From 65a5742f420b922b5862ce36115f8f45ac2c70b8 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Wed, 19 Jun 2002 22:43:23 +0000 Subject: [PATCH] * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics code. --- ChangeLog | 5 +++++ sim-cpu.scm | 29 ++++++++++++++++++++--------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8df7564..bafe0b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-06-20 Hans-Peter Nilsson + + * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics + code. + 2002-06-18 Dave Brolley * cpu/frv.cpu: New cpu description. diff --git a/sim-cpu.scm b/sim-cpu.scm index 107c9cb..edfdb29 100644 --- a/sim-cpu.scm +++ b/sim-cpu.scm @@ -529,15 +529,26 @@ SEM_FN_NAME (@prefix@,init_idesc_table) (SIM_CPU *current_cpu) ; Return C code to perform the semantics of INSN. (define (gen-semantic-code insn) - ; Indicate generating code for INSN. - ; Use the compiled form if available. - ; The case when they're not available is for virtual insns. - (let ((sem (insn-compiled-semantics insn))) - (if sem - (rtl-c-parsed VOID sem nil - #:rtl-cover-fns? #t #:owner insn) - (rtl-c VOID (insn-semantics insn) nil - #:rtl-cover-fns? #t #:owner insn))) + (string-append + (if (and (insn-real? insn) + (isa-setup-semantics (current-isa))) + (string-append + " " + (rtl-c VOID (isa-setup-semantics (current-isa)) nil + #:rtl-cover-fns? #t + #:owner insn) + "\n") + "") + + ; Indicate generating code for INSN. + ; Use the compiled form if available. + ; The case when they're not available is for virtual insns. + (let ((sem (insn-compiled-semantics insn))) + (if sem + (rtl-c-parsed VOID sem nil + #:rtl-cover-fns? #t #:owner insn) + (rtl-c VOID (insn-semantics insn) nil + #:rtl-cover-fns? #t #:owner insn)))) ) ; Return definition of C function to perform INSN. -- 2.43.5