diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 18:17:26 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 18:17:26 -0700 |
commit | f1bfa9d6e409447ad5dfa48d077e832f425f4858 (patch) | |
tree | 1305e31483b0a3a8ac49af10411af932c8eb07c0 | |
parent | fca7cb83f0ecedd1c24d996990c940cd92e87786 (diff) | |
download | gem5-f1bfa9d6e409447ad5dfa48d077e832f425f4858.tar.xz |
X86: Implement the lfpimm microop.
-rw-r--r-- | src/arch/x86/isa/microops/limmop.isa | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/arch/x86/isa/microops/limmop.isa b/src/arch/x86/isa/microops/limmop.isa index f7e7728ab..91ddb1465 100644 --- a/src/arch/x86/isa/microops/limmop.isa +++ b/src/arch/x86/isa/microops/limmop.isa @@ -164,6 +164,30 @@ let {{ return allocator microopClasses["limm"] = LimmOp + + class LfpimmOp(X86Microop): + def __init__(self, dest, imm, dataSize="env.dataSize"): + self.className = "Lfpimm" + self.mnemonic = "lfpimm" + self.dest = dest + if isinstance(imm, (int, long)): + imm = "ULL(%d)" % imm + if isinstance(imm, float): + imm = "reinterpret_cast<uint64_t>((double)(%d))" + self.imm = imm + self.dataSize = dataSize + + def getAllocator(self, *microFlags): + allocator = '''new %(class_name)s(machInst, macrocodeBlock + %(flags)s, %(dest)s, %(imm)s, %(dataSize)s)''' % { + "class_name" : self.className, + "mnemonic" : self.mnemonic, + "flags" : self.microFlagsText(microFlags), + "dest" : self.dest, "imm" : self.imm, + "dataSize" : self.dataSize} + return allocator + + microopClasses["lfpimm"] = LfpimmOp }}; let {{ @@ -174,4 +198,11 @@ let {{ decoder_output += MicroLimmOpConstructor.subst(iop) decoder_output += MicroLimmOpDisassembly.subst(iop) exec_output += MicroLimmOpExecute.subst(iop) + + iop = InstObjParams("lfpimm", "Lfpimm", 'X86MicroopBase', + {"code" : "FpDestReg.uqw = imm"}) + header_output += MicroLimmOpDeclare.subst(iop) + decoder_output += MicroLimmOpConstructor.subst(iop) + decoder_output += MicroLimmOpDisassembly.subst(iop) + exec_output += MicroLimmOpExecute.subst(iop) }}; |