Skip to content

Commit

Permalink
i5483: Fixed bcast opnd type and added more tests
Browse files Browse the repository at this point in the history
Issue: #5483
  • Loading branch information
prasun3 committed May 12, 2022
1 parent eaa40f1 commit 8ff11e3
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 15 deletions.
15 changes: 7 additions & 8 deletions core/ir/x86/decode_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -1800,7 +1800,6 @@ const instr_info_t * const op_instr[] =
#define Wq_f TYPE_W, OPSZ_8_of_32_evex64
#define Ve TYPE_V, OPSZ_16_vex32_evex64
#define Vh_e TYPE_V, OPSZ_half_16_vex32_evex64
#define Vh_x TYPE_V, OPSZ_half_16_vex32
#define We TYPE_W, OPSZ_16_vex32_evex64
#define Wh_e TYPE_W, OPSZ_half_16_vex32_evex64
#define Wi_e TYPE_W, OPSZ_quarter_16_vex32_evex64
Expand Down Expand Up @@ -9327,37 +9326,37 @@ const instr_info_t evex_Wb_extensions[][4] = {
{OP_vsqrtsd, 0xf20f5150, "vsqrtsd", Vdq, xx, KE1b, Hdq, Usd, mrm|evex|er|ttt1s, x, END_LIST},
}, { /* evex_W_ext 267 */
{OP_vpdpbusd, 0x66385008, "vpdpbusd", Ve, xx, KEd, He, We, mrm|evex|ttfv, x, tevexwb[267][1]},
{OP_vpdpbusd, 0x66385018, "vpdpbusd", Ve, xx, KEd, He, TYPE_W, OPSZ_4, mrm|evex|ttfv, x, END_LIST},
{OP_vpdpbusd, 0x66385018, "vpdpbusd", Ve, xx, KEd, He, Md, mrm|evex|ttfv, x, END_LIST},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
}, { /* evex_W_ext 268 */
{OP_vpdpbusds, 0x66385108, "vpdpbusds", Ve, xx, KEd, He, We, mrm|evex|ttfv, x, tevexwb[268][1]},
{OP_vpdpbusds, 0x66385118, "vpdpbusds", Ve, xx, KEd, He, TYPE_W, OPSZ_4, mrm|evex|ttfv, x, END_LIST},
{OP_vpdpbusds, 0x66385118, "vpdpbusds", Ve, xx, KEd, He, Md, mrm|evex|ttfv, x, END_LIST},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
}, { /* evex_W_ext 269 */
{OP_vpdpwssd, 0x66385208, "vpdpwssd", Ve, xx, KEd, He, We, mrm|evex|ttfv, x, tevexwb[269][1]},
{OP_vpdpwssd, 0x66385218, "vpdpwssd", Ve, xx, KEd, He, TYPE_W, OPSZ_4, mrm|evex|ttfv, x, END_LIST},
{OP_vpdpwssd, 0x66385218, "vpdpwssd", Ve, xx, KEd, He, Md, mrm|evex|ttfv, x, END_LIST},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
}, { /* evex_W_ext 270 */
{OP_vpdpwssds, 0x66385308, "vpdpwssds", Ve, xx, KEd, He, We, mrm|evex|ttfv, x, tevexwb[270][1]},
{OP_vpdpwssds, 0x66385318, "vpdpwssds", Ve, xx, KEd, He, TYPE_W, OPSZ_4, mrm|evex|ttfv, x, END_LIST},
{OP_vpdpwssds, 0x66385318, "vpdpwssds", Ve, xx, KEd, He, Md, mrm|evex|ttfv, x, END_LIST},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
},{ /* evex_W_ext 271 */
{OP_vcvtne2ps2bf16, 0xf2387208, "vcvtne2ps2bf16", Ve, xx, KEd, He, We, mrm|evex|ttfv, x, tevexwb[271][1]},
{OP_vcvtne2ps2bf16, 0xf2387218, "vcvtne2ps2bf16", Ve, xx, KEd, He, TYPE_W, OPSZ_4, mrm|evex|ttfv, x, END_LIST},
{OP_vcvtne2ps2bf16, 0xf2387218, "vcvtne2ps2bf16", Ve, xx, KEd, He, Md, mrm|evex|ttfv, x, END_LIST},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
},{ /* evex_W_ext 272 */
{OP_vcvtneps2bf16, 0xf3387208, "vcvtneps2bf16", Vh_e, xx, KEd, We, xx, mrm|evex|ttfv, x, tevexwb[272][1]},
{OP_vcvtneps2bf16, 0xf3387218, "vcvtneps2bf16", Vh_e, xx, KEd, TYPE_W, OPSZ_4, xx, mrm|evex|ttfv, x, END_LIST},
{OP_vcvtneps2bf16, 0xf3387218, "vcvtneps2bf16", Vh_e, xx, KEd, Md, xx, mrm|evex|ttfv, x, END_LIST},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
},{ /* evex_W_ext 273 */
{OP_vdpbf16ps, 0xf3385208, "vdpbf16ps", Ve, xx, KEd, He, We, mrm|evex|ttfv, x, tevexwb[273][1]},
{OP_vdpbf16ps, 0xf3385218, "vdpbf16ps", Ve, xx, KEd, He, TYPE_W, OPSZ_4, mrm|evex|ttfv, x, END_LIST},
{OP_vdpbf16ps, 0xf3385218, "vdpbf16ps", Ve, xx, KEd, He, Md, mrm|evex|ttfv, x, END_LIST},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
{INVALID, 0, "(bad)", xx, xx, xx, xx, xx, no, x, NA},
},
Expand Down
20 changes: 18 additions & 2 deletions suite/tests/api/ir_x86_3args_avx512_evex_mask.h
Original file line number Diff line number Diff line change
Expand Up @@ -3313,8 +3313,24 @@ OPCODE(vsqrtpd_zhik7bcst, vsqrtpd, vsqrtpd_mask, X64_ONLY, REGARG(ZMM16), REGARG
MEMARG(OPSZ_8))
/* AVX512 BF16 */
#if 0
OPCODE(vcvtneps2bf16_xhik7xhi, vcvtneps2bf16, vcvtneps2bf16_mask, X64_ONLY, REGARG(XMM6),
OPCODE(vcvtneps2bf16_xlok7xlo, vcvtneps2bf16, vcvtneps2bf16_mask, X64_ONLY, REGARG(XMM6),
REGARG(K7), REGARG(XMM0))
OPCODE(vcvtneps2bf16_xhik7mem, vcvtneps2bf16, vcvtneps2bf16_mask, X64_ONLY, REGARG(XMM16),
REGARG(K7), MEMARG(OPSZ_16))
OPCODE(vcvtneps2bf16_xhik7bcst, vcvtneps2bf16, vcvtneps2bf16_mask, X64_ONLY,
REGARG(XMM16), REGARG(K7), MEMARG(OPSZ_4))

OPCODE(vcvtneps2bf16_ylok7ylo, vcvtneps2bf16, vcvtneps2bf16_mask, X64_ONLY, REGARG(XMM6),
REGARG(K7), REGARG(XMM0))
OPCODE(vcvtneps2bf16_yhik7mem, vcvtneps2bf16, vcvtneps2bf16_mask, X64_ONLY, REGARG(XMM16),
REGARG(K7), MEMARG(OPSZ_32))
OPCODE(vcvtneps2bf16_yhik7bcst, vcvtneps2bf16, vcvtneps2bf16_mask, X64_ONLY,
REGARG(XMM16), REGARG(K7), MEMARG(OPSZ_4))

OPCODE(vcvtneps2bf16_zlok7zlo, vcvtneps2bf16, vcvtneps2bf16_mask, X64_ONLY, REGARG(ZMM6),
REGARG(K7), REGARG(ZMM0))
OPCODE(vcvtneps2bf16_zhik7mem, vcvtneps2bf16, vcvtneps2bf16_mask, X64_ONLY, REGARG(ZMM16),
REGARG(K7), MEMARG(OPSZ_64))
OPCODE(vcvtneps2bf16_zhik7bcst, vcvtneps2bf16, vcvtneps2bf16_mask, X64_ONLY,
REGARG(XMM16), REGARG(K7), MEMARG(OPSZ_16))
REGARG(ZMM16), REGARG(K7), MEMARG(OPSZ_4))
#endif
134 changes: 129 additions & 5 deletions suite/tests/api/ir_x86_4args_avx512_evex_mask_C.h
Original file line number Diff line number Diff line change
Expand Up @@ -1976,12 +1976,136 @@ OPCODE(vpdpwssd_xhixhixhi, vpdpwssd, vpdpwssd_mask, X64_ONLY, REGARG(XMM0), REGA
REGARG(XMM4), REGARG(XMM3))
OPCODE(vpdpwssds_xhixhixhi, vpdpwssds, vpdpwssds_mask, X64_ONLY, REGARG(XMM0), REGARG(K5),
REGARG(XMM4), REGARG(XMM3))

