aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/ia64/sync.md
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/ia64/sync.md')
-rw-r--r--gcc/config/ia64/sync.md15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/config/ia64/sync.md b/gcc/config/ia64/sync.md
index 69b5d08..0c2ae2e 100644
--- a/gcc/config/ia64/sync.md
+++ b/gcc/config/ia64/sync.md
@@ -27,9 +27,18 @@
(define_code_attr fetchop_name
[(plus "add") (minus "sub") (ior "ior") (xor "xor") (and "and")])
-(define_insn "memory_barrier"
- [(set (mem:BLK (match_scratch:DI 0 "X"))
- (unspec:BLK [(mem:BLK (match_scratch:DI 1 "X"))] UNSPEC_MF))]
+(define_expand "memory_barrier"
+ [(set (match_dup 0)
+ (unspec:BLK [(match_dup 0)] UNSPEC_MF))]
+ ""
+{
+ operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
+ MEM_VOLATILE_P (operands[0]) = 1;
+})
+
+(define_insn "*memory_barrier"
+ [(set (match_operand:BLK 0 "" "")
+ (unspec:BLK [(match_dup 0)] UNSPEC_MF))]
""
"mf"
[(set_attr "itanium_class" "syst_m")])