changeset 4a194d4f6fb0 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=4a194d4f6fb0
description:
X86: Decode the mysterious and elusive ffreep x87 instruction.
The internet says this instruction was created by accident when an
Intel CPU
failed to decode x87 instructions properly. It's been documented on a
few rare
occasions and has generally worked to ensure backwards compatability.
One
source claims that the gcc toolchain is basically the only thing that
emits
it, and that emulators/binary translators like qemu and bochs implement
it.
We won't actually implement it here since we're hardly implementing any
other
x87 instructions either. If we were to implement it, it would behave
the same
as ffree but then also pop the register stack.
http://www.pagetable.com/?p=16
diffstat:
src/arch/x86/isa/decoder/x87.isa | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r 906864dd0937 -r 4a194d4f6fb0 src/arch/x86/isa/decoder/x87.isa
--- a/src/arch/x86/isa/decoder/x87.isa Tue Mar 01 23:18:47 2011 -0800
+++ b/src/arch/x86/isa/decoder/x87.isa Wed Mar 02 00:41:38 2011 -0800
@@ -291,7 +291,9 @@
//0x7: esc7();
0x7: decode MODRM_REG {
0x0: decode MODRM_MOD {
- 0x3: Inst::UD2();
+ // The ffreep instruction isn't entirely real. It should work
+ // the same as ffree but then also pop the register stack.
+ 0x3: ffreep();
default: fild();
}
0x1: decode MODRM_MOD {
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev