Lines Matching refs:inst
1254 } inst[] = {
1290 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
1292 inst[i].src_type == BRW_REGISTER_TYPE_DF)
1296 (inst[i].src_type == BRW_REGISTER_TYPE_Q ||
1297 inst[i].src_type == BRW_REGISTER_TYPE_UQ))
1300 brw_MOV(p, retype(g0, inst[i].dst_type), retype(g0, inst[i].src_type));
1301 brw_inst_set_dst_hstride(&devinfo, last_inst, inst[i].dst_stride);
1302 EXPECT_EQ(inst[i].expected_result, validate(p));
1317 } inst[] = {
1392 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
1394 (inst[i].dst_type == BRW_REGISTER_TYPE_DF ||
1395 inst[i].src_type == BRW_REGISTER_TYPE_DF))
1399 (inst[i].dst_type == BRW_REGISTER_TYPE_Q ||
1400 inst[i].dst_type == BRW_REGISTER_TYPE_UQ ||
1401 inst[i].src_type == BRW_REGISTER_TYPE_Q ||
1402 inst[i].src_type == BRW_REGISTER_TYPE_UQ))
1405 brw_MOV(p, retype(g0, inst[i].dst_type), retype(g0, inst[i].src_type));
1409 brw_inst_set_dst_hstride(&devinfo, last_inst, inst[i].dst_stride);
1410 brw_inst_set_dst_da1_subreg_nr(&devinfo, last_inst, inst[i].dst_subnr);
1412 if (inst[i].src_type == BRW_REGISTER_TYPE_B) {
1423 EXPECT_EQ(inst[i].expected_result_chv_gfx9, validate(p));
1425 EXPECT_EQ(inst[i].expected_result_bdw, validate(p));
1441 } inst[] = {
1479 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
1480 brw_ADD(p, retype(g0, inst[i].dst_type),
1481 retype(g0, inst[i].src0_type),
1482 retype(g0, inst[i].src1_type));
1484 brw_inst_set_dst_address_mode(&devinfo, last_inst, inst[i].dst_indirect);
1485 brw_inst_set_dst_hstride(&devinfo, last_inst, inst[i].dst_stride);
1486 brw_inst_set_src0_address_mode(&devinfo, last_inst, inst[i].src0_indirect);
1488 EXPECT_EQ(inst[i].expected_result, validate(p));
1503 } inst[] = {
1533 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
1534 brw_ADD(p, retype(g0, inst[i].dst_type),
1535 retype(g0, inst[i].src0_type),
1536 retype(g0, inst[i].src1_type));
1538 brw_inst_set_exec_size(&devinfo, last_inst, inst[i].exec_size);
1540 brw_inst_set_dst_hstride(&devinfo, last_inst, inst[i].dst_stride);
1542 EXPECT_EQ(inst[i].expected_result, validate(p));
1559 } inst[] = {
1600 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
1601 brw_ADD(p, retype(g0, inst[i].dst_type),
1602 retype(inst[i].read_acc ? acc0 : g0, inst[i].src0_type),
1603 retype(g0, inst[i].src1_type));
1605 brw_inst_set_dst_hstride(&devinfo, last_inst, inst[i].dst_stride);
1607 brw_inst_set_src0_da1_subreg_nr(&devinfo, last_inst, inst[i].subnr);
1610 EXPECT_EQ(inst[i].expected_result_chv_skl, validate(p));
1612 EXPECT_EQ(inst[i].expected_result_bdw, validate(p));
1630 } inst[] = {
1676 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
1677 if (inst[i].opcode == BRW_OPCODE_MAC) {
1678 brw_MAC(p, retype(g0, inst[i].dst_type),
1679 retype(g0, inst[i].src0_type),
1680 retype(g0, inst[i].src1_type));
1682 assert(inst[i].opcode == BRW_OPCODE_ADD);
1683 brw_ADD(p, retype(g0, inst[i].dst_type),
1684 retype(inst[i].read_acc ? acc0: g0, inst[i].src0_type),
1685 retype(g0, inst[i].src1_type));
1688 brw_inst_set_exec_size(&devinfo, last_inst, inst[i].exec_size);
1690 brw_inst_set_dst_hstride(&devinfo, last_inst, inst[i].dst_stride);
1693 EXPECT_EQ(inst[i].expected_result_chv_skl, validate(p));
1695 EXPECT_EQ(inst[i].expected_result_bdw, validate(p));
1711 } inst[] = {
1743 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
1744 gfx6_math(p, retype(g0, inst[i].dst_type),
1746 retype(g0, inst[i].src0_type),
1747 retype(g0, inst[i].src1_type));
1749 brw_inst_set_dst_hstride(&devinfo, last_inst, inst[i].dst_stride);
1753 brw_inst_set_src0_hstride(&devinfo, last_inst, inst[i].src0_stride);
1757 brw_inst_set_src1_hstride(&devinfo, last_inst, inst[i].src1_stride);
1759 EXPECT_EQ(inst[i].expected_result, validate(p));
1776 } inst[] = {
1818 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
1819 brw_ADD(p, retype(g0, inst[i].dst_type),
1820 retype(g0, inst[i].src0_type),
1821 retype(g0, inst[i].src1_type));
1823 brw_inst_set_dst_hstride(&devinfo, last_inst, inst[i].dst_stride);
1824 brw_inst_set_dst_da1_subreg_nr(&devinfo, last_inst, inst[i].dst_subnr);
1834 brw_inst_set_exec_size(&devinfo, last_inst, inst[i].exec_size);
1837 EXPECT_EQ(inst[i].expected_result_chv_skl, validate(p));
1839 EXPECT_EQ(inst[i].expected_result_bdw, validate(p));
1854 } inst[] = {
1889 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
1890 brw_ADD(p, retype(g0, inst[i].dst_type),
1891 retype(g0, inst[i].src0_type),
1892 retype(g0, inst[i].src1_type));
1894 brw_inst_set_src0_vstride(&devinfo, last_inst, inst[i].src0_vstride);
1895 brw_inst_set_src1_vstride(&devinfo, last_inst, inst[i].src1_vstride);
1897 EXPECT_EQ(inst[i].expected_result, validate(p));
1911 } inst[] = {
1940 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
1941 brw_ADD(p, retype(g0, inst[i].dst_type),
1942 retype(g0, inst[i].src0_type),
1943 retype(g0, inst[i].src1_type));
1945 brw_inst_set_exec_size(&devinfo, last_inst, inst[i].exec_size);
1950 EXPECT_EQ(inst[i].expected_result, validate(p));
1964 } inst[] = {
1991 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
1992 brw_ADD(p, retype(g0, inst[i].dst_type),
1993 retype(inst[i].read_acc ? acc0 : g0, inst[i].src0_type),
1994 retype(g0, inst[i].src1_type));
1999 EXPECT_EQ(inst[i].expected_result, validate(p));
2014 } inst[] = {
2046 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
2047 gfx6_math(p, retype(g0, inst[i].dst_type),
2049 retype(g0, inst[i].src0_type),
2050 retype(g0, inst[i].src1_type));
2052 brw_inst_set_src0_vstride(&devinfo, last_inst, inst[i].src0_vstride);
2053 brw_inst_set_src1_vstride(&devinfo, last_inst, inst[i].src1_vstride);
2055 EXPECT_EQ(inst[i].expected_result, validate(p));
2157 } inst[] = {
2285 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
2287 (inst[i].dst_type == BRW_REGISTER_TYPE_DF ||
2288 inst[i].src_type == BRW_REGISTER_TYPE_DF))
2292 (inst[i].dst_type == BRW_REGISTER_TYPE_Q ||
2293 inst[i].dst_type == BRW_REGISTER_TYPE_UQ ||
2294 inst[i].src_type == BRW_REGISTER_TYPE_Q ||
2295 inst[i].src_type == BRW_REGISTER_TYPE_UQ))
2298 if (inst[i].opcode == BRW_OPCODE_MOV) {
2299 brw_MOV(p, retype(g0, inst[i].dst_type),
2300 retype(g0, inst[i].src_type));
2302 assert(inst[i].opcode == BRW_OPCODE_MUL);
2303 brw_MUL(p, retype(g0, inst[i].dst_type),
2304 retype(g0, inst[i].src_type),
2305 retype(zero, inst[i].src_type));
2307 brw_inst_set_exec_size(&devinfo, last_inst, inst[i].exec_size);
2309 brw_inst_set_dst_da1_subreg_nr(&devinfo, last_inst, inst[i].dst_subreg);
2310 brw_inst_set_src0_da1_subreg_nr(&devinfo, last_inst, inst[i].src_subreg);
2312 brw_inst_set_dst_hstride(&devinfo, last_inst, inst[i].dst_stride);
2314 brw_inst_set_src0_vstride(&devinfo, last_inst, inst[i].src_vstride);
2315 brw_inst_set_src0_width(&devinfo, last_inst, inst[i].src_width);
2316 brw_inst_set_src0_hstride(&devinfo, last_inst, inst[i].src_hstride);
2320 EXPECT_EQ(inst[i].expected_result, validate(p));
2346 } inst[] = {
2418 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
2420 (inst[i].dst_type == BRW_REGISTER_TYPE_DF ||
2421 inst[i].src_type == BRW_REGISTER_TYPE_DF))
2425 (inst[i].dst_type == BRW_REGISTER_TYPE_Q ||
2426 inst[i].dst_type == BRW_REGISTER_TYPE_UQ ||
2427 inst[i].src_type == BRW_REGISTER_TYPE_Q ||
2428 inst[i].src_type == BRW_REGISTER_TYPE_UQ))
2431 if (inst[i].opcode == BRW_OPCODE_MOV) {
2432 brw_MOV(p, retype(g0, inst[i].dst_type),
2433 retype(g0, inst[i].src_type));
2435 assert(inst[i].opcode == BRW_OPCODE_MUL);
2436 brw_MUL(p, retype(g0, inst[i].dst_type),
2437 retype(g0, inst[i].src_type),
2438 retype(zero, inst[i].src_type));
2440 brw_inst_set_exec_size(&devinfo, last_inst, inst[i].exec_size);
2442 brw_inst_set_dst_address_mode(&devinfo, last_inst, inst[i].dst_is_indirect);
2443 brw_inst_set_src0_address_mode(&devinfo, last_inst, inst[i].src_is_indirect);
2445 brw_inst_set_dst_hstride(&devinfo, last_inst, inst[i].dst_stride);
2447 brw_inst_set_src0_vstride(&devinfo, last_inst, inst[i].src_vstride);
2448 brw_inst_set_src0_width(&devinfo, last_inst, inst[i].src_width);
2449 brw_inst_set_src0_hstride(&devinfo, last_inst, inst[i].src_hstride);
2453 EXPECT_EQ(inst[i].expected_result, validate(p));
2480 } inst[] = {
2567 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
2569 (inst[i].dst_type == BRW_REGISTER_TYPE_DF ||
2570 inst[i].src_type == BRW_REGISTER_TYPE_DF))
2574 (inst[i].dst_type == BRW_REGISTER_TYPE_Q ||
2575 inst[i].dst_type == BRW_REGISTER_TYPE_UQ ||
2576 inst[i].src_type == BRW_REGISTER_TYPE_Q ||
2577 inst[i].src_type == BRW_REGISTER_TYPE_UQ))
2580 if (inst[i].opcode == BRW_OPCODE_MOV) {
2581 brw_MOV(p, retype(inst[i].dst, inst[i].dst_type),
2582 retype(inst[i].src, inst[i].src_type));
2584 assert(inst[i].opcode == BRW_OPCODE_MUL);
2585 brw_MUL(p, retype(inst[i].dst, inst[i].dst_type),
2586 retype(inst[i].src, inst[i].src_type),
2587 retype(zero, inst[i].src_type));
2588 brw_inst_set_opcode(&isa, last_inst, inst[i].opcode);
2590 brw_inst_set_exec_size(&devinfo, last_inst, inst[i].exec_size);
2591 brw_inst_set_acc_wr_control(&devinfo, last_inst, inst[i].acc_wr);
2593 brw_inst_set_dst_hstride(&devinfo, last_inst, inst[i].dst_stride);
2595 brw_inst_set_src0_vstride(&devinfo, last_inst, inst[i].src_vstride);
2596 brw_inst_set_src0_width(&devinfo, last_inst, inst[i].src_width);
2597 brw_inst_set_src0_hstride(&devinfo, last_inst, inst[i].src_hstride);
2601 EXPECT_EQ(inst[i].expected_result, validate(p));
2634 } inst[] = {
2680 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
2681 if (inst[i].opcode == BRW_OPCODE_MOV) {
2682 brw_MOV(p, retype(g0, inst[i].dst_type),
2683 retype(g0, inst[i].src_type));
2685 assert(inst[i].opcode == BRW_OPCODE_ADD);
2686 brw_ADD(p, retype(g0, inst[i].dst_type),
2687 retype(g0, inst[i].src_type),
2688 retype(g0, inst[i].src_type));
2690 brw_inst_set_exec_size(&devinfo, last_inst, inst[i].exec_size);
2692 EXPECT_EQ(inst[i].expected_result, validate(p));
2716 } inst[] = {
2786 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
2788 (inst[i].dst_type == BRW_REGISTER_TYPE_DF ||
2789 inst[i].src_type == BRW_REGISTER_TYPE_DF))
2793 (inst[i].dst_type == BRW_REGISTER_TYPE_Q ||
2794 inst[i].dst_type == BRW_REGISTER_TYPE_UQ ||
2795 inst[i].src_type == BRW_REGISTER_TYPE_Q ||
2796 inst[i].src_type == BRW_REGISTER_TYPE_UQ))
2799 if (inst[i].opcode == BRW_OPCODE_MOV) {
2800 brw_MOV(p, retype(g0, inst[i].dst_type),
2801 retype(g0, inst[i].src_type));
2803 assert(inst[i].opcode == BRW_OPCODE_MUL);
2804 brw_MUL(p, retype(g0, inst[i].dst_type),
2805 retype(g0, inst[i].src_type),
2806 retype(zero, inst[i].src_type));
2808 brw_inst_set_exec_size(&devinfo, last_inst, inst[i].exec_size);
2810 brw_inst_set_dst_hstride(&devinfo, last_inst, inst[i].dst_stride);
2812 brw_inst_set_src0_vstride(&devinfo, last_inst, inst[i].src_vstride);
2813 brw_inst_set_src0_width(&devinfo, last_inst, inst[i].src_width);
2814 brw_inst_set_src0_hstride(&devinfo, last_inst, inst[i].src_hstride);
2816 brw_inst_set_no_dd_check(&devinfo, last_inst, inst[i].no_dd_check);
2817 brw_inst_set_no_dd_clear(&devinfo, last_inst, inst[i].no_dd_clear);
2821 EXPECT_EQ(inst[i].expected_result, validate(p));
2846 } inst[] = {
2896 for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
2898 if (devinfo.ver != inst[i].gfx_ver)
2904 brw_set_default_access_mode(p, inst[i].access_mode);
2906 switch (inst[i].opcode) {
2908 brw_MOV(p, retype(g0, inst[i].dst_type),
2909 retype(g0, inst[i].srcs[0].type));
2910 brw_inst_set_src0_vstride(&devinfo, last_inst, inst[i].srcs[0].vstride);
2911 brw_inst_set_src0_hstride(&devinfo, last_inst, inst[i].srcs[0].hstride);
2914 brw_ADD(p, retype(g0, inst[i].dst_type),
2915 retype(g0, inst[i].srcs[0].type),
2916 retype(g0, inst[i].srcs[1].type));
2917 brw_inst_set_src0_vstride(&devinfo, last_inst, inst[i].srcs[0].vstride);
2918 brw_inst_set_src0_width(&devinfo, last_inst, inst[i].srcs[0].width);
2919 brw_inst_set_src0_hstride(&devinfo, last_inst, inst[i].srcs[0].hstride);
2920 brw_inst_set_src1_vstride(&devinfo, last_inst, inst[i].srcs[1].vstride);
2921 brw_inst_set_src1_width(&devinfo, last_inst, inst[i].srcs[1].width);
2922 brw_inst_set_src1_hstride(&devinfo, last_inst, inst[i].srcs[1].hstride);
2925 brw_MAD(p, retype(g0, inst[i].dst_type),
2926 retype(g0, inst[i].srcs[0].type),
2927 retype(g0, inst[i].srcs[1].type),
2928 retype(g0, inst[i].srcs[2].type));
2929 brw_inst_set_3src_a1_src0_vstride(&devinfo, last_inst, inst[i].srcs[0].vstride);
2930 brw_inst_set_3src_a1_src0_hstride(&devinfo, last_inst, inst[i].srcs[0].hstride);
2931 brw_inst_set_3src_a1_src1_vstride(&devinfo, last_inst, inst[i].srcs[0].vstride);
2932 brw_inst_set_3src_a1_src1_hstride(&devinfo, last_inst, inst[i].srcs[0].hstride);
2940 brw_inst_set_src0_width(&devinfo, last_inst, inst[i].srcs[0].width);
2941 brw_inst_set_src1_width(&devinfo, last_inst, inst[i].srcs[1].width);
2945 EXPECT_EQ(inst[i].expected_result, validate(p));