@@ -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 *);
@@ -13951,7 +13951,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. */
@@ -14050,7 +14050,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;
@@ -14638,7 +14638,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. */
@@ -14684,7 +14684,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;
@@ -17326,7 +17326,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));
}
@@ -27073,7 +27073,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
@@ -598,7 +598,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. */
@@ -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). */
@@ -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