3

When ICS came out, there were several new extended-width bytecodes introduced. Most of these were for instructions to support jumbo ids. Here are some of these new instructions, taken from my ics/dalvik/opcode-gen/bytecode.txt:

#
# 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
...

However, on the JB code, I can't find any reference to these new bytecodes. In my jellybean version of bytecodes.txt, the last opcode ends in 0xfe:

op   fc +iput-object-volatile       22c  n field-ref     optimized|continue|throw
op   fd +sget-object-volatile       21c  y field-ref     optimized|continue|throw
op   fe +sput-object-volatile       21c  n field-ref     optimized|continue|throw

# unused: op ff

Are these new instructions not supported on JellyBean?

Also, I can't even seem to find the original dalvik bytecode documentation in jellybean. This is the dir listing of my dalvik/docs folder:

$ ls -a dalvik/docs | cat
.
..
dalvik-constraints.css
dalvik-constraints.html
debugger.html
debugmon.html
dexopt.html
embedded-vm-control.html
heap-profiling.html
hello-world.html
java-bytecode.css
java-bytecode.html
java-constraints.css
java-constraints.html
porting-guide.html
porting-proto.c.txt
prettify.css
prettify.js
verifier.html

Or, maybe, I just downloaded from the wrong branch? I'm using the jb-4.1.1_r4 branch.

hopia
  • 4,880
  • 7
  • 32
  • 54
  • Support was shipped in ICS (4.0), but removed from a subsequent release: https://android.googlesource.com/platform/dalvik/+/ab35b50311951feea3782151dd5422ee944685c2 – fadden Oct 27 '14 at 15:58

1 Answers1

8

I implemented the dx side of these new instructions before leaving Google, but the runtime side of them had yet to be done. I guess nobody ever finished the work, but left the spec docs alone.

danfuzz
  • 4,253
  • 24
  • 34
  • Thanks for the response. I can see in libdex/InstrUtils.cpp for ICS that these jumbo instructions are implemented. However, in JB, they are not... Do you think I can assume in both cases, apps with jumbo-sized components are still not yet supported? – hopia Sep 11 '12 at 05:08
  • Yeah, that's a safe assumption. – danfuzz Sep 11 '12 at 12:06