public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [RFA 0/9] Address space support for x86
@ 2015-10-08  5:00 Richard Henderson
  2015-10-08  5:00 ` [PATCH 4/9] i386: Disallow address spaces with string insns Richard Henderson
                   ` (9 more replies)
  0 siblings, 10 replies; 33+ messages in thread
From: Richard Henderson @ 2015-10-08  5:00 UTC (permalink / raw)
  To: gcc-patches

I started with Armin Rigo's patch, from back in July,

  https://gcc.gnu.org/ml/gcc/2015-07/msg00125.html

but then wound up changing all of it.  To wit:

(1) If we use more sensible defaults for address spaces, we no longer
require 8 backend functions and 1 new hook.  Indeed, basic support for
x86 segmentation via address spaces then requires no overriding of any
hooks.

(2) In order to do anything useful with x86 segmentation, we need to
acknowledge that the most common usage puts a valid object at %seg:0.
Which means that we do need a new hook to disable several optimizations.

(3) I found that usage within glibc really requires a more structured
address space, one with a known mapping to the generic address space.
Thus I introduce __seg_tls, which knows that the segment base is also
stored at %seg:0.

(4) I attempted to convert the entire tls implementation to use __seg_tls.
I believe this is ultimately the best long-term solution, but I ran into
a number of problems both generically and in the backend that prevented
this from being simple.  I've dropped these patches for now.

(5) However, in the process of attempting (4), I found two problems in
the backend that could affect any use of address spaces: the movabs
patterns and string expansions.


r~


Richard Henderson (9):
  Change default of non-overlapping address space conversion
  Relax ADDR_SPACE_GENERIC_P checks for default address space hooks
  i386: Handle address spaces in movabs patterns
  i386: Disallow address spaces with string insns
  i386: Add address spaces for fs/gs segments
  i386: Replace ix86_address_seg with addr_space_t
  i386: Add address space for tls
  Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID
  Fix PR 66768

 gcc/config/i386/i386-c.c                     |   8 +
 gcc/config/i386/i386-protos.h                |   8 +-
 gcc/config/i386/i386.c                       | 296 +++++++++++++++++++--------
 gcc/config/i386/i386.h                       |   3 +-
 gcc/config/i386/i386.md                      |  91 +++++---
 gcc/config/i386/predicates.md                |   8 +-
 gcc/config/i386/rdos.h                       |   2 +-
 gcc/doc/tm.texi                              |   5 +
 gcc/doc/tm.texi.in                           |   2 +
 gcc/expr.c                                   |  30 +--
 gcc/fold-const.c                             |   6 +-
 gcc/gimple.c                                 |  12 +-
 gcc/target.def                               |   9 +
 gcc/targhooks.c                              |  48 ++---
 gcc/targhooks.h                              |   1 +
 gcc/testsuite/gcc.target/i386/addr-space-1.c |  11 +
 gcc/tree-ssa-address.c                       |   2 +-
 17 files changed, 385 insertions(+), 157 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/i386/addr-space-1.c

-- 
2.4.3

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2015-10-18 23:20 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-08  5:00 [RFA 0/9] Address space support for x86 Richard Henderson
2015-10-08  5:00 ` [PATCH 4/9] i386: Disallow address spaces with string insns Richard Henderson
2015-10-08  5:00 ` [PATCH 5/9] i386: Add address spaces for fs/gs segments Richard Henderson
2015-10-16 15:29   ` Paolo Bonzini
2015-10-18 23:47     ` Richard Henderson
2015-10-08  5:00 ` [PATCH 9/9] Fix PR 66768 Richard Henderson
2015-10-08  5:17   ` Bin.Cheng
2015-10-08  9:55     ` Bernd Schmidt
2015-10-08 10:12       ` Bin.Cheng
2015-10-08 10:25   ` Richard Biener
2015-10-08  5:00 ` [PATCH 1/9] Change default of non-overlapping address space conversion Richard Henderson
2015-10-09 10:48   ` Bernd Schmidt
2015-10-08  5:00 ` [PATCH 3/9] i386: Handle address spaces in movabs patterns Richard Henderson
2015-10-08  5:00 ` [PATCH 8/9] Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID Richard Henderson
2015-10-08 10:20   ` Richard Biener
2015-10-09 22:13     ` Richard Henderson
2015-10-12 10:10       ` Richard Biener
2015-10-12 23:27         ` Richard Henderson
2015-10-13 10:13           ` Richard Biener
2015-10-13 15:49             ` Jeff Law
2015-10-13 20:59               ` Richard Henderson
2015-10-14  9:19                 ` Richard Biener
2015-10-14  9:22                   ` Richard Biener
2015-10-14 21:20                     ` Richard Henderson
2015-10-14 15:28                   ` Jeff Law
2015-10-14 15:22                 ` Jeff Law
2015-10-08  5:00 ` [PATCH 6/9] i386: Replace ix86_address_seg with addr_space_t Richard Henderson
2015-10-08  5:00 ` [PATCH 7/9] i386: Add address space for tls Richard Henderson
2015-10-08  8:30   ` Florian Weimer
2015-10-08  5:00 ` [PATCH 2/9] Relax ADDR_SPACE_GENERIC_P checks for default address space hooks Richard Henderson
2015-10-08 10:10   ` Richard Biener
2015-10-08 10:07 ` [RFA 0/9] Address space support for x86 Richard Biener
2015-10-09 22:13   ` Richard Henderson

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).