30 #include "libiberty.h"
40 #if !defined(EMBEDDED_ENV)
41 #define SYMTAB_AVAILABLE 1
61 16, 17, 2, 3, 4, 5, 6, 7
64 #define mips16_reg_names(rn) mips_gpr_names[mips16_to_32_reg_map[rn]]
69 "$0",
"$1",
"$2",
"$3",
"$4",
"$5",
"$6",
"$7",
70 "$8",
"$9",
"$10",
"$11",
"$12",
"$13",
"$14",
"$15",
71 "$16",
"$17",
"$18",
"$19",
"$20",
"$21",
"$22",
"$23",
72 "$24",
"$25",
"$26",
"$27",
"$28",
"$29",
"$30",
"$31"
77 "zero",
"at",
"v0",
"v1",
"a0",
"a1",
"a2",
"a3",
78 "t0",
"t1",
"t2",
"t3",
"t4",
"t5",
"t6",
"t7",
79 "s0",
"s1",
"s2",
"s3",
"s4",
"s5",
"s6",
"s7",
80 "t8",
"t9",
"k0",
"k1",
"gp",
"sp",
"s8",
"ra"
85 "zero",
"at",
"v0",
"v1",
"a0",
"a1",
"a2",
"a3",
86 "a4",
"a5",
"a6",
"a7",
"t0",
"t1",
"t2",
"t3",
87 "s0",
"s1",
"s2",
"s3",
"s4",
"s5",
"s6",
"s7",
88 "t8",
"t9",
"k0",
"k1",
"gp",
"sp",
"s8",
"ra"
93 "$f0",
"$f1",
"$f2",
"$f3",
"$f4",
"$f5",
"$f6",
"$f7",
94 "$f8",
"$f9",
"$f10",
"$f11",
"$f12",
"$f13",
"$f14",
"$f15",
95 "$f16",
"$f17",
"$f18",
"$f19",
"$f20",
"$f21",
"$f22",
"$f23",
96 "$f24",
"$f25",
"$f26",
"$f27",
"$f28",
"$f29",
"$f30",
"$f31"
101 "fv0",
"fv0f",
"fv1",
"fv1f",
"ft0",
"ft0f",
"ft1",
"ft1f",
102 "ft2",
"ft2f",
"ft3",
"ft3f",
"fa0",
"fa0f",
"fa1",
"fa1f",
103 "ft4",
"ft4f",
"ft5",
"ft5f",
"fs0",
"fs0f",
"fs1",
"fs1f",
104 "fs2",
"fs2f",
"fs3",
"fs3f",
"fs4",
"fs4f",
"fs5",
"fs5f"
109 "fv0",
"ft14",
"fv1",
"ft15",
"ft0",
"ft1",
"ft2",
"ft3",
110 "ft4",
"ft5",
"ft6",
"ft7",
"fa0",
"fa1",
"fa2",
"fa3",
111 "fa4",
"fa5",
"fa6",
"fa7",
"fs0",
"ft8",
"fs1",
"ft9",
112 "fs2",
"ft10",
"fs3",
"ft11",
"fs4",
"ft12",
"fs5",
"ft13"
117 "fv0",
"ft12",
"fv1",
"ft13",
"ft0",
"ft1",
"ft2",
"ft3",
118 "ft4",
"ft5",
"ft6",
"ft7",
"fa0",
"fa1",
"fa2",
"fa3",
119 "fa4",
"fa5",
"fa6",
"fa7",
"ft8",
"ft9",
"ft10",
"ft11",
120 "fs0",
"fs1",
"fs2",
"fs3",
"fs4",
"fs5",
"fs6",
"fs7"
125 "$0",
"$1",
"$2",
"$3",
"$4",
"$5",
"$6",
"$7",
126 "$8",
"$9",
"$10",
"$11",
"$12",
"$13",
"$14",
"$15",
127 "$16",
"$17",
"$18",
"$19",
"$20",
"$21",
"$22",
"$23",
128 "$24",
"$25",
"$26",
"$27",
"$28",
"$29",
"$30",
"$31"
133 "c0_index",
"c0_random",
"c0_entrylo0",
"c0_entrylo1",
134 "c0_context",
"c0_pagemask",
"c0_wired",
"$7",
135 "c0_badvaddr",
"c0_count",
"c0_entryhi",
"c0_compare",
136 "c0_status",
"c0_cause",
"c0_epc",
"c0_prid",
137 "c0_config",
"c0_lladdr",
"c0_watchlo",
"c0_watchhi",
138 "c0_xcontext",
"$21",
"$22",
"c0_debug",
139 "c0_depc",
"c0_perfcnt",
"c0_errctl",
"c0_cacheerr",
140 "c0_taglo",
"c0_taghi",
"c0_errorepc",
"c0_desave",
145 { 16, 1,
"c0_config1" },
146 { 16, 2,
"c0_config2" },
147 { 16, 3,
"c0_config3" },
148 { 18, 1,
"c0_watchlo,1" },
149 { 18, 2,
"c0_watchlo,2" },
150 { 18, 3,
"c0_watchlo,3" },
151 { 18, 4,
"c0_watchlo,4" },
152 { 18, 5,
"c0_watchlo,5" },
153 { 18, 6,
"c0_watchlo,6" },
154 { 18, 7,
"c0_watchlo,7" },
155 { 19, 1,
"c0_watchhi,1" },
156 { 19, 2,
"c0_watchhi,2" },
157 { 19, 3,
"c0_watchhi,3" },
158 { 19, 4,
"c0_watchhi,4" },
159 { 19, 5,
"c0_watchhi,5" },
160 { 19, 6,
"c0_watchhi,6" },
161 { 19, 7,
"c0_watchhi,7" },
162 { 25, 1,
"c0_perfcnt,1" },
163 { 25, 2,
"c0_perfcnt,2" },
164 { 25, 3,
"c0_perfcnt,3" },
165 { 25, 4,
"c0_perfcnt,4" },
166 { 25, 5,
"c0_perfcnt,5" },
167 { 25, 6,
"c0_perfcnt,6" },
168 { 25, 7,
"c0_perfcnt,7" },
169 { 27, 1,
"c0_cacheerr,1" },
170 { 27, 2,
"c0_cacheerr,2" },
171 { 27, 3,
"c0_cacheerr,3" },
172 { 28, 1,
"c0_datalo" },
173 { 29, 1,
"c0_datahi" }
178 "c0_index",
"c0_random",
"c0_entrylo0",
"c0_entrylo1",
179 "c0_context",
"c0_pagemask",
"c0_wired",
"c0_hwrena",
180 "c0_badvaddr",
"c0_count",
"c0_entryhi",
"c0_compare",
181 "c0_status",
"c0_cause",
"c0_epc",
"c0_prid",
182 "c0_config",
"c0_lladdr",
"c0_watchlo",
"c0_watchhi",
183 "c0_xcontext",
"$21",
"$22",
"c0_debug",
184 "c0_depc",
"c0_perfcnt",
"c0_errctl",
"c0_cacheerr",
185 "c0_taglo",
"c0_taghi",
"c0_errorepc",
"c0_desave",
190 { 4, 1,
"c0_contextconfig" },
191 { 0, 1,
"c0_mvpcontrol" },
192 { 0, 2,
"c0_mvpconf0" },
193 { 0, 3,
"c0_mvpconf1" },
194 { 1, 1,
"c0_vpecontrol" },
195 { 1, 2,
"c0_vpeconf0" },
196 { 1, 3,
"c0_vpeconf1" },
197 { 1, 4,
"c0_yqmask" },
198 { 1, 5,
"c0_vpeschedule" },
199 { 1, 6,
"c0_vpeschefback" },
200 { 2, 1,
"c0_tcstatus" },
201 { 2, 2,
"c0_tcbind" },
202 { 2, 3,
"c0_tcrestart" },
203 { 2, 4,
"c0_tchalt" },
204 { 2, 5,
"c0_tccontext" },
205 { 2, 6,
"c0_tcschedule" },
206 { 2, 7,
"c0_tcschefback" },
207 { 5, 1,
"c0_pagegrain" },
208 { 6, 1,
"c0_srsconf0" },
209 { 6, 2,
"c0_srsconf1" },
210 { 6, 3,
"c0_srsconf2" },
211 { 6, 4,
"c0_srsconf3" },
212 { 6, 5,
"c0_srsconf4" },
213 { 12, 1,
"c0_intctl" },
214 { 12, 2,
"c0_srsctl" },
215 { 12, 3,
"c0_srsmap" },
216 { 15, 1,
"c0_ebase" },
217 { 16, 1,
"c0_config1" },
218 { 16, 2,
"c0_config2" },
219 { 16, 3,
"c0_config3" },
220 { 18, 1,
"c0_watchlo,1" },
221 { 18, 2,
"c0_watchlo,2" },
222 { 18, 3,
"c0_watchlo,3" },
223 { 18, 4,
"c0_watchlo,4" },
224 { 18, 5,
"c0_watchlo,5" },
225 { 18, 6,
"c0_watchlo,6" },
226 { 18, 7,
"c0_watchlo,7" },
227 { 19, 1,
"c0_watchhi,1" },
228 { 19, 2,
"c0_watchhi,2" },
229 { 19, 3,
"c0_watchhi,3" },
230 { 19, 4,
"c0_watchhi,4" },
231 { 19, 5,
"c0_watchhi,5" },
232 { 19, 6,
"c0_watchhi,6" },
233 { 19, 7,
"c0_watchhi,7" },
234 { 23, 1,
"c0_tracecontrol" },
235 { 23, 2,
"c0_tracecontrol2" },
236 { 23, 3,
"c0_usertracedata" },
237 { 23, 4,
"c0_tracebpc" },
238 { 25, 1,
"c0_perfcnt,1" },
239 { 25, 2,
"c0_perfcnt,2" },
240 { 25, 3,
"c0_perfcnt,3" },
241 { 25, 4,
"c0_perfcnt,4" },
242 { 25, 5,
"c0_perfcnt,5" },
243 { 25, 6,
"c0_perfcnt,6" },
244 { 25, 7,
"c0_perfcnt,7" },
245 { 27, 1,
"c0_cacheerr,1" },
246 { 27, 2,
"c0_cacheerr,2" },
247 { 27, 3,
"c0_cacheerr,3" },
248 { 28, 1,
"c0_datalo" },
249 { 28, 2,
"c0_taglo1" },
250 { 28, 3,
"c0_datalo1" },
251 { 28, 4,
"c0_taglo2" },
252 { 28, 5,
"c0_datalo2" },
253 { 28, 6,
"c0_taglo3" },
254 { 28, 7,
"c0_datalo3" },
255 { 29, 1,
"c0_datahi" },
256 { 29, 2,
"c0_taghi1" },
257 { 29, 3,
"c0_datahi1" },
258 { 29, 4,
"c0_taghi2" },
259 { 29, 5,
"c0_datahi2" },
260 { 29, 6,
"c0_taghi3" },
261 { 29, 7,
"c0_datahi3" },
267 "c0_index",
"c0_random",
"c0_entrylo0",
"c0_entrylo1",
268 "c0_context",
"c0_pagemask",
"c0_wired",
"$7",
269 "c0_badvaddr",
"c0_count",
"c0_entryhi",
"c0_compare",
270 "c0_status",
"c0_cause",
"c0_epc",
"c0_prid",
271 "c0_config",
"c0_lladdr",
"c0_watchlo",
"c0_watchhi",
272 "c0_xcontext",
"$21",
"$22",
"c0_debug",
273 "c0_depc",
"c0_perfcnt",
"c0_errctl",
"c0_cacheerr_i",
274 "c0_taglo_i",
"c0_taghi_i",
"c0_errorepc",
"c0_desave",
279 { 16, 1,
"c0_config1" },
280 { 18, 1,
"c0_watchlo,1" },
281 { 19, 1,
"c0_watchhi,1" },
282 { 22, 0,
"c0_perftrace" },
283 { 23, 3,
"c0_edebug" },
284 { 25, 1,
"c0_perfcnt,1" },
285 { 25, 2,
"c0_perfcnt,2" },
286 { 25, 3,
"c0_perfcnt,3" },
287 { 25, 4,
"c0_perfcnt,4" },
288 { 25, 5,
"c0_perfcnt,5" },
289 { 25, 6,
"c0_perfcnt,6" },
290 { 25, 7,
"c0_perfcnt,7" },
291 { 26, 1,
"c0_buserr_pa" },
292 { 27, 1,
"c0_cacheerr_d" },
293 { 27, 3,
"c0_cacheerr_d_pa" },
294 { 28, 1,
"c0_datalo_i" },
295 { 28, 2,
"c0_taglo_d" },
296 { 28, 3,
"c0_datalo_d" },
297 { 29, 1,
"c0_datahi_i" },
298 { 29, 2,
"c0_taghi_d" },
299 { 29, 3,
"c0_datahi_d" },
304 "$0",
"$1",
"$2",
"$3",
"$4",
"$5",
"$6",
"$7",
305 "$8",
"$9",
"$10",
"$11",
"$12",
"$13",
"$14",
"$15",
306 "$16",
"$17",
"$18",
"$19",
"$20",
"$21",
"$22",
"$23",
307 "$24",
"$25",
"$26",
"$27",
"$28",
"$29",
"$30",
"$31"
312 "hwr_cpunum",
"hwr_synci_step",
"hwr_cc",
"hwr_ccres",
313 "$4",
"$5",
"$6",
"$7",
314 "$8",
"$9",
"$10",
"$11",
"$12",
"$13",
"$14",
"$15",
315 "$16",
"$17",
"$18",
"$19",
"$20",
"$21",
"$22",
"$23",
316 "$24",
"$25",
"$26",
"$27",
"$28",
"$29",
"$30",
"$31"
349 {
"numeric", 0, 0, 0, 0,
497 static unsigned long hint_bfd_mach;
504 if (hint_bfd_mach == mach && hint_arch_choice !=
NULL && hint_arch_choice->
bfd_mach == hint_bfd_mach) {
505 return hint_arch_choice;
514 hint_bfd_mach = mach;
515 hint_arch_choice =
c;
568 #if ! SYMTAB_AVAILABLE
571 target_processor = mips_target_info.processor;
575 if (chosen_arch !=
NULL)
590 unsigned int i, optionlen, vallen;
603 for (
i = 0;
i <
len;
i++) {
615 if (
i == (
len - 1)) {
621 vallen =
len - (optionlen + 1);
623 if (strlen (
"abi") == optionlen
624 && !strncmp (
"abi",
option, optionlen)) {
633 if (strncmp (
"gpr-names",
option, optionlen) == 0
634 && strlen (
"gpr-names") == optionlen)
637 if (chosen_abi !=
NULL) {
643 if (strncmp (
"fpr-names",
option, optionlen) == 0
644 && strlen (
"fpr-names") == optionlen)
647 if (chosen_abi !=
NULL) {
653 if (strncmp (
"cp0-names",
option, optionlen) == 0
654 && strlen (
"cp0-names") == optionlen)
657 if (chosen_arch !=
NULL)
666 if (strncmp (
"hwr-names",
option, optionlen) == 0
667 && strlen (
"hwr-names") == optionlen)
670 if (chosen_arch !=
NULL) {
676 if (strncmp (
"reg-names",
option, optionlen) == 0
677 && strlen (
"reg-names") == optionlen)
684 if (chosen_abi !=
NULL)
690 if (chosen_arch !=
NULL)
706 const char *option_end;
723 while (*option_end !=
',' && *option_end !=
'\0') {
743 for (
i = 0;
i <
len;
i++) {
755 register unsigned long int l,
761 unsigned int lsb, msb, msbd;
765 for (; *
d !=
'\0';
d++)
770 (*
info->fprintf_func) (
info->stream,
"%c ", *
d);
776 (*
info->fprintf_func) (
info->stream,
"%c", *
d);
786 (*
info->fprintf_func) (
info->stream,
787 _(
"# internal error, incomplete extension sequence (+)"));
792 (*
info->fprintf_func) (
info->stream,
"0x%x", lsb);
797 (*
info->fprintf_func) (
info->stream,
"0x%x", msb - lsb + 1);
801 (*
info->fprintf_func) (
info->stream,
"0x%lx",
806 (*
info->fprintf_func) (
info->stream,
"0x%lx",
811 (*
info->fprintf_func) (
info->stream,
"0x%lx",
816 (*
info->fprintf_func) (
info->stream,
"0x%lx",
823 (*
info->fprintf_func) (
info->stream,
"0x%x", msbd + 1);
842 (*
info->fprintf_func) (
info->stream,
"%s",
n->name);
851 (*
info->fprintf_func) (
info->stream,
"0x%x", lsb);
856 (*
info->fprintf_func) (
info->stream,
"0x%x", msb - lsb + 1);
861 (*
info->fprintf_func) (
info->stream,
"0x%x", msbd + 1);
865 (*
info->fprintf_func) (
info->stream,
"%s",
886 (*
info->fprintf_func) (
info->stream,
"%s",
n->name);
895 (*
info->fprintf_func) (
info->stream,
896 _(
"# internal error, undefined extension sequence (+%c)"),
903 (*
info->fprintf_func) (
info->stream,
"0x%lx",
908 (*
info->fprintf_func) (
info->stream,
"0x%lx",
913 (*
info->fprintf_func) (
info->stream,
"0x%lx",
918 (*
info->fprintf_func) (
info->stream,
"0x%lx",
923 (*
info->fprintf_func) (
info->stream,
"0x%lx",
928 (*
info->fprintf_func) (
info->stream,
"$ac%ld",
933 (*
info->fprintf_func) (
info->stream,
"0x%lx",
938 (*
info->fprintf_func) (
info->stream,
"$ac%ld",
959 (*
info->fprintf_func) (
info->stream,
"0x%lx",
972 (*
info->fprintf_func) (
info->stream,
"%ld",
977 (*
info->fprintf_func) (
info->stream,
"%ld",
982 (*
info->fprintf_func) (
info->stream,
"$ac%ld",
987 (*
info->fprintf_func) (
info->stream,
"$ac%ld",
993 (*
info->fprintf_func) (
info->stream,
"$%ld",
1001 (*
info->fprintf_func) (
info->stream,
"%s",
1007 (*
info->fprintf_func) (
info->stream,
"%s",
1013 (*
info->fprintf_func) (
info->stream,
"0x%lx",
1020 if (
delta & 0x8000) {
1023 (*
info->fprintf_func) (
info->stream,
"%d",
1028 (*
info->fprintf_func) (
info->stream,
"0x%x",
1034 (*
info->fprintf_func) (
info->stream,
"0x%x",
1052 if (
delta & 0x8000) {
1060 (*
info->fprintf_func) (
info->stream,
"%s",
1069 (*
info->fprintf_func) (
info->stream,
"%s",
1074 (*
info->fprintf_func) (
info->stream,
"%s",
1077 (*
info->fprintf_func) (
info->stream,
"%s",
1080 (*
info->fprintf_func) (
info->stream,
"%s or %s",
1093 (*
info->fprintf_func) (
info->stream,
"0x%lx",
1098 (*
info->fprintf_func) (
info->stream,
"0x%lx",
1103 (*
info->fprintf_func) (
info->stream,
"0x%lx",
1108 (*
info->fprintf_func) (
info->stream,
"0x%lx",
1113 (*
info->fprintf_func) (
info->stream,
"0x%lx",
1119 (*
info->fprintf_func) (
info->stream,
"0x%lx",
1125 (*
info->fprintf_func) (
info->stream,
"%s",
1131 (*
info->fprintf_func) (
info->stream,
"%s",
1136 (*
info->fprintf_func) (
info->stream,
"%s",
1141 (*
info->fprintf_func) (
info->stream,
"%s",
1153 (*
info->fprintf_func) (
info->stream,
"$%ld",
1164 (*
info->fprintf_func) (
info->stream,
"%s",
1167 (*
info->fprintf_func) (
info->stream,
"$%ld",
1173 (*
info->fprintf_func) (
info->stream,
"%s",
1178 (*
info->fprintf_func) (
info->stream,
1180 ?
"$fcc%ld" :
"$cc%ld"),
1185 (*
info->fprintf_func) (
info->stream,
"$fcc%ld",
1190 (*
info->fprintf_func) (
info->stream,
"%ld",
1195 (*
info->fprintf_func) (
info->stream,
"%ld",
1200 (*
info->fprintf_func) (
info->stream,
"%ld",
1205 (*
info->fprintf_func) (
info->stream,
"%ld",
1210 (*
info->fprintf_func) (
info->stream,
"%ld",
1218 if ((vsel & 0x10) == 0)
1223 for (fmt = 0; fmt < 3; fmt++, vsel >>= 1) {
1224 if ((vsel & 1) == 0) {
1228 (*
info->fprintf_func) (
info->stream,
"$v%ld[%d]",
1232 else if ((vsel & 0x08) == 0)
1234 (*
info->fprintf_func) (
info->stream,
"$v%ld",
1239 (*
info->fprintf_func) (
info->stream,
"0x%lx",
1246 (*
info->fprintf_func) (
info->stream,
"$v%ld",
1251 (*
info->fprintf_func) (
info->stream,
"$v%ld",
1256 (*
info->fprintf_func) (
info->stream,
"$v%ld",
1262 (*
info->fprintf_func) (
info->stream,
1263 _(
"# internal error, undefined modifier(%c)"),
1277 unsigned long int word,
1307 info->display_endian =
info->endian;
1308 info->insn_info_valid = 1;
1309 info->branch_delay_insns = 0;
1310 info->data_size = 0;
1322 && (word &
op->mask) ==
op->match)
1339 info->branch_delay_insns = 1;
1349 info->branch_delay_insns = 1;
1354 (*
info->fprintf_func) (
info->stream,
"%s",
op->name);
1357 if (
d !=
NULL && *
d !=
'\0') {
1358 (*
info->fprintf_func) (
info->stream,
" ");
1369 (*
info->fprintf_func) (
info->stream,
"0x%lx", word);
1394 (*
info->fprintf_func) (
info->stream,
"%s",
1401 (*
info->fprintf_func) (
info->stream,
"%s",
1407 (*
info->fprintf_func) (
info->stream,
"%s",
1413 (*
info->fprintf_func) (
info->stream,
"%s",
1427 (*
info->fprintf_func) (
info->stream,
"$pc");
1435 (*
info->fprintf_func) (
info->stream,
"%s",
1441 (*
info->fprintf_func) (
info->stream,
"%s",
1468 int immed, nbits,
shift, signedp, extbits, pcrel, extu,
branch;
1512 info->data_size = 1;
1519 info->data_size = 2;
1529 info->data_size = 4;
1537 info->data_size = 8;
1559 info->data_size = 4;
1566 info->data_size = 8;
1607 info->data_size = 4;
1615 info->data_size = 8;
1629 if (signedp && immed >= (1 << (nbits - 1))) {
1630 immed -= 1 << nbits;
1633 if ((
type ==
'<' ||
type ==
'>' ||
type ==
'[' ||
type ==
']') && immed == 0) {
1639 if (extbits == 16) {
1641 }
else if (extbits == 15) {
1646 immed &= (1 << extbits) - 1;
1647 if (!extu && immed >= (1 << (extbits - 1))) {
1648 immed -= 1 << extbits;
1653 (*
info->fprintf_func) (
info->stream,
"%d", immed);
1660 }
else if (use_extend) {
1680 0xf800) == 0x1800)) {
1688 0xf81f) == 0xe800)) {
1705 int jalx = l & 0x400;
1710 l = ((l & 0x1f) << 23) | ((l & 0x3e0) << 13) | (
extend << 2);
1716 info->target = ((memaddr + 4) & ~(
bfd_vma) 0x0fffffff) | l;
1719 info->branch_delay_insns = 1;
1725 int need_comma, amask, smask;
1731 amask = (l >> 3) & 7;
1733 if (amask > 0 && amask < 5)
1737 (*
info->fprintf_func) (
info->stream,
"-%s",
1743 smask = (l >> 1) & 3;
1746 (*
info->fprintf_func) (
info->stream,
"%s??",
1747 need_comma ?
", " :
"");
1752 (*
info->fprintf_func) (
info->stream,
"%s%s",
1753 need_comma ?
", " :
"",
1756 (*
info->fprintf_func) (
info->stream,
"-%s",
1764 (*
info->fprintf_func) (
info->stream,
"%s%s",
1765 need_comma ?
", " :
"",
1770 if (amask == 5 || amask == 6)
1772 (*
info->fprintf_func) (
info->stream,
"%s$f0",
1773 need_comma ?
", " :
"");
1775 (*
info->fprintf_func) (
info->stream,
"-$f1");
1786 int amask,
args, statics;
1796 amask = (l >> 16) & 0xf;
1810 statics = amask & 3;
1816 (*
info->fprintf_func) (
info->stream,
"-%s",
1822 framesz = (((l >> 16) & 0xf0) | (l & 0x0f)) * 8;
1823 if (framesz == 0 && !use_extend) {
1827 (*
info->fprintf_func) (
info->stream,
"%s%d",
1828 need_comma ?
", " :
"",
1835 nsreg = (l >> 24) & 0x7;
1844 smask |= ((1 << nsreg) - 1) << 2;
1848 for (
i = 0;
i < 9;
i++)
1850 if (smask & (1 <<
i))
1852 (*
info->fprintf_func) (
info->stream,
", %s",
1855 for (j =
i; smask & (2 << j); j++) {}
1857 (*
info->fprintf_func) (
info->stream,
"-%s",
1867 }
else if (statics > 0) {
1868 (*
info->fprintf_func) (
info->stream,
", %s-%s",
1877 (*
info->fprintf_func)
1879 _(
"# internal disassembler error, unrecognised modifier (%c)"),
1898 info->bytes_per_chunk = 2;
1899 info->display_endian =
info->endian;
1900 info->insn_info_valid = 1;
1901 info->branch_delay_insns = 0;
1902 info->data_size = 0;
1924 if ((insn & 0xf800) == 0xf000)
1934 (*
info->fprintf_func) (
info->stream,
"extend 0x%x",
1947 if ((insn & 0xf800) == 0xf000) {
1948 (*
info->fprintf_func) (
info->stream,
"extend 0x%x",
1964 && (insn &
op->mask) ==
op->match)
1968 if (strchr (
op->args,
'a') !=
NULL)
1972 (*
info->fprintf_func) (
info->stream,
"extend 0x%x",
1996 (*
info->fprintf_func) (
info->stream,
"%s",
op->name);
1997 if (
op->args[0] !=
'\0') {
1998 (*
info->fprintf_func) (
info->stream,
" ");
2001 for (
s =
op->args; *
s !=
'\0';
s++)
2027 info->branch_delay_insns = 1;
2040 (*
info->fprintf_func) (
info->stream,
"0x%x", insn);
2066 if (memaddr & 0x01) {
2071 #if SYMTAB_AVAILABLE
2115 The following MIPS specific disassembler options are supported for use\n\
2116 with the -M switch (multiple options should be separated by commas):\n"));
2119 gpr-names=ABI Print GPR names according to specified ABI.\n\
2120 Default: based on binary being disassembled.\n"));
2123 fpr-names=ABI Print FPR names according to specified ABI.\n\
2124 Default: numeric.\n"));
2127 cp0-names=ARCH Print CP0 register names according to\n\
2128 specified architecture.\n\
2129 Default: based on binary being disassembled.\n"));
2132 hwr-names=ARCH Print HWR names according to specified \n\
2134 Default: based on binary being disassembled.\n"));
2137 reg-names=ABI Print GPR and FPR names according to\n\
2138 specified ABI.\n"));
2141 reg-names=ARCH Print CP0 register and HWR names according to\n\
2142 specified architecture.\n"));
2145 For the options above, the following values are supported for \"ABI\":\n\
2153 For the options above, The following values are supported for \"ARCH\":\n\
static RZ_NULLABLE RzILOpBitVector * shift(RzILOpBitVector *val, RZ_NULLABLE RzILOpBool **carry_out, arm_shifter type, RZ_OWN RzILOpBitVector *dist)
static RzILOpEffect * sel(cs_insn *insn, bool is_thumb)
static RzILOpBitVector * extend(ut32 dst_bits, arm64_extender ext, RZ_OWN RzILOpBitVector *v, ut32 v_bits)
RzBinInfo * info(RzBinFile *bf)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags long
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
#define elf_elfheader(bfd)
#define MIPS16OP_SH_MOVE32Z
#define INSN_WRITE_GPR_31
#define OP_MASK_IMMEDIATE
#define MIPS16OP_SH_REGR32
#define MIPS16OP_MASK_REGR32
#define MIPS16OP_MASK_IMM6
#define INSN_STORE_MEMORY
#define MIPS16OP_MASK_IMM4
#define INSN_UNCOND_BRANCH_DELAY
#define OPCODE_IS_MEMBER(insn, isa, cpu)
#define MIPS16_ALL_STATICS
#define MIPS16OP_MASK_MOVE32Z
#define INSN_LOAD_MEMORY_DELAY
#define MIPS16OP_EXTRACT_REG32R(i)
struct mips_opcode * mips_opcodes
const int bfd_mips16_num_opcodes
#define MIPS16OP_MASK_IMM11
#define MIPS16_INSN_READ_PC
#define MIPS16OP_SH_IMM11
#define MIPS16OP_MASK_IMM5
#define INSN_COND_BRANCH_DELAY
const struct mips_opcode mips16_opcodes[]
#define MIPS16_INSN_READ_SP
#define INSN_COND_BRANCH_LIKELY
#define MIPS16OP_MASK_IMM8
static const char struct stat static buf struct stat static buf static vhangup int options
static const char struct stat static buf struct stat static buf static vhangup int status
#define header(is_bt, len_min, ret_op)
int print_insn_big_mips(bfd_vma memaddr, struct disassemble_info *info)
static const char *const mips_fpr_names_n32[32]
static void print_insn_args(const char *d, register unsigned long int l, bfd_vma pc, struct disassemble_info *info, const struct mips_opcode *opp)
#define mips16_reg_names(rn)
static int print_insn_mips(bfd_vma memaddr, unsigned long int word, struct disassemble_info *info)
static const char *const mips_hwr_names_mips3264r2[32]
static const struct mips_abi_choice * choose_abi_by_name(const char *name, unsigned int namelen)
static const unsigned int mips16_to_32_reg_map[]
static const struct mips_cp0sel_name * lookup_mips_cp0sel_name(const struct mips_cp0sel_name *names, unsigned int len, unsigned int cp0reg, unsigned int sel)
static int mips_cp0sel_names_len
static const char *const mips_hwr_names_numeric[32]
static int mips_processor
static const struct mips_cp0sel_name mips_cp0sel_names_mips3264[]
static const char *const mips_cp0_names_mips3264r2[32]
static const struct mips_arch_choice * choose_arch_by_name(const char *name, unsigned int namelen)
const char *const mips_gpr_names_newabi[32]
static int _print_insn_mips(bfd_vma memaddr, struct disassemble_info *info, enum bfd_endian endianness)
void parse_mips_dis_options(const char *options)
static int print_insn_mips16(bfd_vma memaddr, struct disassemble_info *info)
const struct mips_arch_choice mips_arch_choices[]
static const char *const mips_cp0_names_sb1[32]
static const struct mips_arch_choice * choose_arch_by_number(unsigned long mach)
static const char *const mips_fpr_names_32[32]
static void print_mips16_insn_arg(char type, const struct mips_opcode *op, int l, bfd_boolean use_extend, int extend, bfd_vma memaddr, struct disassemble_info *info)
static const char *const mips_cp0_names_mips3264[32]
static const char *const * mips_fpr_names
static const struct mips_cp0sel_name * mips_cp0sel_names
void print_mips_disassembler_options(FILE *stream)
static const char *const mips_gpr_names_numeric[32]
static const struct mips_cp0sel_name mips_cp0sel_names_mips3264r2[]
int print_insn_little_mips(bfd_vma memaddr, struct disassemble_info *info)
struct mips_abi_choice mips_abi_choices[]
static int is_newabi(Elf_Internal_Ehdr *header)
static const char *const mips_fpr_names_64[32]
static void parse_mips_dis_option(const char *option, unsigned int len)
static const char *const * mips_cp0_names
static const char *const * mips_hwr_names
static void set_default_mips_dis_options(struct disassemble_info *info)
static const char *const * mips_gpr_names
const char *const mips_gpr_names_oldabi[32]
static const char *const mips_cp0_names_numeric[32]
static const struct mips_cp0sel_name mips_cp0sel_names_sb1[]
static const char *const mips_fpr_names_numeric[32]
static bfd_vma bfd_getb16(const void *p)
#define bfd_mach_mips4120
#define bfd_mach_mipsisa32r2
#define bfd_mach_mips12000
#define bfd_mach_mips10000
#define bfd_mach_mips4000
#define bfd_mach_mips5400
BFD_HOST_U_64_BIT bfd_vma
#define bfd_mach_mips_loongson_2f
@ bfd_target_unknown_flavour
static bfd_vma bfd_getb32(const void *p)
#define bfd_mach_mipsisa64
#define bfd_mach_mipsisa32
#define bfd_mach_mips4111
#define bfd_mach_mips4100
#define bfd_mach_mips_loongson_2e
#define bfd_mach_mips5500
#define bfd_mach_mips4400
#define bfd_mach_mipsisa64r2
static bfd_vma bfd_getl16(const void *p)
#define bfd_mach_mips4650
#define bfd_mach_mips_sb1
#define bfd_mach_mips5000
#define bfd_mach_mips4600
#define bfd_mach_mips3900
#define bfd_mach_mips8000
#define bfd_mach_mips4010
#define bfd_mach_mips7000
static bfd_vma bfd_getl32(const void *p)
#define bfd_mach_mips6000
#define bfd_mach_mips3000
#define bfd_mach_mips4300
const char *const * gpr_names
const char *const * fpr_names
const char *const * hwr_names
const struct mips_cp0sel_name * cp0sel_names
const char *const * cp0_names
unsigned int cp0sel_names_len