mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 08:24:05 +08:00
* gencode.c (build_mips16_operands): Fix base PC value for PC
relative operands. (build_instruction): Call JALDELAYSLOT rather than DELAYSLOT for a jal instruction. * interp.c (simJALDELAYSLOT): Define. (JALDELAYSLOT): Define. (INDELAYSLOT, INJALDELAYSLOT): Define. (simulate): Clear simJALDELAYSLOT when simDELAYSLOT is cleared.
This commit is contained in:
@ -954,10 +954,10 @@ build_mips16_operands (bitmap)
|
||||
{
|
||||
int j;
|
||||
|
||||
printf ("PC & ~ (uword64) 1");
|
||||
printf ("((INDELAYSLOT () ? (INJALDELAYSLOT () ? IPC - 4 : IPC - 2) : IPC) & ~ (uword64) 1)");
|
||||
for (j = 0; j < opindex; j++)
|
||||
if (ops[j]->shift != 0)
|
||||
printf (" & 0x%x", ~ ((1 << op->shift) - 1));
|
||||
printf (" & ~ (uword64) 0x%x", (1 << ops[j]->shift) - 1);
|
||||
}
|
||||
else if ((op->flags & MIPS16_ZERO) != 0)
|
||||
printf ("0");
|
||||
@ -1867,7 +1867,10 @@ 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");
|
||||
printf(" DELAYSLOT();\n");
|
||||
if (insn->flags & LINK)
|
||||
printf(" JALDELAYSLOT();\n");
|
||||
else
|
||||
printf(" DELAYSLOT();\n");
|
||||
break ;
|
||||
|
||||
case BRANCH: /* execute delay slot instruction before branch unless (LIKELY && branch_not_taken) */
|
||||
|
Reference in New Issue
Block a user