http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49798

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-21 14:02:54 
UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> 
> > > Linker should put correct address (so, zero extended 32bit address) here.
> > 
> > Did you mean assembler? In many cases, .quad is still simply wrong (PR 
> > 47446).
> 
> No, the linker. But looking at mentioned PR, linker is not able to generate
> BFD_RELOC_64.

That is correct. We shouldn't have BFD_RELOC_64 in 32bit.

> > GCC shouldn't generate .quad in this case.  A patch is posted at
> > 
> > http://gcc.gnu.org/ml/gcc-patches/2011-07/msg01711.html
> 
> IMO, this patch is wrong. Generated code should look like the one for i686, so
> it looks to me that check for Pmode != ptr_mode is missing somewhere in the
> middle end.

That is not necessarily true if Pmode is used here.
In this regard, x32 is the same as x86-64.  Basically
a 64bit value is generated from an address. If address
is 32bit, we just need to zero-extend it.

Reply via email to