"Muhammed Fawzy" <mfawzymkh@xxxxxxxxxxx> 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