/* vpdpbusd ZMM */
OPCODE(vpdpbusd_zlok3zhizhi, vpdpbusd, vpdpbusd_mask, X64_ONLY, REGARG(ZMM0), REGARG(K3),
REGARG(ZMM24), REGARG(ZMM31))
OPCODE(vpdpbusd_zlok3zhild, vpdpbusd, vpdpbusd_mask, X64_ONLY, REGARG(ZMM0), REGARG(K3),
REGARG(ZMM24), MEMARG(OPSZ_64))
OPCODE(vpdpbusd_zlok3zhibcst, vpdpbusd, vpdpbusd_mask, X64_ONLY, REGARG(ZMM0), REGARG(K3),
REGARG(ZMM24), MEMARG(OPSZ_4))
/* vpdpbusd YMM */
OPCODE(vpdpbusd_ylok3yhiyhi, vpdpbusd, vpdpbusd_mask, X64_ONLY, REGARG(YMM0), REGARG(K3),
REGARG(YMM24), REGARG(YMM31))
OPCODE(vpdpbusd_ylok3yhild, vpdpbusd, vpdpbusd_mask, X64_ONLY, REGARG(YMM0), REGARG(K3),
REGARG(YMM24), MEMARG(OPSZ_32))
OPCODE(vpdpbusd_ylok3yhibcst, vpdpbusd, vpdpbusd_mask, X64_ONLY, REGARG(YMM0), REGARG(K3),
REGARG(YMM24), MEMARG(OPSZ_4))
/* vpdpbusd XMM */
OPCODE(vpdpbusd_xlok3xhixhi, vpdpbusd, vpdpbusd_mask, X64_ONLY, REGARG(XMM0), REGARG(K3),
REGARG(XMM24), REGARG(XMM31))
OPCODE(vpdpbusd_xlok3xhild, vpdpbusd, vpdpbusd_mask, X64_ONLY, REGARG(XMM0), REGARG(K3),
REGARG(XMM24), MEMARG(OPSZ_16))
OPCODE(vpdpbusd_xlok3xhibcst, vpdpbusd, vpdpbusd_mask, X64_ONLY, REGARG(XMM0), REGARG(K3),
REGARG(XMM24), MEMARG(OPSZ_4))

