diff options
author | David Daney <ddaney@avtrex.com> | 2007-09-10 18:23:27 +0000 |
---|---|---|
committer | David Daney <daney@gcc.gnu.org> | 2007-09-10 18:23:27 +0000 |
commit | bfd9cff5c5bbcbea235e60529138848df5222b0c (patch) | |
tree | aa9bd4528106fdec43ae74963367caa9e03fe91d | |
parent | 04910611bd80c3cf5b96405c58942b6f80f96fc3 (diff) | |
download | gcc-bfd9cff5c5bbcbea235e60529138848df5222b0c.zip gcc-bfd9cff5c5bbcbea235e60529138848df5222b0c.tar.gz gcc-bfd9cff5c5bbcbea235e60529138848df5222b0c.tar.bz2 |
mips.md (UNSPEC_MEMORY_BARRIER): New entry in define_constants.
* config/mips/mips.md (UNSPEC_MEMORY_BARRIER): New entry in
define_constants.
(memory_barrier): Rewrote as an insn that clobbers memory.
From-SVN: r128349
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/mips/mips.md | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b5a55a3..9360ae0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-09-10 David Daney <ddaney@avtrex.com> + + * config/mips/mips.md (UNSPEC_MEMORY_BARRIER): New entry in + define_constants. + (memory_barrier): Rewrote as an insn that clobbers memory. + 2007-09-10 Richard Sandiford <richard@codesourcery.com> * config/mips/mips.c (mips_global_pointer): Check diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 76dde25..42f9b1e 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -57,6 +57,7 @@ (UNSPEC_SYNC_OLD_OP 38) (UNSPEC_SYNC_NEW_OP 39) (UNSPEC_SYNC_EXCHANGE 40) + (UNSPEC_MEMORY_BARRIER 41) (UNSPEC_ADDRESS_FIRST 100) @@ -4304,10 +4305,11 @@ ;; Atomic memory operations. -(define_expand "memory_barrier" - [(unspec_volatile [(const_int 0)] UNSPEC_SYNC)] +(define_insn "memory_barrier" + [(set (mem:BLK (scratch)) + (unspec:BLK [(const_int 0)] UNSPEC_MEMORY_BARRIER))] "ISA_HAS_SYNC" - "") + "sync") (define_insn "sync_compare_and_swap<mode>" [(set (match_operand:GPR 0 "register_operand" "=&d,d") |