summaryrefslogtreecommitdiff
path: root/gcc/config/microblaze
diff options
context:
space:
mode:
authoreager <eager@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-23 14:37:44 +0000
committereager <eager@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-23 14:37:44 +0000
commitdeed735ac84f01f6af38b71e672b18e50a365bc8 (patch)
treedb475878ea46ec3cb642b8594143922b2297b6e9 /gcc/config/microblaze
parente78a493b1cd63afcae3460c50d1023268e427c4a (diff)
downloadgcc-deed735ac84f01f6af38b71e672b18e50a365bc8.tar.gz
2014-01-23 David Holsgrove <david.holsgrove@xilinx.com>
* config/microblaze/microblaze.md: Add trap insn and attribute git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206967 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/microblaze')
-rw-r--r--gcc/config/microblaze/microblaze.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
index 46a7eddd96d..367f2539fc9 100644
--- a/gcc/config/microblaze/microblaze.md
+++ b/gcc/config/microblaze/microblaze.md
@@ -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"