Signed-off-by: Richard Henderson <r...@redhat.com> --- gcc/config/i386/i386-protos.h | 3 +-- gcc/config/i386/i386.c | 12 ++++++------ gcc/config/i386/i386.h | 3 ++- gcc/config/i386/predicates.md | 8 ++++---- gcc/config/i386/rdos.h | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index f942ef5..4e6d9ad 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -279,12 +279,11 @@ extern rtx maybe_get_pool_constant (rtx); extern char internal_label_prefix[16]; extern int internal_label_prefix_len; -enum ix86_address_seg { SEG_DEFAULT, SEG_FS, SEG_GS }; struct ix86_address { rtx base, index, disp; HOST_WIDE_INT scale; - enum ix86_address_seg seg; + addr_space_t seg; }; extern int ix86_decompose_address (rtx, struct ix86_address *); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 5f2fc04..7647090 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -13984,7 +13984,7 @@ ix86_decompose_address (rtx addr, struct ix86_address *out) rtx scale_rtx = NULL_RTX; rtx tmp; int retval = 1; - enum ix86_address_seg seg = SEG_DEFAULT; + addr_space_t seg = ADDR_SPACE_GENERIC; /* Allow zero-extended SImode addresses, they will be emitted with addr32 prefix. */ @@ -14083,7 +14083,7 @@ ix86_decompose_address (rtx addr, struct ix86_address *out) case UNSPEC: if (XINT (op, 1) == UNSPEC_TP && TARGET_TLS_DIRECT_SEG_REFS - && seg == SEG_DEFAULT) + && seg == ADDR_SPACE_GENERIC) seg = DEFAULT_TLS_SEG_REG; else return 0; @@ -14671,7 +14671,7 @@ ix86_legitimate_address_p (machine_mode, rtx addr, bool strict) struct ix86_address parts; rtx base, index, disp; HOST_WIDE_INT scale; - enum ix86_address_seg seg; + addr_space_t seg; if (ix86_decompose_address (addr, &parts) <= 0) /* Decomposition failed. */ @@ -14717,7 +14717,7 @@ ix86_legitimate_address_p (machine_mode, rtx addr, bool strict) return false; /* Address override works only on the (%reg) part of %fs:(%reg). */ - if (seg != SEG_DEFAULT + if (seg != ADDR_SPACE_GENERIC && ((base && GET_MODE (base) != word_mode) || (index && GET_MODE (index) != word_mode))) return false; @@ -17359,7 +17359,7 @@ ix86_print_operand_address_as (FILE *file, rtx addr, addr_space_t as) if (CONST_INT_P (disp)) { - if (ASSEMBLER_DIALECT == ASM_INTEL && parts.seg == SEG_DEFAULT) + if (ASSEMBLER_DIALECT == ASM_INTEL && parts.seg == ADDR_SPACE_GENERIC) fputs ("ds:", file); fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (disp)); } @@ -27112,7 +27112,7 @@ memory_address_length (rtx addr, bool lea) ok = ix86_decompose_address (addr, &parts); gcc_assert (ok); - len = (parts.seg == SEG_DEFAULT) ? 0 : 1; + len = (parts.seg == ADDR_SPACE_GENERIC) ? 0 : 1; /* If this is not LEA instruction, add the length of addr32 prefix. */ if (TARGET_64BIT && !lea diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index be96c75..3d5b2b2 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -602,7 +602,8 @@ extern tree x86_mfence; #define DEFAULT_ABI SYSV_ABI /* The default TLS segment register used by target. */ -#define DEFAULT_TLS_SEG_REG (TARGET_64BIT ? SEG_FS : SEG_GS) +#define DEFAULT_TLS_SEG_REG \ + (TARGET_64BIT ? ADDR_SPACE_SEG_FS : ADDR_SPACE_SEG_GS) /* Subtargets may reset this to 1 in order to enable 96-bit long double with the rounding mode forced to 53 bits. */ diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 042b949..7b2584c 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -969,7 +969,7 @@ ok = ix86_decompose_address (op, &parts); gcc_assert (ok); - return parts.seg == SEG_DEFAULT; + return parts.seg == ADDR_SPACE_GENERIC; }) ;; Return true if op if a valid base register, displacement or @@ -983,7 +983,7 @@ ok = ix86_decompose_address (op, &parts); gcc_assert (ok); - if (parts.index || parts.seg != SEG_DEFAULT) + if (parts.index || parts.seg != ADDR_SPACE_GENERIC) return false; /* VSIB addressing doesn't support (%rip). */ @@ -1027,7 +1027,7 @@ if (parts.index && parts.base) return false; - if (parts.seg != SEG_DEFAULT) + if (parts.seg != ADDR_SPACE_GENERIC) return false; /* Do not support (%rip). */ @@ -1059,7 +1059,7 @@ if (parts.index) return false; - if (parts.seg != SEG_DEFAULT) + if (parts.seg != ADDR_SPACE_GENERIC) return false; /* Do not support (%rip). */ diff --git a/gcc/config/i386/rdos.h b/gcc/config/i386/rdos.h index f9bfe6d..ccf6b78 100644 --- a/gcc/config/i386/rdos.h +++ b/gcc/config/i386/rdos.h @@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see #define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS #undef DEFAULT_TLS_SEG_REG -#define DEFAULT_TLS_SEG_REG SEG_GS +#define DEFAULT_TLS_SEG_REG ADDR_SPACE_SEG_GS #undef TARGET_RDOS #define TARGET_RDOS 1 -- 2.4.3