From 885a2de6baf38aa95fde807534c368e1e5a44c37 Mon Sep 17 00:00:00 2001 From: brolley Date: Fri, 29 Jul 2005 19:25:33 +0000 Subject: [PATCH] 2005-07-29 Dave Brolley * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'writte n' if with-profile or with-parallel-write. (cgen-semantics.cxx): Make the @prefix@ namespace available if with-para llel. --- cgen/ChangeLog | 3 +++ cgen/sid-cpu.scm | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cgen/ChangeLog b/cgen/ChangeLog index 66c4772e4d..8ba56577ac 100644 --- a/cgen/ChangeLog +++ b/cgen/ChangeLog @@ -1,5 +1,8 @@ 2005-07-29 Dave Brolley + * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written' + if with-profile or with-parallel-write. + (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel. * operand.scm (op:new-mode): Convert (obj:name op) to a string for string-append. diff --git a/cgen/sid-cpu.scm b/cgen/sid-cpu.scm index a13bc51d4d..161b5f062a 100644 --- a/cgen/sid-cpu.scm +++ b/cgen/sid-cpu.scm @@ -736,7 +736,10 @@ using namespace cgen; (gen-define-field-macro (insn-sfmt insn)) " sem_status status = SEM_STATUS_NORMAL;\n" " @prefix@_scache* abuf = sem;\n" - + ; Unconditionally written operands are not recorded here. + (if (or (with-profile?) (with-parallel-write?)) + " unsigned long long written = 0;\n" + "") ; The address of this insn, needed by extraction and semantic code. ; Note that the address recorded in the cpu state struct is not used. ; For faster engines that copy will be out of date. @@ -792,8 +795,11 @@ using namespace cgen; #endif #include \"@cpu@.h\" -using namespace @cpu@; // FIXME: namespace organization still wip - +using namespace @cpu@; // FIXME: namespace organization still wip\n") + (if (with-parallel?) + (string-write "\ +using namespace @prefix@; // FIXME: namespace organization still wip\n")) + (string-write "\ #define GET_ATTR(name) GET_ATTR_##name () \n" -- 2.11.0