summaryrefslogtreecommitdiff
path: root/src/python/m5/SimObject.py
diff options
context:
space:
mode:
authorChristopher Torng <clt67@cornell.edu>2013-12-29 19:29:45 -0600
committerChristopher Torng <clt67@cornell.edu>2013-12-29 19:29:45 -0600
commit903b442228efd27b8b7b49201eacc96c282714b5 (patch)
tree61c57d3b939fe12ba1b033efbc07c4eae18547b2 /src/python/m5/SimObject.py
parente6008b6bc149a8c9ecff5d364bea99b7c94d2f94 (diff)
downloadgem5-903b442228efd27b8b7b49201eacc96c282714b5.tar.xz
mips: Floating point convert bug fix
In mips architecture, floating point convert instructions use the FloatConvertOp format defined in src/arch/mips/isa/formats/fp.isa. The type of the operands in the ISA description file (_sw for signed word, or _sf for signed float, etc.) is used to create a type for the operand in C++. Then the operand is converted using the fpConvert() function in src/arch/mips/utility.cc. If we are converting from a word to a float, and we want to convert 0xffffffff, we expect -1 to be passed into fpConvert(). Instead, we see MAX_INT passed in. Then fpConvert() converts _val_ to MAX_INT in single-precision floating point, and we get the wrong value. To fix it, the signs of the convert operands are being changed from unsigned to signed in the MIPS ISA description. Then, the FloatConvertOp format is being changed to insert a int32_t into the C++ code instead of a uint32_t. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src/python/m5/SimObject.py')
0 files changed, 0 insertions, 0 deletions