diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8e1a4f2..547d49c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 2 16:48:45 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000-tdep.c (branch_dest): Minor code cleanup, don't share + code between branch unconditional and branch conditional cases. + Wed Mar 1 09:41:26 1995 Doug Evans <dje@canuck.cygnus.com> Various changes for sparc64. diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index f08c77d..e226f54 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -78,10 +78,14 @@ branch_dest (opcode, instr, pc, safety) switch (opcode) { case 18 : immediate = ((instr & ~3) << 6) >> 6; /* br unconditional */ + if (absolute) + dest = immediate; + else + dest = pc + immediate; + break; case 16 : - if (opcode != 18) /* br conditional */ - immediate = ((instr & ~3) << 16) >> 16; + immediate = ((instr & ~3) << 16) >> 16; /* br conditional */ if (absolute) dest = immediate; else |