Commit f3eeb82c by David Holsgrove Committed by Michael Eager

microblaze.md: Add trap insn and attribute

2014-01-23  David Holsgrove <david.holsgrove@xilinx.com>

	* config/microblaze/microblaze.md: Add trap insn and attribute

From-SVN: r206967
parent 4a7eaf5f
2014-01-23 David Holsgrove <david.holsgrove@xilinx.com>
* config/microblaze/microblaze.md: Add trap insn and attribute
2014-01-23 Dodji Seketeli <dodji@redhat.com>
PR preprocessor/58580
......
......@@ -74,7 +74,7 @@
;; bshift Shift operations
(define_attr "type"
"unknown,branch,jump,call,load,store,move,arith,darith,imul,idiv,icmp,multi,nop,no_delay_arith,no_delay_load,no_delay_store,no_delay_imul,no_delay_move,bshift,fadd,frsub,fmul,fdiv,fcmp,fsl,fsqrt,fcvt"
"unknown,branch,jump,call,load,store,move,arith,darith,imul,idiv,icmp,multi,nop,no_delay_arith,no_delay_load,no_delay_store,no_delay_imul,no_delay_move,bshift,fadd,frsub,fmul,fdiv,fcmp,fsl,fsqrt,fcvt,trap"
(const_string "unknown"))
;; Main data type used by the insn
......@@ -2201,6 +2201,14 @@
(set_attr "mode" "none")
(set_attr "length" "4")])
;; Trap instruction pattern for __builtin_trap. Same as the glibc ABORT_INSTRUCTION
(define_insn "trap"
[(trap_if (const_int 1) (const_int 0))]
""
"brki\tr0,-1"
[(set_attr "type" "trap")]
)
;; The insn to set GOT. The hardcoded number "8" accounts for $pc difference
;; between "mfs" and "addik" instructions.
(define_insn "set_got"
......
2014-01-23 David Holsgrove <david.holsgrove@xilinx.com>
* gcc.target/microblaze/others/builtin-trap.c: New test,
2014-01-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/58809
......
/* { dg-do compile } */
void trap ()
{
__builtin_trap ();
}
/* { dg-final { scan-assembler "brki\tr0,-1" } } */
\ No newline at end of file
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