aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1997-01-02 19:21:36 +0000
committerJeff Law <law@redhat.com>1997-01-02 19:21:36 +0000
commitbc830321486a9158e5d051cd2c5999c8edc7eded (patch)
treeaf2563901ea6e3e7ed6e2646669854985616509a /opcodes
parentfb0b06b0cf179c7a6d34eb73f74c188f5ed1f8af (diff)
downloadfsf-binutils-gdb-bc830321486a9158e5d051cd2c5999c8edc7eded.zip
fsf-binutils-gdb-bc830321486a9158e5d051cd2c5999c8edc7eded.tar.gz
fsf-binutils-gdb-bc830321486a9158e5d051cd2c5999c8edc7eded.tar.bz2
* mn10300-dis.c (disassemble): Make sure all variables are initialized
before they are used. Fixes various weird disassembly problems.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/mn10300-dis.c12
2 files changed, 11 insertions, 6 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index ccf0a6e..a8ba2d0 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jan 2 12:14:29 1997 Jeffrey A Law (law@cygnus.com)
+
+ * mn10300-dis.c (disassemble): Make sure all variables are initialized
+ before they are used.
+
start-sanitize-v850
Tue Dec 31 12:20:38 1996 Jeffrey A Law (law@cygnus.com)
diff --git a/opcodes/mn10300-dis.c b/opcodes/mn10300-dis.c
index efc8a1b..b6e02b3 100644
--- a/opcodes/mn10300-dis.c
+++ b/opcodes/mn10300-dis.c
@@ -210,7 +210,7 @@ disassemble (memaddr, info, insn, size)
struct mn10300_opcode *op = (struct mn10300_opcode *)mn10300_opcodes;
const struct mn10300_operand *operand;
bfd_byte buffer[4];
- unsigned long extension;
+ unsigned long extension = 0;
int status, match = 0;
/* Find the opcode. */
@@ -297,7 +297,7 @@ disassemble (memaddr, info, insn, size)
}
else if (size == 5 && op->opcode == 0xdc000000)
{
- unsigned long temp;
+ unsigned long temp = 0;
status = (*info->read_memory_func) (memaddr + 1, buffer, 4, info);
if (status != 0)
{
@@ -312,7 +312,7 @@ disassemble (memaddr, info, insn, size)
}
else if (size == 5)
{
- unsigned long temp;
+ unsigned long temp = 0;
status = (*info->read_memory_func) (memaddr + 1, buffer, 2, info);
if (status != 0)
{
@@ -334,7 +334,7 @@ disassemble (memaddr, info, insn, size)
}
else if (size == 6)
{
- unsigned long temp;
+ unsigned long temp = 0;
status = (*info->read_memory_func) (memaddr + 2, buffer, 4, info);
if (status != 0)
{
@@ -349,7 +349,7 @@ disassemble (memaddr, info, insn, size)
}
else if (size == 7 && op->opcode == 0xdd000000)
{
- unsigned long temp;
+ unsigned long temp = 0;
status = (*info->read_memory_func) (memaddr + 1, buffer, 4, info);
if (status != 0)
{
@@ -372,7 +372,7 @@ disassemble (memaddr, info, insn, size)
}
else if (size == 7)
{
- unsigned long temp;
+ unsigned long temp = 0;
status = (*info->read_memory_func) (memaddr + 2, buffer, 4, info);
if (status != 0)
{