Commit 660e6c2c by Thomas Preud'homme Committed by Thomas Preud'homme

Fix ICE on empty FIQ interrupt handler on ARM

2016-11-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config/arm/arm.md (arm_addsi3): Add alternative for addition of
    general register with general register or ARM constant into SP
    register.

    gcc/testsuite/
    * gcc.target/arm/empty_fiq_handler.c: New test.

From-SVN: r242508
parent 5e8d7713
2016-11-16 Thomas Preud'homme <thomas.preudhomme@arm.com>
* config/arm/arm.md (arm_addsi3): Add alternative for addition of
general register with general register or ARM constant into SP
register.
2016-11-16 Jakub Jelinek <jakub@redhat.com> 2016-11-16 Jakub Jelinek <jakub@redhat.com>
PR fortran/78299 PR fortran/78299
...@@ -609,9 +609,9 @@ ...@@ -609,9 +609,9 @@
;; (plus (reg rN) (reg sp)) into (reg rN). In this case reload will ;; (plus (reg rN) (reg sp)) into (reg rN). In this case reload will
;; put the duplicated register first, and not try the commutative version. ;; put the duplicated register first, and not try the commutative version.
(define_insn_and_split "*arm_addsi3" (define_insn_and_split "*arm_addsi3"
[(set (match_operand:SI 0 "s_register_operand" "=rk,l,l ,l ,r ,k ,r,r ,k ,r ,k,k,r ,k ,r") [(set (match_operand:SI 0 "s_register_operand" "=rk,l,l ,l ,r ,k ,r,k ,r ,k ,r ,k,k,r ,k ,r")
(plus:SI (match_operand:SI 1 "s_register_operand" "%0 ,l,0 ,l ,rk,k ,r,rk,k ,rk,k,r,rk,k ,rk") (plus:SI (match_operand:SI 1 "s_register_operand" "%0 ,l,0 ,l ,rk,k ,r,r ,rk,k ,rk,k,r,rk,k ,rk")
(match_operand:SI 2 "reg_or_int_operand" "rk ,l,Py,Pd,rI,rI,k,Pj,Pj,L ,L,L,PJ,PJ,?n")))] (match_operand:SI 2 "reg_or_int_operand" "rk ,l,Py,Pd,rI,rI,k,rI,Pj,Pj,L ,L,L,PJ,PJ,?n")))]
"TARGET_32BIT" "TARGET_32BIT"
"@ "@
add%?\\t%0, %0, %2 add%?\\t%0, %0, %2
...@@ -621,6 +621,7 @@ ...@@ -621,6 +621,7 @@
add%?\\t%0, %1, %2 add%?\\t%0, %1, %2
add%?\\t%0, %1, %2 add%?\\t%0, %1, %2
add%?\\t%0, %2, %1 add%?\\t%0, %2, %1
add%?\\t%0, %1, %2
addw%?\\t%0, %1, %2 addw%?\\t%0, %1, %2
addw%?\\t%0, %1, %2 addw%?\\t%0, %1, %2
sub%?\\t%0, %1, #%n2 sub%?\\t%0, %1, #%n2
...@@ -640,10 +641,10 @@ ...@@ -640,10 +641,10 @@
operands[1], 0); operands[1], 0);
DONE; DONE;
" "
[(set_attr "length" "2,4,4,4,4,4,4,4,4,4,4,4,4,4,16") [(set_attr "length" "2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,16")
(set_attr "predicable" "yes") (set_attr "predicable" "yes")
(set_attr "predicable_short_it" "yes,yes,yes,yes,no,no,no,no,no,no,no,no,no,no,no") (set_attr "predicable_short_it" "yes,yes,yes,yes,no,no,no,no,no,no,no,no,no,no,no,no")
(set_attr "arch" "t2,t2,t2,t2,*,*,*,t2,t2,*,*,a,t2,t2,*") (set_attr "arch" "t2,t2,t2,t2,*,*,*,a,t2,t2,*,*,a,t2,t2,*")
(set (attr "type") (if_then_else (match_operand 2 "const_int_operand" "") (set (attr "type") (if_then_else (match_operand 2 "const_int_operand" "")
(const_string "alu_imm") (const_string "alu_imm")
(const_string "alu_sreg"))) (const_string "alu_sreg")))
......
2016-11-16 Thomas Preud'homme <thomas.preudhomme@arm.com>
* gcc.target/arm/empty_fiq_handler.c: New test.
2016-11-16 Jakub Jelinek <jakub@redhat.com> 2016-11-16 Jakub Jelinek <jakub@redhat.com>
PR fortran/78299 PR fortran/78299
......
/* { dg-do compile } */
/* Below code used to trigger an ICE due to missing constraints for
sp = fp + cst pattern. */
void fiq_handler (void) __attribute__((interrupt ("FIQ")));
void
fiq_handler (void)
{
}
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