diff options
Diffstat (limited to 'opcode-gen')
-rw-r--r-- | opcode-gen/bytecode.txt | 76 | ||||
-rw-r--r-- | opcode-gen/opcode-gen.awk | 12 |
2 files changed, 8 insertions, 80 deletions
diff --git a/opcode-gen/bytecode.txt b/opcode-gen/bytecode.txt index 89b8c8305..6b7b9b183 100644 --- a/opcode-gen/bytecode.txt +++ b/opcode-gen/bytecode.txt @@ -32,13 +32,13 @@ format 10t 20t 30t format 10x format 11n 21s 21h 31i 51l format 11x -format 12x 22x 23x 32x 33x # See note, above. -format 21c 31c 41c +format 12x 22x 23x 32x # See note, above. +format 21c 31c format 21t 31t -format 22b 22s 32s -format 22c 52c +format 22b 22s +format 22c format 22t -format 35c 3rc 5rc +format 35c 3rc # Optimized formats format 00x @@ -48,7 +48,6 @@ format 35mi format 35ms format 3rmi format 3rms -format 40sc # One line per opcode. Columns are: # hex for opcode @@ -344,67 +343,4 @@ op fc +iput-object-volatile 22c n field-ref optimized|continue|thro op fd +sget-object-volatile 21c y field-ref optimized|continue|throw op fe +sput-object-volatile 21c n field-ref optimized|continue|throw -# -# Extended-width opcodes -# - -op 00ff const-class/jumbo 41c y type-ref continue|throw -op 01ff check-cast/jumbo 41c n type-ref continue|throw -op 02ff instance-of/jumbo 52c y type-ref continue|throw -op 03ff new-instance/jumbo 41c y type-ref continue|throw -op 04ff new-array/jumbo 52c y type-ref continue|throw -op 05ff filled-new-array/jumbo 5rc n type-ref continue|throw -op 06ff iget/jumbo 52c y field-ref continue|throw -op 07ff iget-wide/jumbo 52c y field-ref continue|throw -op 08ff iget-object/jumbo 52c y field-ref continue|throw -op 09ff iget-boolean/jumbo 52c y field-ref continue|throw -op 0aff iget-byte/jumbo 52c y field-ref continue|throw -op 0bff iget-char/jumbo 52c y field-ref continue|throw -op 0cff iget-short/jumbo 52c y field-ref continue|throw -op 0dff iput/jumbo 52c n field-ref continue|throw -op 0eff iput-wide/jumbo 52c n field-ref continue|throw -op 0fff iput-object/jumbo 52c n field-ref continue|throw -op 10ff iput-boolean/jumbo 52c n field-ref continue|throw -op 11ff iput-byte/jumbo 52c n field-ref continue|throw -op 12ff iput-char/jumbo 52c n field-ref continue|throw -op 13ff iput-short/jumbo 52c n field-ref continue|throw -op 14ff sget/jumbo 41c y field-ref continue|throw -op 15ff sget-wide/jumbo 41c y field-ref continue|throw -op 16ff sget-object/jumbo 41c y field-ref continue|throw -op 17ff sget-boolean/jumbo 41c y field-ref continue|throw -op 18ff sget-byte/jumbo 41c y field-ref continue|throw -op 19ff sget-char/jumbo 41c y field-ref continue|throw -op 1aff sget-short/jumbo 41c y field-ref continue|throw -op 1bff sput/jumbo 41c n field-ref continue|throw -op 1cff sput-wide/jumbo 41c n field-ref continue|throw -op 1dff sput-object/jumbo 41c n field-ref continue|throw -op 1eff sput-boolean/jumbo 41c n field-ref continue|throw -op 1fff sput-byte/jumbo 41c n field-ref continue|throw -op 20ff sput-char/jumbo 41c n field-ref continue|throw -op 21ff sput-short/jumbo 41c n field-ref continue|throw -op 22ff invoke-virtual/jumbo 5rc n method-ref continue|throw|invoke -op 23ff invoke-super/jumbo 5rc n method-ref continue|throw|invoke -op 24ff invoke-direct/jumbo 5rc n method-ref continue|throw|invoke -op 25ff invoke-static/jumbo 5rc n method-ref continue|throw|invoke -op 26ff invoke-interface/jumbo 5rc n method-ref continue|throw|invoke - -# unused: op 27ff..f1ff - -# -# Optimized opcodes (not valid in an unoptimized dex file) -# - -op f2ff +invoke-object-init/jumbo 5rc n method-ref optimized|continue|throw|invoke -op f3ff +iget-volatile/jumbo 52c y field-ref optimized|continue|throw -op f4ff +iget-wide-volatile/jumbo 52c y field-ref optimized|continue|throw -op f5ff +iget-object-volatile/jumbo 52c y field-ref optimized|continue|throw -op f6ff +iput-volatile/jumbo 52c n field-ref optimized|continue|throw -op f7ff +iput-wide-volatile/jumbo 52c n field-ref optimized|continue|throw -op f8ff +iput-object-volatile/jumbo 52c n field-ref optimized|continue|throw -op f9ff +sget-volatile/jumbo 41c y field-ref optimized|continue|throw -op faff +sget-wide-volatile/jumbo 41c y field-ref optimized|continue|throw -op fbff +sget-object-volatile/jumbo 41c y field-ref optimized|continue|throw -op fcff +sput-volatile/jumbo 41c n field-ref optimized|continue|throw -op fdff +sput-wide-volatile/jumbo 41c n field-ref optimized|continue|throw -op feff +sput-object-volatile/jumbo 41c n field-ref optimized|continue|throw -op ffff ^throw-verification-error/jumbo 40sc n varies optimized|throw +# unused: op ff diff --git a/opcode-gen/opcode-gen.awk b/opcode-gen/opcode-gen.awk index 0e0ff6cab..e26a60c71 100644 --- a/opcode-gen/opcode-gen.awk +++ b/opcode-gen/opcode-gen.awk @@ -23,6 +23,7 @@ BEGIN { MAX_OPCODE = 65535; MAX_PACKED_OPCODE = 511; + MAX_PACKED_OPCODE = 255; # TODO: Not for long! initIndexTypes(); initFlags(); if (readBytecodes()) exit 1; @@ -401,16 +402,7 @@ function createPackedTables(i, op) { # locals: i, op for (i = 0; i <= MAX_PACKED_OPCODE; i++) { op = unpackOpcode(i); - if (i == 255) { - # Special case: This is the low-opcode slot for a would-be - # extended opcode dispatch implementation. - packedName[i] = "dispatch-ff"; - packedConstName[i] = "DISPATCH_FF"; - packedFormat[i] = "00x"; - packedFlags[i] = 0; - packedWidth[i] = 0; - packedIndexType[i] = "unknown"; - } else if (isUnused(op)) { + if (isUnused(op)) { packedName[i] = unusedName(op); packedConstName[i] = unusedConstName(op); packedFormat[i] = "00x"; |