[Simh] Simh execution speed improvement

Bailey, Scott scott.bailey at eds.com
Tue Jan 22 13:37:42 EST 2008


Here's another little contribution to this discussion. I of course have
not
lowered myself so far as to conduct any benchmarks :-) but with a few
minor
tweaks, it is possible to compile using gcc with the "-fwhole-program
--combine" flags -- on paper, this presents the compiler with additional
opportunities for optimization.

Probably these would be good changes to make anyway, as they resolve
inconsistencies in function definitions in different parts of the code.
It
wasn't particularly clear to me whether it was more appropriate to use
signed or unsigned types, so don't read too much into my choices. :-)

The appended patch fixes only the VAX code.

Cheers,

	Scott

--

diff -ur simhv37-3/VAX/vax_cmode.c simhv37-3rsb/VAX/vax_cmode.c
--- simhv37-3/VAX/vax_cmode.c	2006-05-03 20:37:44.000000000 -0400
+++ simhv37-3rsb/VAX/vax_cmode.c	2007-09-04 21:19:01.000000000
-0400
@@ -58,7 +58,7 @@
 extern int32 pcq_p;
 extern int32 ibcnt, ppc;
 extern int32 sim_interval;
-extern int32 sim_brk_summ;
+extern uint32 sim_brk_summ;
 
 extern int32 Read (uint32 va, int32 lnt, int32 access);
 extern void Write (uint32 va, int32 val, int32 lnt, int32 access);
diff -ur simhv37-3/VAX/vax_mmu.c simhv37-3rsb/VAX/vax_mmu.c
--- simhv37-3/VAX/vax_mmu.c	2007-04-29 09:17:00.000000000 -0400
+++ simhv37-3rsb/VAX/vax_mmu.c	2008-01-11 18:41:44.000000000 -0500
@@ -109,8 +109,8 @@
 void WriteL (uint32 pa, int32 val);
 int32 ReadLP (uint32 pa);
 void WriteLP (uint32 pa, int32 val);
-extern int32 ReadIO (uint32 pa, int32 lnt);
-extern void WriteIO (uint32 pa, int32 val, int32 lnt);
+extern int32 ReadIO (int32 pa, int32 lnt);
+extern void WriteIO (int32 pa, int32 val, int32 lnt);
 extern int32 ReadReg (uint32 pa, int32 lnt);
 extern void WriteReg (uint32 pa, int32 val, int32 lnt);
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20080122/f759f731/attachment-0003.html>


More information about the Simh mailing list