Allow indirect branch via GOT slot for x32
commit38e98f58e7e4763649b6edad7495cbc71cbb874f
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 May 2015 21:58:57 +0000 (21 21:58 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 May 2015 21:58:57 +0000 (21 21:58 +0000)
tree339f22cc373ecb0fcc175e7c6da44a697835e525
parentee8f324bdef2a501438ffa655fdda944b7c07ce3
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223505 138bc75d-0d04-0410-961f-82ee72b054a4
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]