This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Definig scratch registers
- To: Rotter Klaus <Klaus dot Rotter at erl9 dot siemens dot de>
- Subject: Re: Definig scratch registers
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 06 Sep 1999 15:45:39 -0600
- cc: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Reply-To: law at cygnus dot com
In message <1B6FF887D79FD2119FDB00805FBED48B01C129C1@erlm511a.erl9.siemens.de
>you write:
> 1) Micros uses a Pascal like stack architecture. This means, with GCC the f
> irst function
> parameter lays on top on the stack, whereas Micros expects the _last_ funct
> ion parameter
> on top of stack. Is there a way to change this ?
> (I can get around by using macros, but I want this fixed inside the compile
> r...)
I thought there was an attribute at one time which reversed the ordering of
arguments on the stack for just this purpose. But I can't seem to find it in
the code or documentation.
> 2) Micros uses all registers as scratch registers, which means, it doesn't
> save eax, ebx... before
> using it. Unfortunatly, it seems that GCC thinks some registers (e.g. ebx)
> are left untouched after
> a system call. Is there a way to tell gcc that all registers are scratch af
> ter a call ?
> (I know, I can get around by introducing a kind of "syscall" like linux doe
> s. But for speed reasons,
> we wanted as little overhead as possible.)
See -fcall-used-XX and -fcall-saved-XX in the GCC manual.
jeff