/* vpdpbusds ZMM */
OPCODE(vpdpbusds_zlok3zhizhi, vpdpbusds, vpdpbusds_mask, X64_ONLY, REGARG(ZMM0),
REGARG(K3), REGARG(ZMM24), REGARG(ZMM31))
OPCODE(vpdpbusds_zlok3zhild, vpdpbusds, vpdpbusds_mask, X64_ONLY, REGARG(ZMM0),
REGARG(K3), REGARG(ZMM24), MEMARG(OPSZ_64))
OPCODE(vpdpbusds_zlok3zhibcst, vpdpbusds, vpdpbusds_mask, X64_ONLY, REGARG(ZMM0),
REGARG(K3), REGARG(ZMM24), MEMARG(OPSZ_4))
/* vpdpbusds YMM */
OPCODE(vpdpbusds_ylok3yhiyhi, vpdpbusds, vpdpbusds_mask, X64_ONLY, REGARG(YMM0),
REGARG(K3), REGARG(YMM24), REGARG(YMM31))
OPCODE(vpdpbusds_ylok3yhild, vpdpbusds, vpdpbusds_mask, X64_ONLY, REGARG(YMM0),
REGARG(K3), REGARG(YMM24), MEMARG(OPSZ_32))
OPCODE(vpdpbusds_ylok3yhibcst, vpdpbusds, vpdpbusds_mask, X64_ONLY, REGARG(YMM0),
REGARG(K3), REGARG(YMM24), MEMARG(OPSZ_4))
/* vpdpbusds XMM */
OPCODE(vpdpbusds_xlok3xhixhi, vpdpbusds, vpdpbusds_mask, X64_ONLY, REGARG(XMM0),
REGARG(K3), REGARG(XMM24), REGARG(XMM31))
OPCODE(vpdpbusds_xlok3xhild, vpdpbusds, vpdpbusds_mask, X64_ONLY, REGARG(XMM0),
REGARG(K3), REGARG(XMM24), MEMARG(OPSZ_16))
OPCODE(vpdpbusds_xlok3xhibcst, vpdpbusds, vpdpbusds_mask, X64_ONLY, REGARG(XMM0),
REGARG(K3), REGARG(XMM24), MEMARG(OPSZ_4))

