Commit 94236928 by Georg-Johann Lay Committed by Georg-Johann Lay

re PR target/52496 (avr-specific built-ins missing memory barrier)

	PR target/52496
	* config/avr/avr.md (unspec): Remove UNSPEC_MEMORY_BARRIER.
	(unspecv): Add UNSPECV_MEMORY_BARRIER.
	(cli_sei): Use unspec_volatile instead of unspec for memory barrier.
	(delay_cycles_1, delay_cycles_2): Ditto.
	(delay_cycles_3, delay_cycles_4): Ditto.
	(nopv, *nopv): Ditto.
	(sleep, *sleep): Ditto.
	(wdr, *wdr): Ditto.

From-SVN: r185692
parent cd32bb90
2012-03-22 Georg-Johann Lay <avr@gjlay.de>
PR target/52496
* config/avr/avr.md (unspec): Remove UNSPEC_MEMORY_BARRIER.
(unspecv): Add UNSPECV_MEMORY_BARRIER.
(cli_sei): Use unspec_volatile instead of unspec for memory barrier.
(delay_cycles_1, delay_cycles_2): Ditto.
(delay_cycles_3, delay_cycles_4): Ditto.
(nopv, *nopv): Ditto.
(sleep, *sleep): Ditto.
(wdr, *wdr): Ditto.
2012-03-22 Richard Guenther <rguenther@suse.de> 2012-03-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/52548 PR tree-optimization/52548
......
...@@ -70,7 +70,6 @@ ...@@ -70,7 +70,6 @@
UNSPEC_COPYSIGN UNSPEC_COPYSIGN
UNSPEC_IDENTITY UNSPEC_IDENTITY
UNSPEC_INSERT_BITS UNSPEC_INSERT_BITS
UNSPEC_MEMORY_BARRIER
]) ])
(define_c_enum "unspecv" (define_c_enum "unspecv"
...@@ -79,6 +78,7 @@ ...@@ -79,6 +78,7 @@
UNSPECV_WRITE_SP UNSPECV_WRITE_SP
UNSPECV_GOTO_RECEIVER UNSPECV_GOTO_RECEIVER
UNSPECV_ENABLE_IRQS UNSPECV_ENABLE_IRQS
UNSPECV_MEMORY_BARRIER
UNSPECV_NOP UNSPECV_NOP
UNSPECV_SLEEP UNSPECV_SLEEP
UNSPECV_WDR UNSPECV_WDR
...@@ -5291,7 +5291,7 @@ ...@@ -5291,7 +5291,7 @@
[(unspec_volatile [(match_operand:QI 0 "const_int_operand" "L,P")] [(unspec_volatile [(match_operand:QI 0 "const_int_operand" "L,P")]
UNSPECV_ENABLE_IRQS) UNSPECV_ENABLE_IRQS)
(set (match_operand:BLK 1 "" "") (set (match_operand:BLK 1 "" "")
(unspec:BLK [(match_dup 1)] UNSPEC_MEMORY_BARRIER))] (unspec_volatile:BLK [(match_dup 1)] UNSPECV_MEMORY_BARRIER))]
"" ""
"@ "@
cli cli
...@@ -5403,7 +5403,7 @@ ...@@ -5403,7 +5403,7 @@
(const_int 1)] (const_int 1)]
UNSPECV_DELAY_CYCLES) UNSPECV_DELAY_CYCLES)
(set (match_operand:BLK 1 "" "") (set (match_operand:BLK 1 "" "")
(unspec:BLK [(match_dup 1)] UNSPEC_MEMORY_BARRIER)) (unspec_volatile:BLK [(match_dup 1)] UNSPECV_MEMORY_BARRIER))
(clobber (match_scratch:QI 2 "=&d"))] (clobber (match_scratch:QI 2 "=&d"))]
"" ""
"ldi %2,lo8(%0) "ldi %2,lo8(%0)
...@@ -5417,7 +5417,7 @@ ...@@ -5417,7 +5417,7 @@
(const_int 2)] (const_int 2)]
UNSPECV_DELAY_CYCLES) UNSPECV_DELAY_CYCLES)
(set (match_operand:BLK 1 "" "") (set (match_operand:BLK 1 "" "")
(unspec:BLK [(match_dup 1)] UNSPEC_MEMORY_BARRIER)) (unspec_volatile:BLK [(match_dup 1)] UNSPECV_MEMORY_BARRIER))
(clobber (match_scratch:HI 2 "=&w"))] (clobber (match_scratch:HI 2 "=&w"))]
"" ""
"ldi %A2,lo8(%0) "ldi %A2,lo8(%0)
...@@ -5432,7 +5432,7 @@ ...@@ -5432,7 +5432,7 @@
(const_int 3)] (const_int 3)]
UNSPECV_DELAY_CYCLES) UNSPECV_DELAY_CYCLES)
(set (match_operand:BLK 1 "" "") (set (match_operand:BLK 1 "" "")
(unspec:BLK [(match_dup 1)] UNSPEC_MEMORY_BARRIER)) (unspec_volatile:BLK [(match_dup 1)] UNSPECV_MEMORY_BARRIER))
(clobber (match_scratch:QI 2 "=&d")) (clobber (match_scratch:QI 2 "=&d"))
(clobber (match_scratch:QI 3 "=&d")) (clobber (match_scratch:QI 3 "=&d"))
(clobber (match_scratch:QI 4 "=&d"))] (clobber (match_scratch:QI 4 "=&d"))]
...@@ -5452,7 +5452,7 @@ ...@@ -5452,7 +5452,7 @@
(const_int 4)] (const_int 4)]
UNSPECV_DELAY_CYCLES) UNSPECV_DELAY_CYCLES)
(set (match_operand:BLK 1 "" "") (set (match_operand:BLK 1 "" "")
(unspec:BLK [(match_dup 1)] UNSPEC_MEMORY_BARRIER)) (unspec_volatile:BLK [(match_dup 1)] UNSPECV_MEMORY_BARRIER))
(clobber (match_scratch:QI 2 "=&d")) (clobber (match_scratch:QI 2 "=&d"))
(clobber (match_scratch:QI 3 "=&d")) (clobber (match_scratch:QI 3 "=&d"))
(clobber (match_scratch:QI 4 "=&d")) (clobber (match_scratch:QI 4 "=&d"))
...@@ -5855,7 +5855,8 @@ ...@@ -5855,7 +5855,8 @@
[(parallel [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "")] [(parallel [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "")]
UNSPECV_NOP) UNSPECV_NOP)
(set (match_dup 1) (set (match_dup 1)
(unspec:BLK [(match_dup 1)] UNSPEC_MEMORY_BARRIER))])] (unspec_volatile:BLK [(match_dup 1)]
UNSPECV_MEMORY_BARRIER))])]
"" ""
{ {
operands[1] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); operands[1] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
...@@ -5866,7 +5867,7 @@ ...@@ -5866,7 +5867,7 @@
[(unspec_volatile [(match_operand:SI 0 "const_int_operand" "P,K")] [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "P,K")]
UNSPECV_NOP) UNSPECV_NOP)
(set (match_operand:BLK 1 "" "") (set (match_operand:BLK 1 "" "")
(unspec:BLK [(match_dup 1)] UNSPEC_MEMORY_BARRIER))] (unspec_volatile:BLK [(match_dup 1)] UNSPECV_MEMORY_BARRIER))]
"" ""
"@ "@
nop nop
...@@ -5878,7 +5879,8 @@ ...@@ -5878,7 +5879,8 @@
(define_expand "sleep" (define_expand "sleep"
[(parallel [(unspec_volatile [(const_int 0)] UNSPECV_SLEEP) [(parallel [(unspec_volatile [(const_int 0)] UNSPECV_SLEEP)
(set (match_dup 0) (set (match_dup 0)
(unspec:BLK [(match_dup 0)] UNSPEC_MEMORY_BARRIER))])] (unspec_volatile:BLK [(match_dup 0)]
UNSPECV_MEMORY_BARRIER))])]
"" ""
{ {
operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
...@@ -5888,7 +5890,7 @@ ...@@ -5888,7 +5890,7 @@
(define_insn "*sleep" (define_insn "*sleep"
[(unspec_volatile [(const_int 0)] UNSPECV_SLEEP) [(unspec_volatile [(const_int 0)] UNSPECV_SLEEP)
(set (match_operand:BLK 0 "" "") (set (match_operand:BLK 0 "" "")
(unspec:BLK [(match_dup 0)] UNSPEC_MEMORY_BARRIER))] (unspec_volatile:BLK [(match_dup 0)] UNSPECV_MEMORY_BARRIER))]
"" ""
"sleep" "sleep"
[(set_attr "length" "1") [(set_attr "length" "1")
...@@ -5898,7 +5900,8 @@ ...@@ -5898,7 +5900,8 @@
(define_expand "wdr" (define_expand "wdr"
[(parallel [(unspec_volatile [(const_int 0)] UNSPECV_WDR) [(parallel [(unspec_volatile [(const_int 0)] UNSPECV_WDR)
(set (match_dup 0) (set (match_dup 0)
(unspec:BLK [(match_dup 0)] UNSPEC_MEMORY_BARRIER))])] (unspec_volatile:BLK [(match_dup 0)]
UNSPECV_MEMORY_BARRIER))])]
"" ""
{ {
operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
...@@ -5908,7 +5911,7 @@ ...@@ -5908,7 +5911,7 @@
(define_insn "*wdr" (define_insn "*wdr"
[(unspec_volatile [(const_int 0)] UNSPECV_WDR) [(unspec_volatile [(const_int 0)] UNSPECV_WDR)
(set (match_operand:BLK 0 "" "") (set (match_operand:BLK 0 "" "")
(unspec:BLK [(match_dup 0)] UNSPEC_MEMORY_BARRIER))] (unspec_volatile:BLK [(match_dup 0)] UNSPECV_MEMORY_BARRIER))]
"" ""
"wdr" "wdr"
[(set_attr "length" "1") [(set_attr "length" "1")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment