mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
Fix brf0{t,f}.s <label> -> instruction not to execute instruction if branch succeeds
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Sat Sep 14 22:18:43 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||||
|
|
||||||
|
* interp.c (do_2_short): If the instruction encodes jump->ins,
|
||||||
|
don't do the second instruction if the jump succeeds.
|
||||||
|
|
||||||
Fri Sep 13 22:35:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
Fri Sep 13 22:35:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||||
|
|
||||||
* simops.c (OP_5F00): Use unknown traps to print all GPRs,
|
* simops.c (OP_5F00): Use unknown traps to print all GPRs,
|
||||||
|
@ -158,12 +158,15 @@ do_long (ins)
|
|||||||
ins_type_counters[ (int)State.ins_type ]++;
|
ins_type_counters[ (int)State.ins_type ]++;
|
||||||
(h->ops->func)();
|
(h->ops->func)();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_2_short (ins1, ins2, leftright)
|
do_2_short (ins1, ins2, leftright)
|
||||||
uint16 ins1, ins2;
|
uint16 ins1, ins2;
|
||||||
enum _leftright leftright;
|
enum _leftright leftright;
|
||||||
{
|
{
|
||||||
struct hash_entry *h;
|
struct hash_entry *h;
|
||||||
|
reg_t orig_pc = PC;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if ((d10v_debug & DEBUG_INSTRUCTION) != 0)
|
if ((d10v_debug & DEBUG_INSTRUCTION) != 0)
|
||||||
(*d10v_callback->printf_filtered) (d10v_callback, "do_2_short 0x%x (%s) -> 0x%x\n",
|
(*d10v_callback->printf_filtered) (d10v_callback, "do_2_short 0x%x (%s) -> 0x%x\n",
|
||||||
@ -175,12 +178,18 @@ do_2_short (ins1, ins2, leftright)
|
|||||||
State.ins_type = (leftright == LEFT_FIRST) ? INS_LEFT : INS_RIGHT;
|
State.ins_type = (leftright == LEFT_FIRST) ? INS_LEFT : INS_RIGHT;
|
||||||
ins_type_counters[ (int)State.ins_type ]++;
|
ins_type_counters[ (int)State.ins_type ]++;
|
||||||
(h->ops->func)();
|
(h->ops->func)();
|
||||||
|
|
||||||
|
/* If the PC has changed (ie, a jump), don't do the second instruction */
|
||||||
|
if (orig_pc == PC)
|
||||||
|
{
|
||||||
h = lookup_hash (ins2, 0);
|
h = lookup_hash (ins2, 0);
|
||||||
get_operands (h->ops, ins2);
|
get_operands (h->ops, ins2);
|
||||||
State.ins_type = (leftright == LEFT_FIRST) ? INS_RIGHT : INS_LEFT;
|
State.ins_type = (leftright == LEFT_FIRST) ? INS_RIGHT : INS_LEFT;
|
||||||
ins_type_counters[ (int)State.ins_type ]++;
|
ins_type_counters[ (int)State.ins_type ]++;
|
||||||
(h->ops->func)();
|
(h->ops->func)();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_parallel (ins1, ins2)
|
do_parallel (ins1, ins2)
|
||||||
uint16 ins1, ins2;
|
uint16 ins1, ins2;
|
||||||
|
Reference in New Issue
Block a user