一尘不染

Hotspot7 hsdis PrintAssembly英特尔语法

java

每次-XX:+PrintAssembly与Hotspot一起使用时,都不得不烦恼我,不得不阅读可怕的AT&T语法。

有没有办法告诉它使用英特尔语法?


阅读 191

收藏
2020-12-03

共1个答案

一尘不染

您所需要做的就是将一些选项解析到dis-asm.h和binutils代码上

对于Intel Asm(我也更喜欢),只需添加以下内容

-XX:PrintAssemblyOptions=intel

如果您需要组合选项,请像这样用逗号分隔

-XX:PrintAssemblyOptions=intel,hsdis-help

任何未被识别为hsdis选项的内容都将被提供给反汇编程序,这些选项与您从中看到的选项相同

objdump --help

... <SNIP A lot of --help text %<> ...
The following i386/x86-64 specific disassembler options are supported for use
with the -M switch (multiple options should be separated by commas):
  x86-64      Disassemble in 64bit mode
  i386        Disassemble in 32bit mode
  i8086       Disassemble in 16bit mode
  att         Display instruction in AT&T syntax
  intel       Display instruction in Intel syntax
  att-mnemonic
              Display instruction in AT&T mnemonic
  intel-mnemonic
              Display instruction in Intel mnemonic
  addr64      Assume 64bit address size
  addr32      Assume 32bit address size
  addr16      Assume 16bit address size
  data32      Assume 32bit data size
  data16      Assume 16bit data size
  suffix      Always display instruction suffix in AT&T syntax
Report bugs to <http://www.sourceware.org/bugzilla/>.
2020-12-03