[patch][commit] Parallel Write Fixes

Dave Brolley <[email protected]>
Newsgroups gmane.comp.emulators.sid.devel,gmane.comp.tools.cgen.devel
Message-ID <[email protected]>
Hi,

I've committed the attached patch which adds some declarttions needed by 
ports using the new parallel write support. Tested on an internal port. 
No effect on existing ports.

Dave
cgen-parallel.patch.ChangeLog (text/plain, 329 B)
2005-07-29  Dave Brolley  <[email protected]>

	* 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.
cgen-parallel.patch.txt (text/plain, 1.7 KB)
Index: cgen/sid-cpu.scm
===================================================================
RCS file: /cvs/src/src/cgen/sid-cpu.scm,v
retrieving revision 1.12
diff -c -p -r1.12 sid-cpu.scm
*** cgen/sid-cpu.scm	15 Jun 2005 21:28:19 -0000	1.12
--- cgen/sid-cpu.scm	29 Jul 2005 19:22:14 -0000
*************** using namespace cgen;
*** 736,742 ****
       (gen-define-field-macro (insn-sfmt insn))
       "  sem_status status = SEM_STATUS_NORMAL;\n"
       "  @prefix@_scache* abuf = sem;\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.
--- 736,745 ----
       (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.
*************** using namespace cgen;
*** 792,799 ****
  #endif
  #include \"@[email protected]\"
  
! using namespace @cpu@; // FIXME: namespace organization still wip
! 
  #define GET_ATTR(name) GET_ATTR_##name ()
  
  \n"
--- 795,805 ----
  #endif
  #include \"@[email protected]\"
  
! 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"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.