diff -r 68578047307f -r ef18d64a1fb4 src/arch/x86/isa/decoder/x87.isa --- a/src/arch/x86/isa/decoder/x87.isa Tue Nov 03 16:55:16 2009 -0500 +++ b/src/arch/x86/isa/decoder/x87.isa Thu Mar 17 16:00:40 2011 -0700 @@ -106,7 +106,7 @@ 0x0: fprem(); 0x1: fyl2xp1(); 0x2: fsqrt(); - 0x3: fsincos(); + 0x3: Inst::FSINCOS(); 0x4: frndint(); 0x5: fscale(); 0x6: fsin(); diff -r 68578047307f -r ef18d64a1fb4 src/arch/x86/isa/insts/x87/transcendental_functions/trigonometric_functions.py --- a/src/arch/x86/isa/insts/x87/transcendental_functions/trigonometric_functions.py Tue Nov 03 16:55:16 2009 -0500 +++ b/src/arch/x86/isa/insts/x87/transcendental_functions/trigonometric_functions.py Thu Mar 17 16:00:40 2011 -0700 @@ -38,7 +38,14 @@ microcode = ''' # FSIN # FCOS -# FSINCOS + +def macroop FSINCOS { + sinfp ufp1, st(0) + cosfp ufp2, st(0) + movfp st(0), ufp1 + movfp st(-1), ufp2, spm=-1 +}; + # FPTAN # FPATAN ''' diff -r 68578047307f -r ef18d64a1fb4 src/arch/x86/isa/microops/fpop.isa --- a/src/arch/x86/isa/microops/fpop.isa Tue Nov 03 16:55:16 2009 -0500 +++ b/src/arch/x86/isa/microops/fpop.isa Thu Mar 17 16:00:40 2011 -0700 @@ -223,6 +223,21 @@ class Sqrtfp(FpOp): code = 'FpDestReg = sqrt(FpSrcReg2);' + class Cosfp(FpOp): + def __init__(self, dest, src1, spm=0, \ + SetStatus=False, dataSize="env.dataSize"): + super(Cosfp, self).__init__(dest, src1, "InstRegIndex(0)", \ + spm, SetStatus, dataSize) + code = 'FpDestReg = cos(FpSrcReg1);' + + class Sinfp(FpOp): + def __init__(self, dest, src1, spm=0, \ + SetStatus=False, dataSize="env.dataSize"): + super(Sinfp, self).__init__(dest, src1, "InstRegIndex(0)", \ + spm, SetStatus, dataSize) + code = 'FpDestReg = sin(FpSrcReg1);' + + # Conversion microops class ConvOp(FpOp): abstract = True