On Thu, Apr 21, 2016 at 7:46 PM, H.J. Lu <hongjiu...@intel.com> wrote: > r231923 has > > ;; Test for a valid operand for a call instruction. > ;; Allow constant call address operands in Pmode only. > (define_special_predicate "call_insn_operand" > (ior (match_test "constant_call_address_operand > (op, mode == VOIDmode ? mode : Pmode)") > (match_operand 0 "call_register_no_elim_operand") > - (and (not (match_test "TARGET_X32")) > - (match_operand 0 "memory_operand")))) > + (ior (and (not (match_test "TARGET_X32")) > + (match_operand 0 "sibcall_memory_operand")) > ^^^^^^^^^^^^^^^^^^^^^^^ A typo. > + (and (match_test "TARGET_X32 && Pmode == DImode") > + (match_operand 0 "GOT_memory_operand"))))) > > "sibcall_memory_operand" should be "memory_operand". > > OK for trunk and 6 branch if there is no regression on x86-64?
OK everywhere, but needs RM's approval for branch. Thanks, Uros. > H.J. > --- > gcc/ > > PR target/70750 > * config/i386/predicates.md (call_insn_operand): Replace > sibcall_memory_operand with memory_operand. > > gcc/testsuite/ > > PR target/70750 > * gcc.target/i386/pr70750-1.c: New test. > * gcc.target/i386/pr70750-2.c: Likewise. > --- > gcc/config/i386/predicates.md | 2 +- > gcc/testsuite/gcc.target/i386/pr70750-1.c | 11 +++++++++++ > gcc/testsuite/gcc.target/i386/pr70750-2.c | 11 +++++++++++ > 3 files changed, 23 insertions(+), 1 deletion(-) > create mode 100644 gcc/testsuite/gcc.target/i386/pr70750-1.c > create mode 100644 gcc/testsuite/gcc.target/i386/pr70750-2.c > > diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md > index 14e80d9..93dda7b 100644 > --- a/gcc/config/i386/predicates.md > +++ b/gcc/config/i386/predicates.md > @@ -637,7 +637,7 @@ > (op, mode == VOIDmode ? mode : Pmode)") > (match_operand 0 "call_register_no_elim_operand") > (ior (and (not (match_test "TARGET_X32")) > - (match_operand 0 "sibcall_memory_operand")) > + (match_operand 0 "memory_operand")) > (and (match_test "TARGET_X32 && Pmode == DImode") > (match_operand 0 "GOT_memory_operand"))))) > > diff --git a/gcc/testsuite/gcc.target/i386/pr70750-1.c > b/gcc/testsuite/gcc.target/i386/pr70750-1.c > new file mode 100644 > index 0000000..9fcab17 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/i386/pr70750-1.c > @@ -0,0 +1,11 @@ > +/* { dg-do compile { target *-*-linux* } } */ > +/* { dg-options "-O2" } */ > + > +int > +f (int (**p) (void)) > +{ > + return p[1](); > +} > + > +/* { dg-final { scan-assembler "jmp\[ \t\].*\\(%rdi\\)" { target { lp64 } } > } } */ > +/* { dg-final { scan-assembler "jmp\[ \t\]\\*%rax" { target { x32 } } } } */ > diff --git a/gcc/testsuite/gcc.target/i386/pr70750-2.c > b/gcc/testsuite/gcc.target/i386/pr70750-2.c > new file mode 100644 > index 0000000..afbef37 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/i386/pr70750-2.c > @@ -0,0 +1,11 @@ > +/* { dg-do compile { target *-*-linux* } } */ > +/* { dg-options "-O2" } */ > + > +int > +f (int (**p) (void)) > +{ > + return -p[1](); > +} > + > +/* { dg-final { scan-assembler "call\[ \t\].*\\(%rdi\\)" { target { lp64 } } > } } */ > +/* { dg-final { scan-assembler "call\[ \t\]\\*%rax" { target { x32 } } } } */ > -- > 2.5.5 >