Cycle counting for SPIM 7.2.1
We use SPIM for the
graduate compiler course at CSU.
Francis Hsu provided a copy of Spim 6.5, which
had been modified
for use with Alex Aiken's
Their modifications count
the number of instructions executed, reads, writes, and branches that
occur within a Mips program as it is simulated with SPIM.
I applied the same modifications to SPIM 7.2.1.
% ./spim -keepstats file.s
SPIM Version 7.2.1 of August 28, 2005
Copyright 1990-2004 by James R. Larus (email@example.com).
All Rights Reserved.
See the file README for a full copyright notice.
Stats -- #instructions : 149
#reads : 43 #writes 42 #branches 13 #other 51
August 13, 2007:
- xspim now compiles with keepstats update.
- Changed float output format to %g to enable MiniJava compiler with
floats that compares with output from code compiled with javac.
.... August 13, 2007