/* vpdpwssd ZMM */
OPCODE(vpdpwssd_zlok3zhizhi, vpdpwssd, vpdpwssd_mask, X64_ONLY, REGARG(ZMM0), REGARG(K3),
REGARG(ZMM24), REGARG(ZMM31))
OPCODE(vpdpwssd_zlok3zhild, vpdpwssd, vpdpwssd_mask, X64_ONLY, REGARG(ZMM0), REGARG(K3),
REGARG(ZMM24), MEMARG(OPSZ_64))
OPCODE(vpdpwssd_zlok3zhibcst, vpdpwssd, vpdpwssd_mask, X64_ONLY, REGARG(ZMM0), REGARG(K3),
REGARG(ZMM24), MEMARG(OPSZ_4))
/* vpdpwssd YMM */
OPCODE(vpdpwssd_ylok3yhiyhi, vpdpwssd, vpdpwssd_mask, X64_ONLY, REGARG(YMM0), REGARG(K3),
REGARG(YMM24), REGARG(YMM31))
OPCODE(vpdpwssd_ylok3yhild, vpdpwssd, vpdpwssd_mask, X64_ONLY, REGARG(YMM0), REGARG(K3),
REGARG(YMM24), MEMARG(OPSZ_32))
OPCODE(vpdpwssd_ylok3yhibcst, vpdpwssd, vpdpwssd_mask, X64_ONLY, REGARG(YMM0), REGARG(K3),
REGARG(YMM24), MEMARG(OPSZ_4))
/* vpdpwssd XMM */
OPCODE(vpdpwssd_xlok3xhixhi, vpdpwssd, vpdpwssd_mask, X64_ONLY, REGARG(XMM0), REGARG(K3),
REGARG(XMM24), REGARG(XMM31))
OPCODE(vpdpwssd_xlok3xhild, vpdpwssd, vpdpwssd_mask, X64_ONLY, REGARG(XMM0), REGARG(K3),
REGARG(XMM24), MEMARG(OPSZ_16))
OPCODE(vpdpwssd_xlok3xhibcst, vpdpwssd, vpdpwssd_mask, X64_ONLY, REGARG(XMM0), REGARG(K3),
REGARG(XMM24), MEMARG(OPSZ_4))

