summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/0012-Add-XLP-instructions-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/0012-Add-XLP-instructions-support.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/0012-Add-XLP-instructions-support.patch146
1 files changed, 64 insertions, 82 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/0012-Add-XLP-instructions-support.patch b/meta/recipes-devtools/binutils/binutils/0012-Add-XLP-instructions-support.patch
index ecc37ccc01..01492b566a 100644
--- a/meta/recipes-devtools/binutils/binutils/0012-Add-XLP-instructions-support.patch
+++ b/meta/recipes-devtools/binutils/binutils/0012-Add-XLP-instructions-support.patch
@@ -1,7 +1,7 @@
1From 448329ea097447aee73d050045295c5a0ae8519e Mon Sep 17 00:00:00 2001 1From 10e0f42d258164a6a8c0c733518c79e114f5d702 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 2 Mar 2015 01:51:05 +0000 3Date: Fri, 15 Jan 2016 06:37:20 +0000
4Subject: [PATCH 12/13] Add XLP instructions support 4Subject: [PATCH 12/12] Add XLP instructions support
5 5
6From 26adb06ce515aadfec08ce13109b4b98287f677b Mon Sep 17 00:00:00 2001 6From 26adb06ce515aadfec08ce13109b4b98287f677b Mon Sep 17 00:00:00 2001
7From: Nebu Philips <nphilips@netlogicmicro.com> 7From: Nebu Philips <nphilips@netlogicmicro.com>
@@ -10,34 +10,16 @@ Subject: [PATCH] Add support for Netlogic XLP
10 10
11Using the mipsisa64r2nlm target, add support for XLP from 11Using the mipsisa64r2nlm target, add support for XLP from
12Netlogic. Also, update vendor name to NLM wherever applicable. 12Netlogic. Also, update vendor name to NLM wherever applicable.
13---
14 bfd/aoutx.h | 1 +
15 bfd/archures.c | 1 +
16 bfd/bfd-in2.h | 1 +
17 bfd/config.bfd | 5 +++++
18 bfd/cpu-mips.c | 6 ++++--
19 bfd/elfxx-mips.c | 8 ++++++++
20 binutils/readelf.c | 1 +
21 gas/config/tc-mips.c | 4 +++-
22 gas/configure | 3 +++
23 gas/configure.tgt | 2 +-
24 include/elf/mips.h | 1 +
25 include/opcode/mips.h | 10 ++++++++--
26 ld/configure.tgt | 2 ++
27 opcodes/mips-dis.c | 12 +++++-------
28 opcodes/mips-opc.c | 33 +++++++++++++++++++++------------
29 15 files changed, 65 insertions(+), 25 deletions(-)
30 13
31Upstream-Status: Pending 14Use 0x00000080 for INSN_XLP, the value 0x00000040 has already been
15assigned to INSN_OCTEON3
32 16
33Signed-off-by: Khem Raj <raj.khem@gmail.com> 17Signed-off-by: Khem Raj <raj.khem@gmail.com>
34
35Use 0x00000080 for INSN_XLP, the value 0x00000040 has already been assigned
36to INSN_OCTEON3
37
38Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com> 18Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com>
39Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 19Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
40--- 20---
21Upstream-Status: Pending
22
41 bfd/aoutx.h | 1 + 23 bfd/aoutx.h | 1 +
42 bfd/archures.c | 1 + 24 bfd/archures.c | 1 +
43 bfd/bfd-in2.h | 1 + 25 bfd/bfd-in2.h | 1 +
@@ -56,7 +38,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
56 15 files changed, 65 insertions(+), 25 deletions(-) 38 15 files changed, 65 insertions(+), 25 deletions(-)
57 39
58diff --git a/bfd/aoutx.h b/bfd/aoutx.h 40diff --git a/bfd/aoutx.h b/bfd/aoutx.h
59index 9385a98..a88df99 100644 41index f78b910..d0d8dd3 100644
60--- a/bfd/aoutx.h 42--- a/bfd/aoutx.h
61+++ b/bfd/aoutx.h 43+++ b/bfd/aoutx.h
62@@ -802,6 +802,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch, 44@@ -802,6 +802,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
@@ -68,34 +50,34 @@ index 9385a98..a88df99 100644
68 arch_flags = M_MIPS2; 50 arch_flags = M_MIPS2;
69 break; 51 break;
70diff --git a/bfd/archures.c b/bfd/archures.c 52diff --git a/bfd/archures.c b/bfd/archures.c
71index c9fd6c8..547bd09 100644 53index 51068b9..727741f 100644
72--- a/bfd/archures.c 54--- a/bfd/archures.c
73+++ b/bfd/archures.c 55+++ b/bfd/archures.c
74@@ -180,6 +180,7 @@ DESCRIPTION 56@@ -181,6 +181,7 @@ DESCRIPTION
75 .#define bfd_mach_mips_octeonp 6601
76 .#define bfd_mach_mips_octeon2 6502 57 .#define bfd_mach_mips_octeon2 6502
58 .#define bfd_mach_mips_octeon3 6503
77 .#define bfd_mach_mips_xlr 887682 {* decimal 'XLR' *} 59 .#define bfd_mach_mips_xlr 887682 {* decimal 'XLR' *}
78+.#define bfd_mach_mips_xlp 887680 {* decimal 'XLP' *} 60+.#define bfd_mach_mips_xlp 887680 {* decimal 'XLP' *}
79 .#define bfd_mach_mipsisa32 32 61 .#define bfd_mach_mipsisa32 32
80 .#define bfd_mach_mipsisa32r2 33 62 .#define bfd_mach_mipsisa32r2 33
81 .#define bfd_mach_mipsisa32r3 34 63 .#define bfd_mach_mipsisa32r3 34
82diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h 64diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
83index c7a2bb5..413b773 100644 65index 779ffbf..bf5a565 100644
84--- a/bfd/bfd-in2.h 66--- a/bfd/bfd-in2.h
85+++ b/bfd/bfd-in2.h 67+++ b/bfd/bfd-in2.h
86@@ -1967,6 +1967,7 @@ enum bfd_architecture 68@@ -1993,6 +1993,7 @@ enum bfd_architecture
87 #define bfd_mach_mips_octeonp 6601
88 #define bfd_mach_mips_octeon2 6502 69 #define bfd_mach_mips_octeon2 6502
70 #define bfd_mach_mips_octeon3 6503
89 #define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */ 71 #define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */
90+#define bfd_mach_mips_xlp 887680 /* decimal 'XLP' */ 72+#define bfd_mach_mips_xlp 887680 /* decimal 'XLP' */
91 #define bfd_mach_mipsisa32 32 73 #define bfd_mach_mipsisa32 32
92 #define bfd_mach_mipsisa32r2 33 74 #define bfd_mach_mipsisa32r2 33
93 #define bfd_mach_mipsisa32r3 34 75 #define bfd_mach_mipsisa32r3 34
94diff --git a/bfd/config.bfd b/bfd/config.bfd 76diff --git a/bfd/config.bfd b/bfd/config.bfd
95index 03d2c6f..27086db 100644 77index 5c27b49..d553039 100644
96--- a/bfd/config.bfd 78--- a/bfd/config.bfd
97+++ b/bfd/config.bfd 79+++ b/bfd/config.bfd
98@@ -1041,6 +1041,11 @@ case "${targ}" in 80@@ -1066,6 +1066,11 @@ case "${targ}" in
99 targ_defvec=mips_elf32_le_vec 81 targ_defvec=mips_elf32_le_vec
100 targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec" 82 targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
101 ;; 83 ;;
@@ -108,12 +90,12 @@ index 03d2c6f..27086db 100644
108 targ_defvec=mips_elf32_be_vec 90 targ_defvec=mips_elf32_be_vec
109 targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec" 91 targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
110diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c 92diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
111index b617aaa..19a99d1 100644 93index 8a9475d..de7e5a3 100644
112--- a/bfd/cpu-mips.c 94--- a/bfd/cpu-mips.c
113+++ b/bfd/cpu-mips.c 95+++ b/bfd/cpu-mips.c
114@@ -103,7 +103,8 @@ enum 96@@ -104,7 +104,8 @@ enum
115 I_mipsocteonp,
116 I_mipsocteon2, 97 I_mipsocteon2,
98 I_mipsocteon3,
117 I_xlr, 99 I_xlr,
118- I_micromips 100- I_micromips
119+ I_micromips, 101+ I_micromips,
@@ -121,9 +103,9 @@ index b617aaa..19a99d1 100644
121 }; 103 };
122 104
123 #define NN(index) (&arch_info_struct[(index) + 1]) 105 #define NN(index) (&arch_info_struct[(index) + 1])
124@@ -153,7 +154,8 @@ static const bfd_arch_info_type arch_info_struct[] = 106@@ -155,7 +156,8 @@ static const bfd_arch_info_type arch_info_struct[] =
125 N (64, 64, bfd_mach_mips_octeonp,"mips:octeon+", FALSE, NN(I_mipsocteonp)),
126 N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2", FALSE, NN(I_mipsocteon2)), 107 N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2", FALSE, NN(I_mipsocteon2)),
108 N (64, 64, bfd_mach_mips_octeon3, "mips:octeon3", FALSE, NN(I_mipsocteon3)),
127 N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)), 109 N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)),
128- N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0) 110- N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0)
129+ N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,NN(I_micromips)), 111+ N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,NN(I_micromips)),
@@ -132,10 +114,10 @@ index b617aaa..19a99d1 100644
132 114
133 /* The default architecture is mips:3000, but with a machine number of 115 /* The default architecture is mips:3000, but with a machine number of
134diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c 116diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
135index 0df7abf..d268e86 100644 117index 1f2f4a3..700afd3 100644
136--- a/bfd/elfxx-mips.c 118--- a/bfd/elfxx-mips.c
137+++ b/bfd/elfxx-mips.c 119+++ b/bfd/elfxx-mips.c
138@@ -6608,6 +6608,9 @@ _bfd_elf_mips_mach (flagword flags) 120@@ -6605,6 +6605,9 @@ _bfd_elf_mips_mach (flagword flags)
139 case E_MIPS_MACH_XLR: 121 case E_MIPS_MACH_XLR:
140 return bfd_mach_mips_xlr; 122 return bfd_mach_mips_xlr;
141 123
@@ -145,7 +127,7 @@ index 0df7abf..d268e86 100644
145 default: 127 default:
146 switch (flags & EF_MIPS_ARCH) 128 switch (flags & EF_MIPS_ARCH)
147 { 129 {
148@@ -11878,6 +11881,10 @@ mips_set_isa_flags (bfd *abfd) 130@@ -11901,6 +11904,10 @@ mips_set_isa_flags (bfd *abfd)
149 val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2; 131 val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
150 break; 132 break;
151 133
@@ -156,7 +138,7 @@ index 0df7abf..d268e86 100644
156 case bfd_mach_mipsisa32: 138 case bfd_mach_mipsisa32:
157 val = E_MIPS_ARCH_32; 139 val = E_MIPS_ARCH_32;
158 break; 140 break;
159@@ -14765,6 +14772,7 @@ static const struct mips_mach_extension mips_mach_extensions[] = 141@@ -13931,6 +13938,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
160 { bfd_mach_mips_octeonp, bfd_mach_mips_octeon }, 142 { bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
161 { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 }, 143 { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
162 { bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 }, 144 { bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 },
@@ -165,10 +147,10 @@ index 0df7abf..d268e86 100644
165 /* MIPS64 extensions. */ 147 /* MIPS64 extensions. */
166 { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 }, 148 { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
167diff --git a/binutils/readelf.c b/binutils/readelf.c 149diff --git a/binutils/readelf.c b/binutils/readelf.c
168index 0c00b2f..6e9d5e4 100644 150index d5dd46f..66810cc 100644
169--- a/binutils/readelf.c 151--- a/binutils/readelf.c
170+++ b/binutils/readelf.c 152+++ b/binutils/readelf.c
171@@ -2898,6 +2898,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine) 153@@ -3140,6 +3140,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
172 case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break; 154 case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break;
173 case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break; 155 case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
174 case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break; 156 case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break;
@@ -177,10 +159,10 @@ index 0c00b2f..6e9d5e4 100644
177 /* We simply ignore the field in this case to avoid confusion: 159 /* We simply ignore the field in this case to avoid confusion:
178 MIPS ELF does not specify EF_MIPS_MACH, it is a GNU 160 MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
179diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c 161diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
180index c3e3e2a..8d64344 100644 162index a2d45a4..75902c0 100644
181--- a/gas/config/tc-mips.c 163--- a/gas/config/tc-mips.c
182+++ b/gas/config/tc-mips.c 164+++ b/gas/config/tc-mips.c
183@@ -551,6 +551,7 @@ static int mips_32bitmode = 0; 165@@ -552,6 +552,7 @@ static int mips_32bitmode = 0;
184 || mips_opts.arch == CPU_RM7000 \ 166 || mips_opts.arch == CPU_RM7000 \
185 || mips_opts.arch == CPU_VR5500 \ 167 || mips_opts.arch == CPU_VR5500 \
186 || mips_opts.micromips \ 168 || mips_opts.micromips \
@@ -188,7 +170,7 @@ index c3e3e2a..8d64344 100644
188 ) 170 )
189 171
190 /* Whether the processor uses hardware interlocks to protect reads 172 /* Whether the processor uses hardware interlocks to protect reads
191@@ -580,6 +581,7 @@ static int mips_32bitmode = 0; 173@@ -581,6 +582,7 @@ static int mips_32bitmode = 0;
192 && mips_opts.isa != ISA_MIPS3) \ 174 && mips_opts.isa != ISA_MIPS3) \
193 || mips_opts.arch == CPU_R4300 \ 175 || mips_opts.arch == CPU_R4300 \
194 || mips_opts.micromips \ 176 || mips_opts.micromips \
@@ -196,20 +178,20 @@ index c3e3e2a..8d64344 100644
196 ) 178 )
197 179
198 /* Whether the processor uses hardware interlocks to protect reads 180 /* Whether the processor uses hardware interlocks to protect reads
199@@ -18682,7 +18684,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] = 181@@ -18702,7 +18704,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
200 /* Broadcom XLP. 182 /* Broadcom XLP.
201 XLP is mostly like XLR, with the prominent exception that it is 183 XLP is mostly like XLR, with the prominent exception that it is
202 MIPS64R2 rather than MIPS64. */ 184 MIPS64R2 rather than MIPS64. */
203- { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLR }, 185- { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLR },
204+ { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLP }, 186+ { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLP },
205 187
206 /* End marker */ 188 /* i6400. */
207 { NULL, 0, 0, 0, 0 } 189 { "i6400", 0, ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6},
208diff --git a/gas/configure b/gas/configure 190diff --git a/gas/configure b/gas/configure
209index 074886f..8091f2f 100755 191index 1c2a665..c8010a8 100755
210--- a/gas/configure 192--- a/gas/configure
211+++ b/gas/configure 193+++ b/gas/configure
212@@ -12808,6 +12808,9 @@ _ACEOF 194@@ -12826,6 +12826,9 @@ _ACEOF
213 mipsisa64r6 | mipsisa64r6el) 195 mipsisa64r6 | mipsisa64r6el)
214 mips_cpu=mips64r6 196 mips_cpu=mips64r6
215 ;; 197 ;;
@@ -220,10 +202,10 @@ index 074886f..8091f2f 100755
220 mips_cpu=r3900 202 mips_cpu=r3900
221 ;; 203 ;;
222diff --git a/gas/configure.tgt b/gas/configure.tgt 204diff --git a/gas/configure.tgt b/gas/configure.tgt
223index 1d92f55..06e8b4f 100644 205index 086e0d2..2b71270 100644
224--- a/gas/configure.tgt 206--- a/gas/configure.tgt
225+++ b/gas/configure.tgt 207+++ b/gas/configure.tgt
226@@ -332,7 +332,7 @@ case ${generic_target} in 208@@ -339,7 +339,7 @@ case ${generic_target} in
227 mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;; 209 mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;;
228 mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*) 210 mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
229 fmt=elf em=tmips ;; 211 fmt=elf em=tmips ;;
@@ -233,7 +215,7 @@ index 1d92f55..06e8b4f 100644
233 mips-*-openbsd*) fmt=elf em=tmips ;; 215 mips-*-openbsd*) fmt=elf em=tmips ;;
234 216
235diff --git a/include/elf/mips.h b/include/elf/mips.h 217diff --git a/include/elf/mips.h b/include/elf/mips.h
236index 2ed6acd..e541f50 100644 218index 57de3bc..9ba141d 100644
237--- a/include/elf/mips.h 219--- a/include/elf/mips.h
238+++ b/include/elf/mips.h 220+++ b/include/elf/mips.h
239@@ -285,6 +285,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext) 221@@ -285,6 +285,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
@@ -245,10 +227,10 @@ index 2ed6acd..e541f50 100644
245 #define E_MIPS_MACH_OCTEON3 0x008e0000 227 #define E_MIPS_MACH_OCTEON3 0x008e0000
246 #define E_MIPS_MACH_5400 0x00910000 228 #define E_MIPS_MACH_5400 0x00910000
247diff --git a/include/opcode/mips.h b/include/opcode/mips.h 229diff --git a/include/opcode/mips.h b/include/opcode/mips.h
248index ef26167..ef53ec6 100644 230index 9318fcc..9be5645 100644
249--- a/include/opcode/mips.h 231--- a/include/opcode/mips.h
250+++ b/include/opcode/mips.h 232+++ b/include/opcode/mips.h
251@@ -1227,8 +1227,10 @@ static const unsigned int mips_isa_table[] = { 233@@ -1228,8 +1228,10 @@ static const unsigned int mips_isa_table[] = {
252 #define INSN_LOONGSON_2F 0x80000000 234 #define INSN_LOONGSON_2F 0x80000000
253 /* Loongson 3A. */ 235 /* Loongson 3A. */
254 #define INSN_LOONGSON_3A 0x00000400 236 #define INSN_LOONGSON_3A 0x00000400
@@ -261,15 +243,15 @@ index ef26167..ef53ec6 100644
261 243
262 /* DSP ASE */ 244 /* DSP ASE */
263 #define ASE_DSP 0x00000001 245 #define ASE_DSP 0x00000001
264@@ -1324,6 +1326,7 @@ static const unsigned int mips_isa_table[] = { 246@@ -1326,6 +1328,7 @@ static const unsigned int mips_isa_table[] = {
265 #define CPU_OCTEONP 6601
266 #define CPU_OCTEON2 6502 247 #define CPU_OCTEON2 6502
248 #define CPU_OCTEON3 6503
267 #define CPU_XLR 887682 /* decimal 'XLR' */ 249 #define CPU_XLR 887682 /* decimal 'XLR' */
268+#define CPU_XLP 887680 /* decimal 'XLP' */ 250+#define CPU_XLP 887680 /* decimal 'XLP' */
269 251
270 /* Return true if the given CPU is included in INSN_* mask MASK. */ 252 /* Return true if the given CPU is included in INSN_* mask MASK. */
271 253
272@@ -1398,6 +1401,9 @@ cpu_is_member (int cpu, unsigned int mask) 254@@ -1403,6 +1406,9 @@ cpu_is_member (int cpu, unsigned int mask)
273 return ((mask & INSN_ISA_MASK) == INSN_ISA32R6) 255 return ((mask & INSN_ISA_MASK) == INSN_ISA32R6)
274 || ((mask & INSN_ISA_MASK) == INSN_ISA64R6); 256 || ((mask & INSN_ISA_MASK) == INSN_ISA64R6);
275 257
@@ -280,10 +262,10 @@ index ef26167..ef53ec6 100644
280 return FALSE; 262 return FALSE;
281 } 263 }
282diff --git a/ld/configure.tgt b/ld/configure.tgt 264diff --git a/ld/configure.tgt b/ld/configure.tgt
283index 740b2ea..4df13a7 100644 265index b45b1e5..fb2f36a 100644
284--- a/ld/configure.tgt 266--- a/ld/configure.tgt
285+++ b/ld/configure.tgt 267+++ b/ld/configure.tgt
286@@ -462,6 +462,8 @@ mips*el-sde-elf*) targ_emul=elf32ltsmip 268@@ -495,6 +495,8 @@ mips*el-sde-elf*) targ_emul=elf32ltsmip
287 mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*) 269 mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
288 targ_emul=elf32btsmip 270 targ_emul=elf32btsmip
289 targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;; 271 targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
@@ -293,10 +275,10 @@ index 740b2ea..4df13a7 100644
293 targ_extra_emuls="elf32lr5900" 275 targ_extra_emuls="elf32lr5900"
294 targ_extra_libpath=$targ_extra_emuls ;; 276 targ_extra_libpath=$targ_extra_emuls ;;
295diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c 277diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
296index 1eb1d45..d6881af 100644 278index 8200920..40d9fe2 100644
297--- a/opcodes/mips-dis.c 279--- a/opcodes/mips-dis.c
298+++ b/opcodes/mips-dis.c 280+++ b/opcodes/mips-dis.c
299@@ -655,13 +655,11 @@ const struct mips_arch_choice mips_arch_choices[] = 281@@ -648,13 +648,11 @@ const struct mips_arch_choice mips_arch_choices[] =
300 mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr), 282 mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr),
301 mips_cp1_names_mips3264, mips_hwr_names_numeric }, 283 mips_cp1_names_mips3264, mips_hwr_names_numeric },
302 284
@@ -311,25 +293,25 @@ index 1eb1d45..d6881af 100644
311+ ISA_MIPS64R2 | INSN_XLP, 0, 293+ ISA_MIPS64R2 | INSN_XLP, 0,
312+ mips_cp0_names_mips3264r2, 294+ mips_cp0_names_mips3264r2,
313+ mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2), 295+ mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2),
314+ mips_hwr_names_mips3264r2 }, 296+ mips_cp1_names_mips3264, mips_hwr_names_mips3264r2 },
315 297
316 /* This entry, mips16, is here only for ISA/processor selection; do 298 /* This entry, mips16, is here only for ISA/processor selection; do
317 not print its name. */ 299 not print its name. */
318diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c 300diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
319index 2c3bbad..9785a7e 100644 301index 402f887..3764836 100644
320--- a/opcodes/mips-opc.c 302--- a/opcodes/mips-opc.c
321+++ b/opcodes/mips-opc.c 303+++ b/opcodes/mips-opc.c
322@@ -319,7 +319,8 @@ decode_mips_operand (const char *p) 304@@ -320,7 +320,8 @@ decode_mips_operand (const char *p)
323 #define IOCT (INSN_OCTEON | INSN_OCTEONP | INSN_OCTEON2) 305 #define IOCTP (INSN_OCTEONP | INSN_OCTEON2 | INSN_OCTEON3)
324 #define IOCTP (INSN_OCTEONP | INSN_OCTEON2) 306 #define IOCT2 (INSN_OCTEON2 | INSN_OCTEON3)
325 #define IOCT2 INSN_OCTEON2 307 #define IOCT3 INSN_OCTEON3
326-#define XLR INSN_XLR 308-#define XLR INSN_XLR
327+#define XLR INSN_XLR 309+#define XLR INSN_XLR
328+#define XLP INSN_XLP 310+#define XLP INSN_XLP
329 #define IVIRT ASE_VIRT 311 #define IVIRT ASE_VIRT
330 #define IVIRT64 ASE_VIRT64 312 #define IVIRT64 ASE_VIRT64
331 313
332@@ -956,6 +957,7 @@ const struct mips_opcode mips_builtin_opcodes[] = 314@@ -957,6 +958,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
333 {"clo", "U,s", 0x70000021, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 }, 315 {"clo", "U,s", 0x70000021, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 },
334 {"clz", "d,s", 0x00000050, 0xfc1f07ff, WR_1|RD_2, 0, I37, 0, 0 }, 316 {"clz", "d,s", 0x00000050, 0xfc1f07ff, WR_1|RD_2, 0, I37, 0, 0 },
335 {"clz", "U,s", 0x70000020, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 }, 317 {"clz", "U,s", 0x70000020, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 },
@@ -337,7 +319,7 @@ index 2c3bbad..9785a7e 100644
337 /* ctc0 is at the bottom of the table. */ 319 /* ctc0 is at the bottom of the table. */
338 {"ctc1", "t,G", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 }, 320 {"ctc1", "t,G", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 },
339 {"ctc1", "t,S", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 }, 321 {"ctc1", "t,S", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 },
340@@ -988,12 +990,13 @@ const struct mips_opcode mips_builtin_opcodes[] = 322@@ -989,12 +991,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
341 {"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_1|RD_2, 0, I3, 0, 0 }, 323 {"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_1|RD_2, 0, I3, 0, 0 },
342 {"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I3, 0, 0 }, 324 {"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I3, 0, 0 },
343 {"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3, 0, 0 }, 325 {"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3, 0, 0 },
@@ -352,7 +334,7 @@ index 2c3bbad..9785a7e 100644
352 /* dctr and dctw are used on the r5000. */ 334 /* dctr and dctw are used on the r5000. */
353 {"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_2, 0, I3, 0, 0 }, 335 {"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
354 {"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_2, 0, I3, 0, 0 }, 336 {"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
355@@ -1065,6 +1068,7 @@ const struct mips_opcode mips_builtin_opcodes[] = 337@@ -1066,6 +1069,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
356 {"dmfc0", "t,G,H", 0x40200000, 0xffe007f8, WR_1|RD_C0|LC, 0, I64, 0, 0 }, 338 {"dmfc0", "t,G,H", 0x40200000, 0xffe007f8, WR_1|RD_C0|LC, 0, I64, 0, 0 },
357 {"dmfgc0", "t,G", 0x40600100, 0xffe007ff, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 }, 339 {"dmfgc0", "t,G", 0x40600100, 0xffe007ff, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 },
358 {"dmfgc0", "t,G,H", 0x40600100, 0xffe007f8, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 }, 340 {"dmfgc0", "t,G,H", 0x40600100, 0xffe007f8, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 },
@@ -360,7 +342,7 @@ index 2c3bbad..9785a7e 100644
360 {"dmt", "", 0x41600bc1, 0xffffffff, TRAP, 0, 0, MT32, 0 }, 342 {"dmt", "", 0x41600bc1, 0xffffffff, TRAP, 0, 0, MT32, 0 },
361 {"dmt", "t", 0x41600bc1, 0xffe0ffff, WR_1|TRAP, 0, 0, MT32, 0 }, 343 {"dmt", "t", 0x41600bc1, 0xffe0ffff, WR_1|TRAP, 0, 0, MT32, 0 },
362 {"dmtc0", "t,G", 0x40a00000, 0xffe007ff, RD_1|WR_C0|WR_CC|CM, 0, I3, 0, EE }, 344 {"dmtc0", "t,G", 0x40a00000, 0xffe007ff, RD_1|WR_C0|WR_CC|CM, 0, I3, 0, EE },
363@@ -1080,6 +1084,8 @@ const struct mips_opcode mips_builtin_opcodes[] = 345@@ -1081,6 +1085,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
364 /* dmfc3 is at the bottom of the table. */ 346 /* dmfc3 is at the bottom of the table. */
365 /* dmtc3 is at the bottom of the table. */ 347 /* dmtc3 is at the bottom of the table. */
366 {"dmuh", "d,s,t", 0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 }, 348 {"dmuh", "d,s,t", 0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
@@ -369,7 +351,7 @@ index 2c3bbad..9785a7e 100644
369 {"dmul", "d,s,t", 0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 }, 351 {"dmul", "d,s,t", 0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
370 {"dmul", "d,v,t", 0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO, 0, IOCT, 0, 0 }, 352 {"dmul", "d,v,t", 0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO, 0, IOCT, 0, 0 },
371 {"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3, 0, M32|I69 }, 353 {"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3, 0, M32|I69 },
372@@ -1229,9 +1235,9 @@ const struct mips_opcode mips_builtin_opcodes[] = 354@@ -1234,9 +1240,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
373 {"ld", "s,-b(+R)", 0xec180000, 0xfc1c0000, WR_1, RD_pc, I69, 0, 0 }, 355 {"ld", "s,-b(+R)", 0xec180000, 0xfc1c0000, WR_1, RD_pc, I69, 0, 0 },
374 {"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, 0, I1, 0, 0 }, 356 {"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, 0, I1, 0, 0 },
375 {"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_1|RD_3|LM, 0, I3, 0, 0 }, 357 {"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_1|RD_3|LM, 0, I3, 0, 0 },
@@ -382,7 +364,7 @@ index 2c3bbad..9785a7e 100644
382 {"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF }, 364 {"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF },
383 {"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF }, 365 {"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF },
384 {"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2, 0, SF }, 366 {"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2, 0, SF },
385@@ -1396,7 +1402,7 @@ const struct mips_opcode mips_builtin_opcodes[] = 367@@ -1401,7 +1407,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
386 {"mflo", "d,9", 0x00000012, 0xff9f07ff, WR_1|RD_LO, 0, 0, D32, 0 }, 368 {"mflo", "d,9", 0x00000012, 0xff9f07ff, WR_1|RD_LO, 0, 0, D32, 0 },
387 {"mflo1", "d", 0x70000012, 0xffff07ff, WR_1|RD_LO, 0, EE, 0, 0 }, 369 {"mflo1", "d", 0x70000012, 0xffff07ff, WR_1|RD_LO, 0, EE, 0, 0 },
388 {"mflhxu", "d", 0x00000052, 0xffff07ff, WR_1|MOD_HILO, 0, 0, SMT, 0 }, 370 {"mflhxu", "d", 0x00000052, 0xffff07ff, WR_1|MOD_HILO, 0, 0, SMT, 0 },
@@ -391,7 +373,7 @@ index 2c3bbad..9785a7e 100644
391 {"mfsa", "d", 0x00000028, 0xffff07ff, WR_1, 0, EE, 0, 0 }, 373 {"mfsa", "d", 0x00000028, 0xffff07ff, WR_1, 0, EE, 0, 0 },
392 {"min.ob", "X,Y,Q", 0x78000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, SB1, MX, 0 }, 374 {"min.ob", "X,Y,Q", 0x78000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, SB1, MX, 0 },
393 {"min.ob", "D,S,Q", 0x48000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, N54, 0, 0 }, 375 {"min.ob", "D,S,Q", 0x48000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, N54, 0, 0 },
394@@ -1441,10 +1447,13 @@ const struct mips_opcode mips_builtin_opcodes[] = 376@@ -1446,10 +1452,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
395 /* move is at the top of the table. */ 377 /* move is at the top of the table. */
396 {"msgn.qh", "X,Y,Q", 0x78200000, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, 0, MX, 0 }, 378 {"msgn.qh", "X,Y,Q", 0x78200000, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, 0, MX, 0 },
397 {"msgsnd", "t", 0, (int) M_MSGSND, INSN_MACRO, 0, XLR, 0, 0 }, 379 {"msgsnd", "t", 0, (int) M_MSGSND, INSN_MACRO, 0, XLR, 0, 0 },
@@ -407,16 +389,16 @@ index 2c3bbad..9785a7e 100644
407 {"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, WR_1|RD_2|RD_3|RD_4|FP_D, 0, I4_33, 0, I37 }, 389 {"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, WR_1|RD_2|RD_3|RD_4|FP_D, 0, I4_33, 0, I37 },
408 {"msub.d", "D,S,T", 0x46200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2E, 0, 0 }, 390 {"msub.d", "D,S,T", 0x46200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2E, 0, 0 },
409 {"msub.d", "D,S,T", 0x72200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2F, 0, 0 }, 391 {"msub.d", "D,S,T", 0x72200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2F, 0, 0 },
410@@ -1494,7 +1503,7 @@ const struct mips_opcode mips_builtin_opcodes[] = 392@@ -1499,7 +1508,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
411 {"mtlo", "s,7", 0x00000013, 0xfc1fe7ff, RD_1|WR_LO, 0, 0, D32, 0 }, 393 {"mtlo", "s,7", 0x00000013, 0xfc1fe7ff, RD_1|WR_LO, 0, 0, D32, 0 },
412 {"mtlo1", "s", 0x70000013, 0xfc1fffff, RD_1|WR_LO, 0, EE, 0, 0 }, 394 {"mtlo1", "s", 0x70000013, 0xfc1fffff, RD_1|WR_LO, 0, EE, 0, 0 },
413 {"mtlhx", "s", 0x00000053, 0xfc1fffff, RD_1|MOD_HILO, 0, 0, SMT, 0 }, 395 {"mtlhx", "s", 0x00000053, 0xfc1fffff, RD_1|MOD_HILO, 0, 0, SMT, 0 },
414-{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1|RD_2, 0, XLR, 0, 0 }, 396-{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1|RD_2, 0, XLR, 0, 0 },
415+{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1, 0, XLR|XLP, 0, 0 }, 397+{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1, 0, XLR|XLP, 0, 0 },
416 {"mtm0", "s", 0x70000008, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 }, 398 {"mtm0", "s", 0x70000008, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
399 {"mtm0", "s,t", 0x70000008, 0xfc00ffff, RD_1|RD_2, 0, IOCT3, 0, 0 },
417 {"mtm1", "s", 0x7000000c, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 }, 400 {"mtm1", "s", 0x7000000c, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
418 {"mtm2", "s", 0x7000000d, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 }, 401@@ -1936,9 +1945,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
419@@ -1924,9 +1933,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
420 {"suxc1", "S,t(b)", 0x4c00000d, 0xfc0007ff, RD_1|RD_2|RD_3|SM|FP_D, 0, I5_33|N55, 0, I37}, 402 {"suxc1", "S,t(b)", 0x4c00000d, 0xfc0007ff, RD_1|RD_2|RD_3|SM|FP_D, 0, I5_33|N55, 0, I37},
421 {"sw", "t,o(b)", 0xac000000, 0xfc000000, RD_1|RD_3|SM, 0, I1, 0, 0 }, 403 {"sw", "t,o(b)", 0xac000000, 0xfc000000, RD_1|RD_3|SM, 0, I1, 0, 0 },
422 {"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, 0, I1, 0, 0 }, 404 {"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, 0, I1, 0, 0 },
@@ -430,5 +412,5 @@ index 2c3bbad..9785a7e 100644
430 {"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 }, 412 {"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 },
431 {"swc1", "T,o(b)", 0xe4000000, 0xfc000000, RD_1|RD_3|SM|FP_S, 0, I1, 0, 0 }, 413 {"swc1", "T,o(b)", 0xe4000000, 0xfc000000, RD_1|RD_3|SM|FP_S, 0, I1, 0, 0 },
432-- 414--
4332.1.4 4152.7.0
434 416