aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2020-12-05 18:26:25 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2020-12-05 18:26:25 +0000
commit2500add25bd3258a66cc7ae199ab7eae53cc3202 (patch)
treea3d53972f71ebb193ec0347715bcdd125b7f53b5 /gcc
parent47d524a636a00be5a7a2c65b1c7dc5beaa9bc1e7 (diff)
downloadgcc-2500add25bd3258a66cc7ae199ab7eae53cc3202.zip
gcc-2500add25bd3258a66cc7ae199ab7eae53cc3202.tar.gz
gcc-2500add25bd3258a66cc7ae199ab7eae53cc3202.tar.bz2
VAX: Use an int iterator to produce individual interlocked branches
With mode-specific interlocked branch insns already folded into iterated templates now fold the two templates into one too, observing that the only difference between them is the value of the bit branched on, which is of course reflected both in the RTL expression and the instruction produced. Use an int iterator to iterate over the bit value, making use of the newly-added wide integer support, and substituting patterns as necessary to produce equivalent individual insns. No functional change. gcc/ * config/vax/builtins.md (bit): New int iterator. (ccss): New int attribute. (jbbssi<mode>, jbbcci<mode>): Fold insns into... (jbb<ccss>i<mode>): ... this.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/vax/builtins.md29
1 files changed, 7 insertions, 22 deletions
diff --git a/gcc/config/vax/builtins.md b/gcc/config/vax/builtins.md
index 473b44f..8bbcd60 100644
--- a/gcc/config/vax/builtins.md
+++ b/gcc/config/vax/builtins.md
@@ -26,6 +26,9 @@
(define_mode_attr bb_mem [(QI "m") (HI "Q") (SI "Q")])
+(define_int_iterator bit [0 1])
+(define_int_attr ccss [(0 "cc") (1 "ss")])
+
(define_expand "ffssi2"
[(set (match_operand:SI 0 "nonimmediate_operand" "")
(ffs:SI (match_operand:SI 1 "general_operand" "")))]
@@ -75,24 +78,6 @@
DONE;
}")
-(define_insn "jbbssi<mode>"
- [(parallel
- [(set (pc)
- (if_then_else
- (eq (zero_extract:SI
- (match_operand:VAXint 0 "memory_operand" "<bb_mem>")
- (const_int 1)
- (match_operand:SI 1 "general_operand" "nrmT"))
- (const_int 1))
- (label_ref (match_operand 2 "" ""))
- (pc)))
- (set (zero_extract:SI (match_operand:VAXint 3 "memory_operand" "+0")
- (const_int 1)
- (match_dup 1))
- (const_int 1))])]
- ""
- "jbssi %1,%0,%l2")
-
(define_expand "sync_lock_release<mode>"
[(set (match_operand:VAXint 0 "memory_operand" "+m")
(unspec:VAXint [(match_operand:VAXint 1 "const_int_operand" "n")
@@ -113,7 +98,7 @@
DONE;
}")
-(define_insn "jbbcci<mode>"
+(define_insn "jbb<ccss>i<mode>"
[(parallel
[(set (pc)
(if_then_else
@@ -121,12 +106,12 @@
(match_operand:VAXint 0 "memory_operand" "<bb_mem>")
(const_int 1)
(match_operand:SI 1 "general_operand" "nrmT"))
- (const_int 0))
+ (const_int bit))
(label_ref (match_operand 2 "" ""))
(pc)))
(set (zero_extract:SI (match_operand:VAXint 3 "memory_operand" "+0")
(const_int 1)
(match_dup 1))
- (const_int 0))])]
+ (const_int bit))])]
""
- "jbcci %1,%0,%l2")
+ "jb<ccss>i %1,%0,%l2")