diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-05-12 20:51:46 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-05-12 20:51:46 +0000 |
commit | ef1021bccb0d87f4fdde4692c6ecc8d5b2099c5e (patch) | |
tree | 680cf7b9f986cebb18cd64c8598d63643f7ecc80 /gcc/config/pa | |
parent | b9fe7b4bf9c31b9cf7bc454228099629313c1bbb (diff) | |
download | gcc-ef1021bccb0d87f4fdde4692c6ecc8d5b2099c5e.tar.gz |
* pa.md (bb patterns): Fix bugs in length computation exposed by
recent branch shortening and genattrtab changes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9665 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/pa')
-rw-r--r-- | gcc/config/pa/pa.md | 64 |
1 files changed, 52 insertions, 12 deletions
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 0643e10c2e4..7587865c0b6 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -1051,19 +1051,39 @@ (const_int 1) (match_operand:SI 1 "uint5_operand" "")) (const_int 0)) - (match_operand 2 "pc_or_label_operand" "") - (match_operand 3 "pc_or_label_operand" "")))] + (label_ref (match_operand 2 "" "")) + (pc)))] "" "* { return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn), - get_attr_length (insn), - (operands[3] != pc_rtx), - insn, 0); + get_attr_length (insn), 0, insn, 0); }" [(set_attr "type" "cbranch") (set (attr "length") - (if_then_else (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8)))) + (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8)))) + (const_int 8188)) + (const_int 4) + (const_int 8)))]) + +(define_insn "" + [(set (pc) + (if_then_else + (ne (zero_extract:SI (match_operand:SI 0 "register_operand" "r") + (const_int 1) + (match_operand:SI 1 "uint5_operand" "")) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" ""))))] + "" + "* +{ + return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn), + get_attr_length (insn), 1, insn, 0); +}" +[(set_attr "type" "cbranch") + (set (attr "length") + (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8)))) (const_int 8188)) (const_int 4) (const_int 8)))]) @@ -1075,19 +1095,39 @@ (const_int 1) (match_operand:SI 1 "uint5_operand" "")) (const_int 0)) - (match_operand 2 "pc_or_label_operand" "") - (match_operand 3 "pc_or_label_operand" "")))] + (label_ref (match_operand 2 "" "")) + (pc)))] "" "* { return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn), - get_attr_length (insn), - (operands[3] != pc_rtx), - insn, 1); + get_attr_length (insn), 0, insn, 1); }" [(set_attr "type" "cbranch") (set (attr "length") - (if_then_else (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8)))) + (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8)))) + (const_int 8188)) + (const_int 4) + (const_int 8)))]) + +(define_insn "" + [(set (pc) + (if_then_else + (eq (zero_extract:SI (match_operand:SI 0 "register_operand" "r") + (const_int 1) + (match_operand:SI 1 "uint5_operand" "")) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" ""))))] + "" + "* +{ + return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn), + get_attr_length (insn), 1, insn, 1); +}" +[(set_attr "type" "cbranch") + (set (attr "length") + (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8)))) (const_int 8188)) (const_int 4) (const_int 8)))]) |