From: Michael Meissner Date: Thu, 2 Mar 1995 21:51:30 +0000 (+0000) Subject: Minor code cleanup in rs6000-tdep.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dc59e9828683ce04aa921cc9e7ee5f333c4c4fe3;p=binutils-gdb.git Minor code cleanup in rs6000-tdep.c --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8e1a4f2e084..547d49c907d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 2 16:48:45 1995 Michael Meissner + + * 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 Various changes for sparc64. diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index f08c77d7b80..e226f54b95d 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