summaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>1999-10-12 04:37:18 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>1999-10-12 04:37:18 +0000
commitb6ce113a2d8af9840cc5fc4d5bd189570b6e1c9c (patch)
tree924f010e10af9a497336411a68e721e78eee4bb2 /sim/common
parent7e0dae8dc181549082baf0824eec205d9618edd2 (diff)
downloadgdb-b6ce113a2d8af9840cc5fc4d5bd189570b6e1c9c.tar.gz
import gdb-1999-10-11 snapshotgdb-1999-10-11
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 22be0d90fda..9cdbd7bf225 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 51147adad7d..1919aea3baf 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 25272a3c5e7..f0edfa6d0b4 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);