x86: Make fprem like the fprem on a real x87
Review Request #1911 - Created June 10, 2013 and submitted
| Information | |
|---|---|
| Andreas Sandberg | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
| gblack | |
Changeset 9758:d33941abaf0c --------------------------- x86: Make fprem like the fprem on a real x87 The current implementation of fprem simply does an fmod and doesn't simulate any of the iterative behavior in a real fprem. This isn't normally a problem, however, it can lead to problems when switching between CPU models. If switching from a real CPU in the middle of an fprem loop to a simulated CPU, the output of the fprem loop becomes correupted. This changeset changes the fprem implementation to work like the one on real hardware.
Quick regressions pass. Solves a switching bug when switching between a virtualized CPU and a simulated CPU while a benchmark is in the middle of a fprem loop calculating a % b.
Nice, thanks!
