This is the mail archive of the gcc@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]

Re: Definig scratch registers


  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



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