diff options
Diffstat (limited to 'src/arch/x86/isa/insts')
7 files changed, 76 insertions, 12 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 5a4959973..b02184e1a 100644 --- a/src/arch/x86/isa/insts/x87/arithmetic/partial_remainder.py +++ b/src/arch/x86/isa/insts/x87/arithmetic/partial_remainder.py @@ -36,6 +36,11 @@ # Authors: Gabe Black microcode = ''' -# FPREM -# FPREM1 +def macroop FPREM { + premfp st(0), st(1), st(0) +}; + +def macroop FPREM1 { + premfp st(0), st(1), st(0) +}; ''' diff --git a/src/arch/x86/isa/insts/x87/control/save_and_restore_x87_control_word.py b/src/arch/x86/isa/insts/x87/control/save_and_restore_x87_control_word.py index 5657c8d47..af465f014 100644 --- a/src/arch/x86/isa/insts/x87/control/save_and_restore_x87_control_word.py +++ b/src/arch/x86/isa/insts/x87/control/save_and_restore_x87_control_word.py @@ -36,7 +36,17 @@ # Authors: Gabe Black microcode = ''' -# FLDCW + +def macroop FLDCW_M { + ld t1, seg, sib, disp, dataSize=2 + wrval fcw, t1 +}; + +def macroop FLDCW_P { + ld t1, seg, sib, disp, dataSize=2 + wrval fcw, t1 +}; + # FSTCW def macroop FNSTCW_M { diff --git a/src/arch/x86/isa/insts/x87/data_transfer_and_conversion/load_or_store_floating_point.py b/src/arch/x86/isa/insts/x87/data_transfer_and_conversion/load_or_store_floating_point.py index 679c2050e..4e230513c 100644 --- a/src/arch/x86/isa/insts/x87/data_transfer_and_conversion/load_or_store_floating_point.py +++ b/src/arch/x86/isa/insts/x87/data_transfer_and_conversion/load_or_store_floating_point.py @@ -47,6 +47,10 @@ def macroop FLD_P { movfp st(-1), ufp1, spm=-1 }; +def macroop FLD_R { + movfp st(-1), sti, spm=-1 +}; + def macroop FST_R { movfp sti, st(0) }; diff --git a/src/arch/x86/isa/insts/x87/load_constants/load_0_1_or_pi.py b/src/arch/x86/isa/insts/x87/load_constants/load_0_1_or_pi.py index 2e63f2593..cb8947312 100644 --- a/src/arch/x86/isa/insts/x87/load_constants/load_0_1_or_pi.py +++ b/src/arch/x86/isa/insts/x87/load_constants/load_0_1_or_pi.py @@ -1,4 +1,5 @@ # Copyright (c) 2007 The Hewlett-Packard Development Company +# Copyright (c) 2013 Mark D. Hill and David A. Wood # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -34,9 +35,23 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Authors: Gabe Black +# Nilay Vaish microcode = ''' -# FLDZ -# FLD1 -# FLDPI + +def macroop FLDZ { + limm ufp1, "double(0)" + movfp st(-1), ufp1, spm=-1 +}; + +def macroop FLD1 { + limm ufp1, "double(1)" + movfp st(-1), ufp1, spm=-1 +}; + +def macroop FLDPI { + limm ufp1, "double(3.14159265359)" + movfp st(-1), ufp1, spm=-1 +}; + ''' diff --git a/src/arch/x86/isa/insts/x87/load_constants/load_logarithm.py b/src/arch/x86/isa/insts/x87/load_constants/load_logarithm.py index 939ab7543..7e71c4006 100644 --- a/src/arch/x86/isa/insts/x87/load_constants/load_logarithm.py +++ b/src/arch/x86/isa/insts/x87/load_constants/load_logarithm.py @@ -1,4 +1,5 @@ # Copyright (c) 2007 The Hewlett-Packard Development Company +# Copyright (c) 2013 Mark D. Hill and David A. Wood # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -34,10 +35,28 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Authors: Gabe Black +# Nilay Vaish microcode = ''' -# FLDL2E -# FLDL2T -# FLDLG2 -# FLDLN2 + +def macroop FLDL2E { + limm ufp1, "double(1.44269504089)" + movfp st(-1), ufp1, spm=-1 +}; + +def macroop FLDL2T { + limm ufp1, "double(3.32192809489)" + movfp st(-1), ufp1, spm=-1 +}; + +def macroop FLDLG2 { + limm ufp1, "double(0.30102999566)" + movfp st(-1), ufp1, spm=-1 +}; + +def macroop FLDLN2 { + limm ufp1, "double(0.69314718056)" + movfp st(-1), ufp1, spm=-1 +}; + ''' diff --git a/src/arch/x86/isa/insts/x87/transcendental_functions/logarithmic_functions.py b/src/arch/x86/isa/insts/x87/transcendental_functions/logarithmic_functions.py index 5be460232..1078c491f 100644 --- a/src/arch/x86/isa/insts/x87/transcendental_functions/logarithmic_functions.py +++ b/src/arch/x86/isa/insts/x87/transcendental_functions/logarithmic_functions.py @@ -38,6 +38,10 @@ microcode = ''' # F2XM1 # FSCALE -# FYL2X + +def macroop FYL2X { + yl2xfp st(1), st(0), st(1), spm=1 +}; + # FYL2XP1 ''' 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 ffdbcf150..cc2ae606b 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 @@ -1,4 +1,5 @@ # Copyright (c) 2007 The Hewlett-Packard Development Company +# Copyright (c) 2012-13 Mark D. Hill and David A. Wood # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -34,6 +35,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Authors: Gabe Black +# Nilay Vaish microcode = ''' def macroop FSIN { @@ -51,6 +53,11 @@ def macroop FSINCOS { movfp st(-1), ufp2, spm=-1 }; -# FPTAN +def macroop FPTAN { + tanfp st(0), st(0) + limm ufp1, "double(1)" + movfp st(-1), ufp1, spm=-1 +}; + # FPATAN ''' |