From e9fa54de58846a8726b9320d6b10809ff65ccecf Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Sun, 30 Dec 2012 12:45:50 -0600 Subject: x86: implement x87 fp instruction fnstsw This patch implements the fnstsw instruction. The code was originally written by Vince Weaver. Gabe had made some comments about the code, but those were never addressed. This patch addresses those comments. --- src/arch/x86/isa/microasm.isa | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/arch/x86/isa/microasm.isa') diff --git a/src/arch/x86/isa/microasm.isa b/src/arch/x86/isa/microasm.isa index 10404ec7a..b1fdfb54c 100644 --- a/src/arch/x86/isa/microasm.isa +++ b/src/arch/x86/isa/microasm.isa @@ -207,6 +207,12 @@ let {{ assembler.symbols["sti"] = stack_index("env.reg") assembler.symbols["stim"] = stack_index("env.regm") + def readFpReg(reg_name): + return regIdx("MISCREG_%s" % reg_name) + + assembler.symbols["fsw"] = readFpReg("FSW") + assembler.symbols["fcw"] = readFpReg("FCW") + macroopDict = assembler.assemble(microcode) decoder_output += mainRom.getDefinition() -- cgit v1.2.3