aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/common/ChangeLog10
-rw-r--r--sim/common/cgen-par.c23
-rw-r--r--sim/common/cgen-par.h11
3 files changed, 41 insertions, 3 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 1273e83..d9b6675 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,13 @@
+2000-03-08 Dave Brolley <brolley@redhat.com>
+
+ * cgen-par.h (cgen_write_queue_kind): Add CGEN_FN_SF_WRITE.
+ (CGEN_WRITE_QUEUE_ELEMENT): Add fn_sf_write.
+ (sim_queue_fn_si_write): Last argument is has type USI.
+ (sim_queue_fn_sf_write): New function.
+ * cgen-par.c (sim_queue_fn_si_write): Declare 'value' as USI.
+ (sim_queue_fn_sf_write): New function.
+ (cgen_write_queue_element_execute): Handle CGEN_FN_SF_WRITE.
+
Tue Feb 22 16:45:09 2000 Andrew Cagney <cagney@b1.cygnus.com>
* run.c (main): When SIM_HAVE_ENVIRONMENT enable tracing with
diff --git a/sim/common/cgen-par.c b/sim/common/cgen-par.c
index baf9f58..0becdcf 100644
--- a/sim/common/cgen-par.c
+++ b/sim/common/cgen-par.c
@@ -93,7 +93,7 @@ void sim_queue_fn_si_write (
SIM_CPU *cpu,
void (*write_function)(SIM_CPU *cpu, UINT, USI),
UINT regno,
- SI value
+ USI value
)
{
CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu);
@@ -105,6 +105,22 @@ void sim_queue_fn_si_write (
element->kinds.fn_si_write.value = value;
}
+void sim_queue_fn_sf_write (
+ SIM_CPU *cpu,
+ void (*write_function)(SIM_CPU *cpu, UINT, SF),
+ UINT regno,
+ SF value
+)
+{
+ CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu);
+ CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q);
+ element->kind = CGEN_FN_SF_WRITE;
+ element->insn_address = CPU_PC_GET (cpu);
+ element->kinds.fn_sf_write.function = write_function;
+ element->kinds.fn_sf_write.regno = regno;
+ element->kinds.fn_sf_write.value = value;
+}
+
void sim_queue_fn_di_write (
SIM_CPU *cpu,
void (*write_function)(SIM_CPU *cpu, UINT, DI),
@@ -364,6 +380,11 @@ cgen_write_queue_element_execute (SIM_CPU *cpu, CGEN_WRITE_QUEUE_ELEMENT *item)
item->kinds.fn_si_write.regno,
item->kinds.fn_si_write.value);
break;
+ case CGEN_FN_SF_WRITE:
+ item->kinds.fn_sf_write.function (cpu,
+ item->kinds.fn_sf_write.regno,
+ item->kinds.fn_sf_write.value);
+ break;
case CGEN_FN_DI_WRITE:
item->kinds.fn_di_write.function (cpu,
item->kinds.fn_di_write.regno,
diff --git a/sim/common/cgen-par.h b/sim/common/cgen-par.h
index 4e0257a..726e648 100644
--- a/sim/common/cgen-par.h
+++ b/sim/common/cgen-par.h
@@ -25,7 +25,8 @@ 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_HI_WRITE, CGEN_FN_SI_WRITE, CGEN_FN_DI_WRITE, CGEN_FN_DF_WRITE,
+ CGEN_FN_HI_WRITE, CGEN_FN_SI_WRITE, CGEN_FN_SF_WRITE,
+ CGEN_FN_DI_WRITE, CGEN_FN_DF_WRITE,
CGEN_FN_XI_WRITE, CGEN_FN_PC_WRITE,
CGEN_MEM_QI_WRITE, CGEN_MEM_HI_WRITE, CGEN_MEM_SI_WRITE, CGEN_MEM_DI_WRITE,
CGEN_MEM_DF_WRITE, CGEN_MEM_XI_WRITE,
@@ -70,6 +71,11 @@ typedef struct {
} fn_si_write;
struct {
UINT regno;
+ SF value;
+ void (*function)(SIM_CPU *, UINT, SF);
+ } fn_sf_write;
+ struct {
+ UINT regno;
DI value;
void (*function)(SIM_CPU *, UINT, DI);
} fn_di_write;
@@ -181,7 +187,8 @@ 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_si_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, USI), UINT, USI);
+extern void sim_queue_fn_sf_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, SF), UINT, SF);
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, DF), UINT, DF);
extern void sim_queue_fn_xi_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, SI *), UINT, SI *);