diff options
Diffstat (limited to 'src/arch/x86/isa/microops/ldstop.isa')
-rw-r--r-- | src/arch/x86/isa/microops/ldstop.isa | 19 |
1 files changed, 19 insertions, 0 deletions
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 |