summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-01-15 07:43:21 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2013-01-15 07:43:21 -0600
commitac9bb514057713dd626298a1b6f4322be205d65c (patch)
tree91bbb0a99eb3dd29ea517120ba2b0c458b5d2ebc /src/arch/x86/isa
parent7f5463539b291b237647d3eceb7ca0276d487987 (diff)
downloadgem5-ac9bb514057713dd626298a1b6f4322be205d65c.tar.xz
x86: implements fsin, fcos instructions
Diffstat (limited to 'src/arch/x86/isa')
-rw-r--r--src/arch/x86/isa/decoder/x87.isa4
-rw-r--r--src/arch/x86/isa/insts/x87/transcendental_functions/trigonometric_functions.py9
2 files changed, 9 insertions, 4 deletions
diff --git a/src/arch/x86/isa/decoder/x87.isa b/src/arch/x86/isa/decoder/x87.isa
index f278dc2f8..704a6f6dd 100644
--- a/src/arch/x86/isa/decoder/x87.isa
+++ b/src/arch/x86/isa/decoder/x87.isa
@@ -109,8 +109,8 @@ format WarnUnimpl {
0x3: Inst::FSINCOS();
0x4: frndint();
0x5: fscale();
- 0x6: fsin();
- 0x7: fcos();
+ 0x6: Inst::FSIN();
+ 0x7: Inst::FCOS();
}
default: Inst::FNSTCW(Mw);
}
diff --git a/src/arch/x86/isa/insts/x87/transcendental_functions/trigonometric_functions.py b/src/arch/x86/isa/insts/x87/transcendental_functions/trigonometric_functions.py
index 05fd20829..ffdbcf150 100644
--- a/src/arch/x86/isa/insts/x87/transcendental_functions/trigonometric_functions.py
+++ b/src/arch/x86/isa/insts/x87/transcendental_functions/trigonometric_functions.py
@@ -36,8 +36,13 @@
# Authors: Gabe Black
microcode = '''
-# FSIN
-# FCOS
+def macroop FSIN {
+ sinfp st(0), st(0)
+};
+
+def macroop FCOS {
+ cosfp st(0), st(0)
+};
def macroop FSINCOS {
sinfp ufp1, st(0)