gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

ASM > seeing c code in asm

#177066 - blessingta@hotmail.co.uk - Sun Dec 04, 2011 5:23 pm

how do you make the compiler show you the asm code it generates when it converts the C code ?

#177067 - headspin - Sun Dec 04, 2011 9:44 pm

-save-temps command line option.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#177069 - blessingta@hotmail.co.uk - Mon Dec 05, 2011 12:42 pm

Where can I find the tutorial to the "save temps command line" option?

Is it just a subheading in devkit pro?

#177071 - elhobbs - Mon Dec 05, 2011 5:29 pm

it is a gcc parameter. so you need to modify your makefile - add it to CFLAGS

original
Code:
CFLAGS   :=   -g -Wall -O2\
       -fomit-frame-pointer\
      -ffast-math \
      $(ARCH)


modified
Code:
CFLAGS   :=   -g -Wall -O2 -save-temps\
       -fomit-frame-pointer\
      -ffast-math \
      $(ARCH)

#177084 - blessingta@hotmail.co.uk - Thu Dec 08, 2011 2:28 pm

thanks it worked