This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/66232] -fPIC -fno-plt -mx32 fails to generate indirect branch via GOT


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66232

--- Comment #4 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Thu May 21 21:58:57 2015
New Revision: 223505

URL: https://gcc.gnu.org/viewcvs?rev=223505&root=gcc&view=rev
Log:
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.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr66232-1.c
    trunk/gcc/testsuite/gcc.target/i386/pr66232-2.c
    trunk/gcc/testsuite/gcc.target/i386/pr66232-3.c
    trunk/gcc/testsuite/gcc.target/i386/pr66232-4.c
    trunk/gcc/testsuite/gcc.target/i386/pr66232-5.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/constraints.md
    trunk/gcc/config/i386/i386.md
    trunk/gcc/config/i386/predicates.md
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]