Allow indirect branch via GOT slot for x32
authorH.J. Lu <hongjiu.lu@intel.com>
Thu, 21 May 2015 21:58:57 +0000 (21:58 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Thu, 21 May 2015 21:58:57 +0000 (14:58 -0700)
commitf70d27e03b2fd9557fcd184f52ee9c82128cc647
tree339f22cc373ecb0fcc175e7c6da44a697835e525
parent9ab2fcc16d674a876364159f5daa2258b42e6bb0
Allow indirect branch via GOT slot for x32

X32 doesn't support indirect branch via 32-bit memory slot since
indirect branch will load 64-bit address from 64-bit memory slot.
Since x32 GOT slot is 64-bit, we should allow indirect branch via GOT
slot for x32.

gcc/

PR target/66232
* config/i386/constraints.md (Bg): New constraint for GOT memory
operand.
* config/i386/i386.md (*call_got_x32): New pattern.
(*call_value_got_x32): Likewise.
* config/i386/predicates.md (GOT_memory_operand): New predicate.

gcc/testsuite/

PR target/66232
* gcc.target/i386/pr66232-1.c: New test.
* gcc.target/i386/pr66232-2.c: Likewise.
* gcc.target/i386/pr66232-3.c: Likewise.
* gcc.target/i386/pr66232-4.c: Likewise.
* gcc.target/i386/pr66232-5.c: Likewise.

From-SVN: r223505
gcc/ChangeLog
gcc/config/i386/constraints.md
gcc/config/i386/i386.md
gcc/config/i386/predicates.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr66232-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr66232-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr66232-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr66232-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr66232-5.c [new file with mode: 0644]