summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts/x87
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas@sandberg.pp.se>2013-06-18 16:10:42 +0200
committerAndreas Sandberg <andreas@sandberg.pp.se>2013-06-18 16:10:42 +0200
commit5d584934ada15446123d5dc97a9de820a87fd4cf (patch)
tree8ed8c0dc38c753588d560fa645d3e5716b003ea6 /src/arch/x86/isa/insts/x87
parent6151c0f7f43f0e3b62a6a2887a4a80d1c2154a3b (diff)
downloadgem5-5d584934ada15446123d5dc97a9de820a87fd4cf.tar.xz
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.
Diffstat (limited to 'src/arch/x86/isa/insts/x87')
-rw-r--r--src/arch/x86/isa/insts/x87/arithmetic/partial_remainder.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/x86/isa/insts/x87/arithmetic/partial_remainder.py b/src/arch/x86/isa/insts/x87/arithmetic/partial_remainder.py
index b02184e1a..42aabfdf6 100644
--- a/src/arch/x86/isa/insts/x87/arithmetic/partial_remainder.py
+++ b/src/arch/x86/isa/insts/x87/arithmetic/partial_remainder.py
@@ -37,10 +37,10 @@
microcode = '''
def macroop FPREM {
- premfp st(0), st(1), st(0)
+ premfp st(0), st(1), st(0), SetStatus=True
};
def macroop FPREM1 {
- premfp st(0), st(1), st(0)
+ premfp st(0), st(1), st(0), SetStatus=True
};
'''