From bc830321486a9158e5d051cd2c5999c8edc7eded Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 2 Jan 1997 19:21:36 +0000 Subject: [PATCH] * mn10300-dis.c (disassemble): Make sure all variables are initialized before they are used. Fixes various weird disassembly problems. --- opcodes/ChangeLog | 5 +++++ opcodes/mn10300-dis.c | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index ccf0a6e2585..a8ba2d0865b 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 efc8a1be998..b6e02b37123 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) { -- 2.30.2