summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/SConscript1
-rw-r--r--src/arch/alpha/predecoder.hh107
-rw-r--r--src/arch/alpha/utility.hh13
-rw-r--r--src/arch/mips/predecoder.hh100
-rw-r--r--src/arch/mips/utility.hh13
-rw-r--r--src/arch/sparc/isa/decoder.isa199
-rw-r--r--src/arch/sparc/isa/formats/mem/util.isa4
-rw-r--r--src/arch/sparc/linux/syscalls.cc4
-rw-r--r--src/arch/sparc/miscregfile.cc7
-rw-r--r--src/arch/sparc/predecoder.hh112
-rw-r--r--src/arch/sparc/utility.hh16
-rw-r--r--src/arch/x86/SConscript2
-rw-r--r--src/arch/x86/isa/formats/unknown.isa3
-rw-r--r--src/arch/x86/predecoder.hh412
-rw-r--r--src/arch/x86/predecoder_tables.cc143
-rw-r--r--src/arch/x86/types.hh71
-rw-r--r--src/arch/x86/utility.hh17
-rw-r--r--src/base/bigint.hh14
-rw-r--r--src/cpu/base.hh8
-rw-r--r--src/cpu/o3/fetch.hh4
-rw-r--r--src/cpu/o3/fetch_impl.hh12
-rw-r--r--src/cpu/simple/atomic.cc43
-rw-r--r--src/cpu/simple/base.cc55
-rw-r--r--src/cpu/simple/base.hh11
-rw-r--r--src/cpu/simple/timing.cc10
-rw-r--r--src/cpu/static_inst.hh6
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/o3-timing/config.ini (renamed from tests/long/00.gzip/ref/alpha/linux/o3-timing/config.ini)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/o3-timing/config.out (renamed from tests/long/00.gzip/ref/alpha/linux/o3-timing/config.out)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/o3-timing/m5stats.txt (renamed from tests/long/00.gzip/ref/alpha/linux/o3-timing/m5stats.txt)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/o3-timing/stderr (renamed from tests/long/00.gzip/ref/alpha/linux/o3-timing/stderr)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/o3-timing/stdout (renamed from tests/long/00.gzip/ref/alpha/linux/o3-timing/stdout)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/simple-atomic/config.ini (renamed from tests/long/00.gzip/ref/alpha/linux/simple-atomic/config.ini)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/simple-atomic/config.out (renamed from tests/long/00.gzip/ref/alpha/linux/simple-atomic/config.out)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/simple-atomic/m5stats.txt (renamed from tests/long/00.gzip/ref/alpha/linux/simple-atomic/m5stats.txt)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/simple-atomic/stderr (renamed from tests/long/00.gzip/ref/alpha/linux/simple-atomic/stderr)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/simple-atomic/stdout (renamed from tests/long/00.gzip/ref/alpha/linux/simple-atomic/stdout)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/simple-timing/config.ini (renamed from tests/long/00.gzip/ref/alpha/linux/simple-timing/config.ini)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/simple-timing/config.out (renamed from tests/long/00.gzip/ref/alpha/linux/simple-timing/config.out)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/simple-timing/m5stats.txt (renamed from tests/long/00.gzip/ref/alpha/linux/simple-timing/m5stats.txt)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/simple-timing/stderr (renamed from tests/long/00.gzip/ref/alpha/linux/simple-timing/stderr)0
-rw-r--r--tests/long/00.gzip/ref/alpha/tru64/simple-timing/stdout (renamed from tests/long/00.gzip/ref/alpha/linux/simple-timing/stdout)0
-rw-r--r--tests/long/00.gzip/test.py4
-rw-r--r--tests/long/10.mcf/test.py4
-rw-r--r--tests/long/20.parser/ref/alpha/tru64/NOTE (renamed from tests/long/20.parser/ref/alpha/linux/NOTE)0
-rw-r--r--tests/long/20.parser/test.py4
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/o3-timing/config.ini (renamed from tests/long/30.eon/ref/alpha/linux/o3-timing/config.ini)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/o3-timing/config.out (renamed from tests/long/30.eon/ref/alpha/linux/o3-timing/config.out)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/o3-timing/m5stats.txt (renamed from tests/long/30.eon/ref/alpha/linux/o3-timing/m5stats.txt)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/o3-timing/stderr (renamed from tests/long/30.eon/ref/alpha/linux/o3-timing/stderr)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/o3-timing/stdout (renamed from tests/long/30.eon/ref/alpha/linux/o3-timing/stdout)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/simple-atomic/config.ini (renamed from tests/long/30.eon/ref/alpha/linux/simple-atomic/config.ini)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/simple-atomic/config.out (renamed from tests/long/30.eon/ref/alpha/linux/simple-atomic/config.out)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/simple-atomic/m5stats.txt (renamed from tests/long/30.eon/ref/alpha/linux/simple-atomic/m5stats.txt)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/simple-atomic/stderr (renamed from tests/long/30.eon/ref/alpha/linux/simple-atomic/stderr)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/simple-atomic/stdout (renamed from tests/long/30.eon/ref/alpha/linux/simple-atomic/stdout)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/simple-timing/config.ini (renamed from tests/long/30.eon/ref/alpha/linux/simple-timing/config.ini)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/simple-timing/config.out (renamed from tests/long/30.eon/ref/alpha/linux/simple-timing/config.out)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/simple-timing/m5stats.txt (renamed from tests/long/30.eon/ref/alpha/linux/simple-timing/m5stats.txt)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/simple-timing/stderr (renamed from tests/long/30.eon/ref/alpha/linux/simple-timing/stderr)0
-rw-r--r--tests/long/30.eon/ref/alpha/tru64/simple-timing/stdout (renamed from tests/long/30.eon/ref/alpha/linux/simple-timing/stdout)0
-rw-r--r--tests/long/30.eon/test.py4
-rw-r--r--tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/config.ini (renamed from tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/config.ini)0
-rw-r--r--tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/config.out (renamed from tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/config.out)0
-rw-r--r--tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/m5stats.txt (renamed from tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/m5stats.txt)0
-rw-r--r--tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/stderr (renamed from tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/stderr)0
-rw-r--r--tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/stdout (renamed from tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/stdout)0
-rw-r--r--tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/config.ini (renamed from tests/long/40.perlbmk/ref/alpha/linux/simple-timing/config.ini)0
-rw-r--r--tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/config.out (renamed from tests/long/40.perlbmk/ref/alpha/linux/simple-timing/config.out)0
-rw-r--r--tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/m5stats.txt (renamed from tests/long/40.perlbmk/ref/alpha/linux/simple-timing/m5stats.txt)0
-rw-r--r--tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/stderr (renamed from tests/long/40.perlbmk/ref/alpha/linux/simple-timing/stderr)0
-rw-r--r--tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/stdout (renamed from tests/long/40.perlbmk/ref/alpha/linux/simple-timing/stdout)0
-rw-r--r--tests/long/40.perlbmk/test.py4
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/o3-timing/config.ini (renamed from tests/long/50.vortex/ref/alpha/linux/o3-timing/config.ini)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/o3-timing/config.out (renamed from tests/long/50.vortex/ref/alpha/linux/o3-timing/config.out)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/o3-timing/m5stats.txt (renamed from tests/long/50.vortex/ref/alpha/linux/o3-timing/m5stats.txt)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/o3-timing/smred.msg (renamed from tests/long/50.vortex/ref/alpha/linux/o3-timing/smred.msg)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/o3-timing/smred.out (renamed from tests/long/50.vortex/ref/alpha/linux/o3-timing/smred.out)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/o3-timing/stderr (renamed from tests/long/50.vortex/ref/alpha/linux/o3-timing/stderr)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/o3-timing/stdout (renamed from tests/long/50.vortex/ref/alpha/linux/o3-timing/stdout)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-atomic/config.ini (renamed from tests/long/50.vortex/ref/alpha/linux/simple-atomic/config.ini)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-atomic/config.out (renamed from tests/long/50.vortex/ref/alpha/linux/simple-atomic/config.out)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-atomic/m5stats.txt (renamed from tests/long/50.vortex/ref/alpha/linux/simple-atomic/m5stats.txt)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-atomic/smred.msg (renamed from tests/long/50.vortex/ref/alpha/linux/simple-atomic/smred.msg)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-atomic/smred.out (renamed from tests/long/50.vortex/ref/alpha/linux/simple-atomic/smred.out)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-atomic/stderr (renamed from tests/long/50.vortex/ref/alpha/linux/simple-atomic/stderr)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-atomic/stdout (renamed from tests/long/50.vortex/ref/alpha/linux/simple-atomic/stdout)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-timing/config.ini (renamed from tests/long/50.vortex/ref/alpha/linux/simple-timing/config.ini)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-timing/config.out (renamed from tests/long/50.vortex/ref/alpha/linux/simple-timing/config.out)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-timing/m5stats.txt (renamed from tests/long/50.vortex/ref/alpha/linux/simple-timing/m5stats.txt)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-timing/smred.msg (renamed from tests/long/50.vortex/ref/alpha/linux/simple-timing/smred.msg)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-timing/smred.out (renamed from tests/long/50.vortex/ref/alpha/linux/simple-timing/smred.out)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-timing/stderr (renamed from tests/long/50.vortex/ref/alpha/linux/simple-timing/stderr)0
-rw-r--r--tests/long/50.vortex/ref/alpha/tru64/simple-timing/stdout (renamed from tests/long/50.vortex/ref/alpha/linux/simple-timing/stdout)0
-rw-r--r--tests/long/50.vortex/test.py4
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/o3-timing/config.ini (renamed from tests/long/60.bzip2/ref/alpha/linux/o3-timing/config.ini)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/o3-timing/config.out (renamed from tests/long/60.bzip2/ref/alpha/linux/o3-timing/config.out)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/o3-timing/m5stats.txt (renamed from tests/long/60.bzip2/ref/alpha/linux/o3-timing/m5stats.txt)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/o3-timing/stderr (renamed from tests/long/60.bzip2/ref/alpha/linux/o3-timing/stderr)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/o3-timing/stdout (renamed from tests/long/60.bzip2/ref/alpha/linux/o3-timing/stdout)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/config.ini (renamed from tests/long/60.bzip2/ref/alpha/linux/simple-atomic/config.ini)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/config.out (renamed from tests/long/60.bzip2/ref/alpha/linux/simple-atomic/config.out)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/m5stats.txt (renamed from tests/long/60.bzip2/ref/alpha/linux/simple-atomic/m5stats.txt)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/stderr (renamed from tests/long/60.bzip2/ref/alpha/linux/simple-atomic/stderr)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/stdout (renamed from tests/long/60.bzip2/ref/alpha/linux/simple-atomic/stdout)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/simple-timing/config.ini (renamed from tests/long/60.bzip2/ref/alpha/linux/simple-timing/config.ini)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/simple-timing/config.out (renamed from tests/long/60.bzip2/ref/alpha/linux/simple-timing/config.out)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/simple-timing/m5stats.txt (renamed from tests/long/60.bzip2/ref/alpha/linux/simple-timing/m5stats.txt)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/simple-timing/stderr (renamed from tests/long/60.bzip2/ref/alpha/linux/simple-timing/stderr)0
-rw-r--r--tests/long/60.bzip2/ref/alpha/tru64/simple-timing/stdout (renamed from tests/long/60.bzip2/ref/alpha/linux/simple-timing/stdout)0
-rw-r--r--tests/long/60.bzip2/test.py4
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/o3-timing/config.ini (renamed from tests/long/70.twolf/ref/alpha/linux/o3-timing/config.ini)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/o3-timing/config.out (renamed from tests/long/70.twolf/ref/alpha/linux/o3-timing/config.out)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/o3-timing/m5stats.txt (renamed from tests/long/70.twolf/ref/alpha/linux/o3-timing/m5stats.txt)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.out (renamed from tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.out)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.pin (renamed from tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.pin)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.pl1 (renamed from tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.pl1)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.pl2 (renamed from tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.pl2)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.sav (renamed from tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.sav)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.sv2 (renamed from tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.sv2)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.twf (renamed from tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.twf)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/o3-timing/stderr (renamed from tests/long/70.twolf/ref/alpha/linux/o3-timing/stderr)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/o3-timing/stdout (renamed from tests/long/70.twolf/ref/alpha/linux/o3-timing/stdout)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-atomic/config.ini (renamed from tests/long/70.twolf/ref/alpha/linux/simple-atomic/config.ini)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-atomic/config.out (renamed from tests/long/70.twolf/ref/alpha/linux/simple-atomic/config.out)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-atomic/m5stats.txt (renamed from tests/long/70.twolf/ref/alpha/linux/simple-atomic/m5stats.txt)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.out (renamed from tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.out)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.pin (renamed from tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.pin)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.pl1 (renamed from tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.pl1)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.pl2 (renamed from tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.pl2)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.sav (renamed from tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.sav)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.sv2 (renamed from tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.sv2)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.twf (renamed from tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.twf)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-atomic/stderr (renamed from tests/long/70.twolf/ref/alpha/linux/simple-atomic/stderr)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-atomic/stdout (renamed from tests/long/70.twolf/ref/alpha/linux/simple-atomic/stdout)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-timing/config.ini (renamed from tests/long/70.twolf/ref/alpha/linux/simple-timing/config.ini)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-timing/config.out (renamed from tests/long/70.twolf/ref/alpha/linux/simple-timing/config.out)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-timing/m5stats.txt (renamed from tests/long/70.twolf/ref/alpha/linux/simple-timing/m5stats.txt)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.out (renamed from tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.out)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.pin (renamed from tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.pin)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.pl1 (renamed from tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.pl1)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.pl2 (renamed from tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.pl2)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.sav (renamed from tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.sav)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.sv2 (renamed from tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.sv2)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.twf (renamed from tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.twf)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-timing/stderr (renamed from tests/long/70.twolf/ref/alpha/linux/simple-timing/stderr)0
-rw-r--r--tests/long/70.twolf/ref/alpha/tru64/simple-timing/stdout (renamed from tests/long/70.twolf/ref/alpha/linux/simple-timing/stdout)0
-rw-r--r--tests/long/70.twolf/ref/sparc/linux/simple-atomic/config.ini64
-rw-r--r--tests/long/70.twolf/ref/sparc/linux/simple-atomic/config.out57
-rw-r--r--tests/long/70.twolf/ref/sparc/linux/simple-atomic/m5stats.txt18
-rw-r--r--tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.out276
-rw-r--r--tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.pin17
-rw-r--r--tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.pl111
-rw-r--r--tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.pl22
-rw-r--r--tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.sav18
-rw-r--r--tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.sv219
-rw-r--r--tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.twf29
-rw-r--r--tests/long/70.twolf/ref/sparc/linux/simple-atomic/stderr8
-rw-r--r--tests/long/70.twolf/ref/sparc/linux/simple-atomic/stdout28
-rw-r--r--tests/long/70.twolf/test.py2
-rw-r--r--util/statetrace/Makefile4
-rw-r--r--util/statetrace/arch/tracechild_sparc.cc58
-rw-r--r--util/statetrace/arch/tracechild_sparc.hh10
-rw-r--r--util/statetrace/statetrace.cc114
-rw-r--r--util/statetrace/tracechild.cc15
-rw-r--r--util/statetrace/tracechild.hh1
165 files changed, 1938 insertions, 228 deletions
diff --git a/src/arch/SConscript b/src/arch/SConscript
index c3ff69f46..0ac25b6c7 100644
--- a/src/arch/SConscript
+++ b/src/arch/SConscript
@@ -51,6 +51,7 @@ isa_switch_hdrs = Split('''
locked_mem.hh
mmaped_ipr.hh
process.hh
+ predecoder.hh
regfile.hh
remote_gdb.hh
stacktrace.hh
diff --git a/src/arch/alpha/predecoder.hh b/src/arch/alpha/predecoder.hh
new file mode 100644
index 000000000..4e89f53a6
--- /dev/null
+++ b/src/arch/alpha/predecoder.hh
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2006 The Regents of The University of Michigan
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Authors: Gabe Black
+ */
+
+#ifndef __ARCH_ALPHA_PREDECODER_HH__
+#define __ARCH_ALPHA_PREDECODER_HH__
+
+#include "arch/alpha/types.hh"
+#include "base/misc.hh"
+#include "sim/host.hh"
+
+class ThreadContext;
+
+namespace AlphaISA
+{
+ class Predecoder
+ {
+ protected:
+ ThreadContext * tc;
+ //The pc of the current instruction
+ Addr fetchPC;
+ //The extended machine instruction being generated
+ ExtMachInst ext_inst;
+
+ public:
+ Predecoder(ThreadContext * _tc) : tc(_tc)
+ {}
+
+ ThreadContext * getTC()
+ {
+ return tc;
+ }
+
+ void setTC(ThreadContext * _tc)
+ {
+ tc = _tc;
+ }
+
+ void process()
+ {
+ }
+
+ //Use this to give data to the predecoder. This should be used
+ //when there is control flow.
+ void moreBytes(Addr pc, Addr off, MachInst inst)
+ {
+ fetchPC = pc;
+ assert(off == 0);
+ ext_inst = inst;
+#if FULL_SYSTEM
+ if (pc && 0x1)
+ ext_inst|=(static_cast<ExtMachInst>(pc & 0x1) << 32);
+#endif
+ }
+
+ //Use this to give data to the predecoder. This should be used
+ //when instructions are executed in order.
+ void moreBytes(MachInst machInst)
+ {
+ moreBytes(fetchPC + sizeof(machInst), 0, machInst);
+ }
+
+ bool needMoreBytes()
+ {
+ return true;
+ }
+
+ bool extMachInstReady()
+ {
+ return true;
+ }
+
+ //This returns a constant reference to the ExtMachInst to avoid a copy
+ const ExtMachInst & getExtMachInst()
+ {
+ return ext_inst;
+ }
+ };
+};
+
+#endif // __ARCH_ALPHA_PREDECODER_HH__
diff --git a/src/arch/alpha/utility.hh b/src/arch/alpha/utility.hh
index b7844c7eb..c20394a92 100644
--- a/src/arch/alpha/utility.hh
+++ b/src/arch/alpha/utility.hh
@@ -48,19 +48,6 @@ namespace AlphaISA
return (tc->readMiscRegNoEffect(AlphaISA::IPR_DTB_CM) & 0x18) != 0;
}
- static inline ExtMachInst
- makeExtMI(MachInst inst, Addr pc) {
-#if FULL_SYSTEM
- ExtMachInst ext_inst = inst;
- if (pc && 0x1)
- return ext_inst|=(static_cast<ExtMachInst>(pc & 0x1) << 32);
- else
- return ext_inst;
-#else
- return ExtMachInst(inst);
-#endif
- }
-
inline bool isCallerSaveIntegerRegister(unsigned int reg) {
panic("register classification not implemented");
return (reg >= 1 && reg <= 8 || reg >= 22 && reg <= 25 || reg == 27);
diff --git a/src/arch/mips/predecoder.hh b/src/arch/mips/predecoder.hh
new file mode 100644
index 000000000..a25cce8a7
--- /dev/null
+++ b/src/arch/mips/predecoder.hh
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2006 The Regents of The University of Michigan
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Authors: Gabe Black
+ */
+
+#ifndef __ARCH_MIPS_PREDECODER_HH__
+#define __ARCH_MIPS_PREDECODER_HH__
+
+#include "arch/mips/types.hh"
+#include "base/misc.hh"
+#include "sim/host.hh"
+
+class ThreadContext;
+
+namespace MipsISA
+{
+ class Predecoder
+ {
+ protected:
+ ThreadContext * tc;
+ //The extended machine instruction being generated
+ ExtMachInst emi;
+
+ public:
+ Predecoder(ThreadContext * _tc) : tc(_tc)
+ {}
+
+ ThreadContext * getTC()
+ {
+ return tc;
+ }
+
+ void setTC(ThreadContext * _tc)
+ {
+ tc = _tc;
+ }
+
+ void process()
+ {
+ }
+
+ //Use this to give data to the predecoder. This should be used
+ //when there is control flow.
+ void moreBytes(Addr currPC, Addr off, MachInst inst)
+ {
+ assert(off == 0);
+ emi = inst;
+ }
+
+ //Use this to give data to the predecoder. This should be used
+ //when instructions are executed in order.
+ void moreBytes(MachInst machInst)
+ {
+ moreBytes(0, 0, machInst);
+ }
+
+ bool needMoreBytes()
+ {
+ return true;
+ }
+
+ bool extMachInstReady()
+ {
+ return true;
+ }
+
+ //This returns a constant reference to the ExtMachInst to avoid a copy
+ const ExtMachInst & getExtMachInst()
+ {
+ return emi;
+ }
+ };
+};
+
+#endif // __ARCH_MIPS_PREDECODER_HH__
diff --git a/src/arch/mips/utility.hh b/src/arch/mips/utility.hh
index b5c1e31e1..12db1de57 100644
--- a/src/arch/mips/utility.hh
+++ b/src/arch/mips/utility.hh
@@ -88,19 +88,6 @@ namespace MipsISA {
return 0;
}
- static inline ExtMachInst
- makeExtMI(MachInst inst, ThreadContext * xc) {
-#if FULL_SYSTEM
- ExtMachInst ext_inst = inst;
- if (xc->readPC() && 0x1)
- return ext_inst|=(static_cast<ExtMachInst>(xc->readPC() & 0x1) << 32);
- else
- return ext_inst;
-#else
- return ExtMachInst(inst);
-#endif
- }
-
inline void startupCPU(ThreadContext *tc, int cpuId)
{
tc->activate(0);
diff --git a/src/arch/sparc/isa/decoder.isa b/src/arch/sparc/isa/decoder.isa
index 70afe19b6..556bb4bca 100644
--- a/src/arch/sparc/isa/decoder.isa
+++ b/src/arch/sparc/isa/decoder.isa
@@ -185,25 +185,25 @@ decode OP default Unknown::unknown()
}}, ',a');
}
default: decode BPCC {
- 0x0: fbpcc0(22, {{
+ 0x0: fbpfcc0(19, {{
if(passesFpCondition(Fsr<11:10>, COND2))
NNPC = xc->readPC() + disp;
else
handle_annul
}});
- 0x1: fbpcc1(22, {{
+ 0x1: fbpfcc1(19, {{
if(passesFpCondition(Fsr<33:32>, COND2))
NNPC = xc->readPC() + disp;
else
handle_annul
}});
- 0x2: fbpcc2(22, {{
+ 0x2: fbpfcc2(19, {{
if(passesFpCondition(Fsr<35:34>, COND2))
NNPC = xc->readPC() + disp;
else
handle_annul
}});
- 0x3: fbpcc3(22, {{
+ 0x3: fbpfcc3(19, {{
if(passesFpCondition(Fsr<37:36>, COND2))
NNPC = xc->readPC() + disp;
else
@@ -426,19 +426,22 @@ decode OP default Unknown::unknown()
{{Rs1<63:> == val2<63:> && val2<63:> != resTemp<63:>}}
);
0x24: mulscc({{
- int64_t resTemp, multiplicand = Rs2_or_imm13;
- int32_t multiplier = Rs1<31:0>;
int32_t savedLSB = Rs1<0:>;
- multiplier = multiplier<31:1> |
- ((Ccr<3:3> ^ Ccr<1:1>) << 32);
- if(!Y<0:>)
- multiplicand = 0;
- Rd = resTemp = multiplicand + multiplier;
+
+ //Step 1
+ int64_t multiplicand = Rs2_or_imm13;
+ //Step 2
+ int32_t partialP = Rs1<31:1> |
+ ((Ccr<3:3> ^ Ccr<1:1>) << 31);
+ //Step 3
+ int32_t added = Y<0:> ? multiplicand : 0;
+ Rd = partialP + added;
+ //Steps 4 & 5
Y = Y<31:1> | (savedLSB << 31);}},
- {{((multiplicand<31:0> + multiplier<31:0>)<32:0>)}},
- {{multiplicand<31:> == multiplier<31:> && multiplier<31:> != resTemp<31:>}},
- {{((multiplicand >> 1) + (multiplier >> 1) + (multiplicand & multiplier & 0x1))<63:>}},
- {{multiplicand<63:> == multiplier<63:> && multiplier<63:> != resTemp<63:>}}
+ {{((partialP<31:0> + added<31:0>)<32:0>)}},
+ {{partialP<31:> == added<31:> && added<31:> != Rd<31:>}},
+ {{((partialP >> 1) + (added >> 1) + (partialP & added & 0x1))<63:>}},
+ {{partialP<63:> == added<63:> && partialP<63:> != Rd<63:>}}
);
}
format IntOp
@@ -816,6 +819,58 @@ decode OP default Unknown::unknown()
}
0x35: decode OPF{
format FpBasic{
+ 0x01: fmovs_fcc0({{
+ if(passesFpCondition(Fsr<11:10>, COND4))
+ Frds = Frs2s;
+ else
+ Frds = Frds;
+ }});
+ 0x02: fmovd_fcc0({{
+ if(passesFpCondition(Fsr<11:10>, COND4))
+ Frd = Frs2;
+ else
+ Frd = Frd;
+ }});
+ 0x03: FpUnimpl::fmovq_fcc0();
+ 0x25: fmovrsz({{
+ if(Rs1 == 0)
+ Frds = Frs2s;
+ else
+ Frds = Frds;
+ }});
+ 0x26: fmovrdz({{
+ if(Rs1 == 0)
+ Frd = Frs2;
+ else
+ Frd = Frd;
+ }});
+ 0x27: FpUnimpl::fmovrqz();
+ 0x41: fmovs_fcc1({{
+ if(passesFpCondition(Fsr<33:32>, COND4))
+ Frds = Frs2s;
+ else
+ Frds = Frds;
+ }});
+ 0x42: fmovd_fcc1({{
+ if(passesFpCondition(Fsr<33:32>, COND4))
+ Frd = Frs2;
+ else
+ Frd = Frd;
+ }});
+ 0x43: FpUnimpl::fmovq_fcc1();
+ 0x45: fmovrslez({{
+ if(Rs1 <= 0)
+ Frds = Frs2s;
+ else
+ Frds = Frds;
+ }});
+ 0x46: fmovrdlez({{
+ if(Rs1 <= 0)
+ Frd = Frs2;
+ else
+ Frd = Frd;
+ }});
+ 0x47: FpUnimpl::fmovrqlez();
0x51: fcmps({{
uint8_t fcc;
if(isnan(Frs1s) || isnan(Frs2s))
@@ -874,6 +929,110 @@ decode OP default Unknown::unknown()
Fsr = insertBits(Fsr, firstbit +1, firstbit, fcc);
}});
0x57: FpUnimpl::fcmpeq();
+ 0x65: fmovrslz({{
+ if(Rs1 < 0)
+ Frds = Frs2s;
+ else
+ Frds = Frds;
+ }});
+ 0x66: fmovrdlz({{
+ if(Rs1 < 0)
+ Frd = Frs2;
+ else
+ Frd = Frd;
+ }});
+ 0x67: FpUnimpl::fmovrqlz();
+ 0x81: fmovs_fcc2({{
+ if(passesFpCondition(Fsr<35:34>, COND4))
+ Frds = Frs2s;
+ else
+ Frds = Frds;
+ }});
+ 0x82: fmovd_fcc2({{
+ if(passesFpCondition(Fsr<35:34>, COND4))
+ Frd = Frs2;
+ else
+ Frd = Frd;
+ }});
+ 0x83: FpUnimpl::fmovq_fcc2();
+ 0xA5: fmovrsnz({{
+ if(Rs1 != 0)
+ Frds = Frs2s;
+ else
+ Frds = Frds;
+ }});
+ 0xA6: fmovrdnz({{
+ if(Rs1 != 0)
+ Frd = Frs2;
+ else
+ Frd = Frd;
+ }});
+ 0xA7: FpUnimpl::fmovrqnz();
+ 0xC1: fmovs_fcc3({{
+ if(passesFpCondition(Fsr<37:36>, COND4))
+ Frds = Frs2s;
+ else
+ Frds = Frds;
+ }});
+ 0xC2: fmovd_fcc3({{
+ if(passesFpCondition(Fsr<37:36>, COND4))
+ Frd = Frs2;
+ else
+ Frd = Frd;
+ }});
+ 0xC3: FpUnimpl::fmovq_fcc3();
+ 0xC5: fmovrsgz({{
+ if(Rs1 > 0)
+ Frds = Frs2s;
+ else
+ Frds = Frds;
+ }});
+ 0xC6: fmovrdgz({{
+ if(Rs1 > 0)
+ Frd = Frs2;
+ else
+ Frd = Frd;
+ }});
+ 0xC7: FpUnimpl::fmovrqgz();
+ 0xE5: fmovrsgez({{
+ if(Rs1 >= 0)
+ Frds = Frs2s;
+ else
+ Frds = Frds;
+ }});
+ 0xE6: fmovrdgez({{
+ if(Rs1 >= 0)
+ Frd = Frs2;
+ else
+ Frd = Frd;
+ }});
+ 0xE7: FpUnimpl::fmovrqgez();
+ 0x101: fmovs_icc({{
+ if(passesCondition(Ccr<3:0>, COND4))
+ Frds = Frs2s;
+ else
+ Frds = Frds;
+ }});
+ 0x102: fmovd_icc({{
+ if(passesCondition(Ccr<3:0>, COND4))
+ Frd = Frs2;
+ else
+ Frd = Frd;
+ }});
+ 0x103: FpUnimpl::fmovq_icc();
+ 0x181: fmovs_xcc({{
+ if(passesCondition(Ccr<7:4>, COND4))
+ Frds = Frs2s;
+ else
+ Frds = Frds;
+ }});
+ 0x182: fmovd_xcc({{
+ if(passesCondition(Ccr<7:4>, COND4))
+ Frd = Frs2;
+ else
+ Frd = Frd;
+ }});
+ 0x183: FpUnimpl::fmovq_xcc();
default: FailUnimpl::fpop2();
}
}
@@ -1164,7 +1323,10 @@ decode OP default Unknown::unknown()
0x04: stw({{Mem.uw = Rd.sw;}});
0x05: stb({{Mem.ub = Rd.sb;}});
0x06: sth({{Mem.uhw = Rd.shw;}});
- 0x07: sttw({{Mem.udw = RdLow<31:0> | (RdHigh<31:0> << 32);}});
+ 0x07: sttw({{
+ (Mem.tuw).a = RdLow<31:0>;
+ (Mem.tuw).b = RdHigh<31:0>;
+ }});
}
format Load {
0x08: ldsw({{Rd = (int32_t)Mem.sw;}});
@@ -1254,7 +1416,10 @@ decode OP default Unknown::unknown()
0x14: stwa({{Mem.uw = Rd;}}, {{EXT_ASI}});
0x15: stba({{Mem.ub = Rd;}}, {{EXT_ASI}});
0x16: stha({{Mem.uhw = Rd;}}, {{EXT_ASI}});
- 0x17: sttwa({{Mem.udw = RdLow<31:0> | RdHigh<31:0> << 32;}}, {{EXT_ASI}});
+ 0x17: sttwa({{
+ (Mem.tuw).a = RdLow<31:0>;
+ (Mem.tuw).b = RdHigh<31:0>;
+ }}, {{EXT_ASI}});
}
format LoadAlt {
0x18: ldswa({{Rd = (int32_t)Mem.sw;}}, {{EXT_ASI}});
diff --git a/src/arch/sparc/isa/formats/mem/util.isa b/src/arch/sparc/isa/formats/mem/util.isa
index 1d884d6c3..dfe937371 100644
--- a/src/arch/sparc/isa/formats/mem/util.isa
+++ b/src/arch/sparc/isa/formats/mem/util.isa
@@ -224,7 +224,7 @@ def template StoreExecute {{
}
if(storeCond && fault == NoFault)
{
- fault = xc->write((uint%(mem_acc_size)s_t)Mem,
+ fault = xc->write((%(mem_acc_type)s%(mem_acc_size)s_t)Mem,
EA, %(asi_val)s, 0);
}
if(fault == NoFault)
@@ -257,7 +257,7 @@ def template StoreInitiateAcc {{
}
if(storeCond && fault == NoFault)
{
- fault = xc->write((uint%(mem_acc_size)s_t)Mem,
+ fault = xc->write((%(mem_acc_type)s%(mem_acc_size)s_t)Mem,
EA, %(asi_val)s, 0);
}
if(fault == NoFault)
diff --git a/src/arch/sparc/linux/syscalls.cc b/src/arch/sparc/linux/syscalls.cc
index 2c2902f9e..24d568162 100644
--- a/src/arch/sparc/linux/syscalls.cc
+++ b/src/arch/sparc/linux/syscalls.cc
@@ -217,7 +217,7 @@ SyscallDesc SparcLinuxProcess::syscall32Descs[] = {
/* 125 */ SyscallDesc("recvfrom", unimplementedFunc),
/* 126 */ SyscallDesc("setreuid", unimplementedFunc), //32 bit
/* 127 */ SyscallDesc("setregid", unimplementedFunc), //32 bit
- /* 128 */ SyscallDesc("rename", unimplementedFunc),
+ /* 128 */ SyscallDesc("rename", renameFunc),
/* 129 */ SyscallDesc("truncate", unimplementedFunc),
/* 130 */ SyscallDesc("ftruncate", unimplementedFunc),
/* 131 */ SyscallDesc("flock", unimplementedFunc),
@@ -520,7 +520,7 @@ SyscallDesc SparcLinuxProcess::syscallDescs[] = {
/* 125 */ SyscallDesc("recvfrom", unimplementedFunc),
/* 126 */ SyscallDesc("setreuid", unimplementedFunc),
/* 127 */ SyscallDesc("setregid", unimplementedFunc),
- /* 128 */ SyscallDesc("rename", unimplementedFunc),
+ /* 128 */ SyscallDesc("rename", renameFunc),
/* 129 */ SyscallDesc("truncate", unimplementedFunc),
/* 130 */ SyscallDesc("ftruncate", unimplementedFunc),
/* 131 */ SyscallDesc("flock", unimplementedFunc),
diff --git a/src/arch/sparc/miscregfile.cc b/src/arch/sparc/miscregfile.cc
index f3be1c4c2..5bd572d38 100644
--- a/src/arch/sparc/miscregfile.cc
+++ b/src/arch/sparc/miscregfile.cc
@@ -646,7 +646,12 @@ void MiscRegFile::setReg(int miscReg,
#endif
return;
case MISCREG_CWP:
- new_val = val > NWindows ? NWindows - 1 : val;
+ new_val = val >= NWindows ? NWindows - 1 : val;
+ if (val >= NWindows) {
+ new_val = NWindows - 1;
+ warn("Attempted to set the CWP to %d with NWindows = %d\n",
+ val, NWindows);
+ }
tc->changeRegFileContext(CONTEXT_CWP, new_val);
break;
case MISCREG_GL:
diff --git a/src/arch/sparc/predecoder.hh b/src/arch/sparc/predecoder.hh
new file mode 100644
index 000000000..71b14b020
--- /dev/null
+++ b/src/arch/sparc/predecoder.hh
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2006 The Regents of The University of Michigan
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Authors: Gabe Black
+ */
+
+#ifndef __ARCH_SPARC_PREDECODER_HH__
+#define __ARCH_SPARC_PREDECODER_HH__
+
+#include "arch/sparc/types.hh"
+#include "base/misc.hh"
+#include "sim/host.hh"
+
+class ThreadContext;
+
+namespace SparcISA
+{
+ class Predecoder
+ {
+ protected:
+ ThreadContext * tc;
+ //The extended machine instruction being generated
+ ExtMachInst emi;
+
+ public:
+ Predecoder(ThreadContext * _tc) : tc(_tc)
+ {}
+
+ ThreadContext * getTC()
+ {
+ return tc;
+ }
+
+ void setTC(ThreadContext * _tc)
+ {
+ tc = _tc;
+ }
+
+ void process()
+ {
+ }
+
+ //Use this to give data to the predecoder. This should be used
+ //when there is control flow.
+ void moreBytes(Addr currPC, Addr off, MachInst inst)
+ {
+ assert(off == 0);
+
+ emi = inst;
+ //The I bit, bit 13, is used to figure out where the ASI
+ //should come from. Use that in the ExtMachInst. This is
+ //slightly redundant, but it removes the need to put a condition
+ //into all the execute functions
+ if(inst & (1 << 13))
+ emi |= (static_cast<ExtMachInst>(
+ tc->readMiscRegNoEffect(MISCREG_ASI))
+ << (sizeof(MachInst) * 8));
+ else
+ emi |= (static_cast<ExtMachInst>(bits(inst, 12, 5))
+ << (sizeof(MachInst) * 8));
+ }
+
+ //Use this to give data to the predecoder. This should be used
+ //when instructions are executed in order.
+ void moreBytes(MachInst machInst)
+ {
+ moreBytes(0, 0, machInst);
+ }
+
+ bool needMoreBytes()
+ {
+ return true;
+ }
+
+ bool extMachInstReady()
+ {
+ return true;
+ }
+
+ //This returns a constant reference to the ExtMachInst to avoid a copy
+ const ExtMachInst & getExtMachInst()
+ {
+ return emi;
+ }
+ };
+};
+
+#endif // __ARCH_SPARC_PREDECODER_HH__
diff --git a/src/arch/sparc/utility.hh b/src/arch/sparc/utility.hh
index dc9201401..1458231f2 100644
--- a/src/arch/sparc/utility.hh
+++ b/src/arch/sparc/utility.hh
@@ -48,22 +48,6 @@ namespace SparcISA
tc->readMiscRegNoEffect(MISCREG_HPSTATE & (1 << 2)));
}
- inline ExtMachInst
- makeExtMI(MachInst inst, ThreadContext * xc) {
- ExtMachInst emi = (MachInst) inst;
- //The I bit, bit 13, is used to figure out where the ASI
- //should come from. Use that in the ExtMachInst. This is
- //slightly redundant, but it removes the need to put a condition
- //into all the execute functions
- if(inst & (1 << 13))
- emi |= (static_cast<ExtMachInst>(xc->readMiscRegNoEffect(MISCREG_ASI))
- << (sizeof(MachInst) * 8));
- else
- emi |= (static_cast<ExtMachInst>(bits(inst, 12, 5))
- << (sizeof(MachInst) * 8));
- return emi;
- }
-
inline bool isCallerSaveIntegerRegister(unsigned int reg) {
panic("register classification not implemented");
return false;
diff --git a/src/arch/x86/SConscript b/src/arch/x86/SConscript
index f49225758..f693caf6f 100644
--- a/src/arch/x86/SConscript
+++ b/src/arch/x86/SConscript
@@ -84,11 +84,11 @@
# Authors: Gabe Black
Import('*')
-
if env['TARGET_ISA'] == 'x86':
Source('floatregfile.cc')
Source('intregfile.cc')
Source('miscregfile.cc')
+ Source('predecoder_tables.cc')
Source('regfile.cc')
Source('remote_gdb.cc')
diff --git a/src/arch/x86/isa/formats/unknown.isa b/src/arch/x86/isa/formats/unknown.isa
index 605ddcb69..43ddc20c1 100644
--- a/src/arch/x86/isa/formats/unknown.isa
+++ b/src/arch/x86/isa/formats/unknown.isa
@@ -120,7 +120,8 @@ output exec {{
Fault Unknown::execute(%(CPU_exec_context)s *xc,
Trace::InstRecord *traceData) const
{
- panic("No instructions are implemented for X86!\n");
+ warn("No instructions are implemented for X86!\n");
+ return NoFault;
}
}};
diff --git a/src/arch/x86/predecoder.hh b/src/arch/x86/predecoder.hh
new file mode 100644
index 000000000..371ce9db9
--- /dev/null
+++ b/src/arch/x86/predecoder.hh
@@ -0,0 +1,412 @@
+/*
+ * Copyright (c) 2007 The Hewlett-Packard Development Company
+ * All rights reserved.
+ *
+ * Redistribution and use of this software in source and binary forms,
+ * with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * The software must be used only for Non-Commercial Use which means any
+ * use which is NOT directed to receiving any direct monetary
+ * compensation for, or commercial advantage from such use. Illustrative
+ * examples of non-commercial use are academic research, personal study,
+ * teaching, education and corporate research & development.
+ * Illustrative examples of commercial use are distributing products for
+ * commercial advantage and providing services using the software for
+ * commercial advantage.
+ *
+ * If you wish to use this software or functionality therein that may be
+ * covered by patents for commercial use, please contact:
+ * Director of Intellectual Property Licensing
+ * Office of Strategy and Technology
+ * Hewlett-Packard Company
+ * 1501 Page Mill Road
+ * Palo Alto, California 94304
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer. Redistributions
+ * in binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or
+ * other materials provided with the distribution. Neither the name of
+ * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission. No right of
+ * sublicense is granted herewith. Derivatives of the software and
+ * output created using the software may be prepared, but only for
+ * Non-Commercial Uses. Derivatives of the software may be shared with
+ * others provided: (i) the others agree to abide by the list of
+ * conditions herein which includes the Non-Commercial Use restrictions;
+ * and (ii) such Derivatives of the software include the above copyright
+ * notice to acknowledge the contribution from this software where
+ * applicable, this list of conditions and the disclaimer below.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Authors: Gabe Black
+ */
+
+#ifndef __ARCH_X86_PREDECODER_HH__
+#define __ARCH_X86_PREDECODER_HH__
+
+#include "arch/x86/types.hh"
+#include "base/bitfield.hh"
+#include "base/misc.hh"
+#include "sim/host.hh"
+
+class ThreadContext;
+
+namespace X86ISA
+{
+ class Predecoder
+ {
+ private:
+ static const uint8_t Prefixes[256];
+ static const uint8_t UsesModRM[2][256];
+
+ protected:
+ ThreadContext * tc;
+ //The bytes to be predecoded
+ MachInst fetchChunk;
+ //The pc of the start of fetchChunk
+ Addr basePC;
+ //The offset into fetchChunk of current processing
+ int offset;
+ //The extended machine instruction being generated
+ ExtMachInst emi;
+
+ //State machine state
+ protected:
+ //Whether or not we're out of bytes
+ bool outOfBytes;
+ //Whether we've completed generating an ExtMachInst
+ bool emiIsReady;
+ //The size of the displacement value
+ int displacementSize;
+ int displacementCollected;
+ //The size of the immediate value
+ int immediateSize;
+ int immediateCollected;
+
+ //These are local to some of the states. I need to turn the states
+ //into inline functions to clean things up a bit.
+ int toGet;
+ int remaining;
+ MachInst partialDisp;
+
+ enum State {
+ Prefix,
+ Opcode,
+ ModRM,
+ SIB,
+ Displacement,
+ Immediate
+ };
+
+ State state;
+
+ public:
+ Predecoder(ThreadContext * _tc) :
+ tc(_tc), basePC(0), offset(0),
+ outOfBytes(true), emiIsReady(false),
+ state(Prefix)
+ {}
+
+ ThreadContext * getTC()
+ {
+ return tc;
+ }
+
+ void setTC(ThreadContext * _tc)
+ {
+ tc = _tc;
+ }
+
+ void process()
+ {
+ warn("About to process some bytes\n");
+ assert(!outOfBytes);
+ assert(!emiIsReady);
+ while(!emiIsReady && !outOfBytes)
+ {
+ uint8_t nextByte = (fetchChunk >> (offset * 8)) & 0xff;
+ switch(state)
+ {
+ case Prefix:
+ uint8_t prefix = Prefixes[nextByte];
+ switch(prefix)
+ {
+ //Operand size override prefixes
+ case OperandSizeOverride:
+ warn("Found operand size override prefix!\n");
+ offset++;
+ break;
+ case AddressSizeOverride:
+ warn("Found address size override prefix!\n");
+ offset++;
+ break;
+ //Segment override prefixes
+ case CSOverride:
+ warn("Found cs segment override!\n");
+ offset++;
+ break;
+ case DSOverride:
+ warn("Found ds segment override!\n");
+ offset++;
+ break;
+ case ESOverride:
+ warn("Found es segment override!\n");
+ offset++;
+ break;
+ case FSOverride:
+ warn("Found fs segment override!\n");
+ offset++;
+ break;
+ case GSOverride:
+ warn("Found gs segment override!\n");
+ offset++;
+ break;
+ case SSOverride:
+ warn("Found ss segment override!\n");
+ offset++;
+ break;
+ case Lock:
+ warn("Found lock prefix!\n");
+ offset++;
+ break;
+ case Rep:
+ warn("Found rep prefix!\n");
+ offset++;
+ break;
+ case Repne:
+ warn("Found repne prefix!\n");
+ offset++;
+ break;
+ case Rex:
+ warn("Found Rex prefix %#x!\n", nextByte);
+ offset++;
+ break;
+ case 0:
+ emi.twoByteOpcode = false;
+ state = Opcode;
+ break;
+ default:
+ panic("Unrecognized prefix %#x\n", nextByte);
+ }
+ break;
+ case Opcode:
+ if(nextByte == 0xf0)
+ {
+ warn("Found two byte opcode!\n");
+ emi.twoByteOpcode = true;
+ }
+ else
+ {
+ warn("Found opcode %#x!\n", nextByte);
+ if (UsesModRM[emi.twoByteOpcode ? 1 : 0][nextByte]) {
+ state = ModRM;
+ } else if(0 /* uses immediate */) {
+ //Figure out how big the immediate should be
+ immediateCollected = 0;
+ emi.immediate = 0;
+ state = Immediate;
+ } else {
+ emiIsReady = true;
+ state = Prefix;
+ }
+ }
+ offset++;
+ break;
+ case ModRM:
+ warn("Found modrm byte %#x!\n", nextByte);
+ if (0) {//in 16 bit mode
+ //figure out 16 bit displacement size
+ if(nextByte & 0xC7 == 0x06 ||
+ nextByte & 0xC0 == 0x40)
+ displacementSize = 1;
+ else if(nextByte & 0xC7 == 0x80)
+ displacementSize = 2;
+ else
+ displacementSize = 0;
+ } else {
+ //figure out 32/64 bit displacement size
+ if(nextByte & 0xC7 == 0x06 ||
+ nextByte & 0xC0 == 0x40)
+ displacementSize = 4;
+ else if(nextByte & 0xC7 == 0x80)
+ displacementSize = 2;
+ else
+ displacementSize = 4;
+ }
+ //If there's an SIB, get that next.
+ //There is no SIB in 16 bit mode.
+ if(nextByte & 0x7 == 4 &&
+ nextByte & 0xC0 != 0xC0) {
+ // && in 32/64 bit mode)
+ state = SIB;
+ } else if(displacementSize) {
+ displacementCollected = 0;
+ emi.displacement = 0;
+ state = Displacement;
+ } else if(immediateSize) {
+ immediateCollected = 0;
+ emi.immediate = 0;
+ state = Immediate;
+ } else {
+ emiIsReady = true;
+ state = Prefix;
+ }
+ //The ModRM byte is consumed no matter what
+ offset++;
+ break;
+ case SIB:
+ warn("Found SIB byte %#x!\n", nextByte);
+ offset++;
+ if(displacementSize) {
+ displacementCollected = 0;
+ emi.displacement = 0;
+ state = Displacement;
+ } else if(immediateSize) {
+ immediateCollected = 0;
+ emi.immediate = 0;
+ state = Immediate;
+ } else {
+ emiIsReady = true;
+ state = Prefix;
+ }
+ break;
+ case Displacement:
+ //Gather up the displacement, or at least as much of it
+ //as we can get.
+
+ //Figure out how many bytes we still need to get for the
+ //displacement.
+ toGet = displacementSize - displacementCollected;
+ //Figure out how many bytes are left in our "buffer"
+ remaining = sizeof(MachInst) - offset;
+ //Get as much as we need, up to the amount available.
+ toGet = toGet > remaining ? remaining : toGet;
+
+ //Shift the bytes we want to be all the way to the right
+ partialDisp = fetchChunk >> offset;
+ //Mask off what we don't want
+ partialDisp &= mask(toGet * 8);
+ //Shift it over to overlay with our displacement.
+ partialDisp <<= displacementCollected;
+ //Put it into our displacement
+ emi.displacement |= partialDisp;
+ //Update how many bytes we've collected.
+ displacementCollected += toGet;
+
+ if(displacementSize == displacementCollected) {
+ //Sign extend the displacement
+ switch(displacementSize)
+ {
+ case 1:
+ emi.displacement = sext<8>(emi.displacement);
+ break;
+ case 2:
+ emi.displacement = sext<16>(emi.displacement);
+ break;
+ case 4:
+ emi.displacement = sext<32>(emi.displacement);
+ break;
+ default:
+ panic("Undefined displacement size!\n");
+ }
+ if(immediateSize) {
+ immediateCollected = 0;
+ emi.immediate = 0;
+ state = Immediate;
+ } else {
+ emiIsReady = true;
+ state = Prefix;
+ }
+ }
+ break;
+ case Immediate:
+ //Gather up the displacement, or at least as much of it
+ //as we can get
+
+ //Figure out how many bytes we still need to get for the
+ //immediate.
+ toGet = immediateSize - immediateCollected;
+ //Figure out how many bytes are left in our "buffer"
+ remaining = sizeof(MachInst) - offset;
+ //Get as much as we need, up to the amount available.
+ toGet = toGet > remaining ? remaining : toGet;
+
+ //Shift the bytes we want to be all the way to the right
+ partialDisp = fetchChunk >> offset;
+ //Mask off what we don't want
+ partialDisp &= mask(toGet * 8);
+ //Shift it over to overlay with our immediate.
+ partialDisp <<= displacementCollected;
+ //Put it into our immediate
+ emi.displacement |= partialDisp;
+ //Update how many bytes we've collected.
+ displacementCollected += toGet;
+ if(immediateSize == immediateCollected)
+ {
+ emiIsReady = true;
+ state = Prefix;
+ }
+ break;
+ default:
+ panic("Unrecognized state! %d\n", state);
+ }
+ if(offset == sizeof(MachInst))
+ outOfBytes = true;
+ }
+ }
+
+ //Use this to give data to the predecoder. This should be used
+ //when there is control flow.
+ void moreBytes(Addr currPC, Addr off, MachInst data)
+ {
+ basePC = currPC;
+ offset = off;
+ fetchChunk = data;
+ assert(off < sizeof(MachInst));
+ outOfBytes = false;
+ warn("About to call process.\n");
+ process();
+ }
+
+ //Use this to give data to the predecoder. This should be used
+ //when instructions are executed in order.
+ void moreBytes(MachInst machInst)
+ {
+ moreBytes(basePC + sizeof(machInst), 0, machInst);
+ }
+
+ bool needMoreBytes()
+ {
+ return outOfBytes;
+ }
+
+ bool extMachInstReady()
+ {
+ return emiIsReady;
+ }
+
+ //This returns a constant reference to the ExtMachInst to avoid a copy
+ const ExtMachInst & getExtMachInst()
+ {
+ assert(emiIsReady);
+ emiIsReady = false;
+ return emi;
+ }
+ };
+};
+
+#endif // __ARCH_X86_PREDECODER_HH__
diff --git a/src/arch/x86/predecoder_tables.cc b/src/arch/x86/predecoder_tables.cc
new file mode 100644
index 000000000..9304eee47
--- /dev/null
+++ b/src/arch/x86/predecoder_tables.cc
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2007 The Hewlett-Packard Development Company
+ * All rights reserved.
+ *
+ * Redistribution and use of this software in source and binary forms,
+ * with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * The software must be used only for Non-Commercial Use which means any
+ * use which is NOT directed to receiving any direct monetary
+ * compensation for, or commercial advantage from such use. Illustrative
+ * examples of non-commercial use are academic research, personal study,
+ * teaching, education and corporate research & development.
+ * Illustrative examples of commercial use are distributing products for
+ * commercial advantage and providing services using the software for
+ * commercial advantage.
+ *
+ * If you wish to use this software or functionality therein that may be
+ * covered by patents for commercial use, please contact:
+ * Director of Intellectual Property Licensing
+ * Office of Strategy and Technology
+ * Hewlett-Packard Company
+ * 1501 Page Mill Road
+ * Palo Alto, California 94304
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer. Redistributions
+ * in binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or
+ * other materials provided with the distribution. Neither the name of
+ * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission. No right of
+ * sublicense is granted herewith. Derivatives of the software and
+ * output created using the software may be prepared, but only for
+ * Non-Commercial Uses. Derivatives of the software may be shared with
+ * others provided: (i) the others agree to abide by the list of
+ * conditions herein which includes the Non-Commercial Use restrictions;
+ * and (ii) such Derivatives of the software include the above copyright
+ * notice to acknowledge the contribution from this software where
+ * applicable, this list of conditions and the disclaimer below.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Authors: Gabe Black
+ */
+
+#include "arch/x86/predecoder.hh"
+#include "arch/x86/types.hh"
+
+namespace X86ISA
+{
+ const uint8_t CS = CSOverride;
+ const uint8_t DS = DSOverride;
+ const uint8_t ES = ESOverride;
+ const uint8_t FS = FSOverride;
+ const uint8_t GS = GSOverride;
+ const uint8_t SS = SSOverride;
+
+ const uint8_t OO = OperandSizeOverride;
+ const uint8_t AO = AddressSizeOverride;
+ const uint8_t LO = Lock;
+ const uint8_t RE = Rep;
+ const uint8_t RN = Repne;
+ const uint8_t RX = Rex;
+
+ //This table identifies whether a byte is a prefix, and if it is,
+ //which prefix it is.
+ const uint8_t Predecoder::Prefixes[256] =
+ { //LSB
+// MSB 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F
+/* 0*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* 1*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* 2*/ 0 , 0 , 0 , 0 , 0 , 0 , ES, 0 , 0 , 0 , 0 , 0 , 0 , 0 , CS, 0,
+/* 3*/ 0 , 0 , 0 , 0 , 0 , 0 , SS, 0 , 0 , 0 , 0 , 0 , 0 , 0 , DS, 0,
+/* 4*/ RX, RX, RX, RX, RX, RX, RX, RX, RX, RX, RX, RX, RX, RX, RX, RX,
+/* 5*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* 6*/ 0 , 0 , 0 , 0 , FS, GS, OO, AO, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* 7*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* 8*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* 9*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* A*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* B*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* C*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* D*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* E*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* F*/ LO, 0 , RN, RE, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
+ };
+
+ //This table identifies whether a particular opcode uses the ModRM byte
+ const uint8_t Predecoder::UsesModRM[2][256] =
+ {//For one byte instructions
+ { //LSB
+// MSB 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F
+/* 0 */ 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0,
+/* 1 */ 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0,
+/* 2 */ 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0,
+/* 3 */ 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0,
+/* 4 */ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* 5 */ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* 6 */ 0 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 0 , 0 , 0,
+/* 7 */ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* 8 */ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
+/* 9 */ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* A */ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* B */ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* C */ 1 , 1 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* D */ 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
+/* E */ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* F */ 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1
+ },
+ //For two byte instructions
+ { //LSB
+// MSB 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F
+/* 0 */ 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 1,
+/* 1 */ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* 2 */ 1 , 1 , 1 , 1 , 1 , 0 , 1 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
+/* 3 */ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* 4 */ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
+/* 5 */ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
+/* 6 */ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
+/* 7 */ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1,
+/* 8 */ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* 9 */ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
+/* A */ 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1,
+/* B */ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1,
+/* C */ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
+/* D */ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
+/* E */ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1,
+/* F */ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0
+ }
+ };
+}
diff --git a/src/arch/x86/types.hh b/src/arch/x86/types.hh
index 63f65eee5..68d95de94 100644
--- a/src/arch/x86/types.hh
+++ b/src/arch/x86/types.hh
@@ -59,13 +59,76 @@
#define __ARCH_X86_TYPES_HH__
#include <inttypes.h>
+#include <iostream>
namespace X86ISA
{
- //XXX This won't work
- typedef uint32_t MachInst;
- //XXX This won't work either
- typedef uint64_t ExtMachInst;
+ //This really determines how many bytes are passed to the predecoder.
+ typedef uint64_t MachInst;
+
+ enum Prefixes {
+ NoOverride = 0,
+ CSOverride = 1,
+ DSOverride = 2,
+ ESOverride = 3,
+ FSOverride = 4,
+ GSOverride = 5,
+ SSOverride = 6,
+ //The Rex prefix obviously doesn't fit in with the above, but putting
+ //it here lets us save double the space the enums take up.
+ Rex = 7,
+ //There can be only one segment override, so they share the
+ //first 3 bits in the legacyPrefixes bitfield.
+ SegmentOverride = 0x7,
+ OperandSizeOverride = 8,
+ AddressSizeOverride = 16,
+ Lock = 32,
+ Rep = 64,
+ Repne = 128
+ };
+
+ //The intermediate structure the x86 predecoder returns.
+ struct ExtMachInst
+ {
+ public: //XXX These should be hidden in the future
+
+ uint8_t legacyPrefixes;
+ uint8_t rexPrefix;
+ bool twoByteOpcode;
+ uint8_t opcode;
+ uint64_t immediate;
+ uint64_t displacement;
+
+ public:
+
+ //These are to pacify the decoder for now. This will go away once
+ //it can handle non integer inputs, and in the mean time allow me to
+ //excercise the predecoder a little.
+ operator unsigned int()
+ {
+ return 0;
+ }
+
+ ExtMachInst(unsigned int)
+ {;}
+
+ ExtMachInst()
+ {;}
+ };
+
+ inline static std::ostream &
+ operator << (std::ostream & os, const ExtMachInst & emi)
+ {
+ os << "{X86 ExtMachInst}";
+ return os;
+ }
+
+ inline static bool
+ operator == (const ExtMachInst &emi1, const ExtMachInst &emi2)
+ {
+ //Since this is empty, it's always equal
+ return true;
+ }
typedef uint64_t IntReg;
//XXX Should this be a 128 bit structure for XMM memory ops?
diff --git a/src/arch/x86/utility.hh b/src/arch/x86/utility.hh
index 1fbe1fffe..d89e223de 100644
--- a/src/arch/x86/utility.hh
+++ b/src/arch/x86/utility.hh
@@ -59,11 +59,23 @@
#define __ARCH_X86_UTILITY_HH__
#include "arch/x86/types.hh"
+#include "base/hashmap.hh"
#include "base/misc.hh"
+#include "cpu/thread_context.hh"
#include "sim/host.hh"
class ThreadContext;
+namespace __hash_namespace {
+ template<>
+ struct hash<X86ISA::ExtMachInst> {
+ size_t operator()(const X86ISA::ExtMachInst &emi) const {
+ //Because these are all the same, return 0
+ return 0;
+ };
+ };
+}
+
namespace X86ISA
{
static inline bool
@@ -72,11 +84,6 @@ namespace X86ISA
return false;
}
- inline ExtMachInst
- makeExtMI(MachInst inst, ThreadContext * xc) {
- return inst;
- }
-
inline bool isCallerSaveIntegerRegister(unsigned int reg) {
panic("register classification not implemented");
return false;
diff --git a/src/base/bigint.hh b/src/base/bigint.hh
index ed48c67fe..d60684231 100644
--- a/src/base/bigint.hh
+++ b/src/base/bigint.hh
@@ -28,6 +28,8 @@
* Authors: Ali Saidi
*/
+#include "base/misc.hh"
+
#include <iostream>
#ifndef __BASE_BIGINT_HH__
@@ -49,6 +51,12 @@ struct m5_twin64_t {
b = x;
return *this;
}
+
+ operator uint64_t()
+ {
+ panic("Tried to cram a twin64_t into an integer!\n");
+ return a;
+ }
};
struct m5_twin32_t {
@@ -67,6 +75,12 @@ struct m5_twin32_t {
b = x;
return *this;
}
+
+ operator uint32_t()
+ {
+ panic("Tried to cram a twin32_t into an integer!\n");
+ return a;
+ }
};
diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index 7167bfde0..4d8300186 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -34,11 +34,11 @@
#include <vector>
+#include "arch/isa_traits.hh"
#include "base/statistics.hh"
#include "config/full_system.hh"
#include "sim/eventq.hh"
#include "mem/mem_object.hh"
-#include "arch/isa_traits.hh"
#if FULL_SYSTEM
#include "arch/interrupts.hh"
@@ -50,6 +50,11 @@ class ThreadContext;
class System;
class Port;
+namespace TheISA
+{
+ class Predecoder;
+}
+
class CPUProgressEvent : public Event
{
protected:
@@ -125,6 +130,7 @@ class BaseCPU : public MemObject
protected:
std::vector<ThreadContext *> threadContexts;
+ std::vector<TheISA::Predecoder *> predecoders;
public:
diff --git a/src/cpu/o3/fetch.hh b/src/cpu/o3/fetch.hh
index 8347ed775..da7ce00f5 100644
--- a/src/cpu/o3/fetch.hh
+++ b/src/cpu/o3/fetch.hh
@@ -33,6 +33,7 @@
#define __CPU_O3_FETCH_HH__
#include "arch/utility.hh"
+#include "arch/predecoder.hh"
#include "base/statistics.hh"
#include "base/timebuf.hh"
#include "cpu/pc_event.hh"
@@ -338,6 +339,9 @@ class DefaultFetch
/** BPredUnit. */
BPredUnit branchPred;
+ /** Predecoder. */
+ TheISA::Predecoder predecoder;
+
/** Per-thread fetch PC. */
Addr PC[Impl::MaxThreads];
diff --git a/src/cpu/o3/fetch_impl.hh b/src/cpu/o3/fetch_impl.hh
index ac0149d18..1256dd233 100644
--- a/src/cpu/o3/fetch_impl.hh
+++ b/src/cpu/o3/fetch_impl.hh
@@ -103,6 +103,7 @@ DefaultFetch<Impl>::IcachePort::recvRetry()
template<class Impl>
DefaultFetch<Impl>::DefaultFetch(Params *params)
: branchPred(params),
+ predecoder(NULL),
decodeToFetchDelay(params->decodeToFetchDelay),
renameToFetchDelay(params->renameToFetchDelay),
iewToFetchDelay(params->iewToFetchDelay),
@@ -1117,13 +1118,10 @@ DefaultFetch<Impl>::fetch(bool &status_change)
inst = TheISA::gtoh(*reinterpret_cast<TheISA::MachInst *>
(&cacheData[tid][offset]));
-#if THE_ISA == ALPHA_ISA
- ext_inst = TheISA::makeExtMI(inst, fetch_PC);
-#elif THE_ISA == SPARC_ISA
- ext_inst = TheISA::makeExtMI(inst, cpu->thread[tid]->getTC());
-#elif THE_ISA == MIPS_ISA
- ext_inst = TheISA::makeExtMI(inst, cpu->thread[tid]->getTC());
-#endif
+ predecoder.setTC(cpu->thread[tid]->getTC());
+ predecoder.moreBytes(fetch_PC, 0, inst);
+
+ ext_inst = predecoder.getExtMachInst();
// Create a new DynInst from the instruction fetched.
DynInstPtr instruction = new DynInst(ext_inst,
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc
index ca4627bbf..6f69b5ac4 100644
--- a/src/cpu/simple/atomic.cc
+++ b/src/cpu/simple/atomic.cc
@@ -446,6 +446,17 @@ AtomicSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res)
#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+template
+Fault
+AtomicSimpleCPU::write(Twin32_t data, Addr addr,
+ unsigned flags, uint64_t *res);
+
+template
+Fault
+AtomicSimpleCPU::write(Twin64_t data, Addr addr,
+ unsigned flags, uint64_t *res);
+
template
Fault
AtomicSimpleCPU::write(uint64_t data, Addr addr,
@@ -505,17 +516,28 @@ AtomicSimpleCPU::tick()
Fault fault = setupFetchRequest(ifetch_req);
if (fault == NoFault) {
- ifetch_pkt->reinitFromRequest();
+ Tick icache_latency = 0;
+ bool icache_access = false;
+ dcache_access = false; // assume no dcache access
- Tick icache_latency = icachePort.sendAtomic(ifetch_pkt);
- // ifetch_req is initialized to read the instruction directly
- // into the CPU object's inst field.
+ //Fetch more instruction memory if necessary
+ if(predecoder.needMoreBytes())
+ {
+ icache_access = true;
+ ifetch_pkt->reinitFromRequest();
+
+ icache_latency = icachePort.sendAtomic(ifetch_pkt);
+ // ifetch_req is initialized to read the instruction directly
+ // into the CPU object's inst field.
+ }
- dcache_access = false; // assume no dcache access
preExecute();
- fault = curStaticInst->execute(this, traceData);
- postExecute();
+ if(curStaticInst)
+ {
+ fault = curStaticInst->execute(this, traceData);
+ postExecute();
+ }
// @todo remove me after debugging with legion done
if (curStaticInst && (!curStaticInst->isMicroOp() ||
@@ -523,7 +545,8 @@ AtomicSimpleCPU::tick()
instCnt++;
if (simulate_stalls) {
- Tick icache_stall = icache_latency - cycles(1);
+ Tick icache_stall =
+ icache_access ? icache_latency - cycles(1) : 0;
Tick dcache_stall =
dcache_access ? dcache_latency - cycles(1) : 0;
Tick stall_cycles = (icache_stall + dcache_stall) / cycles(1);
@@ -534,8 +557,8 @@ AtomicSimpleCPU::tick()
}
}
-
- advancePC(fault);
+ if(predecoder.needMoreBytes())
+ advancePC(fault);
}
if (_status != Idle)
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index 9feb09851..cd139492a 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -70,7 +70,7 @@ using namespace std;
using namespace TheISA;
BaseSimpleCPU::BaseSimpleCPU(Params *p)
- : BaseCPU(p), thread(NULL)
+ : BaseCPU(p), thread(NULL), predecoder(NULL)
{
#if FULL_SYSTEM
thread = new SimpleThread(this, 0, p->system, p->itb, p->dtb);
@@ -367,18 +367,23 @@ BaseSimpleCPU::preExecute()
inst = gtoh(inst);
//If we're not in the middle of a macro instruction
if (!curMacroStaticInst) {
-#if THE_ISA == ALPHA_ISA
- StaticInstPtr instPtr = StaticInst::decode(makeExtMI(inst, thread->readPC()));
-#elif THE_ISA == SPARC_ISA
- StaticInstPtr instPtr = StaticInst::decode(makeExtMI(inst, thread->getTC()));
-#elif THE_ISA == X86_ISA
- StaticInstPtr instPtr = StaticInst::decode(makeExtMI(inst, thread->getTC()));
-#elif THE_ISA == MIPS_ISA
- //Mips doesn't do anything in it's MakeExtMI function right now,
- //so it won't be called.
- StaticInstPtr instPtr = StaticInst::decode(inst);
-#endif
- if (instPtr->isMacroOp()) {
+ StaticInstPtr instPtr = NULL;
+
+ //Predecode, ie bundle up an ExtMachInst
+ //This should go away once the constructor can be set up properly
+ predecoder.setTC(thread->getTC());
+ //If more fetch data is needed, pass it in.
+ if(predecoder.needMoreBytes())
+ predecoder.moreBytes(thread->readPC(), 0, inst);
+ else
+ predecoder.process();
+ //If an instruction is ready, decode it
+ if (predecoder.extMachInstReady())
+ instPtr = StaticInst::decode(predecoder.getExtMachInst());
+
+ //If we decoded an instruction and it's microcoded, start pulling
+ //out micro ops
+ if (instPtr && instPtr->isMacroOp()) {
curMacroStaticInst = instPtr;
curStaticInst = curMacroStaticInst->
fetchMicroOp(thread->readMicroPC());
@@ -391,17 +396,19 @@ BaseSimpleCPU::preExecute()
fetchMicroOp(thread->readMicroPC());
}
+ //If we decoded an instruction this "tick", record information about it.
+ if(curStaticInst)
+ {
+ traceData = Trace::getInstRecord(curTick, tc, curStaticInst,
+ thread->readPC());
- traceData = Trace::getInstRecord(curTick, tc, curStaticInst,
- thread->readPC());
-
- DPRINTF(Decode,"Decode: Decoded %s instruction (opcode: 0x%x): 0x%x\n",
- curStaticInst->getName(), curStaticInst->getOpcode(),
- curStaticInst->machInst);
+ DPRINTF(Decode,"Decode: Decoded %s instruction: 0x%x\n",
+ curStaticInst->getName(), curStaticInst->machInst);
#if FULL_SYSTEM
- thread->setInst(inst);
+ thread->setInst(inst);
#endif // FULL_SYSTEM
+ }
}
void
@@ -444,9 +451,9 @@ BaseSimpleCPU::advancePC(Fault fault)
fault->invoke(tc);
thread->setMicroPC(0);
thread->setNextMicroPC(1);
- } else {
+ } else if (predecoder.needMoreBytes()) {
//If we're at the last micro op for this instruction
- if (curStaticInst->isLastMicroOp()) {
+ if (curStaticInst && curStaticInst->isLastMicroOp()) {
//We should be working with a macro op
assert(curMacroStaticInst);
//Close out this macro op, and clean up the
@@ -465,13 +472,9 @@ BaseSimpleCPU::advancePC(Fault fault)
} else {
// go to the next instruction
thread->setPC(thread->readNextPC());
-#if ISA_HAS_DELAY_SLOT
thread->setNextPC(thread->readNextNPC());
thread->setNextNPC(thread->readNextNPC() + sizeof(MachInst));
assert(thread->readNextPC() != thread->readNextNPC());
-#else
- thread->setNextPC(thread->readNextPC() + sizeof(MachInst));
-#endif
}
}
diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh
index eae24014b..787259c96 100644
--- a/src/cpu/simple/base.hh
+++ b/src/cpu/simple/base.hh
@@ -33,6 +33,7 @@
#ifndef __CPU_SIMPLE_BASE_HH__
#define __CPU_SIMPLE_BASE_HH__
+#include "arch/predecoder.hh"
#include "base/statistics.hh"
#include "config/full_system.hh"
#include "cpu/base.hh"
@@ -63,6 +64,10 @@ class Process;
class RemoteGDB;
class GDBListener;
+namespace TheISA
+{
+ class Predecoder;
+}
class ThreadContext;
class Checkpoint;
@@ -74,7 +79,6 @@ namespace Trace {
class BaseSimpleCPU : public BaseCPU
{
protected:
- typedef TheISA::MachInst MachInst;
typedef TheISA::MiscReg MiscReg;
typedef TheISA::FloatReg FloatReg;
typedef TheISA::FloatRegBits FloatRegBits;
@@ -122,7 +126,10 @@ class BaseSimpleCPU : public BaseCPU
#endif
// current instruction
- MachInst inst;
+ TheISA::MachInst inst;
+
+ // The predecoder
+ TheISA::Predecoder predecoder;
// Static data storage
TheISA::LargestRead dataReg;
diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc
index 2e602648a..45da7c3eb 100644
--- a/src/cpu/simple/timing.cc
+++ b/src/cpu/simple/timing.cc
@@ -398,6 +398,16 @@ TimingSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res)
#ifndef DOXYGEN_SHOULD_SKIP_THIS
template
Fault
+TimingSimpleCPU::write(Twin32_t data, Addr addr,
+ unsigned flags, uint64_t *res);
+
+template
+Fault
+TimingSimpleCPU::write(Twin64_t data, Addr addr,
+ unsigned flags, uint64_t *res);
+
+template
+Fault
TimingSimpleCPU::write(uint64_t data, Addr addr,
unsigned flags, uint64_t *res);
diff --git a/src/cpu/static_inst.hh b/src/cpu/static_inst.hh
index 416c8ab56..a58ac85d6 100644
--- a/src/cpu/static_inst.hh
+++ b/src/cpu/static_inst.hh
@@ -35,6 +35,7 @@
#include <string>
#include "arch/isa_traits.hh"
+#include "arch/utility.hh"
#include "sim/faults.hh"
#include "base/bitfield.hh"
#include "base/hashmap.hh"
@@ -439,9 +440,6 @@ class StaticInst : public StaticInstBase
//This is defined as inline below.
static StaticInstPtr decode(ExtMachInst mach_inst);
- /// Return opcode of machine instruction
- uint32_t getOpcode() { return bits(machInst, 31, 26);}
-
/// Return name of machine instruction
std::string getName() { return mnemonic; }
};
@@ -474,7 +472,7 @@ class StaticInstPtr : public RefCountingPtr<StaticInst>
/// Construct directly from machine instruction.
/// Calls StaticInst::decode().
- StaticInstPtr(TheISA::ExtMachInst mach_inst)
+ explicit StaticInstPtr(TheISA::ExtMachInst mach_inst)
: RefCountingPtr<StaticInst>(StaticInst::decode(mach_inst))
{
}
diff --git a/tests/long/00.gzip/ref/alpha/linux/o3-timing/config.ini b/tests/long/00.gzip/ref/alpha/tru64/o3-timing/config.ini
index fa5ac1725..fa5ac1725 100644
--- a/tests/long/00.gzip/ref/alpha/linux/o3-timing/config.ini
+++ b/tests/long/00.gzip/ref/alpha/tru64/o3-timing/config.ini
diff --git a/tests/long/00.gzip/ref/alpha/linux/o3-timing/config.out b/tests/long/00.gzip/ref/alpha/tru64/o3-timing/config.out
index 8744b6907..8744b6907 100644
--- a/tests/long/00.gzip/ref/alpha/linux/o3-timing/config.out
+++ b/tests/long/00.gzip/ref/alpha/tru64/o3-timing/config.out
diff --git a/tests/long/00.gzip/ref/alpha/linux/o3-timing/m5stats.txt b/tests/long/00.gzip/ref/alpha/tru64/o3-timing/m5stats.txt
index 8303336ed..8303336ed 100644
--- a/tests/long/00.gzip/ref/alpha/linux/o3-timing/m5stats.txt
+++ b/tests/long/00.gzip/ref/alpha/tru64/o3-timing/m5stats.txt
diff --git a/tests/long/00.gzip/ref/alpha/linux/o3-timing/stderr b/tests/long/00.gzip/ref/alpha/tru64/o3-timing/stderr
index eb1796ead..eb1796ead 100644
--- a/tests/long/00.gzip/ref/alpha/linux/o3-timing/stderr
+++ b/tests/long/00.gzip/ref/alpha/tru64/o3-timing/stderr
diff --git a/tests/long/00.gzip/ref/alpha/linux/o3-timing/stdout b/tests/long/00.gzip/ref/alpha/tru64/o3-timing/stdout
index 9aaca3eeb..9aaca3eeb 100644
--- a/tests/long/00.gzip/ref/alpha/linux/o3-timing/stdout
+++ b/tests/long/00.gzip/ref/alpha/tru64/o3-timing/stdout
diff --git a/tests/long/00.gzip/ref/alpha/linux/simple-atomic/config.ini b/tests/long/00.gzip/ref/alpha/tru64/simple-atomic/config.ini
index 841e8766f..841e8766f 100644
--- a/tests/long/00.gzip/ref/alpha/linux/simple-atomic/config.ini
+++ b/tests/long/00.gzip/ref/alpha/tru64/simple-atomic/config.ini
diff --git a/tests/long/00.gzip/ref/alpha/linux/simple-atomic/config.out b/tests/long/00.gzip/ref/alpha/tru64/simple-atomic/config.out
index b5a24e5fb..b5a24e5fb 100644
--- a/tests/long/00.gzip/ref/alpha/linux/simple-atomic/config.out
+++ b/tests/long/00.gzip/ref/alpha/tru64/simple-atomic/config.out
diff --git a/tests/long/00.gzip/ref/alpha/linux/simple-atomic/m5stats.txt b/tests/long/00.gzip/ref/alpha/tru64/simple-atomic/m5stats.txt
index b8593d3a3..b8593d3a3 100644
--- a/tests/long/00.gzip/ref/alpha/linux/simple-atomic/m5stats.txt
+++ b/tests/long/00.gzip/ref/alpha/tru64/simple-atomic/m5stats.txt
diff --git a/tests/long/00.gzip/ref/alpha/linux/simple-atomic/stderr b/tests/long/00.gzip/ref/alpha/tru64/simple-atomic/stderr
index 87866a2a5..87866a2a5 100644
--- a/tests/long/00.gzip/ref/alpha/linux/simple-atomic/stderr
+++ b/tests/long/00.gzip/ref/alpha/tru64/simple-atomic/stderr
diff --git a/tests/long/00.gzip/ref/alpha/linux/simple-atomic/stdout b/tests/long/00.gzip/ref/alpha/tru64/simple-atomic/stdout
index 9aaca3eeb..9aaca3eeb 100644
--- a/tests/long/00.gzip/ref/alpha/linux/simple-atomic/stdout
+++ b/tests/long/00.gzip/ref/alpha/tru64/simple-atomic/stdout
diff --git a/tests/long/00.gzip/ref/alpha/linux/simple-timing/config.ini b/tests/long/00.gzip/ref/alpha/tru64/simple-timing/config.ini
index 48a760b08..48a760b08 100644
--- a/tests/long/00.gzip/ref/alpha/linux/simple-timing/config.ini
+++ b/tests/long/00.gzip/ref/alpha/tru64/simple-timing/config.ini
diff --git a/tests/long/00.gzip/ref/alpha/linux/simple-timing/config.out b/tests/long/00.gzip/ref/alpha/tru64/simple-timing/config.out
index eddb9ff53..eddb9ff53 100644
--- a/tests/long/00.gzip/ref/alpha/linux/simple-timing/config.out
+++ b/tests/long/00.gzip/ref/alpha/tru64/simple-timing/config.out
diff --git a/tests/long/00.gzip/ref/alpha/linux/simple-timing/m5stats.txt b/tests/long/00.gzip/ref/alpha/tru64/simple-timing/m5stats.txt
index 5e7441c54..5e7441c54 100644
--- a/tests/long/00.gzip/ref/alpha/linux/simple-timing/m5stats.txt
+++ b/tests/long/00.gzip/ref/alpha/tru64/simple-timing/m5stats.txt
diff --git a/tests/long/00.gzip/ref/alpha/linux/simple-timing/stderr b/tests/long/00.gzip/ref/alpha/tru64/simple-timing/stderr
index 87866a2a5..87866a2a5 100644
--- a/tests/long/00.gzip/ref/alpha/linux/simple-timing/stderr
+++ b/tests/long/00.gzip/ref/alpha/tru64/simple-timing/stderr
diff --git a/tests/long/00.gzip/ref/alpha/linux/simple-timing/stdout b/tests/long/00.gzip/ref/alpha/tru64/simple-timing/stdout
index 9aaca3eeb..9aaca3eeb 100644
--- a/tests/long/00.gzip/ref/alpha/linux/simple-timing/stdout
+++ b/tests/long/00.gzip/ref/alpha/tru64/simple-timing/stdout
diff --git a/tests/long/00.gzip/test.py b/tests/long/00.gzip/test.py
index 06ccb656b..f69914046 100644
--- a/tests/long/00.gzip/test.py
+++ b/tests/long/00.gzip/test.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2006 The Regents of The University of Michigan
+# Copyright (c) 2006-2007 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,5 +29,5 @@
m5.AddToPath('../configs/common')
from cpu2000 import gzip_log
-workload = gzip_log('alpha', 'tru64', 'smred')
+workload = gzip_log(isa, opsys, 'smred')
root.system.cpu.workload = workload.makeLiveProcess()
diff --git a/tests/long/10.mcf/test.py b/tests/long/10.mcf/test.py
index f545aad3d..ffe2758f1 100644
--- a/tests/long/10.mcf/test.py
+++ b/tests/long/10.mcf/test.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2006 The Regents of The University of Michigan
+# Copyright (c) 2006-2007 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,5 +29,5 @@
m5.AddToPath('../configs/common')
from cpu2000 import mcf
-workload = mcf('alpha', 'tru64', 'lgred')
+workload = mcf(isa, opsys, 'lgred')
root.system.cpu.workload = workload.makeLiveProcess()
diff --git a/tests/long/20.parser/ref/alpha/linux/NOTE b/tests/long/20.parser/ref/alpha/tru64/NOTE
index 5e7d8c358..5e7d8c358 100644
--- a/tests/long/20.parser/ref/alpha/linux/NOTE
+++ b/tests/long/20.parser/ref/alpha/tru64/NOTE
diff --git a/tests/long/20.parser/test.py b/tests/long/20.parser/test.py
index 8703ae634..82ab71c90 100644
--- a/tests/long/20.parser/test.py
+++ b/tests/long/20.parser/test.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2006 The Regents of The University of Michigan
+# Copyright (c) 2006-2007 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,5 +29,5 @@
m5.AddToPath('../configs/common')
from cpu2000 import parser
-workload = parser('alpha', 'tru64', 'lgred')
+workload = parser(isa, opsys, 'lgred')
root.system.cpu.workload = workload.makeLiveProcess()
diff --git a/tests/long/30.eon/ref/alpha/linux/o3-timing/config.ini b/tests/long/30.eon/ref/alpha/tru64/o3-timing/config.ini
index 915a6967f..915a6967f 100644
--- a/tests/long/30.eon/ref/alpha/linux/o3-timing/config.ini
+++ b/tests/long/30.eon/ref/alpha/tru64/o3-timing/config.ini
diff --git a/tests/long/30.eon/ref/alpha/linux/o3-timing/config.out b/tests/long/30.eon/ref/alpha/tru64/o3-timing/config.out
index 80e067401..80e067401 100644
--- a/tests/long/30.eon/ref/alpha/linux/o3-timing/config.out
+++ b/tests/long/30.eon/ref/alpha/tru64/o3-timing/config.out
diff --git a/tests/long/30.eon/ref/alpha/linux/o3-timing/m5stats.txt b/tests/long/30.eon/ref/alpha/tru64/o3-timing/m5stats.txt
index 9d00cb146..9d00cb146 100644
--- a/tests/long/30.eon/ref/alpha/linux/o3-timing/m5stats.txt
+++ b/tests/long/30.eon/ref/alpha/tru64/o3-timing/m5stats.txt
diff --git a/tests/long/30.eon/ref/alpha/linux/o3-timing/stderr b/tests/long/30.eon/ref/alpha/tru64/o3-timing/stderr
index d414f5cfe..d414f5cfe 100644
--- a/tests/long/30.eon/ref/alpha/linux/o3-timing/stderr
+++ b/tests/long/30.eon/ref/alpha/tru64/o3-timing/stderr
diff --git a/tests/long/30.eon/ref/alpha/linux/o3-timing/stdout b/tests/long/30.eon/ref/alpha/tru64/o3-timing/stdout
index 039e2d4ce..039e2d4ce 100644
--- a/tests/long/30.eon/ref/alpha/linux/o3-timing/stdout
+++ b/tests/long/30.eon/ref/alpha/tru64/o3-timing/stdout
diff --git a/tests/long/30.eon/ref/alpha/linux/simple-atomic/config.ini b/tests/long/30.eon/ref/alpha/tru64/simple-atomic/config.ini
index 088cd1a9f..088cd1a9f 100644
--- a/tests/long/30.eon/ref/alpha/linux/simple-atomic/config.ini
+++ b/tests/long/30.eon/ref/alpha/tru64/simple-atomic/config.ini
diff --git a/tests/long/30.eon/ref/alpha/linux/simple-atomic/config.out b/tests/long/30.eon/ref/alpha/tru64/simple-atomic/config.out
index bec900d0f..bec900d0f 100644
--- a/tests/long/30.eon/ref/alpha/linux/simple-atomic/config.out
+++ b/tests/long/30.eon/ref/alpha/tru64/simple-atomic/config.out
diff --git a/tests/long/30.eon/ref/alpha/linux/simple-atomic/m5stats.txt b/tests/long/30.eon/ref/alpha/tru64/simple-atomic/m5stats.txt
index a308f5e36..a308f5e36 100644
--- a/tests/long/30.eon/ref/alpha/linux/simple-atomic/m5stats.txt
+++ b/tests/long/30.eon/ref/alpha/tru64/simple-atomic/m5stats.txt
diff --git a/tests/long/30.eon/ref/alpha/linux/simple-atomic/stderr b/tests/long/30.eon/ref/alpha/tru64/simple-atomic/stderr
index 1d6957eca..1d6957eca 100644
--- a/tests/long/30.eon/ref/alpha/linux/simple-atomic/stderr
+++ b/tests/long/30.eon/ref/alpha/tru64/simple-atomic/stderr
diff --git a/tests/long/30.eon/ref/alpha/linux/simple-atomic/stdout b/tests/long/30.eon/ref/alpha/tru64/simple-atomic/stdout
index 039e2d4ce..039e2d4ce 100644
--- a/tests/long/30.eon/ref/alpha/linux/simple-atomic/stdout
+++ b/tests/long/30.eon/ref/alpha/tru64/simple-atomic/stdout
diff --git a/tests/long/30.eon/ref/alpha/linux/simple-timing/config.ini b/tests/long/30.eon/ref/alpha/tru64/simple-timing/config.ini
index 452538e49..452538e49 100644
--- a/tests/long/30.eon/ref/alpha/linux/simple-timing/config.ini
+++ b/tests/long/30.eon/ref/alpha/tru64/simple-timing/config.ini
diff --git a/tests/long/30.eon/ref/alpha/linux/simple-timing/config.out b/tests/long/30.eon/ref/alpha/tru64/simple-timing/config.out
index 602da9705..602da9705 100644
--- a/tests/long/30.eon/ref/alpha/linux/simple-timing/config.out
+++ b/tests/long/30.eon/ref/alpha/tru64/simple-timing/config.out
diff --git a/tests/long/30.eon/ref/alpha/linux/simple-timing/m5stats.txt b/tests/long/30.eon/ref/alpha/tru64/simple-timing/m5stats.txt
index 328856ce7..328856ce7 100644
--- a/tests/long/30.eon/ref/alpha/linux/simple-timing/m5stats.txt
+++ b/tests/long/30.eon/ref/alpha/tru64/simple-timing/m5stats.txt
diff --git a/tests/long/30.eon/ref/alpha/linux/simple-timing/stderr b/tests/long/30.eon/ref/alpha/tru64/simple-timing/stderr
index 8534c55aa..8534c55aa 100644
--- a/tests/long/30.eon/ref/alpha/linux/simple-timing/stderr
+++ b/tests/long/30.eon/ref/alpha/tru64/simple-timing/stderr
diff --git a/tests/long/30.eon/ref/alpha/linux/simple-timing/stdout b/tests/long/30.eon/ref/alpha/tru64/simple-timing/stdout
index 039e2d4ce..039e2d4ce 100644
--- a/tests/long/30.eon/ref/alpha/linux/simple-timing/stdout
+++ b/tests/long/30.eon/ref/alpha/tru64/simple-timing/stdout
diff --git a/tests/long/30.eon/test.py b/tests/long/30.eon/test.py
index 828b6390c..318da1049 100644
--- a/tests/long/30.eon/test.py
+++ b/tests/long/30.eon/test.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2006 The Regents of The University of Michigan
+# Copyright (c) 2006-2007 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,5 +29,5 @@
m5.AddToPath('../configs/common')
from cpu2000 import eon_cook
-workload = eon_cook('alpha', 'tru64', 'mdred')
+workload = eon_cook(isa, opsys, 'mdred')
root.system.cpu.workload = workload.makeLiveProcess()
diff --git a/tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/config.ini b/tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/config.ini
index 59c6e25e2..59c6e25e2 100644
--- a/tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/config.ini
+++ b/tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/config.ini
diff --git a/tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/config.out b/tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/config.out
index c6e4aa136..c6e4aa136 100644
--- a/tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/config.out
+++ b/tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/config.out
diff --git a/tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/m5stats.txt b/tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/m5stats.txt
index 9db3f64bc..9db3f64bc 100644
--- a/tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/m5stats.txt
+++ b/tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/m5stats.txt
diff --git a/tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/stderr b/tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/stderr
index bc72461c8..bc72461c8 100644
--- a/tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/stderr
+++ b/tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/stderr
diff --git a/tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/stdout b/tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/stdout
index d4a078b85..d4a078b85 100644
--- a/tests/long/40.perlbmk/ref/alpha/linux/simple-atomic/stdout
+++ b/tests/long/40.perlbmk/ref/alpha/tru64/simple-atomic/stdout
diff --git a/tests/long/40.perlbmk/ref/alpha/linux/simple-timing/config.ini b/tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/config.ini
index 5f64dcebd..5f64dcebd 100644
--- a/tests/long/40.perlbmk/ref/alpha/linux/simple-timing/config.ini
+++ b/tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/config.ini
diff --git a/tests/long/40.perlbmk/ref/alpha/linux/simple-timing/config.out b/tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/config.out
index 6998f4828..6998f4828 100644
--- a/tests/long/40.perlbmk/ref/alpha/linux/simple-timing/config.out
+++ b/tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/config.out
diff --git a/tests/long/40.perlbmk/ref/alpha/linux/simple-timing/m5stats.txt b/tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/m5stats.txt
index 45f793ab7..45f793ab7 100644
--- a/tests/long/40.perlbmk/ref/alpha/linux/simple-timing/m5stats.txt
+++ b/tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/m5stats.txt
diff --git a/tests/long/40.perlbmk/ref/alpha/linux/simple-timing/stderr b/tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/stderr
index bc72461c8..bc72461c8 100644
--- a/tests/long/40.perlbmk/ref/alpha/linux/simple-timing/stderr
+++ b/tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/stderr
diff --git a/tests/long/40.perlbmk/ref/alpha/linux/simple-timing/stdout b/tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/stdout
index d4a078b85..d4a078b85 100644
--- a/tests/long/40.perlbmk/ref/alpha/linux/simple-timing/stdout
+++ b/tests/long/40.perlbmk/ref/alpha/tru64/simple-timing/stdout
diff --git a/tests/long/40.perlbmk/test.py b/tests/long/40.perlbmk/test.py
index 2f9dd0ff0..e32416265 100644
--- a/tests/long/40.perlbmk/test.py
+++ b/tests/long/40.perlbmk/test.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2006 The Regents of The University of Michigan
+# Copyright (c) 2006-2007 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,5 +29,5 @@
m5.AddToPath('../configs/common')
from cpu2000 import perlbmk_makerand
-workload = perlbmk_makerand('alpha', 'tru64', 'lgred')
+workload = perlbmk_makerand(isa, opsys, 'lgred')
root.system.cpu.workload = workload.makeLiveProcess()
diff --git a/tests/long/50.vortex/ref/alpha/linux/o3-timing/config.ini b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/config.ini
index cf4e15676..cf4e15676 100644
--- a/tests/long/50.vortex/ref/alpha/linux/o3-timing/config.ini
+++ b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/config.ini
diff --git a/tests/long/50.vortex/ref/alpha/linux/o3-timing/config.out b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/config.out
index 52c225902..52c225902 100644
--- a/tests/long/50.vortex/ref/alpha/linux/o3-timing/config.out
+++ b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/config.out
diff --git a/tests/long/50.vortex/ref/alpha/linux/o3-timing/m5stats.txt b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/m5stats.txt
index 3069385f0..3069385f0 100644
--- a/tests/long/50.vortex/ref/alpha/linux/o3-timing/m5stats.txt
+++ b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/m5stats.txt
diff --git a/tests/long/50.vortex/ref/alpha/linux/o3-timing/smred.msg b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/smred.msg
index 327142d7c..327142d7c 100644
--- a/tests/long/50.vortex/ref/alpha/linux/o3-timing/smred.msg
+++ b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/smred.msg
diff --git a/tests/long/50.vortex/ref/alpha/linux/o3-timing/smred.out b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/smred.out
index 726b45c60..726b45c60 100644
--- a/tests/long/50.vortex/ref/alpha/linux/o3-timing/smred.out
+++ b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/smred.out
diff --git a/tests/long/50.vortex/ref/alpha/linux/o3-timing/stderr b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/stderr
index eb1796ead..eb1796ead 100644
--- a/tests/long/50.vortex/ref/alpha/linux/o3-timing/stderr
+++ b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/stderr
diff --git a/tests/long/50.vortex/ref/alpha/linux/o3-timing/stdout b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/stdout
index e69de29bb..e69de29bb 100644
--- a/tests/long/50.vortex/ref/alpha/linux/o3-timing/stdout
+++ b/tests/long/50.vortex/ref/alpha/tru64/o3-timing/stdout
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/config.ini b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/config.ini
index 179e8ea77..179e8ea77 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/config.ini
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/config.ini
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/config.out b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/config.out
index 725aaed50..725aaed50 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/config.out
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/config.out
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/m5stats.txt b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/m5stats.txt
index 9c60e1316..9c60e1316 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/m5stats.txt
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/m5stats.txt
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/smred.msg b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/smred.msg
index 327142d7c..327142d7c 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/smred.msg
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/smred.msg
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/smred.out b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/smred.out
index 726b45c60..726b45c60 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/smred.out
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/smred.out
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/stderr b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/stderr
index eb1796ead..eb1796ead 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/stderr
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/stderr
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/stdout b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/stdout
index e69de29bb..e69de29bb 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-atomic/stdout
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-atomic/stdout
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-timing/config.ini b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/config.ini
index 0e1a3c9f1..0e1a3c9f1 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-timing/config.ini
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/config.ini
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-timing/config.out b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/config.out
index 0dc85858d..0dc85858d 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-timing/config.out
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/config.out
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-timing/m5stats.txt b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/m5stats.txt
index 9a9778162..9a9778162 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-timing/m5stats.txt
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/m5stats.txt
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-timing/smred.msg b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/smred.msg
index 327142d7c..327142d7c 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-timing/smred.msg
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/smred.msg
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-timing/smred.out b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/smred.out
index 726b45c60..726b45c60 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-timing/smred.out
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/smred.out
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-timing/stderr b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/stderr
index eb1796ead..eb1796ead 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-timing/stderr
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/stderr
diff --git a/tests/long/50.vortex/ref/alpha/linux/simple-timing/stdout b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/stdout
index e69de29bb..e69de29bb 100644
--- a/tests/long/50.vortex/ref/alpha/linux/simple-timing/stdout
+++ b/tests/long/50.vortex/ref/alpha/tru64/simple-timing/stdout
diff --git a/tests/long/50.vortex/test.py b/tests/long/50.vortex/test.py
index bd57ef6e6..fbf0dc081 100644
--- a/tests/long/50.vortex/test.py
+++ b/tests/long/50.vortex/test.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2006 The Regents of The University of Michigan
+# Copyright (c) 2006-2007 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,5 +29,5 @@
m5.AddToPath('../configs/common')
from cpu2000 import vortex
-workload = vortex('alpha', 'tru64', 'smred')
+workload = vortex(isa, opsys, 'smred')
root.system.cpu.workload = workload.makeLiveProcess()
diff --git a/tests/long/60.bzip2/ref/alpha/linux/o3-timing/config.ini b/tests/long/60.bzip2/ref/alpha/tru64/o3-timing/config.ini
index 9ae62655d..9ae62655d 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/o3-timing/config.ini
+++ b/tests/long/60.bzip2/ref/alpha/tru64/o3-timing/config.ini
diff --git a/tests/long/60.bzip2/ref/alpha/linux/o3-timing/config.out b/tests/long/60.bzip2/ref/alpha/tru64/o3-timing/config.out
index 690cc5723..690cc5723 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/o3-timing/config.out
+++ b/tests/long/60.bzip2/ref/alpha/tru64/o3-timing/config.out
diff --git a/tests/long/60.bzip2/ref/alpha/linux/o3-timing/m5stats.txt b/tests/long/60.bzip2/ref/alpha/tru64/o3-timing/m5stats.txt
index bc6866525..bc6866525 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/o3-timing/m5stats.txt
+++ b/tests/long/60.bzip2/ref/alpha/tru64/o3-timing/m5stats.txt
diff --git a/tests/long/60.bzip2/ref/alpha/linux/o3-timing/stderr b/tests/long/60.bzip2/ref/alpha/tru64/o3-timing/stderr
index cdd59eda7..cdd59eda7 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/o3-timing/stderr
+++ b/tests/long/60.bzip2/ref/alpha/tru64/o3-timing/stderr
diff --git a/tests/long/60.bzip2/ref/alpha/linux/o3-timing/stdout b/tests/long/60.bzip2/ref/alpha/tru64/o3-timing/stdout
index 0c5c00118..0c5c00118 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/o3-timing/stdout
+++ b/tests/long/60.bzip2/ref/alpha/tru64/o3-timing/stdout
diff --git a/tests/long/60.bzip2/ref/alpha/linux/simple-atomic/config.ini b/tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/config.ini
index ad57a5293..ad57a5293 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/simple-atomic/config.ini
+++ b/tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/config.ini
diff --git a/tests/long/60.bzip2/ref/alpha/linux/simple-atomic/config.out b/tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/config.out
index 891519c26..891519c26 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/simple-atomic/config.out
+++ b/tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/config.out
diff --git a/tests/long/60.bzip2/ref/alpha/linux/simple-atomic/m5stats.txt b/tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/m5stats.txt
index 7422e3ae7..7422e3ae7 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/simple-atomic/m5stats.txt
+++ b/tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/m5stats.txt
diff --git a/tests/long/60.bzip2/ref/alpha/linux/simple-atomic/stderr b/tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/stderr
index 87866a2a5..87866a2a5 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/simple-atomic/stderr
+++ b/tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/stderr
diff --git a/tests/long/60.bzip2/ref/alpha/linux/simple-atomic/stdout b/tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/stdout
index 0c5c00118..0c5c00118 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/simple-atomic/stdout
+++ b/tests/long/60.bzip2/ref/alpha/tru64/simple-atomic/stdout
diff --git a/tests/long/60.bzip2/ref/alpha/linux/simple-timing/config.ini b/tests/long/60.bzip2/ref/alpha/tru64/simple-timing/config.ini
index 0a123d4a4..0a123d4a4 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/simple-timing/config.ini
+++ b/tests/long/60.bzip2/ref/alpha/tru64/simple-timing/config.ini
diff --git a/tests/long/60.bzip2/ref/alpha/linux/simple-timing/config.out b/tests/long/60.bzip2/ref/alpha/tru64/simple-timing/config.out
index 4692c5d40..4692c5d40 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/simple-timing/config.out
+++ b/tests/long/60.bzip2/ref/alpha/tru64/simple-timing/config.out
diff --git a/tests/long/60.bzip2/ref/alpha/linux/simple-timing/m5stats.txt b/tests/long/60.bzip2/ref/alpha/tru64/simple-timing/m5stats.txt
index 45b7beb7c..45b7beb7c 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/simple-timing/m5stats.txt
+++ b/tests/long/60.bzip2/ref/alpha/tru64/simple-timing/m5stats.txt
diff --git a/tests/long/60.bzip2/ref/alpha/linux/simple-timing/stderr b/tests/long/60.bzip2/ref/alpha/tru64/simple-timing/stderr
index 87866a2a5..87866a2a5 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/simple-timing/stderr
+++ b/tests/long/60.bzip2/ref/alpha/tru64/simple-timing/stderr
diff --git a/tests/long/60.bzip2/ref/alpha/linux/simple-timing/stdout b/tests/long/60.bzip2/ref/alpha/tru64/simple-timing/stdout
index 0c5c00118..0c5c00118 100644
--- a/tests/long/60.bzip2/ref/alpha/linux/simple-timing/stdout
+++ b/tests/long/60.bzip2/ref/alpha/tru64/simple-timing/stdout
diff --git a/tests/long/60.bzip2/test.py b/tests/long/60.bzip2/test.py
index 362ca524e..7fa3d1a07 100644
--- a/tests/long/60.bzip2/test.py
+++ b/tests/long/60.bzip2/test.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2006 The Regents of The University of Michigan
+# Copyright (c) 2006-2007 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,5 +29,5 @@
m5.AddToPath('../configs/common')
from cpu2000 import bzip2_source
-workload = bzip2_source('alpha', 'tru64', 'lgred')
+workload = bzip2_source(isa, opsys, 'lgred')
root.system.cpu.workload = workload.makeLiveProcess()
diff --git a/tests/long/70.twolf/ref/alpha/linux/o3-timing/config.ini b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/config.ini
index 5604f880f..5604f880f 100644
--- a/tests/long/70.twolf/ref/alpha/linux/o3-timing/config.ini
+++ b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/config.ini
diff --git a/tests/long/70.twolf/ref/alpha/linux/o3-timing/config.out b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/config.out
index a78c52d7f..a78c52d7f 100644
--- a/tests/long/70.twolf/ref/alpha/linux/o3-timing/config.out
+++ b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/config.out
diff --git a/tests/long/70.twolf/ref/alpha/linux/o3-timing/m5stats.txt b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/m5stats.txt
index c77face31..c77face31 100644
--- a/tests/long/70.twolf/ref/alpha/linux/o3-timing/m5stats.txt
+++ b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/m5stats.txt
diff --git a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.out b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.out
index 00387ae5c..00387ae5c 100644
--- a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.out
+++ b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.out
diff --git a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.pin b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.pin
index 62b922e4e..62b922e4e 100644
--- a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.pin
+++ b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.pin
diff --git a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.pl1 b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.pl1
index bdc569e39..bdc569e39 100644
--- a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.pl1
+++ b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.pl1
diff --git a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.pl2 b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.pl2
index 6e2601e82..6e2601e82 100644
--- a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.pl2
+++ b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.pl2
diff --git a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.sav b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.sav
index 04c8e9935..04c8e9935 100644
--- a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.sav
+++ b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.sav
diff --git a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.sv2 b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.sv2
index 9dd68ecdb..9dd68ecdb 100644
--- a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.sv2
+++ b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.sv2
diff --git a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.twf b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.twf
index a4c2eac35..a4c2eac35 100644
--- a/tests/long/70.twolf/ref/alpha/linux/o3-timing/smred.twf
+++ b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/smred.twf
diff --git a/tests/long/70.twolf/ref/alpha/linux/o3-timing/stderr b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/stderr
index eb1796ead..eb1796ead 100644
--- a/tests/long/70.twolf/ref/alpha/linux/o3-timing/stderr
+++ b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/stderr
diff --git a/tests/long/70.twolf/ref/alpha/linux/o3-timing/stdout b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/stdout
index f32f0a972..f32f0a972 100644
--- a/tests/long/70.twolf/ref/alpha/linux/o3-timing/stdout
+++ b/tests/long/70.twolf/ref/alpha/tru64/o3-timing/stdout
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/config.ini b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/config.ini
index 789f77815..789f77815 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/config.ini
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/config.ini
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/config.out b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/config.out
index b4087eb1c..b4087eb1c 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/config.out
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/config.out
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/m5stats.txt b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/m5stats.txt
index 2cd5a06bf..2cd5a06bf 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/m5stats.txt
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/m5stats.txt
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.out b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.out
index 00387ae5c..00387ae5c 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.out
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.out
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.pin b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.pin
index 62b922e4e..62b922e4e 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.pin
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.pin
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.pl1 b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.pl1
index bdc569e39..bdc569e39 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.pl1
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.pl1
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.pl2 b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.pl2
index 6e2601e82..6e2601e82 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.pl2
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.pl2
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.sav b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.sav
index 04c8e9935..04c8e9935 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.sav
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.sav
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.sv2 b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.sv2
index 9dd68ecdb..9dd68ecdb 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.sv2
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.sv2
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.twf b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.twf
index a4c2eac35..a4c2eac35 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/smred.twf
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/smred.twf
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/stderr b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/stderr
index eb1796ead..eb1796ead 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/stderr
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/stderr
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/stdout b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/stdout
index f32f0a972..f32f0a972 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-atomic/stdout
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-atomic/stdout
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-timing/config.ini b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/config.ini
index e2265235e..e2265235e 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-timing/config.ini
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/config.ini
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-timing/config.out b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/config.out
index fcf06c7db..fcf06c7db 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-timing/config.out
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/config.out
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-timing/m5stats.txt b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/m5stats.txt
index 5cdae9c4a..5cdae9c4a 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-timing/m5stats.txt
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/m5stats.txt
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.out b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.out
index 00387ae5c..00387ae5c 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.out
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.out
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.pin b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.pin
index 62b922e4e..62b922e4e 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.pin
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.pin
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.pl1 b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.pl1
index bdc569e39..bdc569e39 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.pl1
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.pl1
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.pl2 b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.pl2
index 6e2601e82..6e2601e82 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.pl2
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.pl2
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.sav b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.sav
index 04c8e9935..04c8e9935 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.sav
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.sav
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.sv2 b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.sv2
index 9dd68ecdb..9dd68ecdb 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.sv2
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.sv2
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.twf b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.twf
index a4c2eac35..a4c2eac35 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-timing/smred.twf
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/smred.twf
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-timing/stderr b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/stderr
index eb1796ead..eb1796ead 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-timing/stderr
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/stderr
diff --git a/tests/long/70.twolf/ref/alpha/linux/simple-timing/stdout b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/stdout
index f32f0a972..f32f0a972 100644
--- a/tests/long/70.twolf/ref/alpha/linux/simple-timing/stdout
+++ b/tests/long/70.twolf/ref/alpha/tru64/simple-timing/stdout
diff --git a/tests/long/70.twolf/ref/sparc/linux/simple-atomic/config.ini b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/config.ini
new file mode 100644
index 000000000..2a1613fa1
--- /dev/null
+++ b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/config.ini
@@ -0,0 +1,64 @@
+[root]
+type=Root
+children=system
+dummy=0
+
+[system]
+type=System
+children=cpu membus physmem
+mem_mode=atomic
+physmem=system.physmem
+
+[system.cpu]
+type=AtomicSimpleCPU
+children=workload
+clock=1
+cpu_id=0
+defer_registration=false
+function_trace=false
+function_trace_start=0
+max_insts_all_threads=0
+max_insts_any_thread=0
+max_loads_all_threads=0
+max_loads_any_thread=0
+phase=0
+progress_interval=0
+simulate_stalls=false
+system=system
+width=1
+workload=system.cpu.workload
+dcache_port=system.membus.port[2]
+icache_port=system.membus.port[1]
+
+[system.cpu.workload]
+type=LiveProcess
+cmd=twolf smred
+cwd=build/SPARC_SE/tests/fast/long/70.twolf/sparc/linux/simple-atomic
+egid=100
+env=
+euid=100
+executable=/dist/m5/cpu2000/binaries/sparc/linux/twolf
+gid=100
+input=cin
+output=cout
+pid=100
+ppid=99
+system=system
+uid=100
+
+[system.membus]
+type=Bus
+bus_id=0
+clock=1000
+responder_set=false
+width=64
+port=system.physmem.port system.cpu.icache_port system.cpu.dcache_port
+
+[system.physmem]
+type=PhysicalMemory
+file=
+latency=1
+range=0:134217727
+zero=false
+port=system.membus.port[0]
+
diff --git a/tests/long/70.twolf/ref/sparc/linux/simple-atomic/config.out b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/config.out
new file mode 100644
index 000000000..d24c09793
--- /dev/null
+++ b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/config.out
@@ -0,0 +1,57 @@
+[root]
+type=Root
+dummy=0
+
+[system.physmem]
+type=PhysicalMemory
+file=
+range=[0,134217727]
+latency=1
+zero=false
+
+[system]
+type=System
+physmem=system.physmem
+mem_mode=atomic
+
+[system.membus]
+type=Bus
+bus_id=0
+clock=1000
+width=64
+responder_set=false
+
+[system.cpu.workload]
+type=LiveProcess
+cmd=twolf smred
+executable=/dist/m5/cpu2000/binaries/sparc/linux/twolf
+input=cin
+output=cout
+env=
+cwd=build/SPARC_SE/tests/fast/long/70.twolf/sparc/linux/simple-atomic
+system=system
+uid=100
+euid=100
+gid=100
+egid=100
+pid=100
+ppid=99
+
+[system.cpu]
+type=AtomicSimpleCPU
+max_insts_any_thread=0
+max_insts_all_threads=0
+max_loads_any_thread=0
+max_loads_all_threads=0
+progress_interval=0
+system=system
+cpu_id=0
+workload=system.cpu.workload
+clock=1
+phase=0
+defer_registration=false
+width=1
+function_trace=false
+function_trace_start=0
+simulate_stalls=false
+
diff --git a/tests/long/70.twolf/ref/sparc/linux/simple-atomic/m5stats.txt b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/m5stats.txt
new file mode 100644
index 000000000..45fd6b479
--- /dev/null
+++ b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/m5stats.txt
@@ -0,0 +1,18 @@
+
+---------- Begin Simulation Statistics ----------
+host_inst_rate 676464 # Simulator instruction rate (inst/s)
+host_mem_usage 149916 # Number of bytes of host memory used
+host_seconds 285.95 # Real time elapsed on the host
+host_tick_rate 676463 # Simulator tick rate (ticks/s)
+sim_freq 1000000000000 # Frequency of simulated ticks
+sim_insts 193435973 # Number of instructions simulated
+sim_seconds 0.000193 # Number of seconds simulated
+sim_ticks 193435972 # Number of ticks simulated
+system.cpu.idle_fraction 0 # Percentage of idle cycles
+system.cpu.not_idle_fraction 1 # Percentage of non-idle cycles
+system.cpu.numCycles 193435973 # number of cpu cycles simulated
+system.cpu.num_insts 193435973 # Number of instructions executed
+system.cpu.num_refs 76732959 # Number of memory references
+system.cpu.workload.PROG:num_syscalls 396 # Number of system calls
+
+---------- End Simulation Statistics ----------
diff --git a/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.out b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.out
new file mode 100644
index 000000000..00387ae5c
--- /dev/null
+++ b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.out
@@ -0,0 +1,276 @@
+
+TimberWolfSC version:v4.3a date:Mon Jan 25 18:50:36 EST 1988
+Standard Cell Placement and Global Routing Program
+Authors: Carl Sechen, Bill Swartz
+ Yale University
+
+
+NOTE: Restart file .rs2 not used
+
+TimberWolf will perform a global route step
+rowSep: 1.000000
+feedThruWidth: 4
+
+******************
+BLOCK DATA
+block:1 desire:85
+block:2 desire:85
+Total Desired Length: 170
+total cell length: 168
+total block length: 168
+block x-span:84 block y-span:78
+implicit feed thru range: -84
+Using default value of bin.penalty.control:1.000000
+numBins automatically set to:5
+binWidth = average_cell_width + 0 sigma= 17
+average_cell_width is:16
+standard deviation of cell length is:23.6305
+TimberWolfSC starting from the beginning
+
+
+
+THIS IS THE ROUTE COST OF THE ORIGINAL PLACEMENT: 645
+The number of nets with 1 pin is 4
+The number of nets with 2 pin is 9
+The number of nets with 3 pin is 0
+The number of nets with 4 pin is 2
+The number of nets with 5 pin is 0
+The number of nets with 6 pin is 0
+The number of nets with 7 pin is 0
+The number of nets with 8 pin is 0
+The number of nets with 9 pin is 0
+The number of nets with 10 pin or more is 0
+
+New Cost Function: Initial Horizontal Cost:242
+New Cost Function: FEEDS:0 MISSING_ROWS:-46
+
+bdxlen:86 bdylen:78
+l:0 t:78 r:86 b:0
+
+
+
+THIS IS THE ROUTE COST OF THE CURRENT PLACEMENT: 645
+
+
+
+THIS IS THE PENALTY OF THE CURRENT PLACEMENT: 44
+
+The rand generator seed was at utemp() : 1
+
+
+ tempfile[0][0] = 0.982500 tempfile[0][1] = 90.000000
+ tempfile[1][0] = 0.915000 tempfile[1][1] = 20.000000
+ tempfile[2][0] = 0.700000 tempfile[2][1] = 10.000000
+ tempfile[3][0] = 0.100000 tempfile[3][1] = 0.000000
+
+ I T fds Wire Penalty P_lim Epct binC rowC acc s/p early FDs MRs
+ 1 500 0 929 592 160 30.0 1.0 3.0 84.2 34.7 0.0 0 40
+ 2 491 0 876 106 726 0.0 0.8 2.5 80.0 18.5 0.0 0 46
+ 3 482 0 822 273 372 0.0 0.5 1.5 80.8 21.2 0.0 0 46
+ 4 474 0 826 53 247 0.0 0.5 0.9 65.0 21.9 0.0 0 48
+ 5 465 8 987 73 190 0.0 0.5 0.5 50.0 38.3 0.0 0 46
+ 6 457 8 851 67 226 0.0 0.5 0.5 53.8 42.9 0.0 0 52
+ 7 449 8 1067 108 190 0.0 0.5 0.5 46.2 53.8 0.0 0 50
+ 8 441 8 918 106 171 0.0 0.5 0.5 47.1 40.4 0.0 0 48
+ 9 434 8 812 101 197 0.0 0.5 0.5 53.6 21.0 0.0 0 48
+ 10 426 8 1038 121 181 0.0 0.5 0.5 43.6 27.1 0.0 0 48
+ 11 419 8 898 93 187 0.0 0.5 0.5 45.3 47.8 0.0 0 50
+ 12 411 4 857 94 240 0.0 0.5 0.5 62.7 51.6 0.0 0 44
+ 13 404 8 1043 88 185 0.0 0.5 0.5 54.0 52.8 0.0 0 50
+ 14 397 8 767 94 154 0.0 0.5 0.5 33.8 35.0 0.0 0 50
+ 15 390 8 862 89 183 0.0 0.5 0.5 55.6 29.0 0.0 0 46
+ 16 383 4 798 79 173 0.0 0.5 0.5 57.5 35.3 0.0 0 52
+ 17 376 8 827 100 152 0.0 0.5 0.5 35.3 81.8 0.0 0 50
+ 18 370 8 878 101 208 0.0 0.5 0.5 44.7 46.2 0.0 0 48
+ 19 363 4 921 67 167 0.0 0.5 0.5 57.1 34.7 0.0 0 48
+ 20 357 8 933 93 154 0.0 0.5 0.5 46.5 43.6 0.0 0 52
+ 21 351 8 930 89 147 0.0 0.5 0.5 39.4 36.5 0.0 0 52
+ 22 345 8 951 79 142 0.0 0.5 0.5 32.8 51.3 0.0 0 50
+ 23 339 8 1046 87 207 0.0 0.5 0.5 52.8 61.0 0.0 0 48
+ 24 333 4 989 96 185 0.0 0.5 0.5 45.3 43.3 0.0 0 42
+ 25 327 4 577 86 157 0.0 0.5 0.5 31.1 55.3 0.0 0 52
+ 26 321 8 776 97 174 0.0 0.5 0.5 47.9 62.5 0.0 0 52
+ 27 315 8 850 81 188 0.0 0.5 0.5 45.0 55.2 0.0 0 50
+ 28 310 8 898 97 148 0.0 0.5 0.5 43.0 45.8 0.0 0 48
+ 29 304 8 889 65 173 0.0 0.5 0.5 32.5 41.3 0.0 0 50
+ 30 299 8 858 81 153 0.0 0.5 0.5 44.3 29.2 0.0 0 46
+ 31 294 8 871 82 187 0.0 0.5 0.5 45.7 47.7 0.0 0 48
+ 32 289 8 782 109 173 0.0 0.5 0.5 35.2 57.4 0.0 0 48
+ 33 284 8 743 98 189 0.0 0.6 0.5 41.8 64.3 0.0 0 52
+ 34 279 8 943 90 147 0.0 0.5 0.5 38.6 32.8 0.0 0 48
+ 35 274 8 907 57 166 0.0 0.5 0.5 33.6 51.0 0.0 0 48
+ 36 269 8 900 70 148 0.0 0.5 0.5 45.0 41.4 0.0 0 50
+ 37 264 4 875 106 133 0.0 0.5 0.5 31.7 55.3 0.0 0 52
+ 38 260 8 1023 145 149 0.0 0.6 0.5 28.7 65.0 0.0 0 52
+ 39 255 8 801 151 173 0.0 0.9 0.5 41.7 41.2 0.0 0 48
+ 40 251 8 741 104 159 0.0 0.8 0.5 36.2 47.5 0.0 0 48
+ 41 246 8 828 108 149 0.0 0.5 0.5 34.6 50.9 0.0 0 50
+ 42 242 8 947 128 132 0.0 0.7 0.5 34.2 39.0 0.0 0 50
+ 43 238 8 917 101 142 0.0 0.8 0.5 34.4 50.9 0.0 0 48
+ 44 234 8 761 86 129 0.0 0.5 0.5 42.0 36.4 0.0 0 52
+ 45 229 8 979 106 137 0.0 0.5 0.5 29.2 55.3 0.0 0 50
+ 46 225 8 806 74 130 0.0 0.7 0.5 33.1 65.4 0.0 0 52
+ 47 221 8 971 125 114 0.0 0.5 0.5 31.9 45.6 0.0 0 52
+ 48 218 8 869 125 104 0.0 0.9 0.5 30.0 56.0 0.0 0 48
+ 49 214 8 999 153 140 0.0 0.8 0.5 30.4 46.4 0.0 0 52
+ 50 210 8 798 192 139 0.0 1.0 0.5 28.9 50.0 0.0 0 52
+ 51 206 8 860 125 157 0.0 1.2 0.5 31.5 26.9 0.0 0 52
+ 52 203 8 893 186 127 5.9 0.9 0.5 26.4 42.3 0.0 0 46
+ 53 199 8 863 126 141 0.0 1.2 0.5 32.5 44.4 0.0 0 44
+ 54 196 8 788 97 133 0.0 0.9 0.5 37.5 40.0 0.0 0 50
+ 55 192 8 926 119 116 0.0 0.6 0.5 26.1 55.3 0.0 0 52
+ 56 189 8 789 162 107 0.0 0.8 0.5 25.2 40.4 0.0 0 48
+ 57 186 8 878 107 128 0.0 1.1 0.5 23.1 34.0 0.0 0 52
+ 58 182 8 775 105 122 0.0 0.8 0.5 25.5 57.4 0.0 0 50
+ 59 179 8 747 94 129 0.0 0.7 0.5 34.3 37.3 0.0 0 50
+ 60 176 8 845 96 138 0.0 0.6 0.5 28.3 41.7 0.0 0 52
+ 61 173 8 961 121 110 0.0 0.6 0.5 29.0 52.6 0.0 0 48
+ 62 170 4 911 110 109 0.0 0.9 0.5 33.5 33.3 0.0 0 48
+ 63 167 8 656 109 109 0.0 0.8 0.5 21.9 44.7 0.0 0 52
+ 64 164 8 934 117 105 0.0 0.8 0.5 15.5 50.0 0.0 0 52
+ 65 161 8 972 125 95 0.0 0.8 0.5 24.4 50.0 0.0 0 50
+ 66 158 8 894 125 101 0.0 0.9 0.5 27.2 35.9 0.0 0 52
+ 67 155 8 798 146 129 0.0 1.0 0.5 22.8 58.7 0.0 0 52
+ 68 153 8 901 183 92 0.0 1.1 0.5 23.6 34.5 0.0 0 52
+ 69 150 8 977 197 103 0.0 1.4 0.5 23.6 36.8 0.0 0 52
+ 70 147 8 905 262 93 0.0 1.5 0.5 20.3 63.4 0.0 0 52
+ 71 145 8 995 148 122 0.0 1.9 0.5 20.9 35.3 0.0 0 52
+ 72 142 8 934 230 99 0.0 1.6 0.5 20.0 65.9 0.0 0 52
+ 73 140 8 862 173 100 0.0 1.8 0.5 26.8 46.8 0.0 0 52
+ 74 137 8 924 139 90 0.0 1.7 0.5 16.8 42.5 0.0 0 52
+ 75 135 8 888 168 113 0.0 1.6 0.5 22.9 40.4 0.0 0 52
+ 76 133 8 712 212 84 0.0 1.6 0.5 13.4 46.9 0.0 0 52
+ 77 130 8 868 210 91 0.0 1.7 0.5 17.7 51.2 0.0 0 52
+ 78 128 8 952 307 92 0.0 1.9 0.5 19.7 44.9 0.0 0 50
+ 79 126 8 801 157 107 0.0 2.2 0.5 15.8 39.0 0.0 0 52
+ 80 123 8 849 147 93 0.0 2.1 0.5 15.6 51.4 0.0 0 52
+ 81 121 8 799 154 86 0.0 1.9 0.5 12.2 50.0 0.0 0 52
+ 82 119 8 941 213 82 0.0 1.8 0.5 19.5 41.2 0.0 0 50
+ 83 117 8 751 268 94 0.0 2.0 0.5 20.8 42.6 0.0 0 50
+ 84 115 8 828 198 102 0.0 2.2 0.5 15.5 59.5 0.0 0 52
+ 85 113 8 898 266 123 0.0 2.2 0.5 13.2 85.2 0.0 0 52
+ 86 111 8 943 190 93 0.0 2.4 0.5 19.5 45.1 0.0 0 52
+ 87 109 8 864 183 65 0.0 2.4 0.5 14.9 31.8 0.0 0 52
+ 88 107 8 793 203 93 0.0 2.4 0.5 11.8 35.3 0.0 0 52
+ 89 105 8 752 162 74 1.2 2.4 0.5 13.1 21.4 0.0 0 52
+ 90 103 8 801 149 77 0.0 2.3 0.5 9.7 58.3 0.0 0 52
+ 91 102 8 901 230 99 0.0 2.2 0.5 16.0 25.5 0.0 0 52
+ 92 100 8 826 201 87 0.0 2.4 0.5 12.8 45.7 0.0 0 52
+ 93 98 8 810 196 83 0.0 2.5 0.5 14.0 24.4 0.0 0 52
+ 94 96 8 857 209 68 1.0 2.5 0.5 11.5 27.0 5.1 0 52
+ 95 95 8 771 174 91 0.0 2.6 0.5 10.5 26.5 0.0 0 52
+ 96 93 8 955 210 59 0.0 2.6 0.5 10.0 36.7 0.7 0 52
+ 97 91 8 833 206 53 0.0 2.7 0.5 10.2 19.4 1.4 0 52
+ 98 90 8 888 229 86 0.0 2.8 0.5 8.1 36.0 0.0 0 52
+ 99 88 8 794 186 91 1.0 2.9 0.5 8.3 25.0 0.5 0 52
+100 81 8 756 170 72 1.0 2.9 0.5 6.0 23.8 7.0 0 52
+101 74 8 791 176 67 0.0 2.9 0.5 4.4 58.3 4.0 0 52
+102 67 8 813 213 43 0.0 3.0 0.5 7.0 150.0 4.2 0 52
+103 62 8 779 245 39 0.0 3.1 0.5 3.2 16.7 13.0 0 52
+104 56 8 767 303 63 0.0 3.2 0.5 4.1 20.0 0.7 0 52
+105 52 8 757 270 57 0.0 3.5 0.5 6.4 3.7 0.5 0 52
+106 47 8 763 283 41 0.0 3.7 0.5 4.5 0.0 0.0 0 52
+107 43 8 768 283 36 0.0 3.7 0.5 2.9 18.2 3.6 0 52
+108 39 8 804 283 25 0.0 3.7 0.5 3.1 0.0 6.2 0 52
+109 36 8 781 283 24 0.0 3.7 0.5 3.6 6.7 6.7 0 52
+110 33 8 738 298 42 0.0 3.7 0.5 3.3 15.4 3.5 0 52
+111 30 8 761 298 36 0.0 3.7 0.5 2.2 0.0 4.3 0 52
+112 27 8 769 298 37 0.0 3.7 0.5 0.9 0.0 2.2 0 52
+113 25 8 745 298 31 0.0 3.7 0.5 1.5 0.0 6.6 0 52
+114 23 8 753 298 16 0.0 3.7 0.5 1.3 0.0 2.8 0 52
+115 21 8 745 298 11 0.0 3.7 0.5 1.5 0.0 14.0 0 52
+116 19 8 747 298 21 0.0 3.7 0.5 2.1 0.0 5.8 0 52
+117 13 8 737 298 12 0.0 3.7 0.5 1.0 0.0 10.0 0 52
+118 9 8 736 298 4 0.0 3.7 0.5 1.5 0.0 18.5 0 52
+119 0 8 739 298 0 0.0 3.7 0.5 1.8 0.0 18.0 0 52
+120 0 8 732 298 0 0.0 3.7 0.5 1.2 0.0 21.8 0 52
+121 0 8 732 19 -1 0.0 0.0 0.5 0.0 100.0 54.8
+
+Initial Wiring Cost: 645 Final Wiring Cost: 732
+############## Percent Wire Cost Reduction: -13
+
+
+Initial Wire Length: 645 Final Wire Length: 732
+************** Percent Wire Length Reduction: -13
+
+
+Initial Horiz. Wire: 216 Final Horiz. Wire: 147
+$$$$$$$$$$$ Percent H-Wire Length Reduction: 32
+
+
+Initial Vert. Wire: 429 Final Vert. Wire: 585
+@@@@@@@@@@@ Percent V-Wire Length Reduction: -36
+
+Before Feeds are Added:
+BLOCK TOTAL CELL LENGTHS OVER/UNDER TARGET
+ 1 82 -20
+ 2 86 -16
+
+LONGEST Block is:2 Its length is:86
+BLOCK TOTAL CELL LENGTHS OVER/UNDER TARGET
+ 1 86 -16
+ 2 86 -16
+
+LONGEST Block is:1 Its length is:86
+Added: 1 feed-through cells
+
+Removed the cell overlaps --- Will do neighbor interchanges only now
+
+TOTAL INTERCONNECT LENGTH: 994
+OVERLAP PENALTY: 0
+
+initialRowControl: 1.650
+finalRowControl: 0.300
+iter T Wire accept
+ 122 0.001 976 16%
+ 123 0.001 971 0%
+ 124 0.001 971 0%
+Total Feed-Alignment Movement (Pass 1): 0
+Total Feed-Alignment Movement (Pass 2): 0
+Total Feed-Alignment Movement (Pass 3): 0
+Total Feed-Alignment Movement (Pass 4): 0
+Total Feed-Alignment Movement (Pass 5): 0
+Total Feed-Alignment Movement (Pass 6): 0
+Total Feed-Alignment Movement (Pass 7): 0
+Total Feed-Alignment Movement (Pass 8): 0
+
+The rand generator seed was at globroute() : 987654321
+
+
+Total Number of Net Segments: 9
+Number of Switchable Net Segments: 0
+
+Number of channels: 3
+
+
+
+THIS IS THE ORIGINAL NUMBER OF TRACKS: 5
+
+
+no. of accepted flips: 0
+no. of attempted flips: 0
+THIS IS THE NUMBER OF TRACKS: 5
+
+
+
+FINAL NUMBER OF ROUTING TRACKS: 5
+
+MAX OF CHANNEL: 1 is: 0
+MAX OF CHANNEL: 2 is: 4
+MAX OF CHANNEL: 3 is: 1
+FINAL TOTAL INTERCONNECT LENGTH: 978
+FINAL OVERLAP PENALTY: 0 FINAL VALUE OF TOTAL COST IS: 978
+MAX NUMBER OF ATTEMPTED FLIPS PER T: 55
+
+
+cost_scale_factor:3.90616
+
+Number of Feed Thrus: 0
+Number of Implicit Feed Thrus: 0
+
+Statistics:
+Number of Standard Cells: 10
+Number of Pads: 0
+Number of Nets: 15
+Number of Pins: 46
+Usage statistics not available
diff --git a/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.pin b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.pin
new file mode 100644
index 000000000..62b922e4e
--- /dev/null
+++ b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.pin
@@ -0,0 +1,17 @@
+$COUNT_1/$AND2_1/$ND2_1$Z 1 $COUNT_1/$AND2_1/$ND2_1 00#Z 17 52 2 1 0
+$COUNT_1/$AND2_1/$ND2_1$Z 1 ACOUNT_1 00#A 15 26 2 -1 0
+B7 2 $COUNT_1/$FJK3_2 00#K 25 78 3 -1 0
+B7 2 $COUNT_1/$FJK3_2 00#J 23 78 3 -1 0
+B7 3 $COUNT_1/$AND2_2/$ND2_1 00#A 9 26 2 -1 0
+B7 3 ACOUNT_1 01#Z 17 26 2 -1 0
+B6 5 $COUNT_1/$FJK3_1 00#K 25 26 2 -1 0
+B6 5 $COUNT_1/$FJK3_1 00#J 23 26 2 -1 0
+B6 5 $COUNT_1/$AND2_3/$IV_1 01#Z 7 26 2 -1 0
+$COUNT_1/$FJK3_1$Q 6 $COUNT_1/$FJK3_1 01#Q 81 26 2 -1 0
+$COUNT_1/$FJK3_1$Q 6 $COUNT_1/$AND2_1/$ND2_1 00#B 19 52 2 1 0
+$COUNT_1/$FJK3_2$Q 7 $COUNT_1/$FJK3_2 00#Q 81 52 2 1 0
+$COUNT_1/$FJK3_2$Q 7 $COUNT_1/$AND2_2/$ND2_1 01#B 11 26 2 -1 0
+$COUNT_1/$AND2_3/$ND2_1$Z 8 $COUNT_1/$AND2_3/$ND2_1 00#Z 5 52 2 1 0
+$COUNT_1/$AND2_3/$ND2_1$Z 8 $COUNT_1/$AND2_3/$IV_1 00#A 5 26 2 -1 0
+$COUNT_1/$AND2_4/$ND2_1$Z 9 $COUNT_1/$AND2_4/$ND2_1 00#Z 7 52 2 1 0
+$COUNT_1/$AND2_4/$ND2_1$Z 9 $COUNT_1/$AND2_4/$IV_1 00#A 3 26 2 -1 0
diff --git a/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.pl1 b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.pl1
new file mode 100644
index 000000000..bdc569e39
--- /dev/null
+++ b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.pl1
@@ -0,0 +1,11 @@
+$COUNT_1/$AND2_4/$IV_1 0 0 4 26 0 1
+$COUNT_1/$AND2_3/$IV_1 4 0 8 26 2 1
+$COUNT_1/$AND2_2/$ND2_1 8 0 14 26 0 1
+ACOUNT_1 14 0 18 26 2 1
+twfeed1 18 0 22 26 0 1
+$COUNT_1/$FJK3_1 22 0 86 26 0 1
+$COUNT_1/$AND2_3/$ND2_1 0 52 6 78 0 2
+$COUNT_1/$AND2_4/$ND2_1 6 52 12 78 2 2
+$COUNT_1/$AND2_2/$IV_1 12 52 16 78 2 2
+$COUNT_1/$AND2_1/$ND2_1 16 52 22 78 2 2
+$COUNT_1/$FJK3_2 22 52 86 78 0 2
diff --git a/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.pl2 b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.pl2
new file mode 100644
index 000000000..6e2601e82
--- /dev/null
+++ b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.pl2
@@ -0,0 +1,2 @@
+1 0 0 86 26 0 0
+2 0 52 86 78 0 0
diff --git a/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.sav b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.sav
new file mode 100644
index 000000000..04c8e9935
--- /dev/null
+++ b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.sav
@@ -0,0 +1,18 @@
+0.009592
+121
+0
+1
+0.000000
+0.500000
+3.906156
+1
+1 1 2 37 13
+2 2 0 34 65
+3 2 2 63 65
+4 1 0 59 13
+5 1 2 32 13
+6 2 0 23 65
+7 1 2 12 13
+8 2 0 6 65
+9 1 0 70 13
+10 2 0 70 65
diff --git a/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.sv2 b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.sv2
new file mode 100644
index 000000000..9dd68ecdb
--- /dev/null
+++ b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.sv2
@@ -0,0 +1,19 @@
+0.001000
+123
+0
+2
+0.000000
+0.500000
+3.906156
+1
+1 1 2 16 13
+2 2 2 19 65
+3 2 2 14 65
+4 1 0 11 13
+5 1 2 6 13
+6 2 0 3 65
+7 1 0 2 13
+8 2 2 9 65
+9 1 0 50 13
+10 2 0 54 65
+11 1 0 84 13
diff --git a/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.twf b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.twf
new file mode 100644
index 000000000..a4c2eac35
--- /dev/null
+++ b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/smred.twf
@@ -0,0 +1,29 @@
+net 1
+segment channel 2
+ pin1 1 pin2 7 0 0
+net 2
+segment channel 3
+pin1 41 pin2 42 0 0
+segment channel 2
+pin1 12 pin2 3 0 0
+net 3
+segment channel 2
+pin1 35 pin2 36 0 0
+segment channel 2
+pin1 19 pin2 35 0 0
+net 4
+segment channel 2
+ pin1 5 pin2 38 0 0
+net 5
+net 7
+segment channel 2
+ pin1 14 pin2 43 0 0
+net 8
+segment channel 2
+ pin1 23 pin2 17 0 0
+net 9
+net 11
+segment channel 2
+ pin1 25 pin2 31 0 0
+net 14
+net 15
diff --git a/tests/long/70.twolf/ref/sparc/linux/simple-atomic/stderr b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/stderr
new file mode 100644
index 000000000..94662b6e8
--- /dev/null
+++ b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/stderr
@@ -0,0 +1,8 @@
+warn: More than two loadable segments in ELF object.
+warn: Ignoring segment @ 0x11e394 length 0x10.
+warn: More than two loadable segments in ELF object.
+warn: Ignoring segment @ 0x0 length 0x0.
+0: system.remote_gdb.listener: listening for remote gdb on port 7000
+warn: Entering event queue @ 0. Starting simulation...
+warn: Ignoring request to flush register windows.
+warn: Increasing stack size by one page.
diff --git a/tests/long/70.twolf/ref/sparc/linux/simple-atomic/stdout b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/stdout
new file mode 100644
index 000000000..7c0e5ba5f
--- /dev/null
+++ b/tests/long/70.twolf/ref/sparc/linux/simple-atomic/stdout
@@ -0,0 +1,28 @@
+
+TimberWolfSC version:v4.3a date:Mon Jan 25 18:50:36 EST 1988
+Standard Cell Placement and Global Routing Program
+Authors: Carl Sechen, Bill Swartz
+ Yale University
+ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+ 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
+ 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
+ 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
+ 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
+ 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
+ 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
+106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
+122 123 124 M5 Simulator System
+
+Copyright (c) 2001-2006
+The Regents of The University of Michigan
+All Rights Reserved
+
+
+M5 compiled Mar 12 2007 16:53:49
+M5 started Mon Mar 12 17:37:07 2007
+M5 executing on zizzer.eecs.umich.edu
+command line: build/SPARC_SE/m5.fast -d build/SPARC_SE/tests/fast/long/70.twolf/sparc/linux/simple-atomic tests/run.py long/70.twolf/sparc/linux/simple-atomic
+Couldn't unlink build/SPARC_SE/tests/fast/long/70.twolf/sparc/linux/simple-atomic/smred.sav
+Couldn't unlink build/SPARC_SE/tests/fast/long/70.twolf/sparc/linux/simple-atomic/smred.sv2
+Global frequency set at 1000000000000 ticks per second
+Exiting @ tick 193435972 because target called exit()
diff --git a/tests/long/70.twolf/test.py b/tests/long/70.twolf/test.py
index 65973c1ee..b2a2dc0b6 100644
--- a/tests/long/70.twolf/test.py
+++ b/tests/long/70.twolf/test.py
@@ -30,7 +30,7 @@ m5.AddToPath('../configs/common')
from cpu2000 import twolf
import os
-workload = twolf('alpha', 'tru64', 'smred')
+workload = twolf(isa, opsys, 'smred')
root.system.cpu.workload = workload.makeLiveProcess()
cwd = root.system.cpu.workload.cwd
diff --git a/util/statetrace/Makefile b/util/statetrace/Makefile
index c59748163..2abc06d8e 100644
--- a/util/statetrace/Makefile
+++ b/util/statetrace/Makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2006 The Regents of The University of Michigan
+# Copyright (c) 2006-2007 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -34,4 +34,4 @@ statetrace-native: statetrace.cc tracechild.cc tracechild_arch.cc printer.cc pri
g++ statetrace.cc tracechild.cc tracechild_arch.cc printer.cc -I ./ -I ./arch/ -O3 --static -o statetrace
statetrace-sparc: statetrace.cc tracechild.cc tracechild_arch.cc printer.cc printer.hh refcnt.hh regstate.hh tracechild.hh
- sparc64-unknown-linux-gnu-g++ statetrace.cc tracechild.cc tracechild_arch.cc printer.cc -I ./ -I ./arch/ -O3 --static -o statetrace
+ sparc64-unknown-linux-gnu-g++ statetrace.cc tracechild.cc tracechild_arch.cc printer.cc -g -I ./ -I ./arch/ -O3 --static -o statetrace
diff --git a/util/statetrace/arch/tracechild_sparc.cc b/util/statetrace/arch/tracechild_sparc.cc
index 2f42330e4..f60f9916b 100644
--- a/util/statetrace/arch/tracechild_sparc.cc
+++ b/util/statetrace/arch/tracechild_sparc.cc
@@ -54,8 +54,45 @@ string SparcTraceChild::regNames[numregs] = {
//Miscelaneous
"fsr", "fprs", "pc", "npc", "y", "cwp", "pstate", "asi", "ccr"};
+bool SparcTraceChild::sendState(int socket)
+{
+ uint64_t regVal = 0;
+ for(int x = 0; x <= I7; x++)
+ {
+ regVal = getRegVal(x);
+ if(write(socket, &regVal, sizeof(regVal)) == -1)
+ {
+ cerr << "Write failed! " << strerror(errno) << endl;
+ tracing = false;
+ return false;
+ }
+ }
+ regVal = getRegVal(PC);
+ if(write(socket, &regVal, sizeof(regVal)) == -1)
+ {
+ cerr << "Write failed! " << strerror(errno) << endl;
+ tracing = false;
+ return false;
+ }
+ regVal = getRegVal(NPC);
+ if(write(socket, &regVal, sizeof(regVal)) == -1)
+ {
+ cerr << "Write failed! " << strerror(errno) << endl;
+ tracing = false;
+ return false;
+ }
+ regVal = getRegVal(CCR);
+ if(write(socket, &regVal, sizeof(regVal)) == -1)
+ {
+ cerr << "Write failed! " << strerror(errno) << endl;
+ tracing = false;
+ return false;
+ }
+ return true;
+}
+
int64_t getRegs(regs & myregs, fpu & myfpu,
- int64_t * locals, int64_t * inputs, int num)
+ uint64_t * locals, uint64_t * inputs, int num)
{
assert(num < SparcTraceChild::numregs && num >= 0);
switch(num)
@@ -160,14 +197,19 @@ bool SparcTraceChild::update(int pid)
cerr << "Update failed" << endl;
return false;
}
- uint64_t StackPointer = getSP();
- const int stackBias = (StackPointer % 1) ? 2047 : 0;
+ uint64_t stackPointer = getSP();
+ uint64_t stackBias = 2047;
+ bool v9 = stackPointer % 2;
for(unsigned int x = 0; x < 8; x++)
{
- locals[x] = ptrace(PTRACE_PEEKTEXT, pid,
- StackPointer + stackBias + x * 8, 0);
- inputs[x] = ptrace(PTRACE_PEEKTEXT, pid,
- StackPointer + stackBias + x * 8 + (8 * 8), 0);
+ uint64_t localAddr = stackPointer +
+ (v9 ? (stackBias + x * 8) : (x * 4));
+ locals[x] = ptrace(PTRACE_PEEKTEXT, pid, localAddr, 0);
+ if(!v9) locals[x] >>= 32;
+ uint64_t inputAddr = stackPointer +
+ (v9 ? (stackBias + x * 8 + (8 * 8)) : (x * 4 + 8 * 4));
+ inputs[x] = ptrace(PTRACE_PEEKTEXT, pid, inputAddr, 0);
+ if(!v9) inputs[x] >>= 32;
}
if(ptrace(PTRACE_GETFPREGS, pid, &thefpregs, 0) != 0)
return false;
@@ -366,7 +408,7 @@ ostream & SparcTraceChild::outputStartState(ostream & os)
{
bool v8 = false;
uint64_t sp = getSP();
- if(sp % 1)
+ if(sp % 2)
{
os << "Detected a 64 bit executable.\n";
v8 = false;
diff --git a/util/statetrace/arch/tracechild_sparc.hh b/util/statetrace/arch/tracechild_sparc.hh
index 8b4ff9aae..0284fb82e 100644
--- a/util/statetrace/arch/tracechild_sparc.hh
+++ b/util/statetrace/arch/tracechild_sparc.hh
@@ -72,10 +72,10 @@ private:
regs oldregs;
fpu thefpregs;
fpu oldfpregs;
- int64_t locals[8];
- int64_t oldLocals[8];
- int64_t inputs[8];
- int64_t oldInputs[8];
+ uint64_t locals[8];
+ uint64_t oldLocals[8];
+ uint64_t inputs[8];
+ uint64_t oldInputs[8];
bool regDiffSinceUpdate[numregs];
//This calculates where the pc might go after the current instruction.
@@ -90,6 +90,8 @@ protected:
public:
SparcTraceChild();
+ bool sendState(int socket);
+
int getNumRegs()
{
return numregs;
diff --git a/util/statetrace/statetrace.cc b/util/statetrace/statetrace.cc
index e5baee395..4fe47dc02 100644
--- a/util/statetrace/statetrace.cc
+++ b/util/statetrace/statetrace.cc
@@ -35,88 +35,48 @@
#include <sys/wait.h>
#include <sys/ptrace.h>
#include <unistd.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include <errno.h>
-#include "tracechild.hh"
#include "printer.hh"
+#include "tracechild.hh"
using namespace std;
void printUsage(const char * execName)
{
- cout << execName << " -f <output format file> | -h | -r -- <command> <arguments>" << endl;
+ cout << execName << " -h | -r -- <command> <arguments>" << endl;
}
int main(int argc, char * argv[], char * envp[])
{
TraceChild * child = genTraceChild();
- NestingPrinter printer(child);
string args;
int startProgramArgs;
//Parse the command line arguments
- bool formatStringSet = false;
bool printInitial = false;
bool printTrace = true;
- string format;
for(int x = 1; x < argc; x++)
{
- if(!strcmp(argv[x], "-f"))
- {
- if(formatStringSet)
- {
- cerr << "Attempted to set format twice!"
- << endl;
- printUsage(argv[0]);
- return 1;
- }
- formatStringSet = true;
- x++;
- if(x >= argc)
- {
- cerr << "Incorrect usage.\n" << endl;
- printUsage(argv[0]);
- return 1;
- }
- ifstream formatFile(argv[x]);
- if(!formatFile)
- {
- cerr << "Problem opening file "
- << argv[x] << "." << endl;
- return 1;
- }
- format = "";
- while(formatFile)
- {
- string line;
- getline(formatFile, line);
- if(formatFile.eof())
- {
- format += line;
- break;
- }
- if(!formatFile)
- {
- cerr << "Problem reading from file "
- << argv[x] << "." << endl;
- return 1;
- }
- format += line + '\n';
- }
- }
- else if(!strcmp(argv[x], "-h"))
+ if(!strcmp(argv[x], "-h"))
{
printUsage(argv[0]);
return 0;
}
else if(!strcmp(argv[x], "-r"))
{
- cout << "Legal register names:" << endl;
- int numRegs = child->getNumRegs();
- for(unsigned int x = 0; x < numRegs; x++)
- {
- cout << "\t" << child->getRegName(x) << endl;
- }
- return 0;
+ cout << "Legal register names:" << endl;
+ int numRegs = child->getNumRegs();
+ for(unsigned int x = 0; x < numRegs; x++)
+ {
+ cout << "\t" << child->getRegName(x) << endl;
+ }
+ return 0;
}
else if(!strcmp(argv[x], "-i"))
{
@@ -145,11 +105,6 @@ int main(int argc, char * argv[], char * envp[])
return 1;
}
}
- /*for(unsigned int x = startProgramArgs; x < argc; x++)
- {
- cout << "Adding argument " << argv[x];
- args += string(" ") + argv[x];
- }*/
if(!child->startTracing(argv[startProgramArgs],
argv + startProgramArgs))
{
@@ -162,26 +117,41 @@ int main(int argc, char * argv[], char * envp[])
}
if(printTrace)
{
- if(!formatStringSet)
+ // Connect to m5
+ bool portSet = false;
+ int port;
+ int sock = socket(AF_INET, SOCK_STREAM, 0);
+ if(sock < 0)
{
- cerr << "No output format set!" << endl;
- child->stopTracing();
- printUsage(argv[0]);
- return 1;
+ cerr << "Error opening socket! " << strerror(errno) << endl;
+ return 1;
}
- if(!printer.configure(format))
+ struct hostent *server;
+ server = gethostbyname("zower.eecs.umich.edu");
+ if(!server)
{
- cerr << "Problem in the output format" << endl;
- child->stopTracing();
- return 1;
+ cerr << "Couldn't get host ip! " << strerror(errno) << endl;
+ return 1;
+ }
+ struct sockaddr_in serv_addr;
+ bzero((char *)&serv_addr, sizeof(serv_addr));
+ serv_addr.sin_family = AF_INET;
+ bcopy((char *)server->h_addr,
+ (char *)&serv_addr.sin_addr.s_addr,
+ server->h_length);
+ serv_addr.sin_port = htons(8000);
+ if(connect(sock, (sockaddr *)&serv_addr, sizeof(serv_addr)) < 0)
+ {
+ cerr << "Couldn't connect to server! " << strerror(errno) << endl;
+ return 1;
}
child->step();
while(child->isTracing())
{
- cout << printer;
+ if(!child->sendState(sock))
+ break;
child->step();
}
- cout << printer;
}
if(!child->stopTracing())
{
diff --git a/util/statetrace/tracechild.cc b/util/statetrace/tracechild.cc
index 130f9690f..603429829 100644
--- a/util/statetrace/tracechild.cc
+++ b/util/statetrace/tracechild.cc
@@ -51,12 +51,23 @@ bool TraceChild::startTracing(const char * pathToFile, char * const argv[])
//program to trace.
//Let our parent trace us
- ptrace(PTRACE_TRACEME, 0, 0, 0);
+ if(ptrace(PTRACE_TRACEME, 0, 0, 0) == -1)
+ {
+ cout << "Failure calling TRACEME\n";
+ cout << strerror(errno) << endl;
+ return false;
+ }
+
+ //Set up an empty environment for the child...
+ //We would want to specify this somehow at some point
+ char * env[] = {NULL};
//Start the program to trace
- execv(pathToFile, argv);
+ execve(pathToFile, argv, env);
//We should never get here, so this is an error!
+ cout << "Exec failed\n";
+ cout << strerror(errno) << endl;
return false;
}
diff --git a/util/statetrace/tracechild.hh b/util/statetrace/tracechild.hh
index 84fa595d8..24712f816 100644
--- a/util/statetrace/tracechild.hh
+++ b/util/statetrace/tracechild.hh
@@ -42,6 +42,7 @@ protected:
public:
TraceChild() : tracing(false), instructions(0)
{;}
+ virtual bool sendState(int socket) = 0;
virtual bool startTracing(const char * pathToFile,
char * const argv[]);
virtual bool stopTracing();