diff options
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/i386.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 5fe9e3f0062..7b3f8887996 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -6016,7 +6016,18 @@ legitimize_pic_address (rtx orig, rtx reg) } else { - if (GET_CODE (addr) == CONST) + if (GET_CODE (addr) == CONST_INT + && !x86_64_immediate_operand (addr, VOIDmode)) + { + if (reg) + { + emit_move_insn (reg, addr); + new = reg; + } + else + new = force_reg (Pmode, addr); + } + else if (GET_CODE (addr) == CONST) { addr = XEXP (addr, 0); |