mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
tcg/i386: Implement avx512 multiply
AVX512DQ has VPMULLQ. Tested-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
dac1648fd8
commit
4c8b968683
@ -361,6 +361,7 @@ static bool tcg_target_const_match(int64_t val, TCGType type, int ct)
|
||||
#define OPC_PMOVZXDQ (0x35 | P_EXT38 | P_DATA16)
|
||||
#define OPC_PMULLW (0xd5 | P_EXT | P_DATA16)
|
||||
#define OPC_PMULLD (0x40 | P_EXT38 | P_DATA16)
|
||||
#define OPC_VPMULLQ (0x40 | P_EXT38 | P_DATA16 | P_VEXW | P_EVEX)
|
||||
#define OPC_POR (0xeb | P_EXT | P_DATA16)
|
||||
#define OPC_PSHUFB (0x00 | P_EXT38 | P_DATA16)
|
||||
#define OPC_PSHUFD (0x70 | P_EXT | P_DATA16)
|
||||
@ -2822,7 +2823,7 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,
|
||||
OPC_PSUBUB, OPC_PSUBUW, OPC_UD2, OPC_UD2
|
||||
};
|
||||
static int const mul_insn[4] = {
|
||||
OPC_UD2, OPC_PMULLW, OPC_PMULLD, OPC_UD2
|
||||
OPC_UD2, OPC_PMULLW, OPC_PMULLD, OPC_VPMULLQ
|
||||
};
|
||||
static int const shift_imm_insn[4] = {
|
||||
OPC_UD2, OPC_PSHIFTW_Ib, OPC_PSHIFTD_Ib, OPC_PSHIFTQ_Ib
|
||||
@ -3456,12 +3457,11 @@ int tcg_can_emit_vec_op(TCGOpcode opc, TCGType type, unsigned vece)
|
||||
return 0;
|
||||
|
||||
case INDEX_op_mul_vec:
|
||||
if (vece == MO_8) {
|
||||
/* We can expand the operation for MO_8. */
|
||||
switch (vece) {
|
||||
case MO_8:
|
||||
return -1;
|
||||
}
|
||||
if (vece == MO_64) {
|
||||
return 0;
|
||||
case MO_64:
|
||||
return have_avx512dq;
|
||||
}
|
||||
return 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user