From e88acae7927b1144822572406f0ba9540e41e341 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 8 Mar 2000 21:09:41 +0000 Subject: [PATCH] * extension 2000-03-08 Dave Brolley * 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. --- sim/common/ChangeLog | 10 ++++++++++ sim/common/cgen-par.c | 23 ++++++++++++++++++++++- sim/common/cgen-par.h | 11 +++++++++-- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 1273e8353d4..d9b667555c1 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,13 @@ +2000-03-08 Dave Brolley + + * 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 * 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 baf9f586464..0becdcf1d28 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 4e0257a98fa..726e6485aaa 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, @@ -68,6 +69,11 @@ typedef struct { SI value; void (*function)(SIM_CPU *, UINT, USI); } fn_si_write; + struct { + UINT regno; + SF value; + void (*function)(SIM_CPU *, UINT, SF); + } fn_sf_write; struct { UINT regno; DI value; @@ -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 *); -- 2.30.2