Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix mkopcodeh.awk so that it works on a mac. (CVS 4679) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
59d3dfa41f99e99b836649a0870cbfc1 |
User & Date: | drh 2008-01-04 19:12:36.000 |
Context
2008-01-04
| ||
19:33 | Allow the P2 operand to be negative on opcodes that are not jumps. (CVS 4680) (check-in: 717bcd11a2 user: drh tags: trunk) | |
19:12 | Fix mkopcodeh.awk so that it works on a mac. (CVS 4679) (check-in: 59d3dfa41f user: drh tags: trunk) | |
19:10 | Some modifications to insert.c to work without using the stack. (CVS 4678) (check-in: d9ac6beef5 user: danielk1977 tags: trunk) | |
Changes
Changes to mkopcodeh.awk.
︙ | ︙ | |||
62 63 64 65 66 67 68 | if($i=="same" && $(i+1)=="as"){ sym = $(i+2) sub(/,/,"",sym) op[name] = tk[sym] used[op[name]] = 1 sameas[op[name]] = sym } | > | | | | | | | | | | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | if($i=="same" && $(i+1)=="as"){ sym = $(i+2) sub(/,/,"",sym) op[name] = tk[sym] used[op[name]] = 1 sameas[op[name]] = sym } x = $i sub(",","",x) if(x=="no-push"){ nopush[name] = 1 }else if(x=="out1"){ out1[name] = 1 }else if(x=="out2"){ out2[name] = 2 }else if(x=="out3"){ out3[name] = 3 }else if(x=="in1"){ in1[name] = 1 }else if(x=="in2"){ in2[name] = 1 }else if(x=="in3"){ in3[name] = 1 }else if(x=="jump"){ jump[name] = 1 } } } # Assign numbers to all opcodes and output the result. END { |
︙ | ︙ | |||
128 129 130 131 132 133 134 | # bit 4: input on P1 # bit 5: input on P2 # bit 6: input on P3 # bit 7: pushes a result onto stack # for(i=0; i<=max; i++) bv[i] = 0; for(name in op){ | > > | | | | | | | | > | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | # bit 4: input on P1 # bit 5: input on P2 # bit 6: input on P3 # bit 7: pushes a result onto stack # for(i=0; i<=max; i++) bv[i] = 0; for(name in op){ x = op[name] a0 = a1 = a2 = a3 = a4 = a5 = a6 = a7 = 0 if( jump[name] ) a0 = 1; if( out1[name] ) a1 = 2; if( out2[name] ) a2 = 4; if( out3[name] ) a3 = 8; if( in1[name] ) a4 = 16; if( in2[name] ) a5 = 32; if( in3[name] ) a6 = 64; if( nopush[name]==0 ) a7 = 128; bv[x] = a0+a1+a2+a3+a4+a5+a6+a7; } print "\n" print "/* Properties such as \"out2\" or \"jump\" that are specified in" print "** comments following the "case" for each opcode in the vdbe.c" print "** are encoded into bitvectors as follows:" print "*/" print "#define OPFLG_JUMP 0x01 /* jump: P2 holds a jump target */" |
︙ | ︙ |