This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Stack offset on m88k-psos
- To: egcs at egcs dot cygnus dot com
- Subject: Stack offset on m88k-psos
- From: Brian Ford <ford at vss dot fsi dot com>
- Date: Mon, 5 Apr 1999 10:06:15 -0500
We are having some difficulties using egcs 1.1.2 as an upgrade to our old
gcc 2.6.3 compiler. We use egcs configured as m88k-motorola-sysv4 to
target both that configuration and psos running on an auxilary processor
in that configuration. Our problem stems from the assumption that the
stack is always 16 byte aligned in this configuration as psos does not
assure this allignment.
Here are snippets of the assembly generated by the two compilers.
gcc version 2.6.3:
text
align 8
_max_ige_period:
subu r31,r31,48
addu r2,r31,40 # correct computation of stack offset
st r1,r31,36
bsr.n _vi_ige_max_periods
egcs 1.1.2:
text
align 8
_max_ige_period:
subu r31,r31,48
st r29,r31,32
addu r29,r31,32
st r1,r31,36
or r2,r29,8 # only works on 16 byte aligned stack
bsr.n _vi_ige_max_periods
Does anyone know a good way around this problem and is the alignment
assumption a good and valid one. What do we save by using the or instead
of the add?
I would appreciate any suggestions that you might have.
--
Brian Ford
Software Engineer
Vital Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax: 314-551-8444