[machinst x64]: add punpack[hl]bw instructions
This commit is contained in:
@@ -482,6 +482,8 @@ pub enum SseOpcode {
|
|||||||
Psubusb,
|
Psubusb,
|
||||||
Psubusw,
|
Psubusw,
|
||||||
Ptest,
|
Ptest,
|
||||||
|
Punpckhbw,
|
||||||
|
Punpcklbw,
|
||||||
Pxor,
|
Pxor,
|
||||||
Rcpss,
|
Rcpss,
|
||||||
Roundss,
|
Roundss,
|
||||||
@@ -616,6 +618,8 @@ impl SseOpcode {
|
|||||||
| SseOpcode::Psubsw
|
| SseOpcode::Psubsw
|
||||||
| SseOpcode::Psubusb
|
| SseOpcode::Psubusb
|
||||||
| SseOpcode::Psubusw
|
| SseOpcode::Psubusw
|
||||||
|
| SseOpcode::Punpckhbw
|
||||||
|
| SseOpcode::Punpcklbw
|
||||||
| SseOpcode::Pxor
|
| SseOpcode::Pxor
|
||||||
| SseOpcode::Sqrtpd
|
| SseOpcode::Sqrtpd
|
||||||
| SseOpcode::Sqrtsd
|
| SseOpcode::Sqrtsd
|
||||||
@@ -783,6 +787,8 @@ impl fmt::Debug for SseOpcode {
|
|||||||
SseOpcode::Psubusb => "psubusb",
|
SseOpcode::Psubusb => "psubusb",
|
||||||
SseOpcode::Psubusw => "psubusw",
|
SseOpcode::Psubusw => "psubusw",
|
||||||
SseOpcode::Ptest => "ptest",
|
SseOpcode::Ptest => "ptest",
|
||||||
|
SseOpcode::Punpckhbw => "punpckhbw",
|
||||||
|
SseOpcode::Punpcklbw => "punpcklbw",
|
||||||
SseOpcode::Pxor => "pxor",
|
SseOpcode::Pxor => "pxor",
|
||||||
SseOpcode::Rcpss => "rcpss",
|
SseOpcode::Rcpss => "rcpss",
|
||||||
SseOpcode::Roundss => "roundss",
|
SseOpcode::Roundss => "roundss",
|
||||||
|
|||||||
@@ -1826,6 +1826,8 @@ pub(crate) fn emit(
|
|||||||
SseOpcode::Psubsw => (LegacyPrefixes::_66, 0x0FE9, 2),
|
SseOpcode::Psubsw => (LegacyPrefixes::_66, 0x0FE9, 2),
|
||||||
SseOpcode::Psubusb => (LegacyPrefixes::_66, 0x0FD8, 2),
|
SseOpcode::Psubusb => (LegacyPrefixes::_66, 0x0FD8, 2),
|
||||||
SseOpcode::Psubusw => (LegacyPrefixes::_66, 0x0FD9, 2),
|
SseOpcode::Psubusw => (LegacyPrefixes::_66, 0x0FD9, 2),
|
||||||
|
SseOpcode::Punpckhbw => (LegacyPrefixes::_66, 0x0F68, 2),
|
||||||
|
SseOpcode::Punpcklbw => (LegacyPrefixes::_66, 0x0F60, 2),
|
||||||
SseOpcode::Pxor => (LegacyPrefixes::_66, 0x0FEF, 2),
|
SseOpcode::Pxor => (LegacyPrefixes::_66, 0x0FEF, 2),
|
||||||
SseOpcode::Subps => (LegacyPrefixes::None, 0x0F5C, 2),
|
SseOpcode::Subps => (LegacyPrefixes::None, 0x0F5C, 2),
|
||||||
SseOpcode::Subpd => (LegacyPrefixes::_66, 0x0F5C, 2),
|
SseOpcode::Subpd => (LegacyPrefixes::_66, 0x0F5C, 2),
|
||||||
|
|||||||
@@ -3157,6 +3157,18 @@ fn test_x64_emit() {
|
|||||||
"packsswb %xmm11, %xmm2",
|
"packsswb %xmm11, %xmm2",
|
||||||
));
|
));
|
||||||
|
|
||||||
|
insns.push((
|
||||||
|
Inst::xmm_rm_r(SseOpcode::Punpckhbw, RegMem::reg(xmm3), w_xmm2),
|
||||||
|
"660F68D3",
|
||||||
|
"punpckhbw %xmm3, %xmm2",
|
||||||
|
));
|
||||||
|
|
||||||
|
insns.push((
|
||||||
|
Inst::xmm_rm_r(SseOpcode::Punpcklbw, RegMem::reg(xmm1), w_xmm8),
|
||||||
|
"66440F60C1",
|
||||||
|
"punpcklbw %xmm1, %xmm8",
|
||||||
|
));
|
||||||
|
|
||||||
// ========================================================
|
// ========================================================
|
||||||
// XMM_RM_R: Integer Conversion
|
// XMM_RM_R: Integer Conversion
|
||||||
insns.push((
|
insns.push((
|
||||||
|
|||||||
Reference in New Issue
Block a user