aboutsummaryrefslogtreecommitdiff
path: root/opcodes/arm-dis.c
diff options
context:
space:
mode:
Diffstat (limited to 'opcodes/arm-dis.c')
-rw-r--r--opcodes/arm-dis.c114
1 files changed, 57 insertions, 57 deletions
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index ab9638b..46bda78 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -125,7 +125,7 @@ struct opcode16
%<bitfield>'c print specified char iff bitfield is all ones
%<bitfield>`c print specified char iff bitfield is all zeroes
%<bitfield>?ab... select from array of values in big endian order
-
+
%L print as an iWMMXt N/M width field.
%Z print the Immediate of a WSHUFH instruction.
%l like 'A' except use byte offsets for 'B' & 'H'
@@ -920,7 +920,7 @@ static const struct opcode32 coprocessor_opcodes[] =
%<bitfield>Sn print byte scaled width limited by n
%<bitfield>Tn print short scaled width limited by n
%<bitfield>Un print long scaled width limited by n
-
+
%<bitfield>'c print specified char iff bitfield is all ones
%<bitfield>`c print specified char iff bitfield is all zeroes
%<bitfield>?ab... select from array of values in big endian order. */
@@ -1539,10 +1539,10 @@ static const struct opcode32 neon_opcodes[] =
%<bitfield>{r|R}u as %{r|R} but if matches the other %u field then is UNPREDICTABLE
%<bitfield>{r|R}U as %{r|R} but if matches the other %U field then is UNPREDICTABLE
%<bitfield>d print the bitfield in decimal
- %<bitfield>W print the bitfield plus one in decimal
+ %<bitfield>W print the bitfield plus one in decimal
%<bitfield>x print the bitfield in hex
%<bitfield>X print the bitfield as 1 hex digit without leading "0x"
-
+
%<bitfield>'c print specified char iff bitfield is all ones
%<bitfield>`c print specified char iff bitfield is all zeroes
%<bitfield>?ab... select from array of values in big endian order
@@ -3084,8 +3084,8 @@ arm_decode_bitfield (const char *ptr,
{
unsigned long value = 0;
int width = 0;
-
- do
+
+ do
{
int start, end;
int bits;
@@ -3310,7 +3310,7 @@ print_insn_coprocessor (bfd_vma pc,
func (stream, "\t; ");
/* For unaligned PCs, apply off-by-alignment
correction. */
- info->print_address_func (offset + pc
+ info->print_address_func (offset + pc
+ info->bytes_per_chunk * 2
- (pc & 3),
info);
@@ -3897,7 +3897,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
else
return FALSE;
}
-
+
for (insn = neon_opcodes; insn->assembler; insn++)
{
if ((given & insn->mask) == insn->value)
@@ -3928,7 +3928,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
case 'A':
{
- static const unsigned char enc[16] =
+ static const unsigned char enc[16] =
{
0x4, 0x14, /* st4 0,1 */
0x4, /* st1 2 */
@@ -3950,7 +3950,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
int n = enc[type] & 0xf;
int stride = (enc[type] >> 4) + 1;
int ix;
-
+
func (stream, "{");
if (stride > 1)
for (ix = 0; ix != n; ix++)
@@ -3969,7 +3969,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
func (stream, ", %s", arm_regnames[rm]);
}
break;
-
+
case 'B':
{
int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
@@ -3985,7 +3985,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
if (length > 1 && size > 0)
stride = (idx_align & (1 << size)) ? 2 : 1;
-
+
switch (length)
{
case 1:
@@ -4002,19 +4002,19 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
}
}
break;
-
+
case 2:
if (size == 2 && (idx_align & 2) != 0)
return FALSE;
align = (idx_align & 1) ? 16 << size : 0;
break;
-
+
case 3:
if ((size == 2 && (idx_align & 3) != 0)
|| (idx_align & 1) != 0)
return FALSE;
break;
-
+
case 4:
if (size == 2)
{
@@ -4025,11 +4025,11 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
else
align = (idx_align & 1) ? 32 << size : 0;
break;
-
+
default:
abort ();
}
-
+
func (stream, "{");
for (i = 0; i < length; i++)
func (stream, "%sd%d[%d]", (i == 0) ? "" : ",",
@@ -4044,7 +4044,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
func (stream, ", %s", arm_regnames[rm]);
}
break;
-
+
case 'C':
{
int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
@@ -4056,12 +4056,12 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
int n = type + 1;
int stride = ((given >> 5) & 0x1);
int ix;
-
+
if (stride && (n == 1))
n++;
else
stride++;
-
+
func (stream, "{");
if (stride > 1)
for (ix = 0; ix != n; ix++)
@@ -4088,18 +4088,18 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
func (stream, ", %s", arm_regnames[rm]);
}
break;
-
+
case 'D':
{
int raw_reg = (given & 0xf) | ((given >> 1) & 0x10);
int size = (given >> 20) & 3;
int reg = raw_reg & ((4 << size) - 1);
int ix = raw_reg >> size >> 2;
-
+
func (stream, "d%d[%d]", reg, ix);
}
break;
-
+
case 'E':
/* Neon encoded constant for mov, mvn, vorr, vbic. */
{
@@ -4110,11 +4110,11 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
unsigned shift;
int size = 0;
int isfloat = 0;
-
+
bits |= ((given >> 24) & 1) << 7;
bits |= ((given >> 16) & 7) << 4;
bits |= ((given >> 0) & 15) << 0;
-
+
if (cmode < 8)
{
shift = (cmode >> 1) & 3;
@@ -4141,7 +4141,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
/* Bit replication into bytes. */
int ix;
unsigned long mask;
-
+
value = 0;
hival = 0;
for (ix = 7; ix >= 0; ix--)
@@ -4165,7 +4165,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
{
/* Floating point encoding. */
int tmp;
-
+
value = (unsigned long) (bits & 0x7f) << 19;
value |= (unsigned long) (bits & 0x80) << 24;
tmp = bits & 0x40 ? 0x3c : 0x40;
@@ -4185,7 +4185,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
case 8:
func (stream, "#%ld\t; 0x%.2lx", value, value);
break;
-
+
case 16:
func (stream, "#%ld\t; 0x%.4lx", value, value);
break;
@@ -4195,24 +4195,24 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
{
unsigned char valbytes[4];
double fvalue;
-
+
/* Do this a byte at a time so we don't have to
worry about the host's endianness. */
valbytes[0] = value & 0xff;
valbytes[1] = (value >> 8) & 0xff;
valbytes[2] = (value >> 16) & 0xff;
valbytes[3] = (value >> 24) & 0xff;
-
- floatformat_to_double
+
+ floatformat_to_double
(& floatformat_ieee_single_little, valbytes,
& fvalue);
-
+
func (stream, "#%.7g\t; 0x%.8lx", fvalue,
value);
}
else
func (stream, "#%ld\t; 0x%.8lx",
- (long) (((value & 0x80000000L) != 0)
+ (long) (((value & 0x80000000L) != 0)
? value | ~0xffffffffL : value),
value);
break;
@@ -4220,18 +4220,18 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
case 64:
func (stream, "#0x%.8lx%.8lx", hival, value);
break;
-
+
default:
abort ();
}
}
break;
-
+
case 'F':
{
int regno = ((given >> 16) & 0xf) | ((given >> (7 - 4)) & 0x10);
int num = (given >> 8) & 0x3;
-
+
if (!num)
func (stream, "{d%d}", regno);
else if (num + regno >= 32)
@@ -4249,7 +4249,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
unsigned long value;
c = arm_decode_bitfield (c, given, &value, &width);
-
+
switch (*c)
{
case 'r':
@@ -4262,7 +4262,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
case 'e':
func (stream, "%ld", (1ul << width) - value);
break;
-
+
case 'S':
case 'T':
case 'U':
@@ -4302,7 +4302,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
else
func (stream, "q%ld", value >> 1);
break;
-
+
case '`':
c++;
if (value == 0)
@@ -4345,20 +4345,20 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
/* Return the name of a v7A special register. */
-static const char *
+static const char *
banked_regname (unsigned reg)
{
switch (reg)
{
case 15: return "CPSR";
- case 32: return "R8_usr";
+ case 32: return "R8_usr";
case 33: return "R9_usr";
case 34: return "R10_usr";
case 35: return "R11_usr";
case 36: return "R12_usr";
case 37: return "SP_usr";
case 38: return "LR_usr";
- case 40: return "R8_fiq";
+ case 40: return "R8_fiq";
case 41: return "R9_fiq";
case 42: return "R10_fiq";
case 43: return "R11_fiq";
@@ -4739,7 +4739,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
}
else
{
- func (stream, "%cPSR_",
+ func (stream, "%cPSR_",
(given & 0x00400000) ? 'S' : 'C');
if (given & 0x80000)
func (stream, "f");
@@ -4753,7 +4753,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
break;
case 'U':
- if ((given & 0xf0) == 0x60)
+ if ((given & 0xf0) == 0x60)
{
switch (given & 0xf)
{
@@ -4762,8 +4762,8 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
func (stream, "#%d", (int) given & 0xf);
break;
}
- }
- else
+ }
+ else
{
const char * opt = data_barrier_option (given & 0xf);
if (opt != NULL)
@@ -4780,7 +4780,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
unsigned long value;
c = arm_decode_bitfield (c, given, &value, &width);
-
+
switch (*c)
{
case 'R':
@@ -5317,7 +5317,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
value_in_comment = imm;
}
break;
-
+
case 'J':
{
unsigned int imm = 0;
@@ -5647,7 +5647,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
break;
case 'U':
- if ((given & 0xf0) == 0x60)
+ if ((given & 0xf0) == 0x60)
{
switch (given & 0xf)
{
@@ -5657,7 +5657,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
break;
}
}
- else
+ else
{
const char * opt = data_barrier_option (given & 0xf);
if (opt != NULL)
@@ -5688,7 +5688,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
sysm |= (given & 0x30);
sysm |= (given & 0x00100000) >> 14;
name = banked_regname (sysm);
-
+
if (name != NULL)
func (stream, "%s", name);
else
@@ -5727,7 +5727,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
unsigned long val;
c = arm_decode_bitfield (c, given, &val, &width);
-
+
switch (*c)
{
case 'd':
@@ -5766,7 +5766,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
if (val == ((1ul << width) - 1))
func (stream, "%c", *c);
break;
-
+
case '`':
c++;
if (val == 0)
@@ -5777,7 +5777,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
func (stream, "%c", c[(1 << width) - (int) val]);
c += 1 << width;
break;
-
+
case 'x':
func (stream, "0x%lx", val & 0xffffffffUL);
break;
@@ -5855,7 +5855,7 @@ arm_symbol_is_valid (asymbol * sym,
struct disassemble_info * info ATTRIBUTE_UNUSED)
{
const char * name;
-
+
if (sym == NULL)
return FALSE;
@@ -5918,7 +5918,7 @@ parse_disassembler_options (char *options)
++ options;
/* Skip forward past seperators. */
while (ISSPACE (*options) || (*options == ','))
- ++ options;
+ ++ options;
}
}
@@ -6151,7 +6151,7 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
if ((info->flags & USER_SPECIFIED_MACHINE_TYPE) == 0)
/* If the user did not use the -m command line switch then default to
disassembling all types of ARM instruction.
-
+
The info->mach value has to be ignored as this will be based on
the default archictecture for the target and/or hints in the notes
section, but it will never be greater than the current largest arm