This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-fstack-check on MIPS


Hi All,
I compile with -fstack-check and check the disassembly file.
gcc generates a `sw zero,-4392(sp)' instruction before every function call.
I think -4392(sp) is used as a guard to check if the stack has been overflow
during the function is executed. What I does not understand is there is not
a call to ___chkstk on return of the function call. If I miss the chance to
check the guard word, when the stack check action should be executed? And how
the check action is invoked?

BTW, I wonder how gcc decides the offset is -4392? Can I change the value by
some option?

-------------
Best Regards,
PRC
Jul 2, 2008


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]