Mail Archives: djgpp-workers/1998/01/06/18:40:15
Hi Guys -
I can't remember if I ever sent this in or not. Way back when (maybe
a year ago), I figured out that the stack wasn't being aligned before the
call to main. Well it used to be that you had to manually tell
pgcc that you wanted it to keep the stack double word aligned (using
-mstack-align-double) for maximum floating point performance.
Now however, with the egcs 1.0 and pgcc 1.0
release it apparantly defaults to -mstack-align-double, which is
bad news if the stack isn't aligned properly (just performance-wise bad
news). I don't have a patch file handy but it was a 1 line
fix in crt1.c to add a line that said 'andl $0xFFFFFFF8,%%esp' to
properly align stack before calling main. I can't think of any
downside to doing this, other than possibly buring a couple of
bytes of stack space. Let me know if I forgot this originally and
a patch file is needed or if it was not accepted for whatever reason.
Andy
--
_______ ___________________________________________________________
/ Andrew Crabtree
/ Workgroup Networks Division
____ ___ / Hewlett-Packard
/ / / / Roseville, CA
__/ __/ _____/ 916/785-1675
/ andrewc AT rosemail DOT rose DOT hp DOT com
___________ __/ _____________________________________________________
- Raw text -