Search code examples
haskellassemblyghc

How to generate Intel assembler syntax from ghc of haskell?


I know there is a -S flag in ghc in haskell, and it generates a .s file which is an assembling file.

I am wondering whether GHC is possible to generate the assembler file with Intel syntax?


Solution

  • If it's based on GCC, it might support the -masm=intel flag. See How do you use gcc to generate assembly code in Intel syntax?

    A less nice option is to use objdump on the compiled file:

    objdump -d --disassembler-options=intel file.o