[Bug target/27234] no way to stop gcc from mucking with the stack

2006-04-22 Thread pinskia at gcc dot gnu dot org
--- Comment #5 from pinskia at gcc dot gnu dot org 2006-04-22 20:24 --- Use -fno-sibcalling if you cannot use this optimization because you are violating the ABI really and since GCC depends on the ABI being followed, there is almost nothing GCC can do. If the kernel wants to do tricks

[Bug target/27234] no way to stop gcc from mucking with the stack

2006-04-20 Thread acahalan at gmail dot com
--- Comment #4 from acahalan at gmail dot com 2006-04-21 03:41 --- Mostly, sibcalling does not happen. So in the common case, setting up the normal ABI-specified stack would be a waste. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27234

[Bug target/27234] no way to stop gcc from mucking with the stack

2006-04-20 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-04-21 03:19 --- Did you know sibcalling reduces the stack usage in fact it is kinda stupid to have a function call overhead to create a stack? Therefor the asm should instead create the stack. -- http://gcc.gnu.org/bugzilla/sh

[Bug target/27234] no way to stop gcc from mucking with the stack

2006-04-20 Thread acahalan at gmail dot com
--- Comment #2 from acahalan at gmail dot com 2006-04-21 03:16 --- #define asmlinkage __attribute__((regparm(0))) #define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret)) As I recall, the kernel expects the stack to remain untouched so that it can restore that portion of the