Bug report
A lot of the modifications revision 19380 are wrong and will give errors at certain optimization levels with certain code.
In the thumb2.md file are all the functions handling the short thumb2 (thumb inherited) instructions like:
ADDS r6,r6,#34 = 2 bytes length
However:
ADD r6,r6,#34 = thumb2 instruction, hence 4 bytes long.
As you can seen in the arm.md here below, is this instruction tagged as 2 bytes long in the arm.md file.
The result is "branch out of range" errors from the assembler.
I saw that a lot of this is changed that way (MUL,SUB etc) which are all needed to be handled by the thumb2.md (as in the mainline)
I suggest to revert that whole revision 193980 (I personally have moved to the mainline with all the embedded related stuff patched into it).
Regards
;; The r/r/k alternative is required when reloading the address
;; (plus (reg rN) (reg sp)) into (reg rN). In this case reload will
;; put the duplicated register first, and not try the commutative version.
(define_
[(set (match_operand:SI 0 "s_register_
(plus:SI (match_operand:SI 1 "s_register_
(match_
"TARGET_32BIT"
"@
add%?\\t%0, %1, %2
add%?\\t%0, %1, %2
add%?\\t%0, %1, %2
add%?\\t%0, %2, %1
addw%?\\t%0, %1, %2
addw%?\\t%0, %1, %2
sub%?\\t%0, %1, #%n2
sub%?\\t%0, %1, #%n2
sub%?\\t%0, %1, #%n2
subw%?\\t%0, %1, #%n2
subw%?\\t%0, %1, #%n2
#"
"TARGET_32BIT
&& GET_CODE (operands[2]) == CONST_INT
&& !const_ok_for_op (INTVAL (operands[2]), PLUS)
&& (reload_completed || !arm_eliminable
[(clobber (const_int 0))]
"
arm_split_
DONE;
"
[(set_attr "length" "2,4,4,
(set_attr "predicable" "yes")
(set_attr "arch" "t2,*,*
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- emblocks
- Solved:
- Last query:
- Last reply: