On Sat, Jul 9, 2011 at 3:46 PM, Richard Henderson <r...@redhat.com> wrote: > On 07/09/2011 02:41 PM, H.J. Lu wrote: >> Hi, >> >> X32 uses movl instead of movabs for trampoline. OK for trunk? >> >> Thanks. >> >> H.J. >> --- >> 2011-07-09 H.J. Lu <hongjiu...@intel.com> >> >> * config/i386/i386.c (ix86_trampoline_init): Use movl instead >> of movabs for x32. >> >> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c >> index 04cb07d..c852719 100644 >> --- a/gcc/config/i386/i386.c >> +++ b/gcc/config/i386/i386.c >> @@ -22721,13 +23030,14 @@ ix86_trampoline_init (rtx m_tramp, tree fndecl, >> rtx chain_value) >> } >> else >> { >> - int offset = 0; >> + int offset = 0, size; >> >> /* Load the function address to r11. Try to load address using >> the shorter movl instead of movabs. We may want to support >> movq for kernel mode, but kernel does not use trampolines at >> the moment. */ >> - if (x86_64_zext_immediate_operand (fnaddr, VOIDmode)) >> + if (TARGET_X32 >> + || x86_64_zext_immediate_operand (fnaddr, VOIDmode)) > > Is this change actually necessary? I would think that the > predicate has already been adjusted... >
Since we always use short version for x32, there is no need to call. x86_64_zext_immediate_operand. -- H.J.