aboutsummaryrefslogtreecommitdiff
path: root/sim/common
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
parent50a6e31f5835fc707a0c3ca6e0d56680befb645b (diff)
downloadgdb-2df3850c7bfea139c5baf6c2911c11456a1b32e9.zip
gdb-2df3850c7bfea139c5baf6c2911c11456a1b32e9.tar.gz
gdb-2df3850c7bfea139c5baf6c2911c11456a1b32e9.tar.bz2
import gdb-1999-10-11 snapshot
Diffstat (limited to 'sim/common')
-rw-r--r--sim/common/ChangeLog8
-rw-r--r--sim/common/cgen-par.c20
-rw-r--r--sim/common/cgen-par.h8
3 files changed, 35 insertions, 1 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 22be0d9..9cdbd7b 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,11 @@
+1999-10-07 Dave Brolley <brolley@cygnus.com>
+
+ * cgen-par.h (CGEN_FN_HI_WRITE): New enumerator.
+ (fn_hi_write): New union member.
+ (sim_queue_fn_hi_write): New function.
+ * cgen-par.c (sim_queue_fn_hi_write): New function.
+ (cgen_write_queue_element_execute): Handle CGEN_FN_HI_WRITE.
+
1999-09-29 Doug Evans <devans@casey.cygnus.com>
* cgen-defs.h (sim_engine_invalid_insn): New arg `vpc'.
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,
diff --git a/sim/common/cgen-par.h b/sim/common/cgen-par.h
index 25272a3..f0edfa6 100644
--- a/sim/common/cgen-par.h
+++ b/sim/common/cgen-par.h
@@ -25,7 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
enum cgen_write_queue_kind {
CGEN_BI_WRITE, CGEN_QI_WRITE, CGEN_SI_WRITE, CGEN_SF_WRITE,
CGEN_PC_WRITE,
- CGEN_FN_SI_WRITE, CGEN_FN_DI_WRITE, CGEN_FN_DF_WRITE,
+ CGEN_FN_HI_WRITE, CGEN_FN_SI_WRITE, CGEN_FN_DI_WRITE, CGEN_FN_DF_WRITE,
CGEN_MEM_QI_WRITE, CGEN_MEM_HI_WRITE, CGEN_MEM_SI_WRITE,
CGEN_NUM_WRITE_KINDS
};
@@ -55,6 +55,11 @@ typedef struct {
} pc_write;
struct {
UINT regno;
+ UHI value;
+ void (*function)(SIM_CPU *, UINT, UHI);
+ } fn_hi_write;
+ struct {
+ UINT regno;
SI value;
void (*function)(SIM_CPU *, UINT, USI);
} fn_si_write;
@@ -118,6 +123,7 @@ extern void sim_queue_sf_write (SIM_CPU *, SI *, SF);
extern void sim_queue_pc_write (SIM_CPU *, USI);
+extern void sim_queue_fn_hi_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, UHI), UINT, UHI);
extern void sim_queue_fn_si_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, USI), UINT, SI);
extern void sim_queue_fn_di_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, DI), UINT, DI);
extern void sim_queue_fn_df_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, DI), UINT, DF);