• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/gcc/5.4.0/875-xtensa-implement-trap-pattern.patch
Max FilippovMax Filippov committed d3f0d52144f14 Nov 2016
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From 2b4b5775554c91a63ccae4ee566db696b633652e Mon Sep 17 00:00:00 2001
2
From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
3
Date: Wed, 10 Jun 2015 15:07:40 +0000
4
Subject: [PATCH] xtensa: implement trap pattern
5
​
6
2015-06-10  Max Filippov  <jcmvbkbc@gmail.com>
7
gcc/
8
    * config/xtensa/xtensa.h (TARGET_DEBUG): New definition.
9
    * config/xtensa/xtensa.md (define_attr "type"): New type "trap".
10
    (define_insn "trap"): New definition.
11
​
12
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
13
​
14
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224330 138bc75d-0d04-0410-961f-82ee72b054a4
15
---
16
 gcc/config/xtensa/xtensa.h  |  1 +
17
 gcc/config/xtensa/xtensa.md | 15 ++++++++++++++-
18
 2 files changed, 15 insertions(+), 1 deletion(-)
19
​
20
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
21
index 615f741..fb8702c 100644
22
--- a/gcc/config/xtensa/xtensa.h
23
+++ b/gcc/config/xtensa/xtensa.h
24
@@ -67,6 +67,7 @@ extern unsigned xtensa_current_frame_size;
25
 #define TARGET_THREADPTR   XCHAL_HAVE_THREADPTR
26
 #define TARGET_LOOPS           XCHAL_HAVE_LOOPS
27
 #define TARGET_WINDOWED_ABI    (XSHAL_ABI == XTHAL_ABI_WINDOWED)
28
+#define TARGET_DEBUG       XCHAL_HAVE_DEBUG
29
 
30
 #define TARGET_DEFAULT \
31
   ((XCHAL_HAVE_L32R    ? 0 : MASK_CONST16) |               \
32
diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
33
index 6d84384..a577aa3 100644
34
--- a/gcc/config/xtensa/xtensa.md
35
+++ b/gcc/config/xtensa/xtensa.md
36
@@ -86,7 +86,7 @@
37
 ;; Attributes.
38
 
39
 (define_attr "type"
40
-  "unknown,jump,call,load,store,move,arith,multi,nop,farith,fmadd,fconv,fload,fstore,mul16,mul32,div32,mac16,rsr,wsr,entry"
41
+  "unknown,jump,call,load,store,move,arith,multi,nop,farith,fmadd,fconv,fload,fstore,mul16,mul32,div32,mac16,rsr,wsr,entry,trap"
42
   (const_string "unknown"))
43
 
44
 (define_attr "mode"
45
@@ -1764,6 +1764,19 @@
46
   [(set_attr "length" "0")
47
    (set_attr "type" "nop")])
48
 
49
+(define_insn "trap"
50
+  [(trap_if (const_int 1) (const_int 0))]
51
+  ""
52
+{
53
+  if (TARGET_DEBUG)
54
+    return "break\t1, 15";
55
+  else
56
+    return (TARGET_DENSITY ? "ill.n" : "ill");
57
+}
58
+  [(set_attr "type"    "trap")
59
+   (set_attr "mode"    "none")
60
+   (set_attr "length"  "3")])
61
+
62
 ;; Setting up a frame pointer is tricky for Xtensa because GCC doesn't
63
 ;; know if a frame pointer is required until the reload pass, and
64
 ;; because there may be an incoming argument value in the hard frame
65
-- 
66
2.1.4
67
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.