Added recompiled versions of PACK* and PUNPCK *
This commit is contained in:
parent
a991bc3249
commit
77af266ab2
16 changed files with 899 additions and 9 deletions
|
|
@ -160,6 +160,8 @@ static inline void codegen_addlong(codeblock_t *block, uint32_t val)
|
|||
#define OPCODE_SQADD_V4H (0x0e600c00)
|
||||
#define OPCODE_SQSUB_V8B (0x0e202c00)
|
||||
#define OPCODE_SQSUB_V4H (0x0e602c00)
|
||||
#define OPCODE_SQXTN_V8B_8H (0x0e214800)
|
||||
#define OPCODE_SQXTN_V4H_4S (0x0e614800)
|
||||
#define OPCODE_SHL_VD (0x0e005400)
|
||||
#define OPCODE_SHL_VQ (0x4e005400)
|
||||
#define OPCODE_SSHR_VD (0x0e004400)
|
||||
|
|
@ -177,8 +179,15 @@ static inline void codegen_addlong(codeblock_t *block, uint32_t val)
|
|||
#define OPCODE_UQADD_V4H (0x2e600c00)
|
||||
#define OPCODE_UQSUB_V8B (0x2e202c00)
|
||||
#define OPCODE_UQSUB_V4H (0x2e602c00)
|
||||
#define OPCODE_UQXTN_V8B_8H (0x2e214800)
|
||||
#define OPCODE_USHR_VD (0x2e004400)
|
||||
#define OPCODE_USHR_VQ (0x6e004400)
|
||||
#define OPCODE_ZIP1_V8B (0x0e003800)
|
||||
#define OPCODE_ZIP1_V4H (0x0e403800)
|
||||
#define OPCODE_ZIP1_V2S (0x0e803800)
|
||||
#define OPCODE_ZIP2_V8B (0x0e007800)
|
||||
#define OPCODE_ZIP2_V4H (0x0e407800)
|
||||
#define OPCODE_ZIP2_V2S (0x0e807800)
|
||||
|
||||
#define DATPROC_SHIFT(sh) (sh << 10)
|
||||
#define DATPROC_IMM_SHIFT(sh) (sh << 22)
|
||||
|
|
@ -965,6 +974,15 @@ void host_arm64_SQSUB_V4H(codeblock_t *block, int dst_reg, int src_n_reg, int sr
|
|||
codegen_addlong(block, OPCODE_SQSUB_V4H | Rd(dst_reg) | Rn(src_n_reg) | Rm(src_m_reg));
|
||||
}
|
||||
|
||||
void host_arm64_SQXTN_V8B_8H(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_SQXTN_V8B_8H | Rd(dst_reg) | Rn(src_reg));
|
||||
}
|
||||
void host_arm64_SQXTN_V4B_4H(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_SQXTN_V4B_4H | Rd(dst_reg) | Rn(src_reg));
|
||||
}
|
||||
|
||||
void host_arm64_SHL_V4H(codeblock_t *block, int dst_reg, int src_n_reg, shift)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_SHL_VD | Rd(dst_reg) | Rn(src_n_reg) | SHIFT_IMM_V4H(shift));
|
||||
|
|
@ -1129,6 +1147,11 @@ void host_arm64_UQSUB_V4H(codeblock_t *block, int dst_reg, int src_n_reg, int sr
|
|||
codegen_addlong(block, OPCODE_UQSUB_V4H | Rd(dst_reg) | Rn(src_n_reg) | Rm(src_m_reg));
|
||||
}
|
||||
|
||||
void host_arm64_UQXTN_V8B_8H(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_UQXTN_V8B_8H | Rd(dst_reg) | Rn(src_reg));
|
||||
}
|
||||
|
||||
void host_arm64_USHR_V4H(codeblock_t *block, int dst_reg, int src_n_reg, shift)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_USHR_VD | Rd(dst_reg) | Rn(src_n_reg) | SHIFT_IMM_V4H(shift));
|
||||
|
|
@ -1142,6 +1165,31 @@ void host_arm64_USHR_V2D(codeblock_t *block, int dst_reg, int src_n_reg, shift)
|
|||
codegen_addlong(block, OPCODE_USHR_VQ | Rd(dst_reg) | Rn(src_n_reg) | SHIFT_IMM_V2D(shift));
|
||||
}
|
||||
|
||||
void host_arm64_ZIP1_V8B(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_ZIP1_V8B | Rd(dst_reg) | Rn(src_n_reg) | Rm(src_m_reg));
|
||||
}
|
||||
void host_arm64_ZIP1_V4H(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_ZIP1_V4H | Rd(dst_reg) | Rn(src_n_reg) | Rm(src_m_reg));
|
||||
}
|
||||
void host_arm64_ZIP1_V2S(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_ZIP1_V2S | Rd(dst_reg) | Rn(src_n_reg) | Rm(src_m_reg));
|
||||
}
|
||||
void host_arm64_ZIP2_V8B(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_ZIP2_V8B | Rd(dst_reg) | Rn(src_n_reg) | Rm(src_m_reg));
|
||||
}
|
||||
void host_arm64_ZIP2_V4H(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_ZIP2_V4H | Rd(dst_reg) | Rn(src_n_reg) | Rm(src_m_reg));
|
||||
}
|
||||
void host_arm64_ZIP2_V2S(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_ZIP2_V2S | Rd(dst_reg) | Rn(src_n_reg) | Rm(src_m_reg));
|
||||
}
|
||||
|
||||
void host_arm64_call(codeblock_t *block, void *dst_addr)
|
||||
{
|
||||
int offset = add_literal_q(block, (uintptr_t)dst_addr);
|
||||
|
|
|
|||
|
|
@ -152,6 +152,9 @@ void host_arm64_SQADD_V4H(codeblock_t *block, int dst_reg, int src_n_reg, int sr
|
|||
void host_arm64_SQSUB_V8B(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg);
|
||||
void host_arm64_SQSUB_V4H(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg);
|
||||
|
||||
void host_arm64_SQXTN_V8B_8H(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_arm64_SQXTN_V4H_4D(codeblock_t *block, int dst_reg, int src_reg);
|
||||
|
||||
void host_arm64_SHL_V4H(codeblock_t *block, int dst_reg, int src_reg, int shift);
|
||||
void host_arm64_SHL_V2S(codeblock_t *block, int dst_reg, int src_reg, int shift);
|
||||
void host_arm64_SHL_V2D(codeblock_t *block, int dst_reg, int src_reg, int shift);
|
||||
|
|
@ -195,10 +198,19 @@ void host_arm64_UQADD_V4H(codeblock_t *block, int dst_reg, int src_n_reg, int sr
|
|||
void host_arm64_UQSUB_V8B(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg, int shift);
|
||||
void host_arm64_UQSUB_V4H(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg, int shift);
|
||||
|
||||
void host_arm64_UQXTN_V8B_8H(codeblock_t *block, int dst_reg, int src_reg);
|
||||
|
||||
void host_arm64_USHR_V4H(codeblock_t *block, int dst_reg, int src_reg, int shift);
|
||||
void host_arm64_USHR_V2S(codeblock_t *block, int dst_reg, int src_reg, int shift);
|
||||
void host_arm64_USHR_V2D(codeblock_t *block, int dst_reg, int src_reg, int shift);
|
||||
|
||||
void host_arm64_ZIP1_V8B(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg);
|
||||
void host_arm64_ZIP1_V4H(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg);
|
||||
void host_arm64_ZIP1_V2S(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg);
|
||||
void host_arm64_ZIP2_V8B(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg);
|
||||
void host_arm64_ZIP2_V4H(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg);
|
||||
void host_arm64_ZIP2_V2S(codeblock_t *block, int dst_reg, int src_n_reg, int src_m_reg);
|
||||
|
||||
void host_arm64_call(codeblock_t *block, void *dst_addr);
|
||||
void host_arm64_jump(codeblock_t *block, uintptr_t dst_addr);
|
||||
void host_arm64_mov_imm(codeblock_t *block, int reg, uint32_t imm_data);
|
||||
|
|
|
|||
|
|
@ -1384,6 +1384,55 @@ static int codegen_OR_IMM(codeblock_t *block, uop_t *uop)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_PACKSSWB(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm64_SQXTN_V8B_8H(block, dest_reg, dest_reg);
|
||||
host_arm64_SQXTN_V8B_8H(block, REG_V_TEMP, src_reg_b);
|
||||
host_arm64_VZIP1_V2S(block, dest_reg, dest_reg, REG_V_TEMP);
|
||||
}
|
||||
else
|
||||
fatal("PACKSSWB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PACKSSDW(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_arm64_UQXTN_V4H_4D(block, dest_reg, dest_reg);
|
||||
host_arm64_UQXTN_V4H_4D(block, REG_V_TEMP, src_reg_b);
|
||||
host_arm64_VZIP1_V2S(block, dest_reg, dest_reg, REG_V_TEMP);
|
||||
}
|
||||
else
|
||||
fatal("PACKSSDW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PACKUSWB(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_arm64_UQXTN_V8B_8H(block, dest_reg, dest_reg);
|
||||
host_arm64_UQXTN_V8B_8H(block, REG_V_TEMP, src_reg_b);
|
||||
host_arm64_VZIP1_V2S(block, dest_reg, dest_reg, REG_V_TEMP);
|
||||
}
|
||||
else
|
||||
fatal("PACKUSWB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_PADDB(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
|
|
@ -1824,6 +1873,91 @@ static int codegen_PSUBUSW(codeblock_t *block, uop_t *uop)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_PUNPCKHBW(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm64_VZIP2_V8B(block, dest_reg, src_reg_a, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKHBW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKHWD(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm64_VZIP2_V4H(block, dest_reg, src_reg_a, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKHWD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKHDQ(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm64_VZIP2_V2S(block, dest_reg, src_reg_a, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKHDQ %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKLBW(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm64_VZIP1_V8B(block, dest_reg, src_reg_a, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKLBW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKLWD(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm64_VZIP1_V4H(block, dest_reg, src_reg_a, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKLWD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKLDQ(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm64_VZIP1_V2S(block, dest_reg, src_reg_a, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKLDQ %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_SAR(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg = HOST_REG_GET(uop->src_reg_a_real), shift_reg = HOST_REG_GET(uop->src_reg_b_real);
|
||||
|
|
@ -2346,6 +2480,10 @@ const uOpFn uop_handlers[UOP_MAX] =
|
|||
[UOP_FMUL & UOP_MASK] = codegen_FMUL,
|
||||
[UOP_FSUB & UOP_MASK] = codegen_FSUB,
|
||||
|
||||
[UOP_PACKSSWB & UOP_MASK] = codegen_PACKSSWB,
|
||||
[UOP_PACKSSDW & UOP_MASK] = codegen_PACKSSDW,
|
||||
[UOP_PACKUSWB & UOP_MASK] = codegen_PACKUSWB,
|
||||
|
||||
[UOP_PADDB & UOP_MASK] = codegen_PADDB,
|
||||
[UOP_PADDW & UOP_MASK] = codegen_PADDW,
|
||||
[UOP_PADDD & UOP_MASK] = codegen_PADDD,
|
||||
|
|
@ -2377,7 +2515,14 @@ const uOpFn uop_handlers[UOP_MAX] =
|
|||
[UOP_PSUBSB & UOP_MASK] = codegen_PSUBSB,
|
||||
[UOP_PSUBSW & UOP_MASK] = codegen_PSUBSW,
|
||||
[UOP_PSUBUSB & UOP_MASK] = codegen_PSUBUSB,
|
||||
[UOP_PSUBUSW & UOP_MASK] = codegen_PSUBUSW
|
||||
[UOP_PSUBUSW & UOP_MASK] = codegen_PSUBUSW,
|
||||
|
||||
[UOP_PUNPCKHBW & UOP_MASK] = codegen_PUNPCKHBW,
|
||||
[UOP_PUNPCKHWD & UOP_MASK] = codegen_PUNPCKHWD,
|
||||
[UOP_PUNPCKHDQ & UOP_MASK] = codegen_PUNPCKHDQ,
|
||||
[UOP_PUNPCKLBW & UOP_MASK] = codegen_PUNPCKLBW,
|
||||
[UOP_PUNPCKLWD & UOP_MASK] = codegen_PUNPCKLWD,
|
||||
[UOP_PUNPCKLDQ & UOP_MASK] = codegen_PUNPCKLDQ
|
||||
};
|
||||
|
||||
void codegen_direct_read_8(codeblock_t *block, int host_reg, void *p)
|
||||
|
|
|
|||
|
|
@ -121,6 +121,9 @@ static inline void codegen_addlong(codeblock_t *block, uint32_t val)
|
|||
#define OPCODE_VQADD_S16 0xf2100010
|
||||
#define OPCODE_VQADD_U8 0xf3000010
|
||||
#define OPCODE_VQADD_U16 0xf3100010
|
||||
#define OPCODE_VQMOVN_S16 0xf3b20280
|
||||
#define OPCODE_VQMOVN_S32 0xf3b60280
|
||||
#define OPCODE_VQMOVN_U16 0xf3b202c0
|
||||
#define OPCODE_VQSUB_S8 0xf2000210
|
||||
#define OPCODE_VQSUB_S16 0xf2100210
|
||||
#define OPCODE_VQSUB_U8 0xf3000210
|
||||
|
|
@ -140,6 +143,8 @@ static inline void codegen_addlong(codeblock_t *block, uint32_t val)
|
|||
#define OPCODE_VSUB_I8 0xf3000800
|
||||
#define OPCODE_VSUB_I16 0xf3100800
|
||||
#define OPCODE_VSUB_I32 0xf3200800
|
||||
#define OPCODE_VZIP_D16 0xf3b60180
|
||||
#define OPCODE_VZIP_D32 0xf3ba0180
|
||||
|
||||
#define B_OFFSET(x) (((x) >> 2) & 0xffffff)
|
||||
|
||||
|
|
@ -944,6 +949,19 @@ void host_arm_VQSUB_U16(codeblock_t *block, int dst_reg, int src_reg_n, int src_
|
|||
codegen_addlong(block, OPCODE_VQSUB_U16 | Rd(dst_reg) | Rn(src_reg_n) | Rm(src_reg_m));
|
||||
}
|
||||
|
||||
void host_arm_VQMOVN_S16(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_VQMOVN_S16 | Vd(dst_reg) | Vm(src_reg));
|
||||
}
|
||||
void host_arm_VQMOVN_S32(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_VQMOVN_S32 | Vd(dst_reg) | Vm(src_reg));
|
||||
}
|
||||
void host_arm_VQMOVN_U16(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_VQMOVN_U16 | Vd(dst_reg) | Vm(src_reg));
|
||||
}
|
||||
|
||||
void host_arm_VSHL_D_IMM_16(codeblock_t *block, int dest_reg, int src_reg, int shift)
|
||||
{
|
||||
if (shift > 15)
|
||||
|
|
@ -1028,4 +1046,13 @@ void host_arm_VSUB_I32(codeblock_t *block, int dst_reg, int src_reg_n, int src_r
|
|||
codegen_addlong(block, OPCODE_VSUB_I32 | Rd(dst_reg) | Rn(src_reg_n) | Rm(src_reg_m));
|
||||
}
|
||||
|
||||
void host_arm_VZIP_D16(codeblock_t *block, int d_reg, int m_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_VZIP_D16 | Vd(d_reg) | Vm(m_reg));
|
||||
}
|
||||
void host_arm_VZIP_D32(codeblock_t *block, int d_reg, int m_reg)
|
||||
{
|
||||
codegen_addlong(block, OPCODE_VZIP_D32 | Vd(d_reg) | Vm(m_reg));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -181,6 +181,10 @@ void host_arm_VQSUB_U8(codeblock_t *block, int dst_reg, int src_reg_n, int src_r
|
|||
void host_arm_VQSUB_S16(codeblock_t *block, int dst_reg, int src_reg_n, int src_reg_m);
|
||||
void host_arm_VQSUB_U16(codeblock_t *block, int dst_reg, int src_reg_n, int src_reg_m);
|
||||
|
||||
void host_arm_VQMOVN_S16(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_arm_VQMOVN_S32(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_arm_VQMOVN_U16(codeblock_t *block, int dst_reg, int src_reg);
|
||||
|
||||
void host_arm_VSHL_D_IMM_16(codeblock_t *block, int dest_reg, int src_reg, int shift);
|
||||
void host_arm_VSHL_D_IMM_32(codeblock_t *block, int dest_reg, int src_reg, int shift);
|
||||
void host_arm_VSHL_D_IMM_64(codeblock_t *block, int dest_reg, int src_reg, int shift);
|
||||
|
|
@ -197,3 +201,6 @@ void host_arm_VSUB_D(codeblock_t *block, int dst_reg, int src_reg_n, int src_reg
|
|||
void host_arm_VSUB_I8(codeblock_t *block, int dst_reg, int src_reg_n, int src_reg_m);
|
||||
void host_arm_VSUB_I16(codeblock_t *block, int dst_reg, int src_reg_n, int src_reg_m);
|
||||
void host_arm_VSUB_I32(codeblock_t *block, int dst_reg, int src_reg_n, int src_reg_m);
|
||||
|
||||
void host_arm_VZIP_D16(codeblock_t *block, int d_reg, int m_reg);
|
||||
void host_arm_VZIP_D32(codeblock_t *block, int d_reg, int m_reg);
|
||||
|
|
|
|||
|
|
@ -1504,6 +1504,55 @@ static int codegen_OR_IMM(codeblock_t *block, uop_t *uop)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_PACKSSWB(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm_VQMOVN_S16(block, dest_reg, dest_reg);
|
||||
host_arm_VQMOVN_S16(block, REG_D_TEMP, src_reg_b);
|
||||
host_arm_VZIP_D32(block, dest_reg, REG_D_TEMP);
|
||||
}
|
||||
else
|
||||
fatal("PACKSSWB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PACKSSDW(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_arm_VQMOVN_S32(block, dest_reg, dest_reg);
|
||||
host_arm_VQMOVN_S32(block, REG_D_TEMP, src_reg_b);
|
||||
host_arm_VZIP_D32(block, dest_reg, REG_D_TEMP);
|
||||
}
|
||||
else
|
||||
fatal("PACKSSDW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PACKUSWB(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_arm_VQMOVN_U16(block, dest_reg, dest_reg);
|
||||
host_arm_VQMOVN_U16(block, REG_D_TEMP, src_reg_b);
|
||||
host_arm_VZIP_D32(block, dest_reg, REG_D_TEMP);
|
||||
}
|
||||
else
|
||||
fatal("PACKUSWB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_PADDB(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
|
|
@ -1944,6 +1993,112 @@ static int codegen_PSUBUSW(codeblock_t *block, uop_t *uop)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_PUNPCKHBW(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm_VMOV_D_D(block, REG_D_TEMP, src_reg_b);
|
||||
if (dest_reg != src_reg_a)
|
||||
host_arm_VMOV_D_D(block, dest_reg, src_reg_a);
|
||||
host_arm_VZIP_D8(block, dest_reg, REG_D_TEMP);
|
||||
host_arm_VMOV_D_D(block, dest_reg, REG_D_TEMP);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKHBW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKHWD(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm_VMOV_D_D(block, REG_D_TEMP, src_reg_b);
|
||||
if (dest_reg != src_reg_a)
|
||||
host_arm_VMOV_D_D(block, dest_reg, src_reg_a);
|
||||
host_arm_VZIP_D16(block, dest_reg, REG_D_TEMP);
|
||||
host_arm_VMOV_D_D(block, dest_reg, REG_D_TEMP);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKHWD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKHDQ(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm_VMOV_D_D(block, REG_D_TEMP, src_reg_b);
|
||||
if (dest_reg != src_reg_a)
|
||||
host_arm_VMOV_D_D(block, dest_reg, src_reg_a);
|
||||
host_arm_VZIP_D32(block, dest_reg, REG_D_TEMP);
|
||||
host_arm_VMOV_D_D(block, dest_reg, REG_D_TEMP);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKHDQ %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKLBW(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm_VMOV_D_D(block, REG_D_TEMP, src_reg_b);
|
||||
if (dest_reg != src_reg_a)
|
||||
host_arm_VMOV_D_D(block, dest_reg, src_reg_a);
|
||||
host_arm_VZIP_D8(block, dest_reg, REG_D_TEMP);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKLBW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKLWD(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm_VMOV_D_D(block, REG_D_TEMP, src_reg_b);
|
||||
if (dest_reg != src_reg_a)
|
||||
host_arm_VMOV_D_D(block, dest_reg, src_reg_a);
|
||||
host_arm_VZIP_D16(block, dest_reg, REG_D_TEMP);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKLWD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKLDQ(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_a = HOST_REG_GET(uop->src_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_a = IREG_GET_SIZE(uop->src_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a) && REG_IS_Q(src_size_b))
|
||||
{
|
||||
host_arm_VMOV_D_D(block, REG_D_TEMP, src_reg_b);
|
||||
if (dest_reg != src_reg_a)
|
||||
host_arm_VMOV_D_D(block, dest_reg, src_reg_a);
|
||||
host_arm_VZIP_D32(block, dest_reg, REG_D_TEMP);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKLDQ %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_SAR(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg = HOST_REG_GET(uop->src_reg_a_real), shift_reg = HOST_REG_GET(uop->src_reg_b_real);
|
||||
|
|
@ -2466,6 +2621,10 @@ const uOpFn uop_handlers[UOP_MAX] =
|
|||
[UOP_FMUL & UOP_MASK] = codegen_FMUL,
|
||||
[UOP_FSUB & UOP_MASK] = codegen_FSUB,
|
||||
|
||||
[UOP_PACKSSWB & UOP_MASK] = codegen_PACKSSWB,
|
||||
[UOP_PACKSSDW & UOP_MASK] = codegen_PACKSSDW,
|
||||
[UOP_PACKUSWB & UOP_MASK] = codegen_PACKUSWB,
|
||||
|
||||
[UOP_PADDB & UOP_MASK] = codegen_PADDB,
|
||||
[UOP_PADDW & UOP_MASK] = codegen_PADDW,
|
||||
[UOP_PADDD & UOP_MASK] = codegen_PADDD,
|
||||
|
|
@ -2497,7 +2656,14 @@ const uOpFn uop_handlers[UOP_MAX] =
|
|||
[UOP_PSUBSB & UOP_MASK] = codegen_PSUBSB,
|
||||
[UOP_PSUBSW & UOP_MASK] = codegen_PSUBSW,
|
||||
[UOP_PSUBUSB & UOP_MASK] = codegen_PSUBUSB,
|
||||
[UOP_PSUBUSW & UOP_MASK] = codegen_PSUBUSW
|
||||
[UOP_PSUBUSW & UOP_MASK] = codegen_PSUBUSW,
|
||||
|
||||
[UOP_PUNPCKHBW & UOP_MASK] = codegen_PUNPCKHBW,
|
||||
[UOP_PUNPCKHWD & UOP_MASK] = codegen_PUNPCKHWD,
|
||||
[UOP_PUNPCKHDQ & UOP_MASK] = codegen_PUNPCKHDQ,
|
||||
[UOP_PUNPCKLBW & UOP_MASK] = codegen_PUNPCKLBW,
|
||||
[UOP_PUNPCKLWD & UOP_MASK] = codegen_PUNPCKLWD,
|
||||
[UOP_PUNPCKLDQ & UOP_MASK] = codegen_PUNPCKLDQ
|
||||
};
|
||||
|
||||
void codegen_direct_read_8(codeblock_t *block, int host_reg, void *p)
|
||||
|
|
|
|||
|
|
@ -1229,6 +1229,25 @@ void host_x86_OR32_REG_REG(codeblock_t *block, int dst_reg, int src_reg_a, int s
|
|||
codegen_addbyte2(block, 0x09, 0xc0 | (dst_reg & 7) | ((src_reg_b & 7) << 3)); /*OR dst_reg, src_reg_b*/
|
||||
}
|
||||
|
||||
void host_x86_PACKSSWB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x63, 0xc0 | src_reg | (dst_reg << 3)); /*PACKSSWB dst_reg, src_reg*/
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x70, 0xc0 | dst_reg | (dst_reg << 3)); /*PSHUFD dst_reg, dst_reg, 0x88 (move bits 64-95 to 32-63)*/
|
||||
codegen_addbyte(block, 0x88);
|
||||
}
|
||||
void host_x86_PACKSSDW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x6b, 0xc0 | src_reg | (dst_reg << 3)); /*PACKSSDW dst_reg, src_reg*/
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x70, 0xc0 | dst_reg | (dst_reg << 3)); /*PSHUFD dst_reg, dst_reg, 0x88 (move bits 64-95 to 32-63)*/
|
||||
codegen_addbyte(block, 0x88);
|
||||
}
|
||||
void host_x86_PACKUSWB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x67, 0xc0 | src_reg | (dst_reg << 3)); /*PACKUSWB dst_reg, src_reg*/
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x70, 0xc0 | dst_reg | (dst_reg << 3)); /*PSHUFD dst_reg, dst_reg, 0x88 (move bits 64-95 to 32-63)*/
|
||||
codegen_addbyte(block, 0x88);
|
||||
}
|
||||
|
||||
void host_x86_PADDB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0xfc, 0xc0 | src_reg | (dst_reg << 3)); /*PADDB dst_reg, src_reg*/
|
||||
|
|
@ -1375,6 +1394,37 @@ void host_x86_PSUBUSW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
|||
codegen_addbyte4(block, 0x66, 0x0f, 0xd9, 0xc0 | src_reg | (dst_reg << 3)); /*PSUBUSW dst_reg, src_reg*/
|
||||
}
|
||||
|
||||
void host_x86_PUNPCKHBW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x60, 0xc0 | src_reg | (dst_reg << 3)); /*PUNPCKLBW dst_reg, src_reg*/
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x70, 0xc0 | dst_reg | (dst_reg << 3)); /*PSHUFD dst_reg, dst_reg, 0xee (move top 64-bits to low 64-bits)*/
|
||||
codegen_addbyte(block, 0xee);
|
||||
}
|
||||
void host_x86_PUNPCKHWD_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x61, 0xc0 | src_reg | (dst_reg << 3)); /*PUNPCKLWD dst_reg, src_reg*/
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x70, 0xc0 | dst_reg | (dst_reg << 3)); /*PSHUFD dst_reg, dst_reg, 0xee (move top 64-bits to low 64-bits)*/
|
||||
codegen_addbyte(block, 0xee);
|
||||
}
|
||||
void host_x86_PUNPCKHDQ_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x62, 0xc0 | src_reg | (dst_reg << 3)); /*PUNPCKLDQ dst_reg, src_reg*/
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x70, 0xc0 | dst_reg | (dst_reg << 3)); /*PSHUFD dst_reg, dst_reg, 0xee (move top 64-bits to low 64-bits)*/
|
||||
codegen_addbyte(block, 0xee);
|
||||
}
|
||||
void host_x86_PUNPCKLBW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x60, 0xc0 | src_reg | (dst_reg << 3)); /*PUNPCKLBW dst_reg, src_reg*/
|
||||
}
|
||||
void host_x86_PUNPCKLWD_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x61, 0xc0 | src_reg | (dst_reg << 3)); /*PUNPCKLWD dst_reg, src_reg*/
|
||||
}
|
||||
void host_x86_PUNPCKLDQ_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x62, 0xc0 | src_reg | (dst_reg << 3)); /*PUNPCKLDQ dst_reg, src_reg*/
|
||||
}
|
||||
|
||||
void host_x86_POP(codeblock_t *block, int dst_reg)
|
||||
{
|
||||
if (dst_reg & 8)
|
||||
|
|
|
|||
|
|
@ -153,6 +153,10 @@ void host_x86_OR8_REG_REG(codeblock_t *block, int dst_reg, int src_reg_a, int sr
|
|||
void host_x86_OR16_REG_REG(codeblock_t *block, int dst_reg, int src_reg_a, int src_reg_b);
|
||||
void host_x86_OR32_REG_REG(codeblock_t *block, int dst_reg, int src_reg_a, int src_reg_b);
|
||||
|
||||
void host_x86_PACKSSWB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PACKSSDW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PACKUSWB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
|
||||
void host_x86_PADDB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PADDW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PADDD_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
|
|
@ -191,6 +195,13 @@ void host_x86_PSUBSW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
|||
void host_x86_PSUBUSB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PSUBUSW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
|
||||
void host_x86_PUNPCKHBW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PUNPCKHWD_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PUNPCKHDQ_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PUNPCKLBW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PUNPCKLWD_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PUNPCKLDQ_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
|
||||
void host_x86_POP(codeblock_t *block, int src_reg);
|
||||
|
||||
void host_x86_PUSH(codeblock_t *block, int src_reg);
|
||||
|
|
|
|||
|
|
@ -1270,6 +1270,49 @@ static int codegen_OR_IMM(codeblock_t *block, uop_t *uop)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_PACKSSWB(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PACKSSWB_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PACKSSWB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PACKSSDW(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PACKSSDW_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PACKSSDW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PACKUSWB(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PACKUSWB_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PACKUSWB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_PADDB(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
|
|
@ -1680,6 +1723,91 @@ static int codegen_PSUBUSW(codeblock_t *block, uop_t *uop)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_PUNPCKHBW(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PUNPCKHBW_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKHBW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKHWD(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PUNPCKHWD_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKHWD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKHDQ(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PUNPCKHDQ_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKHDQ %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKLBW(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PUNPCKLBW_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKLBW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKLWD(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PUNPCKLWD_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKLWD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKLDQ(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PUNPCKLDQ_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKLDQ %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_SAR(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg = HOST_REG_GET(uop->src_reg_a_real), shift_reg = HOST_REG_GET(uop->src_reg_b_real);
|
||||
|
|
@ -2117,6 +2245,10 @@ const uOpFn uop_handlers[UOP_MAX] =
|
|||
[UOP_FMUL & UOP_MASK] = codegen_FMUL,
|
||||
[UOP_FSUB & UOP_MASK] = codegen_FSUB,
|
||||
|
||||
[UOP_PACKSSWB & UOP_MASK] = codegen_PACKSSWB,
|
||||
[UOP_PACKSSDW & UOP_MASK] = codegen_PACKSSDW,
|
||||
[UOP_PACKUSWB & UOP_MASK] = codegen_PACKUSWB,
|
||||
|
||||
[UOP_PADDB & UOP_MASK] = codegen_PADDB,
|
||||
[UOP_PADDW & UOP_MASK] = codegen_PADDW,
|
||||
[UOP_PADDD & UOP_MASK] = codegen_PADDD,
|
||||
|
|
@ -2148,7 +2280,14 @@ const uOpFn uop_handlers[UOP_MAX] =
|
|||
[UOP_PSUBSB & UOP_MASK] = codegen_PSUBSB,
|
||||
[UOP_PSUBSW & UOP_MASK] = codegen_PSUBSW,
|
||||
[UOP_PSUBUSB & UOP_MASK] = codegen_PSUBUSB,
|
||||
[UOP_PSUBUSW & UOP_MASK] = codegen_PSUBUSW
|
||||
[UOP_PSUBUSW & UOP_MASK] = codegen_PSUBUSW,
|
||||
|
||||
[UOP_PUNPCKHBW & UOP_MASK] = codegen_PUNPCKHBW,
|
||||
[UOP_PUNPCKHWD & UOP_MASK] = codegen_PUNPCKHWD,
|
||||
[UOP_PUNPCKHDQ & UOP_MASK] = codegen_PUNPCKHDQ,
|
||||
[UOP_PUNPCKLBW & UOP_MASK] = codegen_PUNPCKLBW,
|
||||
[UOP_PUNPCKLWD & UOP_MASK] = codegen_PUNPCKLWD,
|
||||
[UOP_PUNPCKLDQ & UOP_MASK] = codegen_PUNPCKLDQ
|
||||
};
|
||||
|
||||
void codegen_direct_read_8(codeblock_t *block, int host_reg, void *p)
|
||||
|
|
|
|||
|
|
@ -1087,6 +1087,25 @@ void host_x86_OR32_REG_IMM(codeblock_t *block, int dst_reg, int src_reg, uint32_
|
|||
}
|
||||
}
|
||||
|
||||
void host_x86_PACKSSWB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x63, 0xc0 | src_reg | (dst_reg << 3)); /*PACKSSWB dst_reg, src_reg*/
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x70, 0xc0 | dst_reg | (dst_reg << 3)); /*PSHUFD dst_reg, dst_reg, 0x88 (move bits 64-95 to 32-63)*/
|
||||
codegen_addbyte(block, 0x88);
|
||||
}
|
||||
void host_x86_PACKSSDW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x6b, 0xc0 | src_reg | (dst_reg << 3)); /*PACKSSDW dst_reg, src_reg*/
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x70, 0xc0 | dst_reg | (dst_reg << 3)); /*PSHUFD dst_reg, dst_reg, 0x88 (move bits 64-95 to 32-63)*/
|
||||
codegen_addbyte(block, 0x88);
|
||||
}
|
||||
void host_x86_PACKUSWB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x67, 0xc0 | src_reg | (dst_reg << 3)); /*PACKUSWB dst_reg, src_reg*/
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x70, 0xc0 | dst_reg | (dst_reg << 3)); /*PSHUFD dst_reg, dst_reg, 0x88 (move bits 64-95 to 32-63)*/
|
||||
codegen_addbyte(block, 0x88);
|
||||
}
|
||||
|
||||
void host_x86_PADDB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0xfc, 0xc0 | src_reg | (dst_reg << 3)); /*PADDB dst_reg, src_reg*/
|
||||
|
|
@ -1233,6 +1252,37 @@ void host_x86_PSUBUSW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
|||
codegen_addbyte4(block, 0x66, 0x0f, 0xd9, 0xc0 | src_reg | (dst_reg << 3)); /*PSUBUSW dst_reg, src_reg*/
|
||||
}
|
||||
|
||||
void host_x86_PUNPCKHBW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x60, 0xc0 | src_reg | (dst_reg << 3)); /*PUNPCKLBW dst_reg, src_reg*/
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x70, 0xc0 | dst_reg | (dst_reg << 3)); /*PSHUFD dst_reg, dst_reg, 0xee (move top 64-bits to low 64-bits)*/
|
||||
codegen_addbyte(block, 0xee);
|
||||
}
|
||||
void host_x86_PUNPCKHWD_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x61, 0xc0 | src_reg | (dst_reg << 3)); /*PUNPCKLWD dst_reg, src_reg*/
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x70, 0xc0 | dst_reg | (dst_reg << 3)); /*PSHUFD dst_reg, dst_reg, 0xee (move top 64-bits to low 64-bits)*/
|
||||
codegen_addbyte(block, 0xee);
|
||||
}
|
||||
void host_x86_PUNPCKHDQ_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x62, 0xc0 | src_reg | (dst_reg << 3)); /*PUNPCKLDQ dst_reg, src_reg*/
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x70, 0xc0 | dst_reg | (dst_reg << 3)); /*PSHUFD dst_reg, dst_reg, 0xee (move top 64-bits to low 64-bits)*/
|
||||
codegen_addbyte(block, 0xee);
|
||||
}
|
||||
void host_x86_PUNPCKLBW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x60, 0xc0 | src_reg | (dst_reg << 3)); /*PUNPCKLBW dst_reg, src_reg*/
|
||||
}
|
||||
void host_x86_PUNPCKLWD_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x61, 0xc0 | src_reg | (dst_reg << 3)); /*PUNPCKLWD dst_reg, src_reg*/
|
||||
}
|
||||
void host_x86_PUNPCKLDQ_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg)
|
||||
{
|
||||
codegen_addbyte4(block, 0x66, 0x0f, 0x62, 0xc0 | src_reg | (dst_reg << 3)); /*PUNPCKLDQ dst_reg, src_reg*/
|
||||
}
|
||||
|
||||
void host_x86_POP(codeblock_t *block, int src_reg)
|
||||
{
|
||||
codegen_addbyte(block, 0x58 | src_reg); /*POP reg*/
|
||||
|
|
|
|||
|
|
@ -154,6 +154,10 @@ void host_x86_OR8_REG_IMM(codeblock_t *block, int dst_reg, int src_reg, uint8_t
|
|||
void host_x86_OR16_REG_IMM(codeblock_t *block, int dst_reg, int src_reg, uint16_t imm_data);
|
||||
void host_x86_OR32_REG_IMM(codeblock_t *block, int dst_reg, int src_reg, uint32_t imm_data);
|
||||
|
||||
void host_x86_PACKSSWB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PACKSSDW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PACKUSWB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
|
||||
void host_x86_PADDB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PADDW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PADDD_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
|
|
@ -192,6 +196,13 @@ void host_x86_PSUBSW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
|||
void host_x86_PSUBUSB_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PSUBUSW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
|
||||
void host_x86_PUNPCKHBW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PUNPCKHWD_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PUNPCKHDQ_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PUNPCKLBW_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PUNPCKLWD_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
void host_x86_PUNPCKLDQ_XREG_XREG(codeblock_t *block, int dst_reg, int src_reg);
|
||||
|
||||
void host_x86_POP(codeblock_t *block, int src_reg);
|
||||
|
||||
void host_x86_PUSH(codeblock_t *block, int src_reg);
|
||||
|
|
|
|||
|
|
@ -1273,6 +1273,49 @@ static int codegen_OR_IMM(codeblock_t *block, uop_t *uop)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_PACKSSWB(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PACKSSWB_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PACKSSWB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PACKSSDW(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PACKSSDW_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PACKSSDW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PACKUSWB(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PACKUSWB_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PACKUSWB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_PADDB(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
|
|
@ -1683,6 +1726,91 @@ static int codegen_PSUBUSW(codeblock_t *block, uop_t *uop)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_PUNPCKHBW(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PUNPCKHBW_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKHBW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKHWD(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PUNPCKHWD_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKHWD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKHDQ(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PUNPCKHDQ_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKHDQ %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKLBW(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PUNPCKLBW_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKLBW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKLWD(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PUNPCKLWD_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKLWD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_PUNPCKLDQ(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg_b = HOST_REG_GET(uop->src_reg_b_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size_b = IREG_GET_SIZE(uop->src_reg_b_real);
|
||||
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_b) && uop->dest_reg_a_real == uop->src_reg_a_real)
|
||||
{
|
||||
host_x86_PUNPCKLDQ_XREG_XREG(block, dest_reg, src_reg_b);
|
||||
}
|
||||
else
|
||||
fatal("PUNPCKLDQ %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_SAR(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg = HOST_REG_GET(uop->src_reg_a_real), shift_reg = HOST_REG_GET(uop->src_reg_b_real);
|
||||
|
|
@ -2116,7 +2244,11 @@ const uOpFn uop_handlers[UOP_MAX] =
|
|||
[UOP_FMUL & UOP_MASK] = codegen_FMUL,
|
||||
[UOP_FSUB & UOP_MASK] = codegen_FSUB,
|
||||
[UOP_FCOM & UOP_MASK] = codegen_FCOM,
|
||||
|
||||
|
||||
[UOP_PACKSSWB & UOP_MASK] = codegen_PACKSSWB,
|
||||
[UOP_PACKSSDW & UOP_MASK] = codegen_PACKSSDW,
|
||||
[UOP_PACKUSWB & UOP_MASK] = codegen_PACKUSWB,
|
||||
|
||||
[UOP_PADDB & UOP_MASK] = codegen_PADDB,
|
||||
[UOP_PADDW & UOP_MASK] = codegen_PADDW,
|
||||
[UOP_PADDD & UOP_MASK] = codegen_PADDD,
|
||||
|
|
@ -2148,7 +2280,14 @@ const uOpFn uop_handlers[UOP_MAX] =
|
|||
[UOP_PSUBSB & UOP_MASK] = codegen_PSUBSB,
|
||||
[UOP_PSUBSW & UOP_MASK] = codegen_PSUBSW,
|
||||
[UOP_PSUBUSB & UOP_MASK] = codegen_PSUBUSB,
|
||||
[UOP_PSUBUSW & UOP_MASK] = codegen_PSUBUSW
|
||||
[UOP_PSUBUSW & UOP_MASK] = codegen_PSUBUSW,
|
||||
|
||||
[UOP_PUNPCKHBW & UOP_MASK] = codegen_PUNPCKHBW,
|
||||
[UOP_PUNPCKHWD & UOP_MASK] = codegen_PUNPCKHWD,
|
||||
[UOP_PUNPCKHDQ & UOP_MASK] = codegen_PUNPCKHDQ,
|
||||
[UOP_PUNPCKLBW & UOP_MASK] = codegen_PUNPCKLBW,
|
||||
[UOP_PUNPCKLWD & UOP_MASK] = codegen_PUNPCKLWD,
|
||||
[UOP_PUNPCKLDQ & UOP_MASK] = codegen_PUNPCKLDQ
|
||||
};
|
||||
|
||||
void codegen_direct_read_8(codeblock_t *block, int host_reg, void *p)
|
||||
|
|
|
|||
|
|
@ -242,8 +242,26 @@
|
|||
#define UOP_PCMPGTW (UOP_TYPE_PARAMS_REGS | 0xac)
|
||||
/*UOP_PCMPGTD - (packed signed long) dest_reg = (src_reg_a > src_reg_b) ? ~0 : 0*/
|
||||
#define UOP_PCMPGTD (UOP_TYPE_PARAMS_REGS | 0xad)
|
||||
/*UOP_PUNPCKLBW - (packed byte) dest_reg = interleave low src_reg_a/src_reg_b*/
|
||||
#define UOP_PUNPCKLBW (UOP_TYPE_PARAMS_REGS | 0xae)
|
||||
/*UOP_PUNPCKLWD - (packed word) dest_reg = interleave low src_reg_a/src_reg_b*/
|
||||
#define UOP_PUNPCKLWD (UOP_TYPE_PARAMS_REGS | 0xaf)
|
||||
/*UOP_PUNPCKLDQ - (packed long) dest_reg = interleave low src_reg_a/src_reg_b*/
|
||||
#define UOP_PUNPCKLDQ (UOP_TYPE_PARAMS_REGS | 0xb0)
|
||||
/*UOP_PUNPCKHBW - (packed byte) dest_reg = interleave high src_reg_a/src_reg_b*/
|
||||
#define UOP_PUNPCKHBW (UOP_TYPE_PARAMS_REGS | 0xb1)
|
||||
/*UOP_PUNPCKHWD - (packed word) dest_reg = interleave high src_reg_a/src_reg_b*/
|
||||
#define UOP_PUNPCKHWD (UOP_TYPE_PARAMS_REGS | 0xb2)
|
||||
/*UOP_PUNPCKHDQ - (packed long) dest_reg = interleave high src_reg_a/src_reg_b*/
|
||||
#define UOP_PUNPCKHDQ (UOP_TYPE_PARAMS_REGS | 0xb3)
|
||||
/*UOP_PACKSSWB - dest_reg = interleave src_reg_a/src_reg_b, converting words to bytes with signed saturation*/
|
||||
#define UOP_PACKSSWB (UOP_TYPE_PARAMS_REGS | 0xb4)
|
||||
/*UOP_PACKSSDW - dest_reg = interleave src_reg_a/src_reg_b, converting longs to words with signed saturation*/
|
||||
#define UOP_PACKSSDW (UOP_TYPE_PARAMS_REGS | 0xb5)
|
||||
/*UOP_PACKUSWB - dest_reg = interleave src_reg_a/src_reg_b, converting words to bytes with unsigned saturation*/
|
||||
#define UOP_PACKUSWB (UOP_TYPE_PARAMS_REGS | 0xb6)
|
||||
|
||||
#define UOP_MAX 0xb0
|
||||
#define UOP_MAX 0xb7
|
||||
|
||||
#define UOP_MASK 0xffff
|
||||
|
||||
|
|
@ -583,6 +601,10 @@ static inline void uop_gen_reg_src_pointer_imm(uint32_t uop_type, ir_data_t *ir,
|
|||
#define uop_MOV_INT_DOUBLE(ir, dst_reg, src_reg/*, nrc, orc*/) uop_gen_reg_dst_src1(UOP_MOV_INT_DOUBLE, ir, dst_reg, src_reg/*, nrc, orc*/)
|
||||
#define uop_MOV_INT_DOUBLE_64(ir, dst_reg, src_reg_d, src_reg_q, tag) uop_gen_reg_dst_src3(UOP_MOV_INT_DOUBLE_64, ir, dst_reg, src_reg_d, src_reg_q, tag)
|
||||
|
||||
#define uop_PACKSSWB(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PACKSSWB, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
#define uop_PACKSSDW(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PACKSSDW, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
#define uop_PACKUSWB(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PACKUSWB, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
|
||||
#define uop_PADDB(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PADDB, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
#define uop_PADDW(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PADDW, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
#define uop_PADDD(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PADDD, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
|
|
@ -616,6 +638,13 @@ static inline void uop_gen_reg_src_pointer_imm(uint32_t uop_type, ir_data_t *ir,
|
|||
#define uop_PSUBUSB(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PSUBUSB, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
#define uop_PSUBUSW(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PSUBUSW, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
|
||||
#define uop_PUNPCKHBW(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PUNPCKHBW, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
#define uop_PUNPCKHWD(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PUNPCKHWD, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
#define uop_PUNPCKHDQ(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PUNPCKHDQ, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
#define uop_PUNPCKLBW(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PUNPCKLBW, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
#define uop_PUNPCKLWD(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PUNPCKLWD, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
#define uop_PUNPCKLDQ(ir, dst_reg, src_reg_a, src_reg_b) uop_gen_reg_dst_src2(UOP_PUNPCKLDQ, ir, dst_reg, src_reg_a, src_reg_b)
|
||||
|
||||
#define uop_STORE_PTR_IMM(ir, p, imm) uop_gen_pointer_imm(UOP_STORE_P_IMM, ir, p, imm)
|
||||
#define uop_STORE_PTR_IMM_8(ir, p, imm) uop_gen_pointer_imm(UOP_STORE_P_IMM_8, ir, p, imm)
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
#include "codegen_ops_mmx_cmp.h"
|
||||
#include "codegen_ops_mmx_loadstore.h"
|
||||
#include "codegen_ops_mmx_logic.h"
|
||||
#include "codegen_ops_mmx_pack.h"
|
||||
#include "codegen_ops_mmx_shift.h"
|
||||
#include "codegen_ops_mov.h"
|
||||
#include "codegen_ops_shift.h"
|
||||
|
|
@ -79,7 +80,7 @@ RecompOpFn recomp_opcodes_0f[512] =
|
|||
|
||||
/*40*/ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
/*50*/ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
/*60*/ NULL, NULL, NULL, NULL, ropPCMPGTB, ropPCMPGTW, ropPCMPGTD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ropMOVD_r_d, ropMOVQ_r_q,
|
||||
/*60*/ ropPUNPCKLBW, ropPUNPCKLWD, ropPUNPCKLDQ, ropPACKSSWB, ropPCMPGTB, ropPCMPGTW, ropPCMPGTD, ropPACKUSWB, ropPUNPCKHBW, ropPUNPCKHWD, ropPUNPCKHDQ, ropPACKSSDW, NULL, NULL, ropMOVD_r_d, ropMOVQ_r_q,
|
||||
/*70*/ NULL, ropPSxxW_imm, ropPSxxD_imm, ropPSxxQ_imm, ropPCMPEQB, ropPCMPEQW, ropPCMPEQD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ropMOVD_d_r, ropMOVQ_q_r,
|
||||
|
||||
/*80*/ ropJO_16, ropJNO_16, ropJB_16, ropJNB_16, ropJE_16, ropJNE_16, ropJBE_16, ropJNBE_16, ropJS_16, ropJNS_16, ropJP_16, ropJNP_16, ropJL_16, ropJNL_16, ropJLE_16, ropJNLE_16,
|
||||
|
|
@ -101,7 +102,7 @@ RecompOpFn recomp_opcodes_0f[512] =
|
|||
|
||||
/*40*/ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
/*50*/ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
/*60*/ NULL, NULL, NULL, NULL, ropPCMPGTB, ropPCMPGTW, ropPCMPGTD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ropMOVD_r_d, ropMOVQ_r_q,
|
||||
/*60*/ ropPUNPCKLBW, ropPUNPCKLWD, ropPUNPCKLDQ, ropPACKSSWB, ropPCMPGTB, ropPCMPGTW, ropPCMPGTD, ropPACKUSWB, ropPUNPCKHBW, ropPUNPCKHWD, ropPUNPCKHDQ, ropPACKSSDW, NULL, NULL, ropMOVD_r_d, ropMOVQ_r_q,
|
||||
/*70*/ NULL, ropPSxxW_imm, ropPSxxD_imm, ropPSxxQ_imm, ropPCMPEQB, ropPCMPEQW, ropPCMPEQD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ropMOVD_d_r, ropMOVQ_q_r,
|
||||
|
||||
/*80*/ ropJO_32, ropJNO_32, ropJB_32, ropJNB_32, ropJE_32, ropJNE_32, ropJBE_32, ropJNBE_32, ropJS_32, ropJNS_32, ropJP_32, ropJNP_32, ropJL_32, ropJNL_32, ropJLE_32, ropJNLE_32,
|
||||
|
|
|
|||
46
src/codegen_ops_mmx_pack.c
Normal file
46
src/codegen_ops_mmx_pack.c
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
#include "ibm.h"
|
||||
|
||||
#include "x86.h"
|
||||
#include "x86_flags.h"
|
||||
#include "386_common.h"
|
||||
#include "codegen.h"
|
||||
#include "codegen_accumulate.h"
|
||||
#include "codegen_ir.h"
|
||||
#include "codegen_ops.h"
|
||||
#include "codegen_ops_mmx_pack.h"
|
||||
#include "codegen_ops_helpers.h"
|
||||
|
||||
#define ropPpack(func) \
|
||||
uint32_t rop ## func(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
|
||||
{ \
|
||||
int dest_reg = (fetchdat >> 3) & 7; \
|
||||
\
|
||||
uop_MMX_ENTER(ir); \
|
||||
if ((fetchdat & 0xc0) == 0xc0) \
|
||||
{ \
|
||||
int src_reg = fetchdat & 7; \
|
||||
uop_ ## func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_MM(src_reg)); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
x86seg *target_seg; \
|
||||
\
|
||||
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
|
||||
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
|
||||
codegen_check_seg_read(block, ir, target_seg); \
|
||||
uop_MEM_LOAD_REG(ir, IREG_temp0_Q, ireg_seg_base(target_seg), IREG_eaaddr); \
|
||||
uop_ ## func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_temp0_Q); \
|
||||
} \
|
||||
\
|
||||
return op_pc + 1; \
|
||||
}
|
||||
|
||||
ropPpack(PACKSSWB)
|
||||
ropPpack(PACKSSDW)
|
||||
ropPpack(PACKUSWB)
|
||||
ropPpack(PUNPCKLBW)
|
||||
ropPpack(PUNPCKLWD)
|
||||
ropPpack(PUNPCKLDQ)
|
||||
ropPpack(PUNPCKHBW)
|
||||
ropPpack(PUNPCKHWD)
|
||||
ropPpack(PUNPCKHDQ)
|
||||
9
src/codegen_ops_mmx_pack.h
Normal file
9
src/codegen_ops_mmx_pack.h
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uint32_t ropPACKSSWB(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc);
|
||||
uint32_t ropPACKSSDW(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc);
|
||||
uint32_t ropPACKUSWB(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc);
|
||||
uint32_t ropPUNPCKLBW(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc);
|
||||
uint32_t ropPUNPCKLWD(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc);
|
||||
uint32_t ropPUNPCKLDQ(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc);
|
||||
uint32_t ropPUNPCKHBW(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc);
|
||||
uint32_t ropPUNPCKHWD(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc);
|
||||
uint32_t ropPUNPCKHDQ(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc);
|
||||
Loading…
Reference in a new issue