diff options
author | Korey Sewell <ksewell@umich.edu> | 2006-05-07 14:09:19 -0400 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2006-05-07 14:09:19 -0400 |
commit | 0930024b886e9102ba73c8e15a81d1e253ff141b (patch) | |
tree | 6e5fe5c5d54dd0fdc18d80400b83d5046ba23d9a | |
parent | a7565418d297043bf28fa8d9e1efaabb5c4faf07 (diff) | |
download | gem5-0930024b886e9102ba73c8e15a81d1e253ff141b.tar.xz |
Minor changes for FP ... MIPS now works for floating-point programs...
Now we are to the point where more benchmarks and instruction-coverage
is necessary to totally verify/validate correct operation across
all MIPS instructions
arch/mips/isa_traits.hh:
fix for reading double values ... must rearrange bits before using void* to read double.
configs/test/hello_mips:
real hello world MIPS binary
--HG--
extra : convert_revision : 153de1f8a830882c6972bd0bdb56da818f614def
-rw-r--r-- | arch/mips/isa_traits.hh | 6 | ||||
-rwxr-xr-x | configs/test/hello_mips | bin | 837718 -> 837626 bytes |
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips/isa_traits.hh b/arch/mips/isa_traits.hh index 3879eaf40..74947c6dd 100644 --- a/arch/mips/isa_traits.hh +++ b/arch/mips/isa_traits.hh @@ -190,6 +190,7 @@ namespace MipsISA }; typedef float FloatReg; + typedef double FPVal; typedef uint32_t FloatReg32; typedef uint64_t FloatReg64; @@ -230,7 +231,8 @@ namespace MipsISA return *(float *) float_ptr; case DoubleWidth: - void *double_ptr = ®s[floatReg]; + uint64_t double_val = (FloatReg64)regs[floatReg + 1] << 32 | regs[floatReg]; + void *double_ptr = &double_val; return *(double *) double_ptr; default: @@ -255,7 +257,7 @@ namespace MipsISA } } - Fault setReg(int floatReg, const FloatReg &val, int width) + Fault setReg(int floatReg, const FPVal &val, int width) { switch(width) diff --git a/configs/test/hello_mips b/configs/test/hello_mips Binary files differindex 33d9fbb58..a3db001ec 100755 --- a/configs/test/hello_mips +++ b/configs/test/hello_mips |