diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2015-10-06 17:26:50 -0700 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2015-10-06 17:26:50 -0700 |
commit | 57b9f53afa5660152a77b7f3b7affb39f5b0e176 (patch) | |
tree | a8fe858866fecdd2e1d2703a95f04b0b0b37e9ad /src/arch/x86/isa/insts/x87/compare_and_test | |
parent | 83e07c07f941ab496fa9cfef4807719a16b51066 (diff) | |
download | gem5-57b9f53afa5660152a77b7f3b7affb39f5b0e176.tar.xz |
x86: implement fild, fucomi, and fucomip x87 insts
fild loads an integer value into the x87 top of stack register.
fucomi/fucomip compare two x87 register values (the latter
also doing a stack pop).
These instructions are used by some versions of GNU libstdc++.
Diffstat (limited to 'src/arch/x86/isa/insts/x87/compare_and_test')
-rw-r--r-- | src/arch/x86/isa/insts/x87/compare_and_test/floating_point_unordered_compare.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/arch/x86/isa/insts/x87/compare_and_test/floating_point_unordered_compare.py b/src/arch/x86/isa/insts/x87/compare_and_test/floating_point_unordered_compare.py index 8cca0582b..7007c2d74 100644 --- a/src/arch/x86/isa/insts/x87/compare_and_test/floating_point_unordered_compare.py +++ b/src/arch/x86/isa/insts/x87/compare_and_test/floating_point_unordered_compare.py @@ -1,4 +1,6 @@ # Copyright (c) 2007 The Hewlett-Packard Development Company +# Copyright (c) 2015 Advanced Micro Devices, Inc. +# # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -34,11 +36,21 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Authors: Gabe Black +# Steve Reinhardt microcode = ''' # FUCOM # FUCOMP # FUCOMPP -# FUCOMI -# FUCOMIP + +# fucomi +def macroop FUCOMI_R { + compfp st(0), sti +}; + +# fucomi with stack pop (caused by spm=1) +def macroop FUCOMIP_R { + compfp st(0), sti, spm=1 +}; + ''' |