]> gcc.gnu.org Git - gcc.git/commit
i386: Add address spaces for fs/gs segments and tls
authorRichard Henderson <rth@redhat.com>
Mon, 9 Nov 2015 09:20:21 +0000 (01:20 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 9 Nov 2015 09:20:21 +0000 (01:20 -0800)
commit00402c9415a04840f2f1b08b001ff761fd2a40fc
treec3e9b3591e6708bd300d869bbfb7bda737b90b37
parent16734677674ae7f58f4339fa97a91411a347e5db
i386: Add address spaces for fs/gs segments and tls

        * config/i386/i386-c.c (ix86_target_macros): Define __SEG_FS,
        __SEG_GS, __SEG_TLS.
        (ix86_register_pragmas): Register address spaces __seg_fs,
        __seg_gs, __seg_tls.
        * config/i386/i386-protos.h (enum ix86_address_seg): Remove.
        (ADDR_SPACE_SEG_FS, ADDR_SPACE_SEG_GS, ADDR_SPACE_SEG_TLS): New.
        (struct ix86_address): Use addr_space_t instead of ix86_address_seg.
        * config/i386/i386.c (ix86_decompose_address): Likewise.
        (ix86_legitimate_address_p): Likewise.
        (memory_address_length): Likewise.  Check mem address space too.
        (ix86_print_operand): Use ix86_print_operand_address_as.
        (ix86_print_operand_address_as): Rename from
        ix86_print_operand_address, add new addr_space_t parameter.
        Validate that either the parameter or the ix86_address segment
        is default address space.  Handle ADDR_SPACE_SEG_TLS.
        (ix86_print_operand_address): New.
        (ix86_addr_space_subset_p, TARGET_ADDR_SPACE_SUBSET_P): New.
        (ix86_addr_space_convert, TARGET_ADDR_SPACE_CONVERT): New.
        (ix86_addr_space_debug, TARGET_ADDR_SPACE_DEBUG): New.
        (ix86_addr_space_zero_address_valid): New.
        (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): New.
        * config/i386/i386.h (DEFAULT_TLS_SEG_REG): Use addr_space_t constants.
        * config/i386/rdos.h (DEFAULT_TLS_SEG_REG): Likewise.
        * config/i386/predicates.md (address_no_seg_operand): Likewise.
        (vsib_address_operand): Likewise.
        (address_mpx_no_base_operand): Likewise.
        (address_mpx_no_index_operand): Likewise.
        * doc/extend.texi (x86 Named Address Spaces): New section.

        * gcc.target/i386/addr-space-1.c: New test.
        * gcc.target/i386/addr-space-2.c: New test.
        * gcc.target/i386/addr-space-3.c: New test.

From-SVN: r230003
12 files changed:
gcc/ChangeLog
gcc/config/i386/i386-c.c
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/predicates.md
gcc/config/i386/rdos.h
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/addr-space-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/addr-space-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/addr-space-3.c [new file with mode: 0644]
This page took 0.070015 seconds and 5 git commands to generate.