summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/decoder/x87.isa
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2014-01-27 18:50:53 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2014-01-27 18:50:53 -0600
commit6a543b51344ef8d511f2b67fa0d657a9a78dd169 (patch)
tree1e2c3d0b4e15aec919fa49a4d9b3a085d82b5eb3 /src/arch/x86/isa/decoder/x87.isa
parent5be0b846b1ca0131fc6c67c1ff7dcf64791ebc73 (diff)
downloadgem5-6a543b51344ef8d511f2b67fa0d657a9a78dd169.tar.xz
x86: implements x87 add/sub instructions
Diffstat (limited to 'src/arch/x86/isa/decoder/x87.isa')
-rw-r--r--src/arch/x86/isa/decoder/x87.isa33
1 files changed, 23 insertions, 10 deletions
diff --git a/src/arch/x86/isa/decoder/x87.isa b/src/arch/x86/isa/decoder/x87.isa
index 61f125e7c..b325728ba 100644
--- a/src/arch/x86/isa/decoder/x87.isa
+++ b/src/arch/x86/isa/decoder/x87.isa
@@ -39,19 +39,23 @@
format WarnUnimpl {
0x1B: decode OPCODE_OP_BOTTOM3 {
- //0x0: esc0();
0x0: decode MODRM_REG {
- // ST(0) = ST(0) + 32-bit Mem
- 0x0: fadd();
+ 0x0: decode MODRM_MOD {
+ 0x3: Inst::FADD1(Eq);
+ // 32-bit memory operand
+ default: Inst::FADD1(Md);
+ }
0x1: fmul();
0x2: fcom();
0x3: fcomp();
- 0x4: fsub();
+ 0x4: decode MODRM_MOD {
+ 0x3: Inst::FSUB1(Eq);
+ default: Inst::FSUB1(Md);
+ }
0x5: fsubr();
0x6: fdiv();
0x7: fdivr();
}
- //0x1: esc1();
0x1: decode MODRM_REG {
0x0: decode MODRM_MOD {
0x3: Inst::FLD(Eq);
@@ -202,7 +206,10 @@ format WarnUnimpl {
}
//0x4: esc4();
0x4: decode MODRM_REG {
- 0x0: fadd();
+ 0x0: decode MODRM_MOD {
+ 0x3: Inst::FADD2(Eq);
+ default: Inst::FADD2(Mq);
+ }
0x1: fmul();
0x2: decode MODRM_MOD {
0x3: Inst::UD2();
@@ -214,10 +221,10 @@ format WarnUnimpl {
}
0x4: decode MODRM_MOD {
0x3: fsubr();
- default: fsub();
+ default: Inst::FSUB2(Mq);
}
0x5: decode MODRM_MOD {
- 0x3: fsub();
+ 0x3: Inst::FSUB2(Eq);
default: fsubr();
}
0x6: decode MODRM_MOD {
@@ -268,7 +275,10 @@ format WarnUnimpl {
//0x6: esc6();
0x6: decode MODRM_REG {
0x0: decode MODRM_MOD {
- 0x3: faddp();
+ 0x3: decode MODRM_RM {
+ 0x1: Inst::FADDP();
+ default: Inst::FADDP(Eq);
+ }
default: fiadd();
}
0x1: decode MODRM_MOD {
@@ -291,7 +301,10 @@ format WarnUnimpl {
default: fisub();
}
0x5: decode MODRM_MOD {
- 0x3: fsubp();
+ 0x3: decode MODRM_RM {
+ 0x1: Inst::FSUBP();
+ default: Inst::FSUBP(Eq);
+ }
default: fisubr();
}
0x6: decode MODRM_MOD {