x86: Fix loading of floating point constants
Review Request #1914 - Created June 10, 2013 and submitted - Latest diff uploaded
| Information | |
|---|---|
| Andreas Sandberg | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 9761:f3e7cefe878d --------------------------- x86: Fix loading of floating point constants This changeset actually fixes two issues: * The lfpimm instruction didn't work correctly when applied to a floating point constant (it did work for integers containing the bit string representation of a constant) since it used reinterpret_cast to convert a double to a uint64_t. This caused a compilation error, at least, in gcc 4.6.3. * The instructions loading floating point constants in the x87 processor didn't work correctly since they just stored a truncated integer instead of a double in the floating point register. This changeset fixes the old microcode by using lfpimm instruction instead of the limm instructions.
Quick regressions pass. Tested the instructions using a hand-coded assembly program and got the expected values after applying the patch (but not before).
