Commit 98ac6510 by Mark Mitchell Committed by Mark Mitchell

thumb2.md (thumb2_cbz): Correct computation of length attribute.

	* config/arm/thumb2.md (thumb2_cbz): Correct computation of length
	attribute.
	(thumb2_cbnz): Likewise.

From-SVN: r149501
parent b96c5923
2009-07-10 Mark Mitchell <mark@codesourcery.com>
* config/arm/thumb2.md (thumb2_cbz): Correct computation of length
attribute.
(thumb2_cbnz): Likewise.
2009-07-10 David Daney <ddaney@caviumnetworks.com> 2009-07-10 David Daney <ddaney@caviumnetworks.com>
PR target/39079 PR target/39079
......
...@@ -1325,7 +1325,7 @@ ...@@ -1325,7 +1325,7 @@
(clobber (reg:CC CC_REGNUM))] (clobber (reg:CC CC_REGNUM))]
"TARGET_THUMB2" "TARGET_THUMB2"
"* "*
if (get_attr_length (insn) == 2 && which_alternative == 0) if (get_attr_length (insn) == 2)
return \"cbz\\t%0, %l1\"; return \"cbz\\t%0, %l1\";
else else
return \"cmp\\t%0, #0\;beq\\t%l1\"; return \"cmp\\t%0, #0\;beq\\t%l1\";
...@@ -1333,7 +1333,8 @@ ...@@ -1333,7 +1333,8 @@
[(set (attr "length") [(set (attr "length")
(if_then_else (if_then_else
(and (ge (minus (match_dup 1) (pc)) (const_int 2)) (and (ge (minus (match_dup 1) (pc)) (const_int 2))
(le (minus (match_dup 1) (pc)) (const_int 128))) (le (minus (match_dup 1) (pc)) (const_int 128))
(eq (symbol_ref ("which_alternative")) (const_int 0)))
(const_int 2) (const_int 2)
(const_int 8)))] (const_int 8)))]
) )
...@@ -1347,7 +1348,7 @@ ...@@ -1347,7 +1348,7 @@
(clobber (reg:CC CC_REGNUM))] (clobber (reg:CC CC_REGNUM))]
"TARGET_THUMB2" "TARGET_THUMB2"
"* "*
if (get_attr_length (insn) == 2 && which_alternative == 0) if (get_attr_length (insn) == 2)
return \"cbnz\\t%0, %l1\"; return \"cbnz\\t%0, %l1\";
else else
return \"cmp\\t%0, #0\;bne\\t%l1\"; return \"cmp\\t%0, #0\;bne\\t%l1\";
...@@ -1355,7 +1356,8 @@ ...@@ -1355,7 +1356,8 @@
[(set (attr "length") [(set (attr "length")
(if_then_else (if_then_else
(and (ge (minus (match_dup 1) (pc)) (const_int 2)) (and (ge (minus (match_dup 1) (pc)) (const_int 2))
(le (minus (match_dup 1) (pc)) (const_int 128))) (le (minus (match_dup 1) (pc)) (const_int 128))
(eq (symbol_ref ("which_alternative")) (const_int 0)))
(const_int 2) (const_int 2)
(const_int 8)))] (const_int 8)))]
) )
......
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