/* vpdpwssds ZMM */
OPCODE(vpdpwssds_zlok3zhizhi, vpdpwssds, vpdpwssds_mask, X64_ONLY, REGARG(ZMM0),
REGARG(K3), REGARG(ZMM24), REGARG(ZMM31))
OPCODE(vpdpwssds_zlok3zhild, vpdpwssds, vpdpwssds_mask, X64_ONLY, REGARG(ZMM0),
REGARG(K3), REGARG(ZMM24), MEMARG(OPSZ_64))
OPCODE(vpdpwssds_zlok3zhibcst, vpdpwssds, vpdpwssds_mask, X64_ONLY, REGARG(ZMM0),
REGARG(K3), REGARG(ZMM24), MEMARG(OPSZ_4))
/* vpdpwssds YMM */
OPCODE(vpdpwssds_ylok3yhiyhi, vpdpwssds, vpdpwssds_mask, X64_ONLY, REGARG(YMM0),
REGARG(K3), REGARG(YMM24), REGARG(YMM31))
OPCODE(vpdpwssds_ylok3yhild, vpdpwssds, vpdpwssds_mask, X64_ONLY, REGARG(YMM0),
REGARG(K3), REGARG(YMM24), MEMARG(OPSZ_32))
OPCODE(vpdpwssds_ylok3yhibcst, vpdpwssds, vpdpwssds_mask, X64_ONLY, REGARG(YMM0),
REGARG(K3), REGARG(YMM24), MEMARG(OPSZ_4))
/* vpdpwssds XMM */
OPCODE(vpdpwssds_xlok3xhixhi, vpdpwssds, vpdpwssds_mask, X64_ONLY, REGARG(XMM0),
REGARG(K3), REGARG(XMM24), REGARG(XMM31))
OPCODE(vpdpwssds_xlok3xhild, vpdpwssds, vpdpwssds_mask, X64_ONLY, REGARG(XMM0),
REGARG(K3), REGARG(XMM24), MEMARG(OPSZ_16))
OPCODE(vpdpwssds_xlok3xhibcst, vpdpwssds, vpdpwssds_mask, X64_ONLY, REGARG(XMM0),
REGARG(K3), REGARG(XMM24), MEMARG(OPSZ_4))

