1 /* Instruction printing code for the ARC.
2 Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2005, 2007, 2009, 2010
3 Free Software Foundation, Inc.
4 Contributed by Doug Evans (dje@cygnus.com).
6 This file is part of libopcodes.
8 This library is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
13 It is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
24 #include "libiberty.h"
26 #include "opcode/arc.h"
40 /* Classification of the opcodes for the decoder to print
48 /* All branches other than JC. */
51 /* All loads other than immediate
57 /* All single operand instructions. */
58 CLASS_A4_OP3_SUBOPC3F
,
62 #define BIT(word,n) ((word) & (1 << n))
63 #define BITS(word,s,e) (((word) << (31 - e)) >> (s + (31 - e)))
64 #define OPCODE(word) (BITS ((word), 27, 31))
65 #define FIELDA(word) (BITS ((word), 21, 26))
66 #define FIELDB(word) (BITS ((word), 15, 20))
67 #define FIELDC(word) (BITS ((word), 9, 14))
69 /* FIELD D is signed in all of its uses, so we make sure argument is
70 treated as signed for bit shifting purposes: */
71 #define FIELDD(word) (BITS (((signed int)word), 0, 8))
73 #define PUT_NEXT_WORD_IN(a) \
76 if (is_limm == 1 && !NEXT_WORD (1)) \
77 mwerror (state, _("Illegal limm reference in last instruction!\n")); \
78 a = state->words[1]; \
82 #define CHECK_FLAG_COND_NULLIFY() \
87 flag = BIT (state->words[0], 8); \
88 state->nullifyMode = BITS (state->words[0], 5, 6); \
89 cond = BITS (state->words[0], 0, 4); \
94 #define CHECK_COND() \
98 cond = BITS (state->words[0], 0, 4); \
102 #define CHECK_FIELD(field) \
109 PUT_NEXT_WORD_IN (field); \
110 limm_value = field; \
112 else if (field > 60) \
116 flag = (field == 61); \
117 field = FIELDD (state->words[0]); \
122 #define CHECK_FIELD_A() \
125 fieldA = FIELDA (state->words[0]); \
134 #define CHECK_FIELD_B() \
137 fieldB = FIELDB (state->words[0]); \
138 CHECK_FIELD (fieldB); \
142 #define CHECK_FIELD_C() \
145 fieldC = FIELDC (state->words[0]); \
146 CHECK_FIELD (fieldC); \
150 #define IS_SMALL(x) (((field##x) < 256) && ((field##x) > -257))
151 #define IS_REG(x) (field##x##isReg)
152 #define WRITE_FORMAT_LB_Rx_RB(x) WRITE_FORMAT (x, "[","]","","")
153 #define WRITE_FORMAT_x_COMMA_LB(x) WRITE_FORMAT (x, "",",[","",",[")
154 #define WRITE_FORMAT_COMMA_x_RB(x) WRITE_FORMAT (x, ",","]",",","]")
155 #define WRITE_FORMAT_x_RB(x) WRITE_FORMAT (x, "","]","","]")
156 #define WRITE_FORMAT_COMMA_x(x) WRITE_FORMAT (x, ",","",",","")
157 #define WRITE_FORMAT_x_COMMA(x) WRITE_FORMAT (x, "",",","",",")
158 #define WRITE_FORMAT_x(x) WRITE_FORMAT (x, "","","","")
159 #define WRITE_FORMAT(x,cb1,ca1,cb,ca) strcat (formatString, \
160 (IS_REG (x) ? cb1"%r"ca1 : \
161 usesAuxReg ? cb"%a"ca : \
162 IS_SMALL (x) ? cb"%d"ca : cb"%h"ca))
163 #define WRITE_FORMAT_RB() strcat (formatString, "]")
164 #define WRITE_COMMENT(str) (state->comm[state->commNum++] = (str))
165 #define WRITE_NOP_COMMENT() if (!fieldAisReg && !flag) WRITE_COMMENT ("nop");
167 #define NEXT_WORD(x) (offset += 4, state->words[x])
169 #define add_target(x) (state->targets[state->tcnt++] = (x))
171 static char comment_prefix
[] = "\t; ";
174 core_reg_name (struct arcDisState
* state
, int val
)
176 if (state
->coreRegName
)
177 return (*state
->coreRegName
)(state
->_this
, val
);
182 aux_reg_name (struct arcDisState
* state
, int val
)
184 if (state
->auxRegName
)
185 return (*state
->auxRegName
)(state
->_this
, val
);
190 cond_code_name (struct arcDisState
* state
, int val
)
192 if (state
->condCodeName
)
193 return (*state
->condCodeName
)(state
->_this
, val
);
198 instruction_name (struct arcDisState
* state
,
204 return (*state
->instName
)(state
->_this
, op1
, op2
, flags
);
209 mwerror (struct arcDisState
* state
, const char * msg
)
212 (*state
->err
)(state
->_this
, (msg
));
216 post_address (struct arcDisState
* state
, int addr
)
218 static char id
[3 * ARRAY_SIZE (state
->addresses
)];
219 int j
, i
= state
->acnt
;
221 if (i
< ((int) ARRAY_SIZE (state
->addresses
)))
223 state
->addresses
[i
] = addr
;
236 arc_sprintf (struct arcDisState
*state
, char *buf
, const char *format
, ...)
240 int size
, leading_zero
, regMap
[2];
243 va_start (ap
, format
);
255 goto DOCOMM
; /* (return) */
279 leading_zero
= 1; /* e.g. %08x */
280 while (*p
>= '0' && *p
<= '9')
282 size
= size
* 10 + *p
- '0';
287 #define inc_bp() bp = bp + strlen (bp)
291 unsigned u
= va_arg (ap
, int);
293 /* Hex. We can change the format to 0x%08x in
294 one place, here, if we wish.
295 We add underscores for easy reading. */
297 sprintf (bp
, "0x%x_%04x", u
>> 16, u
& 0xffff);
299 sprintf (bp
, "0x%x", u
);
305 int val
= va_arg (ap
, int);
309 sprintf (bp
, "%0*x", size
, val
);
311 sprintf (bp
, "%*x", size
, val
);
313 sprintf (bp
, "%x", val
);
319 int val
= va_arg (ap
, int);
322 sprintf (bp
, "%*d", size
, val
);
324 sprintf (bp
, "%d", val
);
331 int val
= va_arg (ap
, int);
333 #define REG2NAME(num, name) case num: sprintf (bp, ""name); \
334 regMap[(num < 32) ? 0 : 1] |= 1 << (num - ((num < 32) ? 0 : 32)); break;
341 REG2NAME (29, "ilink1");
342 REG2NAME (30, "ilink2");
343 REG2NAME (31, "blink");
344 REG2NAME (60, "lp_count");
349 ext
= core_reg_name (state
, val
);
351 sprintf (bp
, "%s", ext
);
353 sprintf (bp
,"r%d",val
);
363 int val
= va_arg (ap
, int);
365 #define AUXREG2NAME(num, name) case num: sprintf (bp,name); break;
369 AUXREG2NAME (0x0, "status");
370 AUXREG2NAME (0x1, "semaphore");
371 AUXREG2NAME (0x2, "lp_start");
372 AUXREG2NAME (0x3, "lp_end");
373 AUXREG2NAME (0x4, "identity");
374 AUXREG2NAME (0x5, "debug");
379 ext
= aux_reg_name (state
, val
);
381 sprintf (bp
, "%s", ext
);
383 arc_sprintf (state
, bp
, "%h", val
);
393 sprintf (bp
, "%s", va_arg (ap
, char *));
399 fprintf (stderr
, "?? format %c\n", p
[-1]);
409 write_comments_(struct arcDisState
* state
,
414 if (state
->commentBuffer
!= 0)
420 const char *name
= post_address (state
, limm_value
+ shimm
);
423 WRITE_COMMENT (name
);
425 for (i
= 0; i
< state
->commNum
; i
++)
428 strcpy (state
->commentBuffer
, comment_prefix
);
430 strcat (state
->commentBuffer
, ", ");
431 strncat (state
->commentBuffer
, state
->comm
[i
],
432 sizeof (state
->commentBuffer
));
437 #define write_comments2(x) write_comments_ (state, x, is_limm, limm_value)
438 #define write_comments() write_comments2 (0)
440 static const char *condName
[] =
443 "" , "z" , "nz" , "p" , "n" , "c" , "nc" , "v" ,
444 "nv" , "gt" , "ge" , "lt" , "le" , "hi" , "ls" , "pnz"
448 write_instr_name_(struct arcDisState
* state
,
449 const char * instrName
,
451 int condCodeIsPartOfName
,
457 strcpy (state
->instrBuffer
, instrName
);
463 if (!condCodeIsPartOfName
)
464 strcat (state
->instrBuffer
, ".");
469 cc
= cond_code_name (state
, cond
);
474 strcat (state
->instrBuffer
, cc
);
478 strcat (state
->instrBuffer
, ".f");
480 switch (state
->nullifyMode
)
483 strcat (state
->instrBuffer
, ".d");
485 case BR_exec_when_jump
:
486 strcat (state
->instrBuffer
, ".jd");
491 strcat (state
->instrBuffer
, ".x");
494 strcat (state
->instrBuffer
, ".a");
497 strcat (state
->instrBuffer
, ".di");
500 #define write_instr_name() \
503 write_instr_name_(state, instrName,cond, condCodeIsPartOfName, \
504 flag, signExtend, addrWriteBack, directMem); \
505 formatString[0] = '\0'; \
511 op_LD0
= 0, op_LD1
= 1, op_ST
= 2, op_3
= 3,
512 op_BC
= 4, op_BLC
= 5, op_LPC
= 6, op_JC
= 7,
513 op_ADD
= 8, op_ADC
= 9, op_SUB
= 10, op_SBC
= 11,
514 op_AND
= 12, op_OR
= 13, op_BIC
= 14, op_XOR
= 15
517 extern disassemble_info tm_print_insn_info
;
520 dsmOneArcInst (bfd_vma addr
, struct arcDisState
* state
)
522 int condCodeIsPartOfName
= 0;
523 a4_decoding_class decodingClass
;
524 const char * instrName
;
538 int addrWriteBack
= 0;
545 char formatString
[60];
547 state
->instructionLen
= 4;
548 state
->nullifyMode
= BR_exec_when_no_jump
;
552 state
->_mem_load
= 0;
553 state
->_ea_present
= 0;
554 state
->_load_len
= 0;
555 state
->ea_reg1
= no_reg
;
556 state
->ea_reg2
= no_reg
;
562 state
->_opcode
= OPCODE (state
->words
[0]);
564 decodingClass
= CLASS_A4_ARITH
; /* default! */
566 condCodeIsPartOfName
=0;
570 state
->flow
= noflow
;
573 if (state
->commentBuffer
)
574 state
->commentBuffer
[0] = '\0';
576 switch (state
->_opcode
)
579 switch (BITS (state
->words
[0],1,2))
583 state
->_load_len
= 4;
587 state
->_load_len
= 1;
591 state
->_load_len
= 2;
594 instrName
= "??? (0[3])";
595 state
->flow
= invalid_instr
;
598 decodingClass
= CLASS_A4_LD0
;
602 if (BIT (state
->words
[0],13))
605 decodingClass
= CLASS_A4_LR
;
609 switch (BITS (state
->words
[0], 10, 11))
613 state
->_load_len
= 4;
617 state
->_load_len
= 1;
621 state
->_load_len
= 2;
624 instrName
= "??? (1[3])";
625 state
->flow
= invalid_instr
;
628 decodingClass
= CLASS_A4_LD1
;
633 if (BIT (state
->words
[0], 25))
636 decodingClass
= CLASS_A4_SR
;
640 switch (BITS (state
->words
[0], 22, 23))
652 instrName
= "??? (2[3])";
653 state
->flow
= invalid_instr
;
656 decodingClass
= CLASS_A4_ST
;
661 decodingClass
= CLASS_A4_OP3_GENERAL
; /* default for opcode 3... */
662 switch (FIELDC (state
->words
[0]))
666 decodingClass
= CLASS_A4_FLAG
;
694 decodingClass
= CLASS_A4_OP3_SUBOPC3F
;
695 switch (FIELDD (state
->words
[0]))
708 state
->flow
=invalid_instr
;
714 /* ARC Extension Library Instructions
715 NOTE: We assume that extension codes are these instrs. */
717 instrName
= instruction_name (state
,
719 FIELDC (state
->words
[0]),
724 state
->flow
= invalid_instr
;
726 if (flags
& IGNORE_FIRST_OPD
)
743 if (BITS (state
->words
[0],9,9))
754 condCodeIsPartOfName
= 1;
755 decodingClass
= ((state
->_opcode
== op_JC
) ? CLASS_A4_JC
: CLASS_A4_BRANCH
);
762 repeatsOp
= (FIELDC (state
->words
[0]) == FIELDB (state
->words
[0]));
764 switch (state
->_opcode
)
767 instrName
= (repeatsOp
? "asl" : "add");
770 instrName
= (repeatsOp
? "rlc" : "adc");
773 instrName
= (repeatsOp
? "mov" : "and");
778 case op_SUB
: instrName
= "sub";
780 case op_SBC
: instrName
= "sbc";
782 case op_OR
: instrName
= "or";
784 case op_BIC
: instrName
= "bic";
788 if (state
->words
[0] == 0x7fffffff)
790 /* NOP encoded as xor -1, -1, -1. */
792 decodingClass
= CLASS_A4_OP3_SUBOPC3F
;
799 instrName
= instruction_name (state
,state
->_opcode
,0,&flags
);
800 /* if (instrName) printf("FLAGS=0x%x\n", flags); */
804 state
->flow
=invalid_instr
;
806 if (flags
& IGNORE_FIRST_OPD
)
811 fieldAisReg
= fieldBisReg
= fieldCisReg
= 1; /* Assume regs for now. */
812 flag
= cond
= is_shimm
= is_limm
= 0;
813 state
->nullifyMode
= BR_exec_when_no_jump
; /* 0 */
814 signExtend
= addrWriteBack
= directMem
= 0;
817 switch (decodingClass
)
824 CHECK_FLAG_COND_NULLIFY ();
830 WRITE_FORMAT_COMMA_x (B
);
832 WRITE_FORMAT_COMMA_x (C
);
833 WRITE_NOP_COMMENT ();
834 arc_sprintf (state
, state
->operandBuffer
, formatString
,
835 fieldA
, fieldB
, fieldC
);
841 WRITE_FORMAT_COMMA_x (C
);
842 arc_sprintf (state
, state
->operandBuffer
, formatString
,
848 case CLASS_A4_OP3_GENERAL
:
851 CHECK_FLAG_COND_NULLIFY ();
857 WRITE_FORMAT_COMMA_x (B
);
858 WRITE_NOP_COMMENT ();
859 arc_sprintf (state
, state
->operandBuffer
, formatString
,
865 arc_sprintf (state
, state
->operandBuffer
, formatString
, fieldB
);
872 CHECK_FLAG_COND_NULLIFY ();
873 flag
= 0; /* This is the FLAG instruction -- it's redundant. */
877 arc_sprintf (state
, state
->operandBuffer
, formatString
, fieldB
);
881 case CLASS_A4_BRANCH
:
882 fieldA
= BITS (state
->words
[0],7,26) << 2;
883 fieldA
= (fieldA
<< 10) >> 10; /* Make it signed. */
885 CHECK_FLAG_COND_NULLIFY ();
889 /* This address could be a label we know. Convert it. */
890 if (state
->_opcode
!= op_LPC
/* LP */)
892 add_target (fieldA
); /* For debugger. */
893 state
->flow
= state
->_opcode
== op_BLC
/* BL */
896 /* indirect calls are achieved by "lr blink,[status];
897 lr dest<- func addr; j [dest]" */
900 strcat (formatString
, "%s"); /* Address/label name. */
901 arc_sprintf (state
, state
->operandBuffer
, formatString
,
902 post_address (state
, fieldA
));
907 /* For op_JC -- jump to address specified.
908 Also covers jump and link--bit 9 of the instr. word
909 selects whether linked, thus "is_linked" is set above. */
912 CHECK_FLAG_COND_NULLIFY ();
917 fieldA
= (fieldB
>> 25) & 0x7F; /* Flags. */
918 fieldB
= (fieldB
& 0xFFFFFF) << 2;
919 state
->flow
= is_linked
? direct_call
: direct_jump
;
921 /* Screwy JLcc requires .jd mode to execute correctly
922 but we pretend it is .nd (no delay slot). */
923 if (is_linked
&& state
->nullifyMode
== BR_exec_when_jump
)
924 state
->nullifyMode
= BR_exec_when_no_jump
;
928 state
->flow
= is_linked
? indirect_call
: indirect_jump
;
929 /* We should also treat this as indirect call if NOT linked
930 but the preceding instruction was a "lr blink,[status]"
931 and we have a delay slot with "add blink,blink,2".
932 For now we can't detect such. */
933 state
->register_for_indirect_jump
= fieldB
;
937 strcat (formatString
,
938 IS_REG (B
) ? "[%r]" : "%s"); /* Address/label name. */
942 WRITE_FORMAT_COMMA_x (A
);
945 arc_sprintf (state
, state
->operandBuffer
, formatString
, fieldB
, fieldA
);
947 arc_sprintf (state
, state
->operandBuffer
, formatString
,
948 post_address (state
, fieldB
), fieldA
);
954 B and C can be regs, or one (both?) can be limm. */
959 printf ("5:b reg %d %d c reg %d %d \n",
960 fieldBisReg
,fieldB
,fieldCisReg
,fieldC
);
962 state
->_ea_present
= 1;
964 state
->ea_reg1
= fieldB
;
966 state
->_offset
+= fieldB
;
968 state
->ea_reg2
= fieldC
;
970 state
->_offset
+= fieldC
;
971 state
->_mem_load
= 1;
973 directMem
= BIT (state
->words
[0], 5);
974 addrWriteBack
= BIT (state
->words
[0], 3);
975 signExtend
= BIT (state
->words
[0], 0);
978 WRITE_FORMAT_x_COMMA_LB(A
);
979 if (fieldBisReg
|| fieldB
!= 0)
980 WRITE_FORMAT_x_COMMA (B
);
984 WRITE_FORMAT_x_RB (C
);
985 arc_sprintf (state
, state
->operandBuffer
, formatString
,
986 fieldA
, fieldB
, fieldC
);
991 /* LD instruction. */
994 fieldC
= FIELDD (state
->words
[0]);
997 printf ("6:b reg %d %d c 0x%x \n",
998 fieldBisReg
, fieldB
, fieldC
);
999 state
->_ea_present
= 1;
1000 state
->_offset
= fieldC
;
1001 state
->_mem_load
= 1;
1003 state
->ea_reg1
= fieldB
;
1004 /* Field B is either a shimm (same as fieldC) or limm (different!)
1005 Say ea is not present, so only one of us will do the name lookup. */
1007 state
->_offset
+= fieldB
, state
->_ea_present
= 0;
1009 directMem
= BIT (state
->words
[0],14);
1010 addrWriteBack
= BIT (state
->words
[0],12);
1011 signExtend
= BIT (state
->words
[0],9);
1013 write_instr_name ();
1014 WRITE_FORMAT_x_COMMA_LB (A
);
1017 fieldB
= state
->_offset
;
1018 WRITE_FORMAT_x_RB (B
);
1023 if (fieldC
!= 0 && !BIT (state
->words
[0],13))
1026 WRITE_FORMAT_COMMA_x_RB (C
);
1031 arc_sprintf (state
, state
->operandBuffer
, formatString
,
1032 fieldA
, fieldB
, fieldC
);
1037 /* ST instruction. */
1040 fieldA
= FIELDD(state
->words
[0]); /* shimm */
1043 if (dbg
) printf("7:b reg %d %x off %x\n",
1044 fieldBisReg
,fieldB
,fieldA
);
1045 state
->_ea_present
= 1;
1046 state
->_offset
= fieldA
;
1048 state
->ea_reg1
= fieldB
;
1049 /* Field B is either a shimm (same as fieldA) or limm (different!)
1050 Say ea is not present, so only one of us will do the name lookup.
1051 (for is_limm we do the name translation here). */
1053 state
->_offset
+= fieldB
, state
->_ea_present
= 0;
1055 directMem
= BIT (state
->words
[0], 26);
1056 addrWriteBack
= BIT (state
->words
[0], 24);
1058 write_instr_name ();
1059 WRITE_FORMAT_x_COMMA_LB(C
);
1063 fieldB
= state
->_offset
;
1064 WRITE_FORMAT_x_RB (B
);
1069 if (fieldBisReg
&& fieldA
!= 0)
1072 WRITE_FORMAT_COMMA_x_RB(A
);
1077 arc_sprintf (state
, state
->operandBuffer
, formatString
,
1078 fieldC
, fieldB
, fieldA
);
1079 write_comments2 (fieldA
);
1083 /* SR instruction */
1087 write_instr_name ();
1088 WRITE_FORMAT_x_COMMA_LB(C
);
1089 /* Try to print B as an aux reg if it is not a core reg. */
1093 arc_sprintf (state
, state
->operandBuffer
, formatString
, fieldC
, fieldB
);
1097 case CLASS_A4_OP3_SUBOPC3F
:
1098 write_instr_name ();
1099 state
->operandBuffer
[0] = '\0';
1103 /* LR instruction */
1107 write_instr_name ();
1108 WRITE_FORMAT_x_COMMA_LB (A
);
1109 /* Try to print B as an aux reg if it is not a core reg. */
1113 arc_sprintf (state
, state
->operandBuffer
, formatString
, fieldA
, fieldB
);
1118 mwerror (state
, "Bad decoding class in ARC disassembler");
1122 state
->_cond
= cond
;
1123 return state
->instructionLen
= offset
;
1127 /* Returns the name the user specified core extension register. */
1130 _coreRegName(void * arg ATTRIBUTE_UNUSED
, int regval
)
1132 return arcExtMap_coreRegName (regval
);
1135 /* Returns the name the user specified AUX extension register. */
1138 _auxRegName(void *_this ATTRIBUTE_UNUSED
, int regval
)
1140 return arcExtMap_auxRegName(regval
);
1143 /* Returns the name the user specified condition code name. */
1146 _condCodeName(void *_this ATTRIBUTE_UNUSED
, int regval
)
1148 return arcExtMap_condCodeName(regval
);
1151 /* Returns the name the user specified extension instruction. */
1154 _instName (void *_this ATTRIBUTE_UNUSED
, int majop
, int minop
, int *flags
)
1156 return arcExtMap_instName(majop
, minop
, flags
);
1159 /* Decode an instruction returning the size of the instruction
1160 in bytes or zero if unrecognized. */
1163 decodeInstr (bfd_vma address
, /* Address of this instruction. */
1164 disassemble_info
* info
)
1168 struct arcDisState s
; /* ARC Disassembler state. */
1169 void *stream
= info
->stream
; /* Output stream. */
1170 fprintf_ftype func
= info
->fprintf_func
;
1172 memset (&s
, 0, sizeof(struct arcDisState
));
1174 /* read first instruction */
1175 status
= (*info
->read_memory_func
) (address
, buffer
, 4, info
);
1178 (*info
->memory_error_func
) (status
, address
, info
);
1181 if (info
->endian
== BFD_ENDIAN_LITTLE
)
1182 s
.words
[0] = bfd_getl32(buffer
);
1184 s
.words
[0] = bfd_getb32(buffer
);
1185 /* Always read second word in case of limm. */
1187 /* We ignore the result since last insn may not have a limm. */
1188 status
= (*info
->read_memory_func
) (address
+ 4, buffer
, 4, info
);
1189 if (info
->endian
== BFD_ENDIAN_LITTLE
)
1190 s
.words
[1] = bfd_getl32(buffer
);
1192 s
.words
[1] = bfd_getb32(buffer
);
1195 s
.coreRegName
= _coreRegName
;
1196 s
.auxRegName
= _auxRegName
;
1197 s
.condCodeName
= _condCodeName
;
1198 s
.instName
= _instName
;
1201 dsmOneArcInst (address
, & s
);
1203 /* Display the disassembly instruction. */
1204 (*func
) (stream
, "%08lx ", s
.words
[0]);
1205 (*func
) (stream
, " ");
1206 (*func
) (stream
, "%-10s ", s
.instrBuffer
);
1208 if (__TRANSLATION_REQUIRED (s
))
1210 bfd_vma addr
= s
.addresses
[s
.operandBuffer
[1] - '0'];
1212 (*info
->print_address_func
) ((bfd_vma
) addr
, info
);
1213 (*func
) (stream
, "\n");
1216 (*func
) (stream
, "%s",s
.operandBuffer
);
1218 return s
.instructionLen
;
1221 /* Return the print_insn function to use.
1222 Side effect: load (possibly empty) extension section */
1225 arc_get_disassembler (void *ptr
)
1228 build_ARC_extmap ((struct bfd
*) ptr
);