Minor code cleanup in rs6000-tdep.c
authorMichael Meissner <gnu@the-meissners.org>
Thu, 2 Mar 1995 21:51:30 +0000 (21:51 +0000)
committerMichael Meissner <gnu@the-meissners.org>
Thu, 2 Mar 1995 21:51:30 +0000 (21:51 +0000)
gdb/ChangeLog
gdb/rs6000-tdep.c

index 8e1a4f2e0842d55bab2fa2b18110a644ac3267cd..547d49c907d9c7a09e2ff73b14a14427010ddcc7 100644 (file)
@@ -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.
index f08c77d7b80919a0fd6ff9e25990d5565a485b02..e226f54b95d77a605a84743feb24ca2cfcd922dc 100644 (file)
@@ -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