[Simh] RE : Simh execution speed improvement - about 45% improvement.
Marc Chametzky
marc at bluevine.net
Thu Jan 17 21:55:19 EST 2008
> I am quite impressed by your very high VUPS results!
> I did try to reproduce your results, with a sun sunfire 4100 equipped
> with two single core opteron CPUs running at 2.2GHz, with solaris 10 and
> sunstudio 11 to compile simh. Unfortunately, I am a newbie on solaris.
That was my mistake. It turned out that I was using GCC after all. (I
had updated Sun Studio for something else and the compiler switches
looked similar, so I got confused about which one simh was using.)
> I then did compile on the same platform with gcc and gmake, simh 3.7-3
> unmodified, and it gave me 12.0 VUPS.
> with the modified (the memory access functions declared as inline)
> vax_cpu.c it gave me 15.0 VUPS.
> Both speed results are too low for my target setup to be usable.
>
> So, i would very very much appreciate if you can give me a few pointers:
> 1) what is your machine make, model, CPU type and speed?
It is an AMD Athlon 64 3200+ (2.2 GHz). (I built it myself, so no
make/model.)
> 2) What should i use as arguments in sunstudio to build simh? Do I use
> the provided makefile, or should I try to generate a new one?
One thing that's important is that I am building a 64-bit version. I
can't run a 32-bit version right now since my system disk is too large.
The diff for my makefile compared with the 3.7-3 version:
9c9
< OS_CCDEFS = -lsocket -lnsl -lpthread -D_GNU_SOURCE
---
> OS_CCDEFS = -lsocket -lnsl -lpthread -lrt -D_GNU_SOURCE -m64 -msse3
-m80387
17a18
> USE_NETWORK=1
20c21
< NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include
/usr/local/lib/libpcap.a
---
> NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include
/usr/local/lib/libpcap64.a
Note that I made a 64-bit libpcap.a for networking support.
To get the 64-bit build working, I also had to make this change to
sim_fio.c:
167,168d166
< #elif defined (USE_INT64) && defined (USE_ADDR64) && defined (__sun__)
< return fopen64 (file, mode);
309,318d306
< #if defined (__sun__)
< #define _SIM_IO_FSEEK_EXT_ 1
<
< int sim_fseek (FILE *st, t_addr xpos, int origin)
< {
< return fseeko64 (st, xpos, origin);
< }
<
< #endif /* end Solaris */
<
I think those are the only changes I needed. Give that a try and see if
it works for you.
--Marc
More information about the Simh
mailing list