* sim/mips/gencode.c (build_instruction): Don't need to subtract 4 for
authorGavin Romig-Koch <gavin@redhat.com>
Tue, 16 Sep 1997 20:01:00 +0000 (20:01 +0000)
committerGavin Romig-Koch <gavin@redhat.com>
Tue, 16 Sep 1997 20:01:00 +0000 (20:01 +0000)
JALR, just 2.

sim/mips/ChangeLog
sim/mips/gencode.c

index 058b2bd5e5cfc76017942ad3e281133183454411..2764259bfe12c7f91d60dc55433f5489d6876647 100644 (file)
@@ -1,3 +1,8 @@
+Tue Sep 16 15:52:04 1997  Gavin Koch  <gavin@cygnus.com>
+
+       * gencode.c (build_instruction): Don't need to subtract 4 for
+       JALR, just 2.
+
 Tue Sep 16 11:32:28 1997  Gavin Koch  <gavin@cygnus.com>
 
        * interp.c: Correct some HASFPU problems.
index d2ca7496b42e6a832b3d802b3b7d08b178ad2edc..ae4f42ad53f169d2f636faeb1221c495c4cde401 100644 (file)
@@ -2532,7 +2532,8 @@ build_instruction (doisa, features, mips16, insn)
      printf("   op1 = WORD64LO(op1);\n");
      printf("   /* NOTE: The jump occurs AFTER the next instruction has been executed */\n");
      printf("   DSPC = op1;\n");
-     if (insn->flags & LINK)
+     if ((insn->flags & LINK)
+         && ! (insn->flags & REG))
        printf("   JALDELAYSLOT();\n");
      else
        printf("   DELAYSLOT();\n");