/* AVX512 BF16 */
OPCODE(vcvtne2ps2bf16_zhik7zhizhi, vcvtne2ps2bf16, vcvtne2ps2bf16_mask, X64_ONLY,
/* vcvtne2ps2bf16 ZMM */
OPCODE(vcvtne2ps2bf16_zlok3zhizhi, vcvtne2ps2bf16, vcvtne2ps2bf16_mask, X64_ONLY,
REGARG(ZMM0), REGARG(K3), REGARG(ZMM24), REGARG(ZMM31))
OPCODE(vdpbf16ps_zhik7zhizhi, vdpbf16ps, vdpbf16ps_mask, X64_ONLY, REGARG(ZMM0),
REGARG(K3), REGARG(ZMM24), REGARG(ZMM31))
OPCODE(vcvtne2ps2bf16_zhik7zhild, vcvtne2ps2bf16, vcvtne2ps2bf16_mask, X64_ONLY,
OPCODE(vcvtne2ps2bf16_zlok3zhild, vcvtne2ps2bf16, vcvtne2ps2bf16_mask, X64_ONLY,
REGARG(ZMM0), REGARG(K3), REGARG(ZMM24), MEMARG(OPSZ_64))
OPCODE(vdpbf16ps_zhik7zhild, vdpbf16ps, vdpbf16ps_mask, X64_ONLY, REGARG(ZMM0),
OPCODE(vcvtne2ps2bf16_zlok3zhibcst, vcvtne2ps2bf16, vcvtne2ps2bf16_mask, X64_ONLY,
REGARG(ZMM0), REGARG(K3), REGARG(ZMM24), MEMARG(OPSZ_4))
/* vcvtne2ps2bf16 YMM */
OPCODE(vcvtne2ps2bf16_ylok3yhiyhi, vcvtne2ps2bf16, vcvtne2ps2bf16_mask, X64_ONLY,
REGARG(YMM0), REGARG(K3), REGARG(YMM24), REGARG(YMM31))
OPCODE(vcvtne2ps2bf16_ylok3yhild, vcvtne2ps2bf16, vcvtne2ps2bf16_mask, X64_ONLY,
REGARG(YMM0), REGARG(K3), REGARG(YMM24), MEMARG(OPSZ_32))
OPCODE(vcvtne2ps2bf16_ylok3yhibcst, vcvtne2ps2bf16, vcvtne2ps2bf16_mask, X64_ONLY,
REGARG(YMM0), REGARG(K3), REGARG(YMM24), MEMARG(OPSZ_4))
/* vcvtne2ps2bf16 XMM */
OPCODE(vcvtne2ps2bf16_xlok3xhixhi, vcvtne2ps2bf16, vcvtne2ps2bf16_mask, X64_ONLY,
REGARG(XMM0), REGARG(K3), REGARG(XMM24), REGARG(XMM31))
OPCODE(vcvtne2ps2bf16_xlok3xhild, vcvtne2ps2bf16, vcvtne2ps2bf16_mask, X64_ONLY,
REGARG(XMM0), REGARG(K3), REGARG(XMM24), MEMARG(OPSZ_16))
OPCODE(vcvtne2ps2bf16_xlok3xhibcst, vcvtne2ps2bf16, vcvtne2ps2bf16_mask, X64_ONLY,
REGARG(XMM0), REGARG(K3), REGARG(XMM24), MEMARG(OPSZ_4))

/* vdpbf16ps ZMM */
OPCODE(vdpbf16ps_zlok3zhizhi, vdpbf16ps, vdpbf16ps_mask, X64_ONLY, REGARG(ZMM0),
REGARG(K3), REGARG(ZMM24), REGARG(ZMM31))
OPCODE(vdpbf16ps_zlok3zhild, vdpbf16ps, vdpbf16ps_mask, X64_ONLY, REGARG(ZMM0),
REGARG(K3), REGARG(ZMM24), MEMARG(OPSZ_64))
OPCODE(vdpbf16ps_zlok3zhibcst, vdpbf16ps, vdpbf16ps_mask, X64_ONLY, REGARG(ZMM0),
REGARG(K3), REGARG(ZMM24), MEMARG(OPSZ_4))
/* vdpbf16ps YMM */
OPCODE(vdpbf16ps_ylok3yhiyhi, vdpbf16ps, vdpbf16ps_mask, X64_ONLY, REGARG(YMM0),
REGARG(K3), REGARG(YMM24), REGARG(YMM31))
OPCODE(vdpbf16ps_ylok3yhild, vdpbf16ps, vdpbf16ps_mask, X64_ONLY, REGARG(YMM0),
REGARG(K3), REGARG(YMM24), MEMARG(OPSZ_32))
OPCODE(vdpbf16ps_ylok3yhibcst, vdpbf16ps, vdpbf16ps_mask, X64_ONLY, REGARG(YMM0),
REGARG(K3), REGARG(YMM24), MEMARG(OPSZ_4))
/* vdpbf16ps XMM */
OPCODE(vdpbf16ps_xlok3xhixhi, vdpbf16ps, vdpbf16ps_mask, X64_ONLY, REGARG(XMM0),
REGARG(K3), REGARG(XMM24), REGARG(XMM31))
OPCODE(vdpbf16ps_xlok3xhild, vdpbf16ps, vdpbf16ps_mask, X64_ONLY, REGARG(XMM0),
REGARG(K3), REGARG(XMM24), MEMARG(OPSZ_16))
OPCODE(vdpbf16ps_xlok3xhibcst, vdpbf16ps, vdpbf16ps_mask, X64_ONLY, REGARG(XMM0),
REGARG(K3), REGARG(XMM24), MEMARG(OPSZ_4))

0 comments on commit 8ff11e3

Please sign in to comment.