This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: f77 on sco5 fails on GOTOFF references
re: pushl immediate with computed offset from GOTOFF(%reg)
> > assembler. I've filed a problem report with SCO on it.
>
> It is not an SCO assembler bug. If anything, it is a GAS bug, since
> it should have reported an error. To push the address of a constant
> with -fpic, we must use a lea/pushl combination -- just the pushl is
> not valid.
I had wondered about that, but since I'm far from a studly x86 assembler
programmer, I didn't. I'd just assumed it was a synthetic assembler
operation that didn't trounce %eax as the other approach would have.
> I believe the problem to be between LEGITIMATE_PIC_OPERAND_P and the
> pushl "i" constraint, and the fact that the i386 backend lies to gcc
> about how pic really works. If the later were fixed (big overhaul),
> I'm sure many things would work much better.
So there are actually two problems here that sort of cancle each other
out, right? The first is that GCC is emitting something icky and the
second is that GAS is actually assembling it into something that works.
Cute.
Since both of these are beyond me to fix, I'll back out of this
conversation now.
Thanx for the help.
--
Robert Lipe http://www.dgii.com/people/robertl robertl@dgii.com