diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2005-01-03 09:23:58 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2005-01-03 08:23:58 +0000 |
commit | 548a6c4f8885e54246f5c68308e26671fdbf9d42 (patch) | |
tree | c81bd78bce7c6bbc171a922ee31c443d329432e3 /gcc | |
parent | 0703dcebc3427694b04ba19d472fc38ec490657b (diff) | |
download | gcc-548a6c4f8885e54246f5c68308e26671fdbf9d42.zip gcc-548a6c4f8885e54246f5c68308e26671fdbf9d42.tar.gz gcc-548a6c4f8885e54246f5c68308e26671fdbf9d42.tar.bz2 |
sparc.h (SPARC_RELAXED_ORDERING): Define to false.
* config/sparc/sparc.h (SPARC_RELAXED_ORDERING): Define to false.
* config/sparc/linux.h (SPARC_RELAXED_ORDERING): Define to true.
* config/sparc/linux64.h (SPARC_RELAXED_ORDERING): Likewise.
* config/sparc/sparc.c (TARGET_RELAXED_ORDERING): Define to
SPARC_RELAXED_ORDERING.
From-SVN: r92824
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/sparc/linux.h | 6 | ||||
-rw-r--r-- | gcc/config/sparc/linux64.h | 6 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.c | 14 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.h | 10 |
5 files changed, 31 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6999538..ba78b2c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2005-01-03 Eric Botcazou <ebotcazou@libertysurf.fr> + + * config/sparc/sparc.h (SPARC_RELAXED_ORDERING): Define to false. + * config/sparc/linux.h (SPARC_RELAXED_ORDERING): Define to true. + * config/sparc/linux64.h (SPARC_RELAXED_ORDERING): Likewise. + * config/sparc/sparc.c (TARGET_RELAXED_ORDERING): Define to + SPARC_RELAXED_ORDERING. + 2005-01-03 Richard Henderson <rth@redhat.com> Uros Bizjak <uros@kss-loka.si> diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index 2116cb4..ec95ae6 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -234,3 +234,9 @@ do { \ #endif #define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h" + +/* Linux currently uses RMO in uniprocessor mode, which is equivalent to + TMO, and TMO in multiprocessor mode. But they reserve the right to + change their minds. */ +#undef SPARC_RELAXED_ORDERING +#define SPARC_RELAXED_ORDERING true diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index 0b91659..deaea77 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -371,3 +371,9 @@ do { \ #endif #define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h" + +/* Linux currently uses RMO in uniprocessor mode, which is equivalent to + TMO, and TMO in multiprocessor mode. But they reserve the right to + change their minds. */ +#undef SPARC_RELAXED_ORDERING +#define SPARC_RELAXED_ORDERING true diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index c15a406..5415bea 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -498,20 +498,8 @@ enum processor_type sparc_cpu; #define TARGET_ATTRIBUTE_TABLE sparc_attribute_table #endif -/* The SPARC v9 architecture defines a relaxed memory ordering model (RMO) - which requires this if enabled. Prior to v9, there are no instructions - to even talk about memory syncronization. The Ultra3 processor doesn't - implement RMO. - - Solaris never enables RMO; only ever uses total memory ordering (TMO. - - Linux currently uses RMO in uniprocessor mode, which is equivalent to - TMO, and TMO in multiprocessor mode. But they reserve the right to - change their minds. */ -/* ??? Getting the configury correct is harder than it's worth. Just - enable it all the time. */ #undef TARGET_RELAXED_ORDERING -#define TARGET_RELAXED_ORDERING true +#define TARGET_RELAXED_ORDERING SPARC_RELAXED_ORDERING struct gcc_target targetm = TARGET_INITIALIZER; diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 3b6ea6c..673b1da 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -204,6 +204,16 @@ extern enum cmodel sparc_cmodel; #define SPARC_DEFAULT_CMODEL CM_32 +/* The SPARC-V9 architecture defines a relaxed memory ordering model (RMO) + which requires the following macro to be true if enabled. Prior to V9, + there are no instructions to even talk about memory synchronization. + Note that the UltraSPARC III processors don't implement RMO, unlike the + UltraSPARC II processors. + + Default to false; for example, Solaris never enables RMO, only ever uses + total memory ordering (TMO). */ +#define SPARC_RELAXED_ORDERING false + /* This is call-clobbered in the normal ABI, but is reserved in the home grown (aka upward compatible) embedded ABI. */ #define EMBMEDANY_BASE_REG "%g4" |