Commit 67b2c493 by Richard Sandiford Committed by Richard Sandiford

i386.md: Use (match_test ...) for attribute tests.

gcc/
	* config/i386/i386.md: Use (match_test ...) for attribute tests.
	* config/i386/mmx.md: Likewise.
	* config/i386/sse.md: Likewise.
	* config/i386/predicates.md (call_insn_operand): Use
	(not (match_test "...")) instead of (match_test "!...")
	* config/i386/constraints.md (w): Likewise.

From-SVN: r178389
parent 0c0d3957
2011-08-31 Richard Sandiford <rdsandiford@googlemail.com> 2011-08-31 Richard Sandiford <rdsandiford@googlemail.com>
* config/i386/i386.md: Use (match_test ...) for attribute tests.
* config/i386/mmx.md: Likewise.
* config/i386/sse.md: Likewise.
* config/i386/predicates.md (call_insn_operand): Use
(not (match_test "...")) instead of (match_test "!...")
* config/i386/constraints.md (w): Likewise.
2011-08-31 Richard Sandiford <rdsandiford@googlemail.com>
* doc/md.texi: Describe the use of match_tests in attribute tests. * doc/md.texi: Describe the use of match_tests in attribute tests.
* rtl.def (MATCH_TEST): Update commentary. * rtl.def (MATCH_TEST): Update commentary.
* genattrtab.c (attr_copy_rtx, check_attr_test, clear_struct_flag) * genattrtab.c (attr_copy_rtx, check_attr_test, clear_struct_flag)
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
(define_constraint "w" (define_constraint "w"
"@internal Call memory operand." "@internal Call memory operand."
(and (match_test "!TARGET_X32") (and (not (match_test "TARGET_X32"))
(match_operand 0 "memory_operand"))) (match_operand 0 "memory_operand")))
;; Integer constant constraints. ;; Integer constant constraints.
......
...@@ -159,13 +159,13 @@ ...@@ -159,13 +159,13 @@
(if_then_else (if_then_else
(ior (eq_attr "alternative" "4,5") (ior (eq_attr "alternative" "4,5")
(and (eq_attr "alternative" "7") (and (eq_attr "alternative" "7")
(eq (symbol_ref "TARGET_AVX") (const_int 0)))) (not (match_test "TARGET_AVX"))))
(const_string "1") (const_string "1")
(const_string "*"))) (const_string "*")))
(set (attr "prefix_data16") (set (attr "prefix_data16")
(if_then_else (if_then_else
(and (eq_attr "alternative" "8") (and (eq_attr "alternative" "8")
(eq (symbol_ref "TARGET_AVX") (const_int 0))) (not (match_test "TARGET_AVX")))
(const_string "1") (const_string "1")
(const_string "*"))) (const_string "*")))
(set (attr "prefix") (set (attr "prefix")
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
(set (attr "length_vex") (set (attr "length_vex")
(if_then_else (if_then_else
(and (eq_attr "alternative" "12,13") (and (eq_attr "alternative" "12,13")
(ne (symbol_ref "TARGET_AVX") (const_int 0))) (match_test "TARGET_AVX"))
(const_string "4") (const_string "4")
(const_string "*"))) (const_string "*")))
(set (attr "prefix") (set (attr "prefix")
...@@ -1563,7 +1563,8 @@ ...@@ -1563,7 +1563,8 @@
[(set_attr "type" "mmxshft") [(set_attr "type" "mmxshft")
(set (attr "prefix_extra") (set (attr "prefix_extra")
(if_then_else (if_then_else
(eq (symbol_ref "(TARGET_SSE || TARGET_3DNOW_A)") (const_int 0)) (not (ior (match_test "TARGET_SSE")
(match_test "TARGET_3DNOW_A")))
(const_string "1") (const_string "1")
(const_string "*"))) (const_string "*")))
(set_attr "mode" "DI")]) (set_attr "mode" "DI")])
......
...@@ -565,7 +565,7 @@ ...@@ -565,7 +565,7 @@
(define_predicate "call_insn_operand" (define_predicate "call_insn_operand"
(ior (match_operand 0 "constant_call_address_operand") (ior (match_operand 0 "constant_call_address_operand")
(match_operand 0 "call_register_no_elim_operand") (match_operand 0 "call_register_no_elim_operand")
(and (match_test "!TARGET_X32") (and (not (match_test "TARGET_X32"))
(match_operand 0 "memory_operand")))) (match_operand 0 "memory_operand"))))
;; Similarly, but for tail calls, in which we cannot allow memory references. ;; Similarly, but for tail calls, in which we cannot allow memory references.
......
...@@ -397,15 +397,12 @@ ...@@ -397,15 +397,12 @@
[(set_attr "type" "sselog1,ssemov,ssemov") [(set_attr "type" "sselog1,ssemov,ssemov")
(set_attr "prefix" "maybe_vex") (set_attr "prefix" "maybe_vex")
(set (attr "mode") (set (attr "mode")
(cond [(ne (symbol_ref "TARGET_AVX") (const_int 0)) (cond [(match_test "TARGET_AVX")
(const_string "<sseinsnmode>") (const_string "<sseinsnmode>")
(ior (ior (ior (ior (match_test "optimize_function_for_size_p (cfun)")
(ne (symbol_ref "optimize_function_for_size_p (cfun)") (not (match_test "TARGET_SSE2")))
(const_int 0))
(eq (symbol_ref "TARGET_SSE2") (const_int 0)))
(and (eq_attr "alternative" "2") (and (eq_attr "alternative" "2")
(ne (symbol_ref "TARGET_SSE_TYPELESS_STORES") (match_test "TARGET_SSE_TYPELESS_STORES")))
(const_int 0))))
(const_string "V4SF") (const_string "V4SF")
(eq (const_string "<MODE>mode") (const_string "V4SFmode")) (eq (const_string "<MODE>mode") (const_string "V4SFmode"))
(const_string "V4SF") (const_string "V4SF")
...@@ -548,7 +545,7 @@ ...@@ -548,7 +545,7 @@
(set_attr "movu" "1") (set_attr "movu" "1")
(set (attr "prefix_data16") (set (attr "prefix_data16")
(if_then_else (if_then_else
(ne (symbol_ref "TARGET_AVX") (const_int 0)) (match_test "TARGET_AVX")
(const_string "*") (const_string "*")
(const_string "1"))) (const_string "1")))
(set_attr "prefix" "maybe_vex") (set_attr "prefix" "maybe_vex")
...@@ -564,12 +561,12 @@ ...@@ -564,12 +561,12 @@
(set_attr "movu" "1") (set_attr "movu" "1")
(set (attr "prefix_data16") (set (attr "prefix_data16")
(if_then_else (if_then_else
(ne (symbol_ref "TARGET_AVX") (const_int 0)) (match_test "TARGET_AVX")
(const_string "*") (const_string "*")
(const_string "0"))) (const_string "0")))
(set (attr "prefix_rep") (set (attr "prefix_rep")
(if_then_else (if_then_else
(ne (symbol_ref "TARGET_AVX") (const_int 0)) (match_test "TARGET_AVX")
(const_string "*") (const_string "*")
(const_string "1"))) (const_string "1")))
(set_attr "prefix" "maybe_vex") (set_attr "prefix" "maybe_vex")
...@@ -604,7 +601,7 @@ ...@@ -604,7 +601,7 @@
[(set_attr "type" "ssecvt") [(set_attr "type" "ssecvt")
(set (attr "prefix_data16") (set (attr "prefix_data16")
(if_then_else (if_then_else
(ne (symbol_ref "TARGET_AVX") (const_int 0)) (match_test "TARGET_AVX")
(const_string "*") (const_string "*")
(const_string "1"))) (const_string "1")))
(set_attr "prefix" "maybe_vex") (set_attr "prefix" "maybe_vex")
...@@ -2247,7 +2244,7 @@ ...@@ -2247,7 +2244,7 @@
[(set_attr "type" "ssecvt") [(set_attr "type" "ssecvt")
(set (attr "prefix_data16") (set (attr "prefix_data16")
(if_then_else (if_then_else
(ne (symbol_ref "TARGET_AVX") (const_int 0)) (match_test "TARGET_AVX")
(const_string "*") (const_string "*")
(const_string "1"))) (const_string "1")))
(set_attr "prefix" "maybe_vex") (set_attr "prefix" "maybe_vex")
...@@ -2270,12 +2267,12 @@ ...@@ -2270,12 +2267,12 @@
[(set_attr "type" "ssecvt") [(set_attr "type" "ssecvt")
(set (attr "prefix_rep") (set (attr "prefix_rep")
(if_then_else (if_then_else
(ne (symbol_ref "TARGET_AVX") (const_int 0)) (match_test "TARGET_AVX")
(const_string "*") (const_string "*")
(const_string "1"))) (const_string "1")))
(set (attr "prefix_data16") (set (attr "prefix_data16")
(if_then_else (if_then_else
(ne (symbol_ref "TARGET_AVX") (const_int 0)) (match_test "TARGET_AVX")
(const_string "*") (const_string "*")
(const_string "0"))) (const_string "0")))
(set_attr "prefix_data16" "0") (set_attr "prefix_data16" "0")
...@@ -4411,7 +4408,7 @@ ...@@ -4411,7 +4408,7 @@
(set (attr "prefix_data16") (set (attr "prefix_data16")
(if_then_else (if_then_else
(and (eq_attr "alternative" "0") (and (eq_attr "alternative" "0")
(eq (symbol_ref "TARGET_AVX") (const_int 0))) (not (match_test "TARGET_AVX")))
(const_string "1") (const_string "1")
(const_string "*"))) (const_string "*")))
(set_attr "prefix" "maybe_vex,orig,vex,*,*,*") (set_attr "prefix" "maybe_vex,orig,vex,*,*,*")
...@@ -4641,7 +4638,7 @@ ...@@ -4641,7 +4638,7 @@
(set (attr "prefix_data16") (set (attr "prefix_data16")
(if_then_else (if_then_else
(and (eq_attr "alternative" "2,4") (and (eq_attr "alternative" "2,4")
(eq (symbol_ref "TARGET_AVX") (const_int 0))) (not (match_test "TARGET_AVX")))
(const_string "1") (const_string "1")
(const_string "*"))) (const_string "*")))
(set_attr "length_immediate" "*,*,*,*,*,1,*,*,*") (set_attr "length_immediate" "*,*,*,*,*,1,*,*,*")
...@@ -6320,11 +6317,11 @@ ...@@ -6320,11 +6317,11 @@
(const_string "*"))) (const_string "*")))
(set_attr "prefix" "orig,vex") (set_attr "prefix" "orig,vex")
(set (attr "mode") (set (attr "mode")
(cond [(ne (symbol_ref "TARGET_AVX2") (const_int 0)) (cond [(match_test "TARGET_AVX2")
(const_string "OI") (const_string "OI")
(ne (symbol_ref "GET_MODE_SIZE (<MODE>mode) > 128") (const_int 0)) (match_test "GET_MODE_SIZE (<MODE>mode) > 128")
(const_string "V8SF") (const_string "V8SF")
(ne (symbol_ref "TARGET_SSE2") (const_int 0)) (match_test "TARGET_SSE2")
(const_string "TI") (const_string "TI")
] ]
(const_string "V4SF")))]) (const_string "V4SF")))])
...@@ -6396,11 +6393,11 @@ ...@@ -6396,11 +6393,11 @@
(const_string "*"))) (const_string "*")))
(set_attr "prefix" "orig,vex") (set_attr "prefix" "orig,vex")
(set (attr "mode") (set (attr "mode")
(cond [(ne (symbol_ref "TARGET_AVX2") (const_int 0)) (cond [(match_test "TARGET_AVX2")
(const_string "OI") (const_string "OI")
(ne (symbol_ref "GET_MODE_SIZE (<MODE>mode) > 128") (const_int 0)) (match_test "GET_MODE_SIZE (<MODE>mode) > 128")
(const_string "V8SF") (const_string "V8SF")
(ne (symbol_ref "TARGET_SSE2") (const_int 0)) (match_test "TARGET_SSE2")
(const_string "TI") (const_string "TI")
] ]
(const_string "V4SF")))]) (const_string "V4SF")))])
...@@ -6813,19 +6810,19 @@ ...@@ -6813,19 +6810,19 @@
(set_attr "type" "sselog") (set_attr "type" "sselog")
(set (attr "prefix_rex") (set (attr "prefix_rex")
(if_then_else (if_then_else
(and (eq (symbol_ref "TARGET_AVX") (const_int 0)) (and (not (match_test "TARGET_AVX"))
(eq (const_string "<MODE>mode") (const_string "V2DImode"))) (eq (const_string "<MODE>mode") (const_string "V2DImode")))
(const_string "1") (const_string "1")
(const_string "*"))) (const_string "*")))
(set (attr "prefix_data16") (set (attr "prefix_data16")
(if_then_else (if_then_else
(and (eq (symbol_ref "TARGET_AVX") (const_int 0)) (and (not (match_test "TARGET_AVX"))
(eq (const_string "<MODE>mode") (const_string "V8HImode"))) (eq (const_string "<MODE>mode") (const_string "V8HImode")))
(const_string "1") (const_string "1")
(const_string "*"))) (const_string "*")))
(set (attr "prefix_extra") (set (attr "prefix_extra")
(if_then_else (if_then_else
(and (eq (symbol_ref "TARGET_AVX") (const_int 0)) (and (not (match_test "TARGET_AVX"))
(eq (const_string "<MODE>mode") (const_string "V8HImode"))) (eq (const_string "<MODE>mode") (const_string "V8HImode")))
(const_string "*") (const_string "*")
(const_string "1"))) (const_string "1")))
...@@ -7495,7 +7492,7 @@ ...@@ -7495,7 +7492,7 @@
(set (attr "prefix_rex") (set (attr "prefix_rex")
(if_then_else (if_then_else
(and (eq_attr "alternative" "0,3") (and (eq_attr "alternative" "0,3")
(eq (symbol_ref "TARGET_AVX") (const_int 0))) (not (match_test "TARGET_AVX")))
(const_string "1") (const_string "1")
(const_string "*"))) (const_string "*")))
(set_attr "prefix_extra" "1,1,*,*,*,*,*,*,*") (set_attr "prefix_extra" "1,1,*,*,*,*,*,*,*")
...@@ -9709,7 +9706,7 @@ ...@@ -9709,7 +9706,7 @@
[(set_attr "type" "ssecvt") [(set_attr "type" "ssecvt")
(set (attr "prefix_data16") (set (attr "prefix_data16")
(if_then_else (if_then_else
(ne (symbol_ref "TARGET_AVX") (const_int 0)) (match_test "TARGET_AVX")
(const_string "*") (const_string "*")
(const_string "1"))) (const_string "1")))
(set_attr "prefix_extra" "1") (set_attr "prefix_extra" "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