On Fri, Nov 9, 2012 at 10:17 AM, H.J. Lu <hjl.to...@gmail.com> wrote:
> 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. This patch > uses 32-bit registers instead of 64-bit registers when displacement > < -16*1024*1024. -16*1024*1024 is used instead of 0 so that we will > still generate -16(%rsp) instead of -16(%esp). > > Tested it on Linux/x32. OK to install? This problem uncovers a bug in the middle-end, so I guess it would be better to fix it there. Uros.