On Wed, Jul 20, 2011 at 1:09 PM, H.J. Lu <hjl.to...@gmail.com> wrote: > On Wed, Jul 20, 2011 at 10:31 AM, Richard Henderson <r...@redhat.com> wrote: >> On 07/20/2011 10:25 AM, H.J. Lu wrote: >>> I am testing this patch. OK for trunk if it works? >> >> Yep. >> > > It doesn't work. Looking into it. >
We have #define CASE_VECTOR_MODE \ (!TARGET_LP64 || (flag_pic && ix86_cmodel != CM_LARGE_PIC) ? SImode : DImode) There is no difference between LP64 and X32 for PIC. I am testing this patch --- diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 6e1dbb8..09ea1d4 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -10996,9 +10996,6 @@ (use (label_ref (match_operand 1 "" "")))])] "" { - if (TARGET_X32) - operands[0] = convert_memory_address (Pmode, operands[0]); - /* In PIC mode, the table entries are stored GOT (32-bit) or PC (64-bit) relative. Convert the relative address to an absolute address. */ if (flag_pic) @@ -11030,6 +11027,8 @@ operands[0] = expand_simple_binop (Pmode, code, op0, op1, NULL_RTX, 0, OPTAB_DIRECT); } + else if (TARGET_X32) + operands[0] = convert_memory_address (Pmode, operands[0]); }) (define_insn "*tablejump_1" --- Richard, is this OK for trunk with the last patch if they work? Thanks. -- H.J. ----