Force compiler to pass arguments by Stack!

Michael Tesch
Wed Feb 28 21:53:00 GMT 2001

is it syscalls or library calls that are causing this problem?

if it's library calls:
first, you should check to see if the target you are
compiling for has a flag that does this.  if it doesn't,
and you're feeling hard-core, you can try to edit the target
description macros in gcc.  this will make the generated
code incompatible with whatever the real ABI (the one that
gcc is configured for) specifies.  and, it may not 
actually work at all, but if you're desperate...

1. find the target description macro .h file in (for example:)
   gcc-2.95.2/gcc/config/<your arch>/<your arch>.h
2. find the line that defines FUNCTION_ARG
3. make it say:  #define FUNCTION_ARG(a,b,c,d) 0
4. recompile gcc & pray

backup plan:  figure out why it doesn't work ;-)

OR, maybe if you're only having this problem when syscalls
return args, find the files that define how a syscall is made,
and fix those instead.
(that depends on your libraries.)

i suspect that neither of these approaches is going to be as 
easy as they sound.


>Content-Type: text/plain;
>	charset="big5"
>Content-Transfer-Encoding: quoted-printable
>   =20
>    Do you know how to force compiler to compile functions that
>    pass and receive arguments in Stack,not in Registers,
>    I've encounter a situation ,a black box kernel put arguments in =
>    and My program is compiled optimized,and receive some arguments
>    from Registers.This cause a error!
>   =20


Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list