Extended-width dalvik bytecodes missing on Jellybean

非 Y 不嫁゛ 提交于 2019-12-23 18:46:17

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/12356902/extended-width-dalvik-bytecodes-missing-on-jellybean

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!