summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/isa/decoder/two_byte_opcodes.isa10
-rw-r--r--src/arch/x86/isa/insts/simd128/floating_point/arithmetic/division.py63
2 files changed, 62 insertions, 11 deletions
diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa
index aedf6bcfa..eccfee1b3 100644
--- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa
+++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa
@@ -510,7 +510,7 @@
0x3: cvtdq2ps_Vo_Wo();
0x4: Inst::SUBPS(Vo,Wo);
0x5: Inst::MINPS(Vo,Wo);
- 0x6: divps_Vo_Wo();
+ 0x6: Inst::DIVPS(Vo,Wo);
0x7: Inst::MAXPS(Vo,Wo);
}
// repe (0xF3)
@@ -521,7 +521,7 @@
0x3: cvttps2dq_Vo_Wo();
0x4: Inst::SUBSS(Vd,Wd);
0x5: Inst::MINSS(Vd,Wd);
- 0x6: divss_Vd_Wd();
+ 0x6: Inst::DIVSS(Vd,Wd);
0x7: Inst::MAXSS(Vd,Wd);
}
// operand size (0x66)
@@ -532,7 +532,7 @@
0x3: cvtps2dq_Vo_Wo();
0x4: Inst::SUBPD(Vo,Wo);
0x5: Inst::MINPD(Vo,Wo);
- 0x6: divpd_Vo_Wo();
+ 0x6: Inst::DIVPD(Vo,Wo);
0x7: Inst::MAXPD(Vo,Wo);
}
// repne (0xF2)
@@ -917,7 +917,7 @@
0x3: cvtdq2ps_Vo_Wo();
0x4: Inst::SUBPS(Vo,Wo);
0x5: Inst::MINPS(Vo,Wo);
- 0x6: divps_Vo_Wo();
+ 0x6: Inst::DIVPS(Vo,Wo);
}
// repe (0xF3)
0x4: decode OPCODE_OP_BOTTOM3 {
@@ -929,7 +929,7 @@
0x2: cmpccpd_Vo_Wo_Ib();
0x4: Inst::SUBPD(Vo,Wo);
0x5: Inst::MINPD(Vo,Wo);
- 0x6: divpd_Vo_Wo();
+ 0x6: Inst::DIVPD(Vo,Wo);
default: Inst::UD2();
}
// repne (0xF2)
diff --git a/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/division.py b/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/division.py
index 0f4b14a81..3e565278c 100644
--- a/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/division.py
+++ b/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/division.py
@@ -54,22 +54,73 @@
# Authors: Gabe Black
microcode = '''
-# DIVPS
-# DIVPD
-# DIVSS
+def macroop DIVSS_XMM_XMM {
+ mdivf xmml, xmml, xmmlm, size=4, ext=1
+};
+
+def macroop DIVSS_XMM_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ mdivf xmml, xmml, ufp1, size=4, ext=1
+};
+
+def macroop DIVSS_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ mdivf xmml, xmml, ufp1, size=4, ext=1
+};
def macroop DIVSD_XMM_XMM {
- divfp xmml, xmml, xmmlm
+ mdivf xmml, xmml, xmmlm, size=8, ext=1
};
def macroop DIVSD_XMM_M {
ldfp ufp1, seg, sib, disp, dataSize=8
- divfp xmml, xmml, ufp1
+ mdivf xmml, xmml, ufp1, size=8, ext=1
};
def macroop DIVSD_XMM_P {
rdip t7
ldfp ufp1, seg, riprel, disp, dataSize=8
- divfp xmml, xmml, ufp1
+ mdivf xmml, xmml, ufp1, size=8, ext=1
+};
+
+def macroop DIVPS_XMM_XMM {
+ mdivf xmml, xmml, xmmlm, size=4, ext=0
+ mdivf xmmh, xmmh, xmmhm, size=4, ext=0
+};
+
+def macroop DIVPS_XMM_M {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ mdivf xmml, xmml, ufp1, size=4, ext=0
+ mdivf xmmh, xmmh, ufp2, size=4, ext=0
+};
+
+def macroop DIVPS_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ mdivf xmml, xmml, ufp1, size=4, ext=0
+ mdivf xmmh, xmmh, ufp2, size=4, ext=0
+};
+
+def macroop DIVPD_XMM_XMM {
+ mdivf xmml, xmml, xmmlm, size=8, ext=0
+ mdivf xmmh, xmmh, xmmhm, size=8, ext=0
+};
+
+def macroop DIVPD_XMM_M {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ mdivf xmml, xmml, ufp1, size=8, ext=0
+ mdivf xmmh, xmmh, ufp2, size=8, ext=0
+};
+
+def macroop DIVPD_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ mdivf xmml, xmml, ufp1, size=8, ext=0
+ mdivf xmmh, xmmh, ufp2, size=8, ext=0
};
'''