aboutsummaryrefslogtreecommitdiff
path: root/opcodes/m10300-dis.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2001-07-24 04:10:19 +0000
committerKazu Hirata <kazu@codesourcery.com>2001-07-24 04:10:19 +0000
commit33822a8e759c9fab4599d5c942719296eef720cd (patch)
tree3a6979ffbc8c8562dadc048b359230adcff71f91 /opcodes/m10300-dis.c
parenta7019e234a78b290ceac8bfa0f77661cf8f58914 (diff)
downloadgdb-33822a8e759c9fab4599d5c942719296eef720cd.zip
gdb-33822a8e759c9fab4599d5c942719296eef720cd.tar.gz
gdb-33822a8e759c9fab4599d5c942719296eef720cd.tar.bz2
* alpha-dis.c: Fix formatting.
* cris-dis.c: Likewise. * m10300-dis.c: Likewise. * tic54x-dis.c: Likewise.
Diffstat (limited to 'opcodes/m10300-dis.c')
-rw-r--r--opcodes/m10300-dis.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/opcodes/m10300-dis.c b/opcodes/m10300-dis.c
index f9e60d7..a8d4b51 100644
--- a/opcodes/m10300-dis.c
+++ b/opcodes/m10300-dis.c
@@ -1,5 +1,5 @@
/* Disassemble MN10300 instructions.
- Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "sysdep.h"
-#include "opcode/mn10300.h"
+#include "opcode/mn10300.h"
#include "dis-asm.h"
#include "opintl.h"
@@ -29,7 +29,7 @@ static void disassemble PARAMS ((bfd_vma, struct disassemble_info *,
#define HAVE_AM33 (info->mach == AM33)
#define HAVE_AM30 (info->mach == AM30)
-int
+int
print_insn_mn10300 (memaddr, info)
bfd_vma memaddr;
struct disassemble_info *info;
@@ -103,7 +103,7 @@ print_insn_mn10300 (memaddr, info)
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
- return -1;
+ return -1;
}
insn = bfd_getb16 (buffer);
consume = 2;
@@ -111,7 +111,7 @@ print_insn_mn10300 (memaddr, info)
/* These are three byte insns. */
else if ((insn & 0xff) == 0xf8
- || (insn & 0xff) == 0xcc
+ || (insn & 0xff) == 0xcc
|| (insn & 0xff) == 0xf9
|| (insn & 0xf3) == 0x01
|| (insn & 0xf3) == 0x02
@@ -140,7 +140,7 @@ print_insn_mn10300 (memaddr, info)
(*info->memory_error_func) (status, memaddr, info);
return -1;
}
- insn |= *(unsigned char *)buffer;
+ insn |= *(unsigned char *) buffer;
consume = 3;
}
@@ -249,7 +249,7 @@ disassemble (memaddr, info, insn, size)
mysize = 7;
else
mysize = 7;
-
+
if ((op->mask & insn) == op->opcode
&& size == (unsigned int) mysize
&& (op->machine == 0
@@ -259,7 +259,7 @@ disassemble (memaddr, info, insn, size)
const unsigned char *opindex_ptr;
unsigned int nocomma;
int paren = 0;
-
+
if (op->format == FMT_D1 || op->format == FMT_S1)
extra_shift = 8;
else if (op->format == FMT_D2 || op->format == FMT_D4
@@ -363,7 +363,7 @@ disassemble (memaddr, info, insn, size)
(*info->memory_error_func) (status, memaddr, info);
return;
}
- extension = *(unsigned char *)buffer;
+ extension = *(unsigned char *) buffer;
}
else if (size == 6 && op->format == FMT_D8)
{
@@ -374,7 +374,7 @@ disassemble (memaddr, info, insn, size)
(*info->memory_error_func) (status, memaddr, info);
return;
}
- insn |= *(unsigned char *)buffer;
+ insn |= *(unsigned char *) buffer;
status = (*info->read_memory_func) (memaddr + 3, buffer, 2, info);
if (status != 0)
@@ -426,7 +426,7 @@ disassemble (memaddr, info, insn, size)
insn &= 0xff000000;
insn |= (temp >> 8) & 0xffffff;
extension = (temp & 0xff) << 16;
-
+
status = (*info->read_memory_func) (memaddr + 5, buffer, 2, info);
if (status != 0)
{
@@ -449,14 +449,14 @@ disassemble (memaddr, info, insn, size)
insn &= 0xffff0000;
insn |= (temp >> 16) & 0xffff;
extension = (temp & 0xffff) << 8;
-
+
status = (*info->read_memory_func) (memaddr + 6, buffer, 1, info);
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
return;
}
- extension |= *(unsigned char *)buffer;
+ extension |= *(unsigned char *) buffer;
}
match = 1;
@@ -484,8 +484,8 @@ disassemble (memaddr, info, insn, size)
temp = extension >> operand->shift;
temp &= ((1 << (32 - operand->bits)) - 1);
value |= temp;
- value = ((value ^ (((unsigned long)1) << 31))
- - (((unsigned long)1) << 31));
+ value = ((value ^ (((unsigned long) 1) << 31))
+ - (((unsigned long) 1) << 31));
}
else if ((operand->flags & MN10300_OPERAND_24BIT) != 0)
{
@@ -512,8 +512,8 @@ disassemble (memaddr, info, insn, size)
if ((operand->flags & MN10300_OPERAND_SIGNED) != 0
/* These are properly extended by the code above. */
&& ((operand->flags & MN10300_OPERAND_24BIT) == 0))
- value = ((value ^ (((unsigned long)1) << (operand->bits - 1)))
- - (((unsigned long)1) << (operand->bits - 1)));
+ value = ((value ^ (((unsigned long) 1) << (operand->bits - 1)))
+ - (((unsigned long) 1) << (operand->bits - 1)));
if (!nocomma
&& (!paren
@@ -521,19 +521,19 @@ disassemble (memaddr, info, insn, size)
(*info->fprintf_func) (info->stream, ",");
nocomma = 0;
-
+
if ((operand->flags & MN10300_OPERAND_DREG) != 0)
{
value = ((insn >> (operand->shift + extra_shift))
& ((1 << operand->bits) - 1));
- (*info->fprintf_func) (info->stream, "d%d", (int)value);
+ (*info->fprintf_func) (info->stream, "d%d", (int) value);
}
else if ((operand->flags & MN10300_OPERAND_AREG) != 0)
{
value = ((insn >> (operand->shift + extra_shift))
& ((1 << operand->bits) - 1));
- (*info->fprintf_func) (info->stream, "a%d", (int)value);
+ (*info->fprintf_func) (info->stream, "a%d", (int) value);
}
else if ((operand->flags & MN10300_OPERAND_SP) != 0)
@@ -550,11 +550,11 @@ disassemble (memaddr, info, insn, size)
value = ((insn >> (operand->shift + extra_shift))
& ((1 << operand->bits) - 1));
if (value < 8)
- (*info->fprintf_func) (info->stream, "r%d", (int)value);
+ (*info->fprintf_func) (info->stream, "r%d", (int) value);
else if (value < 12)
- (*info->fprintf_func) (info->stream, "a%d", (int)value - 8);
+ (*info->fprintf_func) (info->stream, "a%d", (int) value - 8);
else
- (*info->fprintf_func) (info->stream, "d%d", (int)value - 12);
+ (*info->fprintf_func) (info->stream, "d%d", (int) value - 12);
}
else if ((operand->flags & MN10300_OPERAND_XRREG) != 0)
@@ -564,7 +564,7 @@ disassemble (memaddr, info, insn, size)
if (value == 0)
(*info->fprintf_func) (info->stream, "sp", value);
else
- (*info->fprintf_func) (info->stream, "xr%d", (int)value);
+ (*info->fprintf_func) (info->stream, "xr%d", (int) value);
}
else if ((operand->flags & MN10300_OPERAND_USP) != 0)
@@ -670,8 +670,8 @@ disassemble (memaddr, info, insn, size)
(*info->fprintf_func) (info->stream, "]");
}
- else
- (*info->fprintf_func) (info->stream, "%ld", (long)value);
+ else
+ (*info->fprintf_func) (info->stream, "%ld", (long) value);
}
/* All done. */
break;