Search code examples
javaassemblyjvminline-assemblyjvm-hotspot

Why does hotspot use different assembly styles in same source code?


For example, hotspot uses at&t and intel style to describe the fence() function.

enter image description here

Since both at&t and intel style assembly have the same underlying machine code, why does hotspot use different styles in the same source code?


Solution

  • HotSpot for Windows is compiled with Microsoft Visual C++ (MSVC).
    HotSpot for Linux is compiled with GCC.

    MSVC and GCC indeed have different syntax for inline assembly.