This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug middle-end/55142] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88


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

--- Comment #30 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-09 00:35:28 UTC ---
(In reply to comment #24)
> 
> I think the most robust solution would be to always zero-extend the addresses
> for -mx32, i.e. output
>   movl    %ecx, -1073743664(%eax)
> even if the address is a PLUS in DImode.  Otherwise, we're left with kludges...

Since x32 runs in 64-bit mode, for address -0x40000300(%rax),
hardware sign-extends displacement from 32-bits to 64-bits and
adds it to %rax.  But x32 wants 32-bit -0x40000300, not 64-bit
-0x40000300.  I believe it is correct for GCC to use 32-bit
registers instead of 64-bit registers when displacement is
negative.


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