python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / gcc / 5.4.0 / 880-gcc-nios2-Add-IJMP_REGS-enum.patch
blob7a8c843e55f930418f5aed295b8bc8c62d47e767
1 From 920a898d2a04933c13eb808a513bc5822e91f70a Mon Sep 17 00:00:00 2001
2 From: sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4>
3 Date: Tue, 12 May 2015 15:57:22 +0000
4 Subject: [PATCH] gcc/nios2: Add IJMP_REGS enum
6 2015-05-12 Chung-Lin Tang <cltang@codesourcery.com>
7 Sandra Loosemore <sandra@codesourcery.com>
9 gcc/
10 * config/nios2/nios2.h (enum reg_class): Add IJMP_REGS enum
11 value.
12 (REG_CLASS_NAMES): Add "IJMP_REGS".
13 (REG_CLASS_CONTENTS): Add new entry for IJMP_REGS.
14 * config/nios2/nios2.md (indirect_jump,*tablejump): Adjust to
15 use new "c" register constraint.
16 * config/nios2/constraint.md (c): New register constraint
17 corresponding to IJMP_REGS.
19 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223082 138bc75d-0d04-0410-961f-82ee72b054a4
21 [Romain: rebase on gcc 5.4]
22 Signed-off-by: Romain Naour <romain.naour@gmail.com>
23 ---
24 gcc/config/nios2/constraints.md | 3 +++
25 gcc/config/nios2/nios2.h | 11 +++++++----
26 gcc/config/nios2/nios2.md | 4 ++--
27 3 files changed, 12 insertions(+), 6 deletions(-)
29 diff --git a/gcc/config/nios2/constraints.md b/gcc/config/nios2/constraints.md
30 index f4bd9f7..735f892 100644
31 --- a/gcc/config/nios2/constraints.md
32 +++ b/gcc/config/nios2/constraints.md
33 @@ -39,6 +39,9 @@
35 ;; Register constraints
37 +(define_register_constraint "c" "IJMP_REGS"
38 + "A register suitable for an indirect jump.")
40 (define_register_constraint "j" "SIB_REGS"
41 "A register suitable for an indirect sibcall.")
43 diff --git a/gcc/config/nios2/nios2.h b/gcc/config/nios2/nios2.h
44 index 117983d..7c329ae 100644
45 --- a/gcc/config/nios2/nios2.h
46 +++ b/gcc/config/nios2/nios2.h
47 @@ -173,6 +173,7 @@ enum reg_class
49 NO_REGS,
50 SIB_REGS,
51 + IJMP_REGS,
52 GP_REGS,
53 ALL_REGS,
54 LIM_REG_CLASSES
55 @@ -183,6 +184,7 @@ enum reg_class
56 #define REG_CLASS_NAMES \
57 { "NO_REGS", \
58 "SIB_REGS", \
59 + "IJMP_REGS", \
60 "GP_REGS", \
61 "ALL_REGS" }
63 @@ -190,10 +192,11 @@ enum reg_class
65 #define REG_CLASS_CONTENTS \
66 { \
67 - /* NO_REGS */ { 0, 0}, \
68 - /* SIB_REGS */ { 0xfe0c, 0}, \
69 - /* GP_REGS */ {~0, 0}, \
70 - /* ALL_REGS */ {~0,~0} \
71 + /* NO_REGS */ { 0, 0}, \
72 + /* SIB_REGS */ { 0xfe0c, 0}, \
73 + /* IJMP_REGS */ { 0x7fffffff, 0}, \
74 + /* GP_REGS */ {~0, 0}, \
75 + /* ALL_REGS */ {~0,~0} \
79 diff --git a/gcc/config/nios2/nios2.md b/gcc/config/nios2/nios2.md
80 index 7b35d269..36ef101 100644
81 --- a/gcc/config/nios2/nios2.md
82 +++ b/gcc/config/nios2/nios2.md
83 @@ -697,7 +697,7 @@
84 ; check or adjust for overflow.
86 (define_insn "indirect_jump"
87 - [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
88 + [(set (pc) (match_operand:SI 0 "register_operand" "c"))]
90 "jmp\\t%0"
91 [(set_attr "type" "control")])
92 @@ -811,7 +811,7 @@
94 (define_insn "*tablejump"
95 [(set (pc)
96 - (match_operand:SI 0 "register_operand" "r"))
97 + (match_operand:SI 0 "register_operand" "c"))
98 (use (label_ref (match_operand 1 "" "")))]
100 "jmp\\t%0"
102 2.5.5