summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/microops
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/isa/microops')
-rw-r--r--src/arch/x86/isa/microops/fpop.isa2
-rw-r--r--src/arch/x86/isa/microops/ldstop.isa19
2 files changed, 21 insertions, 0 deletions
diff --git a/src/arch/x86/isa/microops/fpop.isa b/src/arch/x86/isa/microops/fpop.isa
index 39162d392..6ba292977 100644
--- a/src/arch/x86/isa/microops/fpop.isa
+++ b/src/arch/x86/isa/microops/fpop.isa
@@ -1,5 +1,7 @@
// Copyright (c) 2007 The Hewlett-Packard Development Company
// Copyright (c) 2012-2013 Mark D. Hill and David A. Wood
+// Copyright (c) 2015 Advanced Micro Devices, Inc.
+//
// All rights reserved.
//
// The license below extends only to copyright in the software and shall
diff --git a/src/arch/x86/isa/microops/ldstop.isa b/src/arch/x86/isa/microops/ldstop.isa
index bccec36fe..a7c201f44 100644
--- a/src/arch/x86/isa/microops/ldstop.isa
+++ b/src/arch/x86/isa/microops/ldstop.isa
@@ -427,6 +427,25 @@ let {{
}
''', big = False)
+ # Load integer from memory into x87 top-of-stack register.
+ # Used to implement fild instruction.
+ defineMicroLoadOp('Ldifp87', code='''
+ switch (dataSize)
+ {
+ case 2:
+ FpData_df = (int64_t)sext<16>(Mem);
+ break;
+ case 4:
+ FpData_df = (int64_t)sext<32>(Mem);
+ break;
+ case 8:
+ FpData_df = (int64_t)Mem;
+ break;
+ default:
+ panic("Unhandled data size in LdIFp87.\\n");
+ }
+ ''', big = False)
+
def defineMicroStoreOp(mnemonic, code, completeCode="", mem_flags="0"):
global header_output
global decoder_output