From 667065d0d4c9805b49fa87832cbf9af65e403586 Mon Sep 17 00:00:00 2001 From: Gavin Romig-Koch Date: Tue, 16 Sep 1997 20:01:00 +0000 Subject: [PATCH] * sim/mips/gencode.c (build_instruction): Don't need to subtract 4 for JALR, just 2. --- sim/mips/ChangeLog | 5 +++++ sim/mips/gencode.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 058b2bd5e5c..2764259bfe1 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,8 @@ +Tue Sep 16 15:52:04 1997 Gavin Koch + + * gencode.c (build_instruction): Don't need to subtract 4 for + JALR, just 2. + Tue Sep 16 11:32:28 1997 Gavin Koch * interp.c: Correct some HASFPU problems. diff --git a/sim/mips/gencode.c b/sim/mips/gencode.c index d2ca7496b42..ae4f42ad53f 100644 --- a/sim/mips/gencode.c +++ b/sim/mips/gencode.c @@ -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"); -- 2.30.2