DEFAULT_CALLER_SAVES doesn't work on the mac
Ian Lance Taylor
iant@google.com
Tue Dec 22 16:29:00 GMT 2009
"Muhammed Fawzy" <mfawzymkh@hotmail.com> writes:
> I am trying to force GCC to save ALL registers before functions
> calls. I am running GCC 4.0.1 on MAC OS X leopard.
> I am trying to achieve this by defining DEFAULT_CALLER_SAVES as well
> as compiling with -fcaller-saves. however, disassemble of a simple
> helloworld program that calls functions a from main doesn't show any
> difference.
> is there any special thing needed to force gcc to save all registers ?
-fcaller-saves is the default when optimizing.
Try using -fcall-used-REG for all your registers.
Ian
More information about the Gcc-help
mailing list