summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-17 18:44:44 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-17 18:44:44 -0700
commitcf9634a43f2c211105b7a5dbed5237fe5884291f (patch)
treefd15179758ea84a9a3116c3201fcb7456f1d27a8 /src/arch
parentae64377afe0373a56ad14a492cc758e8e4a8d9e8 (diff)
downloadgem5-cf9634a43f2c211105b7a5dbed5237fe5884291f.tar.xz
X86: Implement many of the media mov instructions.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/isa/decoder/two_byte_opcodes.isa28
-rw-r--r--src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move.py152
2 files changed, 156 insertions, 24 deletions
diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa
index 3b8bd1ed8..96a030e61 100644
--- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa
+++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa
@@ -288,20 +288,20 @@
0x02: decode LEGACY_DECODEVAL {
// no prefix
0x0: decode OPCODE_OP_BOTTOM3 {
- 0x0: movups_Vo_Wo();
- 0x1: movups_Wo_Vo();
+ 0x0: Inst::MOVUPS(Vo,Wo);
+ 0x1: Inst::MOVUPS(Wo,Vo);
0x2: decode MODRM_MOD {
- 0x3: movhlps_Vq_VRq();
- default: movlps_Vq_Mq();
+ 0x3: Inst::MOVHLPS(Vq,VRq);
+ default: Inst::MOVLPS(Vq,Mq);
}
- 0x3: movlps_Mq_Vq();
+ 0x3: Inst::MOVLPS(Mq,Vq);
0x4: Inst::UNPCKLPS(Vps,Wq);
0x5: Inst::UNPCKHPS(Vpd,Wq);
0x6: decode MODRM_MOD {
- 0x3: movlhps_Vq_VRq();
- default: movhps_Vq_Mq();
+ 0x3: Inst::MOVLHPS(Vq,VRq);
+ default: Inst::MOVHPS(Vq,Mq);
}
- 0x7: movhps_Mq_Vq();
+ 0x7: Inst::MOVHPS(Mq,Vq);
}
// repe (0xF3)
0x4: decode OPCODE_OP_BOTTOM3 {
@@ -313,14 +313,14 @@
}
// operand size (0x66)
0x1: decode OPCODE_OP_BOTTOM3 {
- 0x0: movupd_Vo_Wo();
- 0x1: movupd_Wo_Vo();
+ 0x0: Inst::MOVUPD(Vo,Wo);
+ 0x1: Inst::MOVUPD(Wo,Vo);
0x2: Inst::MOVLPD(Vq,Mq);
0x3: Inst::MOVLPD(Mq,Vq);
0x4: Inst::UNPCKLPD(Vo,Wq);
0x5: Inst::UNPCKHPD(Vo,Wo);
- 0x6: movhpd_Vq_Mq();
- 0x7: movhpd_Mq_Vq();
+ 0x6: Inst::MOVHPD(Vq,Mq);
+ 0x7: Inst::MOVHPD(Mq,Vq);
}
// repne (0xF2)
0x8: decode OPCODE_OP_BOTTOM3 {
@@ -389,8 +389,8 @@
}
// operand size (0x66)
0x1: decode OPCODE_OP_BOTTOM3 {
- 0x0: movapd_Vo_Wo();
- 0x1: movapd_Wo_Vo();
+ 0x0: Inst::MOVAPD(Vo,Wo);
+ 0x1: Inst::MOVAPD(Wo,Vo);
0x2: Inst::CVTPI2PD(Vo,Qq);
0x3: movntpd_Mo_Vo();
0x4: cvttpd2pi_Pq_Wo();
diff --git a/src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move.py b/src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move.py
index 1924f8f8c..1a6be6783 100644
--- a/src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move.py
+++ b/src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move.py
@@ -86,12 +86,142 @@ def macroop MOVAPS_XMM_XMM {
movfp xmmh, xmmhm, dataSize=8
};
-# MOVAPD
-# MOVUPS
-# MOVUPD
-# MOVHPS
-# MOVHPD
-# MOVLPS
+def macroop MOVAPD_XMM_XMM {
+ movfp xmml, xmmlm, dataSize=8
+ movfp xmmh, xmmhm, dataSize=8
+};
+
+def macroop MOVAPD_XMM_M {
+ ldfp xmml, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVAPD_XMM_P {
+ rdip t7
+ ldfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVAPD_M_XMM {
+ stfp xmml, seg, sib, "DISPLACEMENT", dataSize=8
+ stfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVAPD_P_XMM {
+ rdip t7
+ stfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
+ stfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVUPS_XMM_XMM {
+ movfp xmml, xmmlm, dataSize=8
+ movfp xmmh, xmmhm, dataSize=8
+};
+
+def macroop MOVUPS_XMM_M {
+ ldfp xmml, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVUPS_XMM_P {
+ rdip t7
+ ldfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVUPS_M_XMM {
+ stfp xmml, seg, sib, "DISPLACEMENT", dataSize=8
+ stfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVUPS_P_XMM {
+ rdip t7
+ stfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
+ stfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVUPD_XMM_XMM {
+ movfp xmml, xmmlm, dataSize=8
+ movfp xmmh, xmmhm, dataSize=8
+};
+
+def macroop MOVUPD_XMM_M {
+ ldfp xmml, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVUPD_XMM_P {
+ rdip t7
+ ldfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVUPD_M_XMM {
+ stfp xmml, seg, sib, "DISPLACEMENT", dataSize=8
+ stfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVUPD_P_XMM {
+ rdip t7
+ stfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
+ stfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVHPS_XMM_M {
+ ldfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVHPS_XMM_P {
+ rdip t7
+ ldfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVHPS_M_XMM {
+ stfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVHPS_P_XMM {
+ rdip t7
+ stfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
+ stfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVHPD_XMM_M {
+ ldfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVHPD_XMM_P {
+ rdip t7
+ ldfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVHPD_M_XMM {
+ stfp xmmh, seg, sib, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVHPD_P_XMM {
+ rdip t7
+ stfp xmml, seg, riprel, "DISPLACEMENT", dataSize=8
+ stfp xmmh, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+};
+
+def macroop MOVLPS_XMM_M {
+ ldfp xmml, seg, sib, disp, dataSize=8
+};
+
+def macroop MOVLPS_XMM_P {
+ rdip t7
+ ldfp xmml, seg, riprel, disp, dataSize=8
+};
+
+def macroop MOVLPS_M_XMM {
+ stfp xmml, seg, sib, disp, dataSize=8
+};
+
+def macroop MOVLPS_P_XMM {
+ rdip t7
+ stfp xmml, seg, riprel, disp, dataSize=8
+};
def macroop MOVLPD_XMM_M {
ldfp xmml, seg, sib, disp, dataSize=8
@@ -111,12 +241,14 @@ def macroop MOVLPD_P_XMM {
stfp xmml, seg, riprel, disp, dataSize=8
};
-def macroop MOVLPD_XMM_XMM {
- movfp xmml, xmmlm, dataSize=8
+def macroop MOVHLPS_XMM_XMM {
+ movfp xmml, xmmhm, dataSize=8
+};
+
+def macroop MOVLHPS_XMM_XMM {
+ movfp xmmh, xmmlm, dataSize=8
};
-# MOVHLPS
-# MOVLHPS
# MOVSS
def macroop MOVSD_XMM_M {