aboutsummaryrefslogtreecommitdiff
path: root/sim/common/cgen-par.c
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-10-12 04:37:53 +0000
committerJason Molenda <jmolenda@apple.com>1999-10-12 04:37:53 +0000
commit2df3850c7bfea139c5baf6c2911c11456a1b32e9 (patch)
treea7b20a626e29e423c610ac0eef23fbe9591684e4 /sim/common/cgen-par.c
parent50a6e31f5835fc707a0c3ca6e0d56680befb645b (diff)
downloadgdb-2df3850c7bfea139c5baf6c2911c11456a1b32e9.zip
gdb-2df3850c7bfea139c5baf6c2911c11456a1b32e9.tar.gz
gdb-2df3850c7bfea139c5baf6c2911c11456a1b32e9.tar.bz2
import gdb-1999-10-11 snapshot
Diffstat (limited to 'sim/common/cgen-par.c')
-rw-r--r--sim/common/cgen-par.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sim/common/cgen-par.c b/sim/common/cgen-par.c
index 51147ad..1919aea 100644
--- a/sim/common/cgen-par.c
+++ b/sim/common/cgen-par.c
@@ -68,6 +68,21 @@ void sim_queue_pc_write (SIM_CPU *cpu, USI value)
element->kinds.pc_write.value = value;
}
+void sim_queue_fn_hi_write (
+ SIM_CPU *cpu,
+ void (*write_function)(SIM_CPU *cpu, UINT, UHI),
+ UINT regno,
+ UHI value
+)
+{
+ CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu);
+ CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q);
+ element->kind = CGEN_FN_HI_WRITE;
+ element->kinds.fn_hi_write.function = write_function;
+ element->kinds.fn_hi_write.regno = regno;
+ element->kinds.fn_hi_write.value = value;
+}
+
void sim_queue_fn_si_write (
SIM_CPU *cpu,
void (*write_function)(SIM_CPU *cpu, UINT, USI),
@@ -162,6 +177,11 @@ cgen_write_queue_element_execute (SIM_CPU *cpu, CGEN_WRITE_QUEUE_ELEMENT *item)
case CGEN_PC_WRITE:
CPU_PC_SET (cpu, item->kinds.pc_write.value);
break;
+ case CGEN_FN_HI_WRITE:
+ item->kinds.fn_hi_write.function (cpu,
+ item->kinds.fn_hi_write.regno,
+ item->kinds.fn_hi_write.value);
+ break;
case CGEN_FN_SI_WRITE:
item->kinds.fn_si_write.function (cpu,
item->kinds.fn_si_write.regno,