From: Richard Henderson <rth@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: richard.guenther@gmail.com
Subject: [PATCH v2 06/13] i386: Replace ix86_address_seg with addr_space_t
Date: Tue, 20 Oct 2015 21:28:00 -0000 [thread overview]
Message-ID: <1445376433-14658-7-git-send-email-rth@redhat.com> (raw)
In-Reply-To: <1445376433-14658-1-git-send-email-rth@redhat.com>
Signed-off-by: Richard Henderson <rth@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
next prev parent reply other threads:[~2015-10-20 21:28 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-20 21:27 [PATCH v2 00/13] Address space support for x86 Richard Henderson
2015-10-20 21:28 ` Richard Henderson [this message]
2015-10-20 21:28 ` [PATCH v2 02/13] Relax ADDR_SPACE_GENERIC_P checks for default address space hooks Richard Henderson
2015-10-21 14:02 ` Jeff Law
2015-10-21 20:50 ` Richard Henderson
2015-10-20 21:28 ` [PATCH v2 01/13] Change default of non-overlapping address space conversion Richard Henderson
2015-10-21 14:03 ` Jeff Law
2015-10-20 21:28 ` [PATCH v2 05/13] i386: Add address spaces for fs/gs segments Richard Henderson
2015-10-20 21:28 ` [PATCH v2 04/13] i386: Disallow address spaces with string insns Richard Henderson
2015-10-20 21:28 ` [PATCH v2 09/13] Fix PR 66768 Richard Henderson
2015-10-21 13:56 ` Jeff Law
2015-10-21 17:55 ` Richard Henderson
2015-10-20 21:28 ` [PATCH v2 10/13] Avoid CSE of MEMs in different address spaces Richard Henderson
2015-10-21 13:49 ` Jeff Law
2015-10-21 17:12 ` Richard Henderson
2015-10-22 7:48 ` Richard Biener
2015-10-20 21:28 ` [PATCH v2 08/13] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID Richard Henderson
2015-10-21 13:59 ` Jeff Law
2015-10-21 20:51 ` Richard Henderson
2015-10-21 21:29 ` Jeff Law
2015-10-22 3:27 ` Sandra Loosemore
2015-10-22 7:59 ` Richard Biener
2015-10-23 17:08 ` Sandra Loosemore
2015-10-22 19:17 ` Richard Henderson
2015-10-20 21:28 ` [PATCH v2 07/13] i386: Add address space for tls Richard Henderson
2015-10-20 21:28 ` [PATCH v2 12/13] Document the x86 address spaces Richard Henderson
2015-10-22 4:59 ` Sandra Loosemore
2015-10-22 20:30 ` Richard Henderson
2015-10-23 17:16 ` Sandra Loosemore
2015-10-20 21:28 ` [PATCH v2 11/13] Test case for conversion from __seg_tls:0 Richard Henderson
2015-11-09 14:46 ` Richard Biener
2015-11-09 17:55 ` Thomas Schwinge
2015-10-20 21:28 ` [PATCH v2 13/13] Add hook for modifying debug info for address spaces Richard Henderson
2015-10-21 13:55 ` Jeff Law
2015-10-21 14:57 ` H.J. Lu
2015-10-21 17:23 ` Richard Henderson
2015-10-21 17:25 ` H.J. Lu
2015-10-21 17:51 ` Richard Henderson
2015-10-21 18:36 ` H.J. Lu
2015-10-21 16:22 ` Ulrich Weigand
2015-10-21 19:13 ` Richard Henderson
2015-10-22 14:19 ` Ulrich Weigand
2015-10-20 21:34 ` [PATCH v2 03/13] i386: Handle address spaces in movabs patterns Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1445376433-14658-7-git-send-email-rth@redhat.com \
--to=rth@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).