<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>Re: [Simh] Simh execution speed improvement</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Courier New">Here's another little contribution to this discussion. I of course have not</FONT>

<BR><FONT SIZE=2 FACE="Courier New">lowered myself so far as to conduct any benchmarks :-) but with a few minor</FONT>

<BR><FONT SIZE=2 FACE="Courier New">tweaks, it is possible to compile using gcc with the "-fwhole-program</FONT>

<BR><FONT SIZE=2 FACE="Courier New">--combine" flags -- on paper, this presents the compiler with additional</FONT>

<BR><FONT SIZE=2 FACE="Courier New">opportunities for optimization.</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">Probably these would be good changes to make anyway, as they resolve</FONT>

<BR><FONT SIZE=2 FACE="Courier New">inconsistencies in function definitions in different parts of the code. It</FONT>

<BR><FONT SIZE=2 FACE="Courier New">wasn't particularly clear to me whether it was more appropriate to use</FONT>

<BR><FONT SIZE=2 FACE="Courier New">signed or unsigned types, so don't read too much into my choices. :-)</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">The appended patch fixes only the VAX code.</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">Cheers,</FONT>
</P>

<P>        <FONT SIZE=2 FACE="Courier New">Scott</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">--</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">diff -ur simhv37-3/VAX/vax_cmode.c simhv37-3rsb/VAX/vax_cmode.c</FONT>

<BR><FONT SIZE=2 FACE="Courier New">--- simhv37-3/VAX/vax_cmode.c   2006-05-03 20:37:44.000000000 -0400</FONT>

<BR><FONT SIZE=2 FACE="Courier New">+++ simhv37-3rsb/VAX/vax_cmode.c        2007-09-04 21:19:01.000000000 -0400</FONT>

<BR><FONT SIZE=2 FACE="Courier New">@@ -58,7 +58,7 @@</FONT>

<BR><FONT SIZE=2 FACE="Courier New"> extern int32 pcq_p;</FONT>

<BR><FONT SIZE=2 FACE="Courier New"> extern int32 ibcnt, ppc;</FONT>

<BR><FONT SIZE=2 FACE="Courier New"> extern int32 sim_interval;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">-extern int32 sim_brk_summ;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">+extern uint32 sim_brk_summ;</FONT>

<BR><FONT SIZE=2 FACE="Courier New"> </FONT>

<BR><FONT SIZE=2 FACE="Courier New"> extern int32 Read (uint32 va, int32 lnt, int32 access);</FONT>

<BR><FONT SIZE=2 FACE="Courier New"> extern void Write (uint32 va, int32 val, int32 lnt, int32 access);</FONT>

<BR><FONT SIZE=2 FACE="Courier New">diff -ur simhv37-3/VAX/vax_mmu.c simhv37-3rsb/VAX/vax_mmu.c</FONT>

<BR><FONT SIZE=2 FACE="Courier New">--- simhv37-3/VAX/vax_mmu.c     2007-04-29 09:17:00.000000000 -0400</FONT>

<BR><FONT SIZE=2 FACE="Courier New">+++ simhv37-3rsb/VAX/vax_mmu.c  2008-01-11 18:41:44.000000000 -0500</FONT>

<BR><FONT SIZE=2 FACE="Courier New">@@ -109,8 +109,8 @@</FONT>

<BR><FONT SIZE=2 FACE="Courier New"> void WriteL (uint32 pa, int32 val);</FONT>

<BR><FONT SIZE=2 FACE="Courier New"> int32 ReadLP (uint32 pa);</FONT>

<BR><FONT SIZE=2 FACE="Courier New"> void WriteLP (uint32 pa, int32 val);</FONT>

<BR><FONT SIZE=2 FACE="Courier New">-extern int32 ReadIO (uint32 pa, int32 lnt);</FONT>

<BR><FONT SIZE=2 FACE="Courier New">-extern void WriteIO (uint32 pa, int32 val, int32 lnt);</FONT>

<BR><FONT SIZE=2 FACE="Courier New">+extern int32 ReadIO (int32 pa, int32 lnt);</FONT>

<BR><FONT SIZE=2 FACE="Courier New">+extern void WriteIO (int32 pa, int32 val, int32 lnt);</FONT>

<BR><FONT SIZE=2 FACE="Courier New"> extern int32 ReadReg (uint32 pa, int32 lnt);</FONT>

<BR><FONT SIZE=2 FACE="Courier New"> extern void WriteReg (uint32 pa, int32 val, int32 lnt);</FONT>

<BR><FONT SIZE=2 FACE="Courier New"> </FONT>
</P>

</BODY>
</HTML>