Lines Matching refs:alu
591 struct r600_bytecode_alu alu; in evergreen_interp_alu() local
600 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in evergreen_interp_alu()
603 alu.op = ALU_OP2_INTERP_ZW; in evergreen_interp_alu()
605 alu.op = ALU_OP2_INTERP_XY; in evergreen_interp_alu()
608 alu.dst.sel = ctx->shader->input[input].gpr; in evergreen_interp_alu()
609 alu.dst.write = 1; in evergreen_interp_alu()
612 alu.dst.chan = i % 4; in evergreen_interp_alu()
614 alu.src[0].sel = gpr; in evergreen_interp_alu()
615 alu.src[0].chan = (base_chan - (i % 2)); in evergreen_interp_alu()
617 alu.src[1].sel = V_SQ_ALU_SRC_PARAM_BASE + ctx->shader->input[input].lds_pos; in evergreen_interp_alu()
619 alu.bank_swizzle_force = SQ_ALU_VEC_210; in evergreen_interp_alu()
621 alu.last = 1; in evergreen_interp_alu()
622 r = r600_bytecode_add_alu(ctx->bc, &alu); in evergreen_interp_alu()
632 struct r600_bytecode_alu alu; in evergreen_interp_flat() local
635 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in evergreen_interp_flat()
637 alu.op = ALU_OP1_INTERP_LOAD_P0; in evergreen_interp_flat()
639 alu.dst.sel = ctx->shader->input[input].gpr; in evergreen_interp_flat()
640 alu.dst.write = 1; in evergreen_interp_flat()
642 alu.dst.chan = i; in evergreen_interp_flat()
644 alu.src[0].sel = V_SQ_ALU_SRC_PARAM_BASE + ctx->shader->input[input].lds_pos; in evergreen_interp_flat()
645 alu.src[0].chan = i; in evergreen_interp_flat()
648 alu.last = 1; in evergreen_interp_flat()
649 r = r600_bytecode_add_alu(ctx->bc, &alu); in evergreen_interp_flat()
783 struct r600_bytecode_alu alu; in select_twoside_color() local
789 memset(&alu, 0, sizeof(alu)); in select_twoside_color()
790 alu.op = ALU_OP3_CNDGT; in select_twoside_color()
791 alu.is_op3 = 1; in select_twoside_color()
792 alu.dst.write = 1; in select_twoside_color()
793 alu.dst.sel = gpr_front; in select_twoside_color()
794 alu.src[0].sel = ctx->face_gpr; in select_twoside_color()
795 alu.src[1].sel = gpr_front; in select_twoside_color()
796 alu.src[2].sel = gpr_back; in select_twoside_color()
798 alu.dst.chan = i; in select_twoside_color()
799 alu.src[1].chan = i; in select_twoside_color()
800 alu.src[2].chan = i; in select_twoside_color()
801 alu.last = (i==3); in select_twoside_color()
803 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in select_twoside_color()
816 struct r600_bytecode_alu alu; in single_alu_op2() local
821 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in single_alu_op2()
822 alu.op = op; in single_alu_op2()
823 alu.src[0].sel = src0_sel; in single_alu_op2()
825 alu.src[0].value = src0_chan_val; in single_alu_op2()
827 alu.src[0].chan = src0_chan_val; in single_alu_op2()
828 alu.src[1].sel = src1_sel; in single_alu_op2()
830 alu.src[1].value = src1_chan_val; in single_alu_op2()
832 alu.src[1].chan = src1_chan_val; in single_alu_op2()
833 alu.dst.sel = dst_sel; in single_alu_op2()
834 alu.dst.chan = i; in single_alu_op2()
835 alu.dst.write = i == dst_chan; in single_alu_op2()
836 alu.last = (i == 3); in single_alu_op2()
837 r = r600_bytecode_add_alu(ctx->bc, &alu); in single_alu_op2()
844 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in single_alu_op2()
845 alu.op = op; in single_alu_op2()
846 alu.src[0].sel = src0_sel; in single_alu_op2()
848 alu.src[0].value = src0_chan_val; in single_alu_op2()
850 alu.src[0].chan = src0_chan_val; in single_alu_op2()
851 alu.src[1].sel = src1_sel; in single_alu_op2()
853 alu.src[1].value = src1_chan_val; in single_alu_op2()
855 alu.src[1].chan = src1_chan_val; in single_alu_op2()
856 alu.dst.sel = dst_sel; in single_alu_op2()
857 alu.dst.chan = dst_chan; in single_alu_op2()
858 alu.dst.write = 1; in single_alu_op2()
859 alu.last = 1; in single_alu_op2()
860 r = r600_bytecode_add_alu(ctx->bc, &alu); in single_alu_op2()
873 struct r600_bytecode_alu alu; in single_alu_op3() local
878 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in single_alu_op3()
879 alu.op = op; in single_alu_op3()
880 alu.src[0].sel = src0_sel; in single_alu_op3()
882 alu.src[0].value = src0_chan_val; in single_alu_op3()
884 alu.src[0].chan = src0_chan_val; in single_alu_op3()
885 alu.src[1].sel = src1_sel; in single_alu_op3()
887 alu.src[1].value = src1_chan_val; in single_alu_op3()
889 alu.src[1].chan = src1_chan_val; in single_alu_op3()
890 alu.src[2].sel = src2_sel; in single_alu_op3()
892 alu.src[2].value = src2_chan_val; in single_alu_op3()
894 alu.src[2].chan = src2_chan_val; in single_alu_op3()
895 alu.dst.sel = dst_sel; in single_alu_op3()
896 alu.dst.chan = dst_chan; in single_alu_op3()
897 alu.is_op3 = 1; in single_alu_op3()
898 alu.last = 1; in single_alu_op3()
899 r = r600_bytecode_add_alu(ctx->bc, &alu); in single_alu_op3()
953 struct r600_bytecode_alu alu; in tgsi_barrier() local
956 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_barrier()
957 alu.op = ctx->inst_info->op; in tgsi_barrier()
958 alu.last = 1; in tgsi_barrier()
960 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_barrier()
1229 struct r600_bytecode_alu alu; in tgsi_declaration() local
1230 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_declaration()
1231 alu.op = ALU_OP1_MOV; in tgsi_declaration()
1232 alu.src[0].sel = 0; in tgsi_declaration()
1233 alu.src[0].chan = 0 + i; in tgsi_declaration()
1234 alu.dst.sel = 1; in tgsi_declaration()
1235 alu.dst.chan = 0 + i; in tgsi_declaration()
1236 alu.dst.write = 1; in tgsi_declaration()
1237 alu.last = (i == 1) ? 1 : 0; in tgsi_declaration()
1238 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_declaration()
1242 struct r600_bytecode_alu alu; in tgsi_declaration() local
1243 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_declaration()
1244 alu.op = ALU_OP2_ADD; in tgsi_declaration()
1245 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_declaration()
1246 alu.src[1].sel = 1; in tgsi_declaration()
1247 alu.src[1].chan = 0; in tgsi_declaration()
1248 alu.src[1].neg = 1; in tgsi_declaration()
1249 alu.dst.sel = 1; in tgsi_declaration()
1250 alu.dst.chan = 2; in tgsi_declaration()
1251 alu.dst.write = 1; in tgsi_declaration()
1252 alu.last = 1; in tgsi_declaration()
1253 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_declaration()
1257 alu.op = ALU_OP2_ADD; in tgsi_declaration()
1258 alu.src[0].sel = 1; in tgsi_declaration()
1259 alu.src[0].chan = 2; in tgsi_declaration()
1260 alu.src[1].sel = 1; in tgsi_declaration()
1261 alu.src[1].chan = 1; in tgsi_declaration()
1262 alu.src[1].neg = 1; in tgsi_declaration()
1263 alu.dst.sel = 1; in tgsi_declaration()
1264 alu.dst.chan = 2; in tgsi_declaration()
1265 alu.dst.write = 1; in tgsi_declaration()
1266 alu.last = 1; in tgsi_declaration()
1267 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_declaration()
1438 struct r600_bytecode_alu alu; in load_sample_position() local
1440 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_sample_position()
1441 alu.op = ALU_OP1_MOV; in load_sample_position()
1442 r600_bytecode_src(&alu.src[0], sample_id, chan_sel); in load_sample_position()
1443 alu.dst.sel = t1; in load_sample_position()
1444 alu.dst.write = 1; in load_sample_position()
1445 alu.last = 1; in load_sample_position()
1446 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_sample_position()
1477 struct r600_bytecode_alu alu; in eg_load_helper_invocation() local
1480 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in eg_load_helper_invocation()
1481 alu.op = ALU_OP1_MOV; in eg_load_helper_invocation()
1482 alu.dst.sel = ctx->helper_invoc_reg; in eg_load_helper_invocation()
1483 alu.dst.chan = 0; in eg_load_helper_invocation()
1484 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in eg_load_helper_invocation()
1485 alu.src[0].value = 0xffffffff; in eg_load_helper_invocation()
1486 alu.dst.write = 1; in eg_load_helper_invocation()
1487 alu.last = 1; in eg_load_helper_invocation()
1488 r = r600_bytecode_add_alu(ctx->bc, &alu); in eg_load_helper_invocation()
1515 struct r600_bytecode_alu alu; in cm_load_helper_invocation() local
1517 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cm_load_helper_invocation()
1518 alu.op = ALU_OP1_MOV; in cm_load_helper_invocation()
1519 alu.dst.sel = ctx->helper_invoc_reg; in cm_load_helper_invocation()
1520 alu.dst.chan = 0; in cm_load_helper_invocation()
1521 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in cm_load_helper_invocation()
1522 alu.src[0].value = 0xffffffff; in cm_load_helper_invocation()
1523 alu.dst.write = 1; in cm_load_helper_invocation()
1524 alu.last = 1; in cm_load_helper_invocation()
1525 r = r600_bytecode_add_alu(ctx->bc, &alu); in cm_load_helper_invocation()
1529 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cm_load_helper_invocation()
1530 alu.op = ALU_OP1_MOV; in cm_load_helper_invocation()
1531 alu.dst.sel = ctx->helper_invoc_reg; in cm_load_helper_invocation()
1532 alu.dst.chan = 0; in cm_load_helper_invocation()
1533 alu.src[0].sel = V_SQ_ALU_SRC_0; in cm_load_helper_invocation()
1534 alu.dst.write = 1; in cm_load_helper_invocation()
1535 alu.last = 1; in cm_load_helper_invocation()
1536 r = r600_bytecode_add_alu_type(ctx->bc, &alu, CF_OP_ALU_VALID_PIXEL_MODE); in cm_load_helper_invocation()
1554 struct r600_bytecode_alu alu; in load_block_grid_size() local
1555 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_block_grid_size()
1556 alu.op = ALU_OP1_MOV; in load_block_grid_size()
1557 alu.src[0].sel = V_SQ_ALU_SRC_0; in load_block_grid_size()
1558 alu.dst.sel = t1; in load_block_grid_size()
1559 alu.dst.write = 1; in load_block_grid_size()
1560 alu.last = 1; in load_block_grid_size()
1561 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_block_grid_size()
1819 struct r600_bytecode_alu alu; in tgsi_fetch_rel_const() local
1821 memset(&alu, 0, sizeof(alu)); in tgsi_fetch_rel_const()
1823 alu.op = ALU_OP2_ADD_INT; in tgsi_fetch_rel_const()
1824 alu.src[0].sel = ctx->bc->ar_reg; in tgsi_fetch_rel_const()
1825 alu.src[0].chan = ar_chan; in tgsi_fetch_rel_const()
1827 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_fetch_rel_const()
1828 alu.src[1].value = offset; in tgsi_fetch_rel_const()
1830 alu.dst.sel = dst_reg; in tgsi_fetch_rel_const()
1831 alu.dst.chan = ar_chan; in tgsi_fetch_rel_const()
1832 alu.dst.write = 1; in tgsi_fetch_rel_const()
1833 alu.last = 1; in tgsi_fetch_rel_const()
1835 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_fetch_rel_const()
1887 struct r600_bytecode_alu alu; in fetch_gs_input() local
1908 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in fetch_gs_input()
1909 alu.op = ALU_OP1_MOV; in fetch_gs_input()
1910 alu.src[0].sel = ctx->gs_rotated_input[0]; in fetch_gs_input()
1911 alu.src[0].chan = i == 2 ? 3 : i; in fetch_gs_input()
1912 alu.dst.sel = treg[i]; in fetch_gs_input()
1913 alu.dst.chan = 0; in fetch_gs_input()
1914 alu.dst.write = 1; in fetch_gs_input()
1915 alu.last = 1; in fetch_gs_input()
1916 r = r600_bytecode_add_alu(ctx->bc, &alu); in fetch_gs_input()
1920 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in fetch_gs_input()
1921 alu.op = ALU_OP1_MOV; in fetch_gs_input()
1922 alu.src[0].sel = treg[0]; in fetch_gs_input()
1923 alu.src[0].rel = 1; in fetch_gs_input()
1924 alu.dst.sel = t2; in fetch_gs_input()
1925 alu.dst.write = 1; in fetch_gs_input()
1926 alu.last = 1; in fetch_gs_input()
1927 r = r600_bytecode_add_alu(ctx->bc, &alu); in fetch_gs_input()
2136 struct r600_bytecode_alu alu; in do_lds_fetch_values() local
2159 memset(&alu, 0, sizeof(alu)); in do_lds_fetch_values()
2160 alu.op = LDS_OP1_LDS_READ_RET; in do_lds_fetch_values()
2161 alu.src[0].sel = temp_reg; in do_lds_fetch_values()
2162 alu.src[0].chan = i; in do_lds_fetch_values()
2163 alu.src[1].sel = V_SQ_ALU_SRC_0; in do_lds_fetch_values()
2164 alu.src[2].sel = V_SQ_ALU_SRC_0; in do_lds_fetch_values()
2165 alu.dst.chan = 0; in do_lds_fetch_values()
2166 alu.is_lds_idx_op = true; in do_lds_fetch_values()
2167 alu.last = 1; in do_lds_fetch_values()
2168 r = r600_bytecode_add_alu(ctx->bc, &alu); in do_lds_fetch_values()
2177 memset(&alu, 0, sizeof(alu)); in do_lds_fetch_values()
2179 alu.op = ALU_OP1_MOV; in do_lds_fetch_values()
2180 alu.src[0].sel = EG_V_SQ_ALU_SRC_LDS_OQ_A_POP; in do_lds_fetch_values()
2181 alu.src[0].chan = 0; in do_lds_fetch_values()
2182 alu.dst.sel = dst_reg; in do_lds_fetch_values()
2183 alu.dst.chan = i; in do_lds_fetch_values()
2184 alu.dst.write = 1; in do_lds_fetch_values()
2185 alu.last = 1; in do_lds_fetch_values()
2186 r = r600_bytecode_add_alu(ctx->bc, &alu); in do_lds_fetch_values()
2306 struct r600_bytecode_alu alu; in tgsi_split_constant() local
2334 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_split_constant()
2335 alu.op = ALU_OP1_MOV; in tgsi_split_constant()
2336 alu.src[0].sel = ctx->src[i].sel; in tgsi_split_constant()
2337 alu.src[0].chan = k; in tgsi_split_constant()
2338 alu.src[0].rel = ctx->src[i].rel; in tgsi_split_constant()
2339 alu.src[0].kc_bank = ctx->src[i].kc_bank; in tgsi_split_constant()
2340 alu.src[0].kc_rel = ctx->src[i].kc_rel; in tgsi_split_constant()
2341 alu.dst.sel = treg; in tgsi_split_constant()
2342 alu.dst.chan = k; in tgsi_split_constant()
2343 alu.dst.write = 1; in tgsi_split_constant()
2345 alu.last = 1; in tgsi_split_constant()
2346 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_split_constant()
2362 struct r600_bytecode_alu alu; in tgsi_split_literal_constant() local
2374 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_split_literal_constant()
2375 alu.op = ALU_OP1_MOV; in tgsi_split_literal_constant()
2376 alu.src[0].sel = ctx->src[i].sel; in tgsi_split_literal_constant()
2377 alu.src[0].chan = k; in tgsi_split_literal_constant()
2378 alu.src[0].value = ctx->src[i].value[k]; in tgsi_split_literal_constant()
2379 alu.dst.sel = treg; in tgsi_split_literal_constant()
2380 alu.dst.chan = k; in tgsi_split_literal_constant()
2381 alu.dst.write = 1; in tgsi_split_literal_constant()
2383 alu.last = 1; in tgsi_split_literal_constant()
2384 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_split_literal_constant()
2447 struct r600_bytecode_alu alu; in emit_streamout() local
2448 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in emit_streamout()
2449 alu.op = ALU_OP1_MOV; in emit_streamout()
2450 alu.src[0].sel = so_gpr[i]; in emit_streamout()
2451 alu.src[0].chan = so->output[i].start_component + j; in emit_streamout()
2453 alu.dst.sel = tmp; in emit_streamout()
2454 alu.dst.chan = j; in emit_streamout()
2455 alu.dst.write = 1; in emit_streamout()
2457 alu.last = 1; in emit_streamout()
2458 r = r600_bytecode_add_alu(ctx->bc, &alu); in emit_streamout()
2533 struct r600_bytecode_alu alu; in convert_edgeflag_to_int() local
2542 memset(&alu, 0, sizeof(alu)); in convert_edgeflag_to_int()
2543 alu.op = ALU_OP1_MOV; in convert_edgeflag_to_int()
2544 alu.src[0].sel = reg; in convert_edgeflag_to_int()
2545 alu.dst.sel = reg; in convert_edgeflag_to_int()
2546 alu.dst.write = 1; in convert_edgeflag_to_int()
2547 alu.dst.clamp = 1; in convert_edgeflag_to_int()
2548 alu.last = 1; in convert_edgeflag_to_int()
2549 r600_bytecode_add_alu(ctx->bc, &alu); in convert_edgeflag_to_int()
2551 memset(&alu, 0, sizeof(alu)); in convert_edgeflag_to_int()
2552 alu.op = ALU_OP1_FLT_TO_INT; in convert_edgeflag_to_int()
2553 alu.src[0].sel = reg; in convert_edgeflag_to_int()
2554 alu.dst.sel = reg; in convert_edgeflag_to_int()
2555 alu.dst.write = 1; in convert_edgeflag_to_int()
2556 alu.last = 1; in convert_edgeflag_to_int()
2557 r600_bytecode_add_alu(ctx->bc, &alu); in convert_edgeflag_to_int()
2568 struct r600_bytecode_alu alu; in generate_gs_copy_shader() local
2599 memset(&alu, 0, sizeof(alu)); in generate_gs_copy_shader()
2600 alu.op = ALU_OP2_AND_INT; in generate_gs_copy_shader()
2601 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in generate_gs_copy_shader()
2602 alu.src[1].value = 0x3fffffff; in generate_gs_copy_shader()
2603 alu.dst.write = 1; in generate_gs_copy_shader()
2604 r600_bytecode_add_alu(ctx.bc, &alu); in generate_gs_copy_shader()
2607 memset(&alu, 0, sizeof(alu)); in generate_gs_copy_shader()
2608 alu.op = ALU_OP2_LSHR_INT; in generate_gs_copy_shader()
2609 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in generate_gs_copy_shader()
2610 alu.src[1].value = 0x1e; in generate_gs_copy_shader()
2611 alu.dst.chan = 1; in generate_gs_copy_shader()
2612 alu.dst.write = 1; in generate_gs_copy_shader()
2613 alu.last = 1; in generate_gs_copy_shader()
2614 r600_bytecode_add_alu(ctx.bc, &alu); in generate_gs_copy_shader()
2671 memset(&alu, 0, sizeof(alu)); in generate_gs_copy_shader()
2672 alu.op = ALU_OP2_PRED_SETE_INT; in generate_gs_copy_shader()
2673 alu.src[0].chan = 1; in generate_gs_copy_shader()
2674 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in generate_gs_copy_shader()
2675 alu.src[1].value = ring; in generate_gs_copy_shader()
2676 alu.execute_mask = 1; in generate_gs_copy_shader()
2677 alu.update_pred = 1; in generate_gs_copy_shader()
2678 alu.last = 1; in generate_gs_copy_shader()
2679 r600_bytecode_add_alu_type(ctx.bc, &alu, CF_OP_ALU_PUSH_BEFORE); in generate_gs_copy_shader()
2691 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in generate_gs_copy_shader()
2692 alu.op = ALU_OP0_NOP; in generate_gs_copy_shader()
2693 alu.last = 1; in generate_gs_copy_shader()
2694 r600_bytecode_add_alu(ctx.bc, &alu); in generate_gs_copy_shader()
2874 struct r600_bytecode_alu alu; in emit_inc_ring_offset() local
2877 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in emit_inc_ring_offset()
2878 alu.op = ALU_OP2_ADD_INT; in emit_inc_ring_offset()
2879 alu.src[0].sel = ctx->gs_export_gpr_tregs[idx]; in emit_inc_ring_offset()
2880 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in emit_inc_ring_offset()
2881 alu.src[1].value = ctx->gs_out_ring_offset >> 4; in emit_inc_ring_offset()
2882 alu.dst.sel = ctx->gs_export_gpr_tregs[idx]; in emit_inc_ring_offset()
2883 alu.dst.write = 1; in emit_inc_ring_offset()
2884 alu.last = 1; in emit_inc_ring_offset()
2885 r = r600_bytecode_add_alu(ctx->bc, &alu); in emit_inc_ring_offset()
3059 struct r600_bytecode_alu alu; in emit_lds_vs_writes() local
3082 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in emit_lds_vs_writes()
3083 alu.op = LDS_OP3_LDS_WRITE_REL; in emit_lds_vs_writes()
3084 alu.src[0].sel = temp_reg; in emit_lds_vs_writes()
3085 alu.src[0].chan = chan; in emit_lds_vs_writes()
3086 alu.src[1].sel = ctx->shader->output[i].gpr; in emit_lds_vs_writes()
3087 alu.src[1].chan = j * 2; in emit_lds_vs_writes()
3088 alu.src[2].sel = ctx->shader->output[i].gpr; in emit_lds_vs_writes()
3089 alu.src[2].chan = (j * 2) + 1; in emit_lds_vs_writes()
3090 alu.last = 1; in emit_lds_vs_writes()
3091 alu.dst.chan = 0; in emit_lds_vs_writes()
3092 alu.lds_idx = 1; in emit_lds_vs_writes()
3093 alu.is_lds_idx_op = true; in emit_lds_vs_writes()
3094 r = r600_bytecode_add_alu(ctx->bc, &alu); in emit_lds_vs_writes()
3108 struct r600_bytecode_alu alu; in r600_store_tcs_output() local
3144 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_store_tcs_output()
3145 alu.op = LDS_OP3_LDS_WRITE_REL; in r600_store_tcs_output()
3146 alu.src[0].sel = temp_reg; in r600_store_tcs_output()
3147 alu.src[0].chan = i; in r600_store_tcs_output()
3149 alu.src[1].sel = dst->Register.Index; in r600_store_tcs_output()
3150 alu.src[1].sel += ctx->file_offset[dst->Register.File]; in r600_store_tcs_output()
3151 alu.src[1].chan = i; in r600_store_tcs_output()
3153 alu.src[2].sel = dst->Register.Index; in r600_store_tcs_output()
3154 alu.src[2].sel += ctx->file_offset[dst->Register.File]; in r600_store_tcs_output()
3155 alu.src[2].chan = i + 1; in r600_store_tcs_output()
3156 alu.lds_idx = 1; in r600_store_tcs_output()
3157 alu.dst.chan = 0; in r600_store_tcs_output()
3158 alu.last = 1; in r600_store_tcs_output()
3159 alu.is_lds_idx_op = true; in r600_store_tcs_output()
3160 r = r600_bytecode_add_alu(ctx->bc, &alu); in r600_store_tcs_output()
3166 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_store_tcs_output()
3167 alu.op = LDS_OP2_LDS_WRITE; in r600_store_tcs_output()
3168 alu.src[0].sel = temp_reg; in r600_store_tcs_output()
3169 alu.src[0].chan = i; in r600_store_tcs_output()
3171 alu.src[1].sel = dst->Register.Index; in r600_store_tcs_output()
3172 alu.src[1].sel += ctx->file_offset[dst->Register.File]; in r600_store_tcs_output()
3173 alu.src[1].chan = i; in r600_store_tcs_output()
3175 alu.src[2].sel = V_SQ_ALU_SRC_0; in r600_store_tcs_output()
3176 alu.dst.chan = 0; in r600_store_tcs_output()
3177 alu.last = 1; in r600_store_tcs_output()
3178 alu.is_lds_idx_op = true; in r600_store_tcs_output()
3179 r = r600_bytecode_add_alu(ctx->bc, &alu); in r600_store_tcs_output()
3221 struct r600_bytecode_alu alu; in r600_emit_tess_factor() local
3226 memset(&alu, 0, sizeof(alu)); in r600_emit_tess_factor()
3227 alu.op = ALU_OP2_PRED_SETE_INT; in r600_emit_tess_factor()
3228 alu.src[0].chan = 2; in r600_emit_tess_factor()
3229 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in r600_emit_tess_factor()
3230 alu.execute_mask = 1; in r600_emit_tess_factor()
3231 alu.update_pred = 1; in r600_emit_tess_factor()
3232 alu.last = 1; in r600_emit_tess_factor()
3233 r600_bytecode_add_alu_type(ctx->bc, &alu, CF_OP_ALU_PUSH_BEFORE); in r600_emit_tess_factor()
3370 struct r600_bytecode_alu alu; in load_thread_id_gpr() local
3373 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_thread_id_gpr()
3374 alu.op = ALU_OP1_MBCNT_32LO_ACCUM_PREV_INT; in load_thread_id_gpr()
3375 alu.dst.sel = ctx->temp_reg; in load_thread_id_gpr()
3376 alu.dst.chan = 0; in load_thread_id_gpr()
3377 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in load_thread_id_gpr()
3378 alu.src[0].value = 0xffffffff; in load_thread_id_gpr()
3379 alu.dst.write = 1; in load_thread_id_gpr()
3380 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_thread_id_gpr()
3384 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_thread_id_gpr()
3385 alu.op = ALU_OP1_MBCNT_32HI_INT; in load_thread_id_gpr()
3386 alu.dst.sel = ctx->temp_reg; in load_thread_id_gpr()
3387 alu.dst.chan = 1; in load_thread_id_gpr()
3388 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in load_thread_id_gpr()
3389 alu.src[0].value = 0xffffffff; in load_thread_id_gpr()
3390 alu.dst.write = 1; in load_thread_id_gpr()
3391 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_thread_id_gpr()
3395 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_thread_id_gpr()
3396 alu.op = ALU_OP3_MULADD_UINT24; in load_thread_id_gpr()
3397 alu.dst.sel = ctx->temp_reg; in load_thread_id_gpr()
3398 alu.dst.chan = 2; in load_thread_id_gpr()
3399 alu.src[0].sel = EG_V_SQ_ALU_SRC_SE_ID; in load_thread_id_gpr()
3400 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in load_thread_id_gpr()
3401 alu.src[1].value = 256; in load_thread_id_gpr()
3402 alu.src[2].sel = EG_V_SQ_ALU_SRC_HW_WAVE_ID; in load_thread_id_gpr()
3403 alu.dst.write = 1; in load_thread_id_gpr()
3404 alu.is_op3 = 1; in load_thread_id_gpr()
3405 alu.last = 1; in load_thread_id_gpr()
3406 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_thread_id_gpr()
3821 struct r600_bytecode_alu alu; in r600_shader_from_tgsi() local
3824 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_shader_from_tgsi()
3826 alu.op = ALU_OP2_LSHL_INT; in r600_shader_from_tgsi()
3827 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in r600_shader_from_tgsi()
3828 alu.src[0].value = 0x1; in r600_shader_from_tgsi()
3829 alu.src[1].sel = ctx.fixed_pt_position_gpr; in r600_shader_from_tgsi()
3830 alu.src[1].chan = 3; in r600_shader_from_tgsi()
3831 alu.dst.sel = tmp; in r600_shader_from_tgsi()
3832 alu.dst.chan = 0; in r600_shader_from_tgsi()
3833 alu.dst.write = 1; in r600_shader_from_tgsi()
3834 alu.last = 1; in r600_shader_from_tgsi()
3835 if ((r = r600_bytecode_add_alu(ctx.bc, &alu))) in r600_shader_from_tgsi()
3838 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_shader_from_tgsi()
3839 alu.op = ALU_OP2_AND_INT; in r600_shader_from_tgsi()
3840 alu.src[0].sel = tmp; in r600_shader_from_tgsi()
3841 alu.src[1].sel = ctx.face_gpr; in r600_shader_from_tgsi()
3842 alu.src[1].chan = 2; in r600_shader_from_tgsi()
3843 alu.dst.sel = ctx.face_gpr; in r600_shader_from_tgsi()
3844 alu.dst.chan = 2; in r600_shader_from_tgsi()
3845 alu.dst.write = 1; in r600_shader_from_tgsi()
3846 alu.last = 1; in r600_shader_from_tgsi()
3847 if ((r = r600_bytecode_add_alu(ctx.bc, &alu))) in r600_shader_from_tgsi()
3854 struct r600_bytecode_alu alu; in r600_shader_from_tgsi() local
3855 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_shader_from_tgsi()
3856 alu.op = ALU_OP1_RECIP_IEEE; in r600_shader_from_tgsi()
3857 alu.src[0].sel = shader->input[ctx.fragcoord_input].gpr; in r600_shader_from_tgsi()
3858 alu.src[0].chan = 3; in r600_shader_from_tgsi()
3860 alu.dst.sel = shader->input[ctx.fragcoord_input].gpr; in r600_shader_from_tgsi()
3861 alu.dst.chan = j; in r600_shader_from_tgsi()
3862 alu.dst.write = (j == 3); in r600_shader_from_tgsi()
3863 alu.last = (j == 3); in r600_shader_from_tgsi()
3864 if ((r = r600_bytecode_add_alu(ctx.bc, &alu))) in r600_shader_from_tgsi()
3868 struct r600_bytecode_alu alu; in r600_shader_from_tgsi() local
3869 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_shader_from_tgsi()
3870 alu.op = ALU_OP1_RECIP_IEEE; in r600_shader_from_tgsi()
3871 alu.src[0].sel = shader->input[ctx.fragcoord_input].gpr; in r600_shader_from_tgsi()
3872 alu.src[0].chan = 3; in r600_shader_from_tgsi()
3874 alu.dst.sel = shader->input[ctx.fragcoord_input].gpr; in r600_shader_from_tgsi()
3875 alu.dst.chan = 3; in r600_shader_from_tgsi()
3876 alu.dst.write = 1; in r600_shader_from_tgsi()
3877 alu.last = 1; in r600_shader_from_tgsi()
3878 if ((r = r600_bytecode_add_alu(ctx.bc, &alu))) in r600_shader_from_tgsi()
3884 struct r600_bytecode_alu alu; in r600_shader_from_tgsi() local
3892 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_shader_from_tgsi()
3893 alu.op = ALU_OP1_MOV; in r600_shader_from_tgsi()
3894 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in r600_shader_from_tgsi()
3895 alu.src[0].value = 0; in r600_shader_from_tgsi()
3896 alu.dst.sel = ctx.gs_export_gpr_tregs[j]; in r600_shader_from_tgsi()
3897 alu.dst.write = 1; in r600_shader_from_tgsi()
3898 alu.last = 1; in r600_shader_from_tgsi()
3899 r = r600_bytecode_add_alu(ctx.bc, &alu); in r600_shader_from_tgsi()
4024 struct r600_bytecode_alu alu; in r600_shader_from_tgsi() local
4025 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_shader_from_tgsi()
4026 alu.op = ALU_OP2_DOT4; in r600_shader_from_tgsi()
4027 alu.src[0].sel = shader->output[ctx.cv_output].gpr; in r600_shader_from_tgsi()
4028 alu.src[0].chan = j; in r600_shader_from_tgsi()
4030 alu.src[1].sel = 512 + i; in r600_shader_from_tgsi()
4031 alu.src[1].kc_bank = R600_BUFFER_INFO_CONST_BUFFER; in r600_shader_from_tgsi()
4032 alu.src[1].chan = j; in r600_shader_from_tgsi()
4034 alu.dst.sel = clipdist_temp[oreg]; in r600_shader_from_tgsi()
4035 alu.dst.chan = j; in r600_shader_from_tgsi()
4036 alu.dst.write = (j == ochan); in r600_shader_from_tgsi()
4038 alu.last = 1; in r600_shader_from_tgsi()
4039 r = r600_bytecode_add_alu(ctx.bc, &alu); in r600_shader_from_tgsi()
4524 struct r600_bytecode_alu alu; in tgsi_op2_64_params() local
4572 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_op2_64_params()
4576 alu.dst.sel = use_tmp ? ctx->temp_reg : dest_temp; in tgsi_op2_64_params()
4577 alu.dst.chan = i; in tgsi_op2_64_params()
4578 alu.dst.write = 1; in tgsi_op2_64_params()
4580 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op2_64_params()
4583 alu.dst.write = 0; in tgsi_op2_64_params()
4585 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op2_64_params()
4587 alu.op = op_override ? op_override : ctx->inst_info->op; in tgsi_op2_64_params()
4589 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_op2_64_params()
4592 r600_bytecode_src(&alu.src[j], &ctx->src[j], fp64_switch(i)); in tgsi_op2_64_params()
4595 r600_bytecode_src(&alu.src[0], &ctx->src[1], fp64_switch(i)); in tgsi_op2_64_params()
4596 r600_bytecode_src(&alu.src[1], &ctx->src[0], fp64_switch(i)); in tgsi_op2_64_params()
4603 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_op2_64_params()
4610 alu.last = 1; in tgsi_op2_64_params()
4612 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_op2_64_params()
4626 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_op2_64_params()
4627 alu.op = ALU_OP1_MOV; in tgsi_op2_64_params()
4630 alu.dst.sel = dest_temp; in tgsi_op2_64_params()
4631 alu.dst.chan = i; in tgsi_op2_64_params()
4632 alu.dst.write = 1; in tgsi_op2_64_params()
4634 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op2_64_params()
4635 alu.src[0].sel = ctx->temp_reg; in tgsi_op2_64_params()
4636 alu.src[0].chan = use_tmp - 1; in tgsi_op2_64_params()
4637 alu.last = (i == lasti); in tgsi_op2_64_params()
4639 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_op2_64_params()
4673 struct r600_bytecode_alu alu; in tgsi_op3_64() local
4680 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_op3_64()
4681 alu.op = ctx->inst_info->op; in tgsi_op3_64()
4683 r600_bytecode_src(&alu.src[j], &ctx->src[j], i == 3 ? 0 : 1); in tgsi_op3_64()
4687 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op3_64()
4689 alu.dst.sel = tmp; in tgsi_op3_64()
4691 alu.dst.chan = i; in tgsi_op3_64()
4692 alu.is_op3 = 1; in tgsi_op3_64()
4694 alu.last = 1; in tgsi_op3_64()
4696 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_op3_64()
4706 struct r600_bytecode_alu alu; in tgsi_op2_s() local
4729 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_op2_s()
4731 alu.dst.sel = ctx->temp_reg; in tgsi_op2_s()
4732 alu.dst.chan = i; in tgsi_op2_s()
4733 alu.dst.write = 1; in tgsi_op2_s()
4735 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op2_s()
4737 alu.op = op; in tgsi_op2_s()
4740 r600_bytecode_src(&alu.src[j], &ctx->src[j], i); in tgsi_op2_s()
4742 alu.src[1].neg = src1_neg; in tgsi_op2_s()
4744 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_op2_s()
4745 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_op2_s()
4748 alu.last = 1; in tgsi_op2_s()
4750 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_op2_s()
4761 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_op2_s()
4762 alu.op = ALU_OP1_MOV; in tgsi_op2_s()
4763 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op2_s()
4764 alu.src[0].sel = ctx->temp_reg; in tgsi_op2_s()
4765 alu.src[0].chan = i; in tgsi_op2_s()
4766 alu.last = (i == lasti); in tgsi_op2_s()
4768 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_op2_s()
4794 struct r600_bytecode_alu alu; in tgsi_ineg() local
4802 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_ineg()
4803 alu.op = ctx->inst_info->op; in tgsi_ineg()
4805 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_ineg()
4807 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_ineg()
4809 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_ineg()
4812 alu.last = 1; in tgsi_ineg()
4814 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_ineg()
4825 struct r600_bytecode_alu alu; in tgsi_dneg() local
4833 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_dneg()
4834 alu.op = ALU_OP1_MOV; in tgsi_dneg()
4836 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_dneg()
4839 r600_bytecode_src_toggle_neg(&alu.src[0]); in tgsi_dneg()
4840 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_dneg()
4843 alu.last = 1; in tgsi_dneg()
4845 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_dneg()
4856 struct r600_bytecode_alu alu; in tgsi_dfracexp() local
4861 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_dfracexp()
4862 alu.op = ctx->inst_info->op; in tgsi_dfracexp()
4864 alu.dst.sel = ctx->temp_reg; in tgsi_dfracexp()
4865 alu.dst.chan = i; in tgsi_dfracexp()
4866 alu.dst.write = 1; in tgsi_dfracexp()
4868 r600_bytecode_src(&alu.src[j], &ctx->src[j], fp64_switch(i)); in tgsi_dfracexp()
4872 alu.last = 1; in tgsi_dfracexp()
4874 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_dfracexp()
4884 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_dfracexp()
4885 alu.op = ALU_OP1_MOV; in tgsi_dfracexp()
4886 alu.src[0].chan = (i & 1) + 2; in tgsi_dfracexp()
4887 alu.src[0].sel = ctx->temp_reg; in tgsi_dfracexp()
4889 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_dfracexp()
4890 alu.dst.write = 1; in tgsi_dfracexp()
4891 alu.last = 1; in tgsi_dfracexp()
4892 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_dfracexp()
4900 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_dfracexp()
4901 alu.op = ALU_OP1_MOV; in tgsi_dfracexp()
4902 alu.src[0].chan = 1; in tgsi_dfracexp()
4903 alu.src[0].sel = ctx->temp_reg; in tgsi_dfracexp()
4905 tgsi_dst(ctx, &inst->Dst[1], i, &alu.dst); in tgsi_dfracexp()
4906 alu.last = 1; in tgsi_dfracexp()
4907 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_dfracexp()
4920 struct r600_bytecode_alu alu; in egcm_int_to_double() local
4932 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_int_to_double()
4933 alu.op = ALU_OP2_AND_INT; in egcm_int_to_double()
4934 alu.dst.sel = temp_reg; in egcm_int_to_double()
4935 alu.dst.chan = dchan; in egcm_int_to_double()
4936 r600_bytecode_src(&alu.src[0], &ctx->src[0], c); in egcm_int_to_double()
4937 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in egcm_int_to_double()
4938 alu.src[1].value = 0xffffff00; in egcm_int_to_double()
4939 alu.dst.write = 1; in egcm_int_to_double()
4940 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_int_to_double()
4944 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_int_to_double()
4945 alu.op = ALU_OP2_AND_INT; in egcm_int_to_double()
4946 alu.dst.sel = temp_reg; in egcm_int_to_double()
4947 alu.dst.chan = dchan + 1; in egcm_int_to_double()
4948 r600_bytecode_src(&alu.src[0], &ctx->src[0], c); in egcm_int_to_double()
4949 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in egcm_int_to_double()
4950 alu.src[1].value = 0xff; in egcm_int_to_double()
4951 alu.dst.write = 1; in egcm_int_to_double()
4952 alu.last = 1; in egcm_int_to_double()
4953 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_int_to_double()
4963 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_int_to_double()
4964 alu.op = i == dchan ? ctx->inst_info->op : ALU_OP1_UINT_TO_FLT; in egcm_int_to_double()
4966 alu.src[0].sel = temp_reg; in egcm_int_to_double()
4967 alu.src[0].chan = i; in egcm_int_to_double()
4968 alu.dst.sel = temp_reg; in egcm_int_to_double()
4969 alu.dst.chan = i; in egcm_int_to_double()
4970 alu.dst.write = 1; in egcm_int_to_double()
4972 alu.last = i == dchan + 1; in egcm_int_to_double()
4974 alu.last = 1; /* trans only ops on evergreen */ in egcm_int_to_double()
4976 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_int_to_double()
4987 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_int_to_double()
4988 alu.op = ALU_OP1_FLT32_TO_FLT64; in egcm_int_to_double()
4990 alu.src[0].chan = dchan + (i / 2); in egcm_int_to_double()
4992 alu.src[0].sel = temp_reg; in egcm_int_to_double()
4994 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in egcm_int_to_double()
4995 alu.src[0].value = 0x0; in egcm_int_to_double()
4997 alu.dst.sel = ctx->temp_reg; in egcm_int_to_double()
4998 alu.dst.chan = i; in egcm_int_to_double()
4999 alu.last = i == 3; in egcm_int_to_double()
5000 alu.dst.write = 1; in egcm_int_to_double()
5002 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_int_to_double()
5008 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_int_to_double()
5009 alu.op = ALU_OP2_ADD_64; in egcm_int_to_double()
5011 alu.src[0].chan = fp64_switch(i); in egcm_int_to_double()
5012 alu.src[0].sel = ctx->temp_reg; in egcm_int_to_double()
5014 alu.src[1].chan = fp64_switch(i + 2); in egcm_int_to_double()
5015 alu.src[1].sel = ctx->temp_reg; in egcm_int_to_double()
5016 tgsi_dst(ctx, &inst->Dst[0], dchan + i, &alu.dst); in egcm_int_to_double()
5017 alu.last = i == 1; in egcm_int_to_double()
5019 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_int_to_double()
5032 struct r600_bytecode_alu alu; in egcm_double_to_int() local
5047 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_double_to_int()
5048 alu.op = ctx->inst_info->op; in egcm_double_to_int()
5050 alu.src[0].chan = i; in egcm_double_to_int()
5051 alu.src[0].sel = treg; in egcm_double_to_int()
5052 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in egcm_double_to_int()
5053 alu.last = (i == lasti); in egcm_double_to_int()
5055 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_double_to_int()
5069 struct r600_bytecode_alu alu; in cayman_emit_unary_double_raw() local
5075 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_emit_unary_double_raw()
5076 alu.op = op; in cayman_emit_unary_double_raw()
5078 r600_bytecode_src(&alu.src[0], src, 1); in cayman_emit_unary_double_raw()
5079 r600_bytecode_src(&alu.src[1], src, 0); in cayman_emit_unary_double_raw()
5082 r600_bytecode_src_set_abs(&alu.src[1]); in cayman_emit_unary_double_raw()
5084 alu.dst.sel = dst_reg; in cayman_emit_unary_double_raw()
5085 alu.dst.chan = i; in cayman_emit_unary_double_raw()
5086 alu.dst.write = (i == 0 || i == 1); in cayman_emit_unary_double_raw()
5089 alu.last = 1; in cayman_emit_unary_double_raw()
5090 r = r600_bytecode_add_alu(bc, &alu); in cayman_emit_unary_double_raw()
5102 struct r600_bytecode_alu alu; in cayman_emit_double_instr() local
5124 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_emit_double_instr()
5125 alu.op = ALU_OP1_MOV; in cayman_emit_double_instr()
5126 alu.src[0].sel = t1; in cayman_emit_double_instr()
5127 alu.src[0].chan = (i == 0 || i == 2) ? 0 : 1; in cayman_emit_double_instr()
5128 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in cayman_emit_double_instr()
5129 alu.dst.write = 1; in cayman_emit_double_instr()
5131 alu.last = 1; in cayman_emit_double_instr()
5132 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_emit_double_instr()
5143 struct r600_bytecode_alu alu; in cayman_emit_float_instr() local
5147 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_emit_float_instr()
5148 alu.op = ctx->inst_info->op; in cayman_emit_float_instr()
5150 r600_bytecode_src(&alu.src[j], &ctx->src[j], 0); in cayman_emit_float_instr()
5154 r600_bytecode_src_set_abs(&alu.src[j]); in cayman_emit_float_instr()
5157 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in cayman_emit_float_instr()
5158 alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1; in cayman_emit_float_instr()
5161 alu.last = 1; in cayman_emit_float_instr()
5162 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_emit_float_instr()
5173 struct r600_bytecode_alu alu; in cayman_mul_int_instr() local
5182 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_mul_int_instr()
5183 alu.op = ctx->inst_info->op; in cayman_mul_int_instr()
5185 r600_bytecode_src(&alu.src[j], &ctx->src[j], k); in cayman_mul_int_instr()
5187 alu.dst.sel = t1; in cayman_mul_int_instr()
5188 alu.dst.chan = i; in cayman_mul_int_instr()
5189 alu.dst.write = (i == k); in cayman_mul_int_instr()
5191 alu.last = 1; in cayman_mul_int_instr()
5192 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_mul_int_instr()
5201 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_mul_int_instr()
5202 alu.op = ALU_OP1_MOV; in cayman_mul_int_instr()
5203 alu.src[0].sel = t1; in cayman_mul_int_instr()
5204 alu.src[0].chan = i; in cayman_mul_int_instr()
5205 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in cayman_mul_int_instr()
5206 alu.dst.write = 1; in cayman_mul_int_instr()
5208 alu.last = 1; in cayman_mul_int_instr()
5209 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_mul_int_instr()
5222 struct r600_bytecode_alu alu; in cayman_mul_double_instr() local
5234 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_mul_double_instr()
5235 alu.op = ctx->inst_info->op; in cayman_mul_double_instr()
5237 r600_bytecode_src(&alu.src[j], &ctx->src[j], k * 2 + ((i == 3) ? 0 : 1)); in cayman_mul_double_instr()
5239 alu.dst.sel = t1; in cayman_mul_double_instr()
5240 alu.dst.chan = i; in cayman_mul_double_instr()
5241 alu.dst.write = 1; in cayman_mul_double_instr()
5243 alu.last = 1; in cayman_mul_double_instr()
5244 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_mul_double_instr()
5252 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_mul_double_instr()
5253 alu.op = ALU_OP1_MOV; in cayman_mul_double_instr()
5254 alu.src[0].sel = t1; in cayman_mul_double_instr()
5255 alu.src[0].chan = i; in cayman_mul_double_instr()
5256 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in cayman_mul_double_instr()
5257 alu.dst.write = 1; in cayman_mul_double_instr()
5259 alu.last = 1; in cayman_mul_double_instr()
5260 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_mul_double_instr()
5275 struct r600_bytecode_alu alu; in cayman_ddiv_instr() local
5291 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_ddiv_instr()
5292 alu.op = ALU_OP2_MUL_64; in cayman_ddiv_instr()
5294 r600_bytecode_src(&alu.src[0], &ctx->src[0], k * 2 + ((i == 3) ? 0 : 1)); in cayman_ddiv_instr()
5296 alu.src[1].sel = t1; in cayman_ddiv_instr()
5297 alu.src[1].chan = (i == 3) ? 0 : 1; in cayman_ddiv_instr()
5299 alu.dst.sel = t1; in cayman_ddiv_instr()
5300 alu.dst.chan = i; in cayman_ddiv_instr()
5301 alu.dst.write = 1; in cayman_ddiv_instr()
5303 alu.last = 1; in cayman_ddiv_instr()
5304 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_ddiv_instr()
5310 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_ddiv_instr()
5311 alu.op = ALU_OP1_MOV; in cayman_ddiv_instr()
5312 alu.src[0].sel = t1; in cayman_ddiv_instr()
5313 alu.src[0].chan = i; in cayman_ddiv_instr()
5314 tgsi_dst(ctx, &inst->Dst[0], k * 2 + i, &alu.dst); in cayman_ddiv_instr()
5315 alu.dst.write = 1; in cayman_ddiv_instr()
5317 alu.last = 1; in cayman_ddiv_instr()
5318 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_ddiv_instr()
5333 struct r600_bytecode_alu alu; in tgsi_setup_trig() local
5335 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_setup_trig()
5336 alu.op = ALU_OP3_MULADD; in tgsi_setup_trig()
5337 alu.is_op3 = 1; in tgsi_setup_trig()
5339 alu.dst.chan = 0; in tgsi_setup_trig()
5340 alu.dst.sel = ctx->temp_reg; in tgsi_setup_trig()
5341 alu.dst.write = 1; in tgsi_setup_trig()
5343 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_setup_trig()
5345 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_setup_trig()
5346 alu.src[1].chan = 0; in tgsi_setup_trig()
5347 alu.src[1].value = u_bitcast_f2u(0.5f * M_1_PI); in tgsi_setup_trig()
5348 alu.src[2].sel = V_SQ_ALU_SRC_0_5; in tgsi_setup_trig()
5349 alu.src[2].chan = 0; in tgsi_setup_trig()
5350 alu.last = 1; in tgsi_setup_trig()
5351 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_setup_trig()
5355 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_setup_trig()
5356 alu.op = ALU_OP1_FRACT; in tgsi_setup_trig()
5358 alu.dst.chan = 0; in tgsi_setup_trig()
5359 alu.dst.sel = ctx->temp_reg; in tgsi_setup_trig()
5360 alu.dst.write = 1; in tgsi_setup_trig()
5362 alu.src[0].sel = ctx->temp_reg; in tgsi_setup_trig()
5363 alu.src[0].chan = 0; in tgsi_setup_trig()
5364 alu.last = 1; in tgsi_setup_trig()
5365 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_setup_trig()
5369 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_setup_trig()
5370 alu.op = ALU_OP3_MULADD; in tgsi_setup_trig()
5371 alu.is_op3 = 1; in tgsi_setup_trig()
5373 alu.dst.chan = 0; in tgsi_setup_trig()
5374 alu.dst.sel = ctx->temp_reg; in tgsi_setup_trig()
5375 alu.dst.write = 1; in tgsi_setup_trig()
5377 alu.src[0].sel = ctx->temp_reg; in tgsi_setup_trig()
5378 alu.src[0].chan = 0; in tgsi_setup_trig()
5380 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_setup_trig()
5381 alu.src[1].chan = 0; in tgsi_setup_trig()
5382 alu.src[2].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_setup_trig()
5383 alu.src[2].chan = 0; in tgsi_setup_trig()
5386 alu.src[1].value = u_bitcast_f2u(2.0f * M_PI); in tgsi_setup_trig()
5387 alu.src[2].value = u_bitcast_f2u(-M_PI); in tgsi_setup_trig()
5389 alu.src[1].sel = V_SQ_ALU_SRC_1; in tgsi_setup_trig()
5390 alu.src[2].sel = V_SQ_ALU_SRC_0_5; in tgsi_setup_trig()
5391 alu.src[2].neg = 1; in tgsi_setup_trig()
5394 alu.last = 1; in tgsi_setup_trig()
5395 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_setup_trig()
5404 struct r600_bytecode_alu alu; in cayman_trig() local
5414 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_trig()
5415 alu.op = ctx->inst_info->op; in cayman_trig()
5416 alu.dst.chan = i; in cayman_trig()
5418 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in cayman_trig()
5419 alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1; in cayman_trig()
5421 alu.src[0].sel = ctx->temp_reg; in cayman_trig()
5422 alu.src[0].chan = 0; in cayman_trig()
5424 alu.last = 1; in cayman_trig()
5425 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_trig()
5435 struct r600_bytecode_alu alu; in tgsi_trig() local
5443 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_trig()
5444 alu.op = ctx->inst_info->op; in tgsi_trig()
5445 alu.dst.chan = 0; in tgsi_trig()
5446 alu.dst.sel = ctx->temp_reg; in tgsi_trig()
5447 alu.dst.write = 1; in tgsi_trig()
5449 alu.src[0].sel = ctx->temp_reg; in tgsi_trig()
5450 alu.src[0].chan = 0; in tgsi_trig()
5451 alu.last = 1; in tgsi_trig()
5452 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_trig()
5461 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_trig()
5462 alu.op = ALU_OP1_MOV; in tgsi_trig()
5464 alu.src[0].sel = ctx->temp_reg; in tgsi_trig()
5465 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_trig()
5467 alu.last = 1; in tgsi_trig()
5468 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_trig()
5478 struct r600_bytecode_alu alu; in tgsi_kill() local
5482 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_kill()
5483 alu.op = ctx->inst_info->op; in tgsi_kill()
5485 alu.dst.chan = i; in tgsi_kill()
5487 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_kill()
5490 alu.src[1].sel = V_SQ_ALU_SRC_1; in tgsi_kill()
5491 alu.src[1].neg = 1; in tgsi_kill()
5493 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_kill()
5496 alu.last = 1; in tgsi_kill()
5498 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_kill()
5512 struct r600_bytecode_alu alu; in tgsi_lit() local
5516 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5517 alu.op = ALU_OP2_MAX; in tgsi_lit()
5518 r600_bytecode_src(&alu.src[0], &ctx->src[0], 1); in tgsi_lit()
5519 alu.src[1].sel = V_SQ_ALU_SRC_0; /*0.0*/ in tgsi_lit()
5520 alu.src[1].chan = 1; in tgsi_lit()
5522 alu.dst.sel = ctx->temp_reg; in tgsi_lit()
5523 alu.dst.chan = 0; in tgsi_lit()
5524 alu.dst.write = 1; in tgsi_lit()
5526 alu.last = 1; in tgsi_lit()
5527 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5540 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5541 alu.op = ALU_OP1_LOG_CLAMPED; in tgsi_lit()
5542 alu.src[0].sel = ctx->temp_reg; in tgsi_lit()
5543 alu.src[0].chan = 0; in tgsi_lit()
5544 alu.dst.sel = ctx->temp_reg; in tgsi_lit()
5545 alu.dst.chan = i; in tgsi_lit()
5547 alu.dst.write = 1; in tgsi_lit()
5548 alu.last = 1; in tgsi_lit()
5550 alu.dst.write = 0; in tgsi_lit()
5552 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5558 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5559 alu.op = ALU_OP1_LOG_CLAMPED; in tgsi_lit()
5560 alu.src[0].sel = ctx->temp_reg; in tgsi_lit()
5561 alu.src[0].chan = 0; in tgsi_lit()
5562 alu.dst.sel = ctx->temp_reg; in tgsi_lit()
5563 alu.dst.chan = 2; in tgsi_lit()
5564 alu.dst.write = 1; in tgsi_lit()
5565 alu.last = 1; in tgsi_lit()
5566 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5571 chan = alu.dst.chan; in tgsi_lit()
5572 sel = alu.dst.sel; in tgsi_lit()
5575 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5576 alu.op = ALU_OP3_MUL_LIT; in tgsi_lit()
5577 alu.src[0].sel = sel; in tgsi_lit()
5578 alu.src[0].chan = chan; in tgsi_lit()
5579 r600_bytecode_src(&alu.src[1], &ctx->src[0], 3); in tgsi_lit()
5580 r600_bytecode_src(&alu.src[2], &ctx->src[0], 0); in tgsi_lit()
5581 alu.dst.sel = ctx->temp_reg; in tgsi_lit()
5582 alu.dst.chan = 0; in tgsi_lit()
5583 alu.dst.write = 1; in tgsi_lit()
5584 alu.is_op3 = 1; in tgsi_lit()
5585 alu.last = 1; in tgsi_lit()
5586 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5593 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5594 alu.op = ALU_OP1_EXP_IEEE; in tgsi_lit()
5595 alu.src[0].sel = ctx->temp_reg; in tgsi_lit()
5596 alu.src[0].chan = 0; in tgsi_lit()
5597 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_lit()
5599 alu.dst.write = 1; in tgsi_lit()
5600 alu.last = 1; in tgsi_lit()
5602 alu.dst.write = 0; in tgsi_lit()
5603 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5609 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5610 alu.op = ALU_OP1_EXP_IEEE; in tgsi_lit()
5611 alu.src[0].sel = ctx->temp_reg; in tgsi_lit()
5612 alu.src[0].chan = 0; in tgsi_lit()
5613 tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst); in tgsi_lit()
5614 alu.last = 1; in tgsi_lit()
5615 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5622 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5623 alu.op = ALU_OP1_MOV; in tgsi_lit()
5624 alu.src[0].sel = V_SQ_ALU_SRC_1; /*1.0*/ in tgsi_lit()
5625 alu.src[0].chan = 0; in tgsi_lit()
5626 tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst); in tgsi_lit()
5627 alu.dst.write = (inst->Dst[0].Register.WriteMask >> 0) & 1; in tgsi_lit()
5628 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5633 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5634 alu.op = ALU_OP2_MAX; in tgsi_lit()
5635 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_lit()
5636 alu.src[1].sel = V_SQ_ALU_SRC_0; /*0.0*/ in tgsi_lit()
5637 alu.src[1].chan = 0; in tgsi_lit()
5638 tgsi_dst(ctx, &inst->Dst[0], 1, &alu.dst); in tgsi_lit()
5639 alu.dst.write = (inst->Dst[0].Register.WriteMask >> 1) & 1; in tgsi_lit()
5640 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5645 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lit()
5646 alu.op = ALU_OP1_MOV; in tgsi_lit()
5647 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_lit()
5648 alu.src[0].chan = 0; in tgsi_lit()
5649 tgsi_dst(ctx, &inst->Dst[0], 3, &alu.dst); in tgsi_lit()
5650 alu.dst.write = (inst->Dst[0].Register.WriteMask >> 3) & 1; in tgsi_lit()
5651 alu.last = 1; in tgsi_lit()
5652 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lit()
5662 struct r600_bytecode_alu alu; in tgsi_rsq() local
5665 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_rsq()
5667 alu.op = ALU_OP1_RECIPSQRT_IEEE; in tgsi_rsq()
5670 r600_bytecode_src(&alu.src[i], &ctx->src[i], 0); in tgsi_rsq()
5671 r600_bytecode_src_set_abs(&alu.src[i]); in tgsi_rsq()
5673 alu.dst.sel = ctx->temp_reg; in tgsi_rsq()
5674 alu.dst.write = 1; in tgsi_rsq()
5675 alu.last = 1; in tgsi_rsq()
5676 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_rsq()
5686 struct r600_bytecode_alu alu; in tgsi_helper_tempx_replicate() local
5690 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_helper_tempx_replicate()
5691 alu.src[0].sel = ctx->temp_reg; in tgsi_helper_tempx_replicate()
5692 alu.op = ALU_OP1_MOV; in tgsi_helper_tempx_replicate()
5693 alu.dst.chan = i; in tgsi_helper_tempx_replicate()
5694 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_helper_tempx_replicate()
5695 alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1; in tgsi_helper_tempx_replicate()
5697 alu.last = 1; in tgsi_helper_tempx_replicate()
5698 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_helper_tempx_replicate()
5708 struct r600_bytecode_alu alu; in tgsi_trans_srcx_replicate() local
5711 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_trans_srcx_replicate()
5712 alu.op = ctx->inst_info->op; in tgsi_trans_srcx_replicate()
5714 r600_bytecode_src(&alu.src[i], &ctx->src[i], 0); in tgsi_trans_srcx_replicate()
5716 alu.dst.sel = ctx->temp_reg; in tgsi_trans_srcx_replicate()
5717 alu.dst.write = 1; in tgsi_trans_srcx_replicate()
5718 alu.last = 1; in tgsi_trans_srcx_replicate()
5719 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_trans_srcx_replicate()
5730 struct r600_bytecode_alu alu; in cayman_pow() local
5734 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_pow()
5735 alu.op = ALU_OP1_LOG_IEEE; in cayman_pow()
5736 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in cayman_pow()
5737 alu.dst.sel = ctx->temp_reg; in cayman_pow()
5738 alu.dst.chan = i; in cayman_pow()
5739 alu.dst.write = 1; in cayman_pow()
5741 alu.last = 1; in cayman_pow()
5742 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_pow()
5748 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_pow()
5749 alu.op = ALU_OP2_MUL; in cayman_pow()
5750 r600_bytecode_src(&alu.src[0], &ctx->src[1], 0); in cayman_pow()
5751 alu.src[1].sel = ctx->temp_reg; in cayman_pow()
5752 alu.dst.sel = ctx->temp_reg; in cayman_pow()
5753 alu.dst.write = 1; in cayman_pow()
5754 alu.last = 1; in cayman_pow()
5755 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_pow()
5761 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in cayman_pow()
5762 alu.op = ALU_OP1_EXP_IEEE; in cayman_pow()
5763 alu.src[0].sel = ctx->temp_reg; in cayman_pow()
5765 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in cayman_pow()
5766 alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1; in cayman_pow()
5768 alu.last = 1; in cayman_pow()
5769 r = r600_bytecode_add_alu(ctx->bc, &alu); in cayman_pow()
5778 struct r600_bytecode_alu alu; in tgsi_pow() local
5782 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_pow()
5783 alu.op = ALU_OP1_LOG_IEEE; in tgsi_pow()
5784 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_pow()
5785 alu.dst.sel = ctx->temp_reg; in tgsi_pow()
5786 alu.dst.write = 1; in tgsi_pow()
5787 alu.last = 1; in tgsi_pow()
5788 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_pow()
5792 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_pow()
5793 alu.op = ALU_OP2_MUL; in tgsi_pow()
5794 r600_bytecode_src(&alu.src[0], &ctx->src[1], 0); in tgsi_pow()
5795 alu.src[1].sel = ctx->temp_reg; in tgsi_pow()
5796 alu.dst.sel = ctx->temp_reg; in tgsi_pow()
5797 alu.dst.write = 1; in tgsi_pow()
5798 alu.last = 1; in tgsi_pow()
5799 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_pow()
5803 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_pow()
5804 alu.op = ALU_OP1_EXP_IEEE; in tgsi_pow()
5805 alu.src[0].sel = ctx->temp_reg; in tgsi_pow()
5806 alu.dst.sel = ctx->temp_reg; in tgsi_pow()
5807 alu.dst.write = 1; in tgsi_pow()
5808 alu.last = 1; in tgsi_pow()
5809 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_pow()
5818 struct r600_bytecode_alu alu; in emit_mul_int_op() local
5820 alu = *alu_src; in emit_mul_int_op()
5823 alu.dst.chan = i; in emit_mul_int_op()
5824 alu.dst.write = (i == alu_src->dst.chan); in emit_mul_int_op()
5825 alu.last = (i == 3); in emit_mul_int_op()
5827 r = r600_bytecode_add_alu(bc, &alu); in emit_mul_int_op()
5832 alu.last = 1; in emit_mul_int_op()
5833 r = r600_bytecode_add_alu(bc, &alu); in emit_mul_int_op()
5843 struct r600_bytecode_alu alu; in tgsi_divmod() local
5912 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5913 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
5915 alu.dst.sel = tmp2; in tgsi_divmod()
5916 alu.dst.chan = 0; in tgsi_divmod()
5917 alu.dst.write = 1; in tgsi_divmod()
5919 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_divmod()
5921 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_divmod()
5923 alu.last = 1; in tgsi_divmod()
5924 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5928 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5929 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
5931 alu.dst.sel = tmp2; in tgsi_divmod()
5932 alu.dst.chan = 1; in tgsi_divmod()
5933 alu.dst.write = 1; in tgsi_divmod()
5935 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_divmod()
5937 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
5939 alu.last = 1; in tgsi_divmod()
5940 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5947 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5948 alu.op = ALU_OP2_XOR_INT; in tgsi_divmod()
5950 alu.dst.sel = tmp2; in tgsi_divmod()
5951 alu.dst.chan = 2; in tgsi_divmod()
5952 alu.dst.write = 1; in tgsi_divmod()
5954 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_divmod()
5955 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
5957 alu.last = 1; in tgsi_divmod()
5958 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5963 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5964 alu.op = ALU_OP3_CNDGE_INT; in tgsi_divmod()
5965 alu.is_op3 = 1; in tgsi_divmod()
5967 alu.dst.sel = tmp2; in tgsi_divmod()
5968 alu.dst.chan = 0; in tgsi_divmod()
5969 alu.dst.write = 1; in tgsi_divmod()
5971 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_divmod()
5972 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_divmod()
5973 alu.src[2].sel = tmp2; in tgsi_divmod()
5974 alu.src[2].chan = 0; in tgsi_divmod()
5976 alu.last = 1; in tgsi_divmod()
5977 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
5981 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
5982 alu.op = ALU_OP3_CNDGE_INT; in tgsi_divmod()
5983 alu.is_op3 = 1; in tgsi_divmod()
5985 alu.dst.sel = tmp2; in tgsi_divmod()
5986 alu.dst.chan = 1; in tgsi_divmod()
5987 alu.dst.write = 1; in tgsi_divmod()
5989 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_divmod()
5990 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
5991 alu.src[2].sel = tmp2; in tgsi_divmod()
5992 alu.src[2].chan = 1; in tgsi_divmod()
5994 alu.last = 1; in tgsi_divmod()
5995 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6003 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6004 alu.op = ALU_OP1_UINT_TO_FLT; in tgsi_divmod()
6006 alu.dst.sel = tmp3; in tgsi_divmod()
6007 alu.dst.chan = 0; in tgsi_divmod()
6008 alu.dst.write = 1; in tgsi_divmod()
6011 alu.src[0].sel = tmp2; in tgsi_divmod()
6012 alu.src[0].chan = 1; in tgsi_divmod()
6014 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_divmod()
6017 alu.last = 1; in tgsi_divmod()
6018 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6023 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6024 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_divmod()
6026 alu.dst.sel = tmp0; in tgsi_divmod()
6027 alu.dst.chan = j; in tgsi_divmod()
6028 alu.dst.write = (j == 0); in tgsi_divmod()
6030 alu.src[0].sel = tmp3; in tgsi_divmod()
6031 alu.src[0].chan = 0; in tgsi_divmod()
6034 alu.last = 1; in tgsi_divmod()
6035 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6039 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6040 alu.op = ALU_OP2_MUL; in tgsi_divmod()
6042 alu.src[0].sel = tmp0; in tgsi_divmod()
6043 alu.src[0].chan = 0; in tgsi_divmod()
6045 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_divmod()
6046 alu.src[1].value = 0x4f800000; in tgsi_divmod()
6048 alu.dst.sel = tmp3; in tgsi_divmod()
6049 alu.dst.write = 1; in tgsi_divmod()
6050 alu.last = 1; in tgsi_divmod()
6051 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_divmod()
6055 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6056 alu.op = ALU_OP1_FLT_TO_UINT; in tgsi_divmod()
6058 alu.dst.sel = tmp0; in tgsi_divmod()
6059 alu.dst.chan = 0; in tgsi_divmod()
6060 alu.dst.write = 1; in tgsi_divmod()
6062 alu.src[0].sel = tmp3; in tgsi_divmod()
6063 alu.src[0].chan = 0; in tgsi_divmod()
6065 alu.last = 1; in tgsi_divmod()
6066 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6070 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6071 alu.op = ALU_OP1_RECIP_UINT; in tgsi_divmod()
6073 alu.dst.sel = tmp0; in tgsi_divmod()
6074 alu.dst.chan = 0; in tgsi_divmod()
6075 alu.dst.write = 1; in tgsi_divmod()
6078 alu.src[0].sel = tmp2; in tgsi_divmod()
6079 alu.src[0].chan = 1; in tgsi_divmod()
6081 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_divmod()
6084 alu.last = 1; in tgsi_divmod()
6085 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6090 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6091 alu.op = ALU_OP2_MULLO_UINT; in tgsi_divmod()
6093 alu.dst.sel = tmp0; in tgsi_divmod()
6094 alu.dst.chan = 2; in tgsi_divmod()
6095 alu.dst.write = 1; in tgsi_divmod()
6097 alu.src[0].sel = tmp0; in tgsi_divmod()
6098 alu.src[0].chan = 0; in tgsi_divmod()
6100 alu.src[1].sel = tmp2; in tgsi_divmod()
6101 alu.src[1].chan = 1; in tgsi_divmod()
6103 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
6106 if ((r = emit_mul_int_op(ctx->bc, &alu))) in tgsi_divmod()
6110 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6111 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
6113 alu.dst.sel = tmp0; in tgsi_divmod()
6114 alu.dst.chan = 3; in tgsi_divmod()
6115 alu.dst.write = 1; in tgsi_divmod()
6117 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_divmod()
6118 alu.src[1].sel = tmp0; in tgsi_divmod()
6119 alu.src[1].chan = 2; in tgsi_divmod()
6121 alu.last = 1; in tgsi_divmod()
6122 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6126 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6127 alu.op = ALU_OP2_MULHI_UINT; in tgsi_divmod()
6129 alu.dst.sel = tmp0; in tgsi_divmod()
6130 alu.dst.chan = 1; in tgsi_divmod()
6131 alu.dst.write = 1; in tgsi_divmod()
6133 alu.src[0].sel = tmp0; in tgsi_divmod()
6134 alu.src[0].chan = 0; in tgsi_divmod()
6137 alu.src[1].sel = tmp2; in tgsi_divmod()
6138 alu.src[1].chan = 1; in tgsi_divmod()
6140 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
6143 if ((r = emit_mul_int_op(ctx->bc, &alu))) in tgsi_divmod()
6147 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6148 alu.op = ALU_OP3_CNDE_INT; in tgsi_divmod()
6149 alu.is_op3 = 1; in tgsi_divmod()
6151 alu.dst.sel = tmp0; in tgsi_divmod()
6152 alu.dst.chan = 2; in tgsi_divmod()
6153 alu.dst.write = 1; in tgsi_divmod()
6155 alu.src[0].sel = tmp0; in tgsi_divmod()
6156 alu.src[0].chan = 1; in tgsi_divmod()
6157 alu.src[1].sel = tmp0; in tgsi_divmod()
6158 alu.src[1].chan = 3; in tgsi_divmod()
6159 alu.src[2].sel = tmp0; in tgsi_divmod()
6160 alu.src[2].chan = 2; in tgsi_divmod()
6162 alu.last = 1; in tgsi_divmod()
6163 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6167 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6168 alu.op = ALU_OP2_MULHI_UINT; in tgsi_divmod()
6170 alu.dst.sel = tmp0; in tgsi_divmod()
6171 alu.dst.chan = 3; in tgsi_divmod()
6172 alu.dst.write = 1; in tgsi_divmod()
6174 alu.src[0].sel = tmp0; in tgsi_divmod()
6175 alu.src[0].chan = 2; in tgsi_divmod()
6177 alu.src[1].sel = tmp0; in tgsi_divmod()
6178 alu.src[1].chan = 0; in tgsi_divmod()
6180 if ((r = emit_mul_int_op(ctx->bc, &alu))) in tgsi_divmod()
6184 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6185 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
6187 alu.dst.sel = tmp1; in tgsi_divmod()
6188 alu.dst.chan = 0; in tgsi_divmod()
6189 alu.dst.write = 1; in tgsi_divmod()
6191 alu.src[0].sel = tmp0; in tgsi_divmod()
6192 alu.src[0].chan = 0; in tgsi_divmod()
6193 alu.src[1].sel = tmp0; in tgsi_divmod()
6194 alu.src[1].chan = 3; in tgsi_divmod()
6196 alu.last = 1; in tgsi_divmod()
6197 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6201 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6202 alu.op = ALU_OP2_ADD_INT; in tgsi_divmod()
6204 alu.dst.sel = tmp1; in tgsi_divmod()
6205 alu.dst.chan = 1; in tgsi_divmod()
6206 alu.dst.write = 1; in tgsi_divmod()
6208 alu.src[0].sel = tmp0; in tgsi_divmod()
6209 alu.src[0].chan = 0; in tgsi_divmod()
6210 alu.src[1].sel = tmp0; in tgsi_divmod()
6211 alu.src[1].chan = 3; in tgsi_divmod()
6213 alu.last = 1; in tgsi_divmod()
6214 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6218 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6219 alu.op = ALU_OP3_CNDE_INT; in tgsi_divmod()
6220 alu.is_op3 = 1; in tgsi_divmod()
6222 alu.dst.sel = tmp0; in tgsi_divmod()
6223 alu.dst.chan = 0; in tgsi_divmod()
6224 alu.dst.write = 1; in tgsi_divmod()
6226 alu.src[0].sel = tmp0; in tgsi_divmod()
6227 alu.src[0].chan = 1; in tgsi_divmod()
6228 alu.src[1].sel = tmp1; in tgsi_divmod()
6229 alu.src[1].chan = 1; in tgsi_divmod()
6230 alu.src[2].sel = tmp1; in tgsi_divmod()
6231 alu.src[2].chan = 0; in tgsi_divmod()
6233 alu.last = 1; in tgsi_divmod()
6234 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6238 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6239 alu.op = ALU_OP2_MULHI_UINT; in tgsi_divmod()
6241 alu.dst.sel = tmp0; in tgsi_divmod()
6242 alu.dst.chan = 2; in tgsi_divmod()
6243 alu.dst.write = 1; in tgsi_divmod()
6245 alu.src[0].sel = tmp0; in tgsi_divmod()
6246 alu.src[0].chan = 0; in tgsi_divmod()
6249 alu.src[1].sel = tmp2; in tgsi_divmod()
6250 alu.src[1].chan = 0; in tgsi_divmod()
6252 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_divmod()
6255 if ((r = emit_mul_int_op(ctx->bc, &alu))) in tgsi_divmod()
6259 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6260 alu.op = ALU_OP2_MULLO_UINT; in tgsi_divmod()
6262 alu.dst.sel = tmp0; in tgsi_divmod()
6263 alu.dst.chan = 1; in tgsi_divmod()
6264 alu.dst.write = 1; in tgsi_divmod()
6267 alu.src[0].sel = tmp2; in tgsi_divmod()
6268 alu.src[0].chan = 1; in tgsi_divmod()
6270 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_divmod()
6273 alu.src[1].sel = tmp0; in tgsi_divmod()
6274 alu.src[1].chan = 2; in tgsi_divmod()
6276 if ((r = emit_mul_int_op(ctx->bc, &alu))) in tgsi_divmod()
6280 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6281 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
6283 alu.dst.sel = tmp0; in tgsi_divmod()
6284 alu.dst.chan = 3; in tgsi_divmod()
6285 alu.dst.write = 1; in tgsi_divmod()
6288 alu.src[0].sel = tmp2; in tgsi_divmod()
6289 alu.src[0].chan = 0; in tgsi_divmod()
6291 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_divmod()
6294 alu.src[1].sel = tmp0; in tgsi_divmod()
6295 alu.src[1].chan = 1; in tgsi_divmod()
6297 alu.last = 1; in tgsi_divmod()
6298 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6302 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6303 alu.op = ALU_OP2_SETGE_UINT; in tgsi_divmod()
6305 alu.dst.sel = tmp1; in tgsi_divmod()
6306 alu.dst.chan = 0; in tgsi_divmod()
6307 alu.dst.write = 1; in tgsi_divmod()
6309 alu.src[0].sel = tmp0; in tgsi_divmod()
6310 alu.src[0].chan = 3; in tgsi_divmod()
6312 alu.src[1].sel = tmp2; in tgsi_divmod()
6313 alu.src[1].chan = 1; in tgsi_divmod()
6315 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
6318 alu.last = 1; in tgsi_divmod()
6319 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6323 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6324 alu.op = ALU_OP2_SETGE_UINT; in tgsi_divmod()
6326 alu.dst.sel = tmp1; in tgsi_divmod()
6327 alu.dst.chan = 1; in tgsi_divmod()
6328 alu.dst.write = 1; in tgsi_divmod()
6331 alu.src[0].sel = tmp2; in tgsi_divmod()
6332 alu.src[0].chan = 0; in tgsi_divmod()
6334 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_divmod()
6337 alu.src[1].sel = tmp0; in tgsi_divmod()
6338 alu.src[1].chan = 1; in tgsi_divmod()
6340 alu.last = 1; in tgsi_divmod()
6341 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6347 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6348 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
6350 alu.dst.sel = tmp1; in tgsi_divmod()
6351 alu.dst.chan = 2; in tgsi_divmod()
6352 alu.dst.write = 1; in tgsi_divmod()
6354 alu.src[0].sel = tmp0; in tgsi_divmod()
6355 alu.src[0].chan = 3; in tgsi_divmod()
6358 alu.src[1].sel = tmp2; in tgsi_divmod()
6359 alu.src[1].chan = 1; in tgsi_divmod()
6361 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
6364 alu.last = 1; in tgsi_divmod()
6365 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6369 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6370 alu.op = ALU_OP2_ADD_INT; in tgsi_divmod()
6372 alu.dst.sel = tmp1; in tgsi_divmod()
6373 alu.dst.chan = 3; in tgsi_divmod()
6374 alu.dst.write = 1; in tgsi_divmod()
6376 alu.src[0].sel = tmp0; in tgsi_divmod()
6377 alu.src[0].chan = 3; in tgsi_divmod()
6379 alu.src[1].sel = tmp2; in tgsi_divmod()
6380 alu.src[1].chan = 1; in tgsi_divmod()
6382 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_divmod()
6385 alu.last = 1; in tgsi_divmod()
6386 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6392 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6393 alu.op = ALU_OP2_ADD_INT; in tgsi_divmod()
6395 alu.dst.sel = tmp1; in tgsi_divmod()
6396 alu.dst.chan = 2; in tgsi_divmod()
6397 alu.dst.write = 1; in tgsi_divmod()
6399 alu.src[0].sel = tmp0; in tgsi_divmod()
6400 alu.src[0].chan = 2; in tgsi_divmod()
6401 alu.src[1].sel = V_SQ_ALU_SRC_1_INT; in tgsi_divmod()
6403 alu.last = 1; in tgsi_divmod()
6404 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6408 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6409 alu.op = ALU_OP2_ADD_INT; in tgsi_divmod()
6411 alu.dst.sel = tmp1; in tgsi_divmod()
6412 alu.dst.chan = 3; in tgsi_divmod()
6413 alu.dst.write = 1; in tgsi_divmod()
6415 alu.src[0].sel = tmp0; in tgsi_divmod()
6416 alu.src[0].chan = 2; in tgsi_divmod()
6417 alu.src[1].sel = V_SQ_ALU_SRC_M_1_INT; in tgsi_divmod()
6419 alu.last = 1; in tgsi_divmod()
6420 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6426 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6427 alu.op = ALU_OP2_AND_INT; in tgsi_divmod()
6429 alu.dst.sel = tmp1; in tgsi_divmod()
6430 alu.dst.chan = 0; in tgsi_divmod()
6431 alu.dst.write = 1; in tgsi_divmod()
6433 alu.src[0].sel = tmp1; in tgsi_divmod()
6434 alu.src[0].chan = 0; in tgsi_divmod()
6435 alu.src[1].sel = tmp1; in tgsi_divmod()
6436 alu.src[1].chan = 1; in tgsi_divmod()
6438 alu.last = 1; in tgsi_divmod()
6439 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6444 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6445 alu.op = ALU_OP3_CNDE_INT; in tgsi_divmod()
6446 alu.is_op3 = 1; in tgsi_divmod()
6448 alu.dst.sel = tmp0; in tgsi_divmod()
6449 alu.dst.chan = 2; in tgsi_divmod()
6450 alu.dst.write = 1; in tgsi_divmod()
6452 alu.src[0].sel = tmp1; in tgsi_divmod()
6453 alu.src[0].chan = 0; in tgsi_divmod()
6454 alu.src[1].sel = tmp0; in tgsi_divmod()
6455 alu.src[1].chan = mod ? 3 : 2; in tgsi_divmod()
6456 alu.src[2].sel = tmp1; in tgsi_divmod()
6457 alu.src[2].chan = 2; in tgsi_divmod()
6459 alu.last = 1; in tgsi_divmod()
6460 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6464 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6465 alu.op = ALU_OP3_CNDE_INT; in tgsi_divmod()
6466 alu.is_op3 = 1; in tgsi_divmod()
6469 alu.dst.sel = tmp0; in tgsi_divmod()
6470 alu.dst.chan = 2; in tgsi_divmod()
6471 alu.dst.write = 1; in tgsi_divmod()
6474 alu.dst.sel = tmp4; in tgsi_divmod()
6475 alu.dst.chan = i; in tgsi_divmod()
6476 alu.dst.write = 1; in tgsi_divmod()
6478 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_divmod()
6482 alu.src[0].sel = tmp1; in tgsi_divmod()
6483 alu.src[0].chan = 1; in tgsi_divmod()
6484 alu.src[1].sel = tmp1; in tgsi_divmod()
6485 alu.src[1].chan = 3; in tgsi_divmod()
6486 alu.src[2].sel = tmp0; in tgsi_divmod()
6487 alu.src[2].chan = 2; in tgsi_divmod()
6489 alu.last = 1; in tgsi_divmod()
6490 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6500 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6501 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
6503 alu.dst.sel = tmp0; in tgsi_divmod()
6504 alu.dst.chan = 0; in tgsi_divmod()
6505 alu.dst.write = 1; in tgsi_divmod()
6507 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_divmod()
6508 alu.src[1].sel = tmp0; in tgsi_divmod()
6509 alu.src[1].chan = 2; in tgsi_divmod()
6511 alu.last = 1; in tgsi_divmod()
6512 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6517 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6518 alu.op = ALU_OP3_CNDGE_INT; in tgsi_divmod()
6519 alu.is_op3 = 1; in tgsi_divmod()
6522 alu.dst.sel = tmp4; in tgsi_divmod()
6523 alu.dst.chan = i; in tgsi_divmod()
6524 alu.dst.write = 1; in tgsi_divmod()
6526 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_divmod()
6529 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_divmod()
6530 alu.src[1].sel = tmp0; in tgsi_divmod()
6531 alu.src[1].chan = 2; in tgsi_divmod()
6532 alu.src[2].sel = tmp0; in tgsi_divmod()
6533 alu.src[2].chan = 0; in tgsi_divmod()
6535 alu.last = 1; in tgsi_divmod()
6536 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6542 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6543 alu.op = ALU_OP2_SUB_INT; in tgsi_divmod()
6545 alu.dst.sel = tmp0; in tgsi_divmod()
6546 alu.dst.chan = 0; in tgsi_divmod()
6547 alu.dst.write = 1; in tgsi_divmod()
6549 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_divmod()
6550 alu.src[1].sel = tmp0; in tgsi_divmod()
6551 alu.src[1].chan = 2; in tgsi_divmod()
6553 alu.last = 1; in tgsi_divmod()
6554 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6559 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6560 alu.op = ALU_OP3_CNDGE_INT; in tgsi_divmod()
6561 alu.is_op3 = 1; in tgsi_divmod()
6564 alu.dst.sel = tmp4; in tgsi_divmod()
6565 alu.dst.chan = i; in tgsi_divmod()
6566 alu.dst.write = 1; in tgsi_divmod()
6568 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_divmod()
6571 alu.src[0].sel = tmp2; in tgsi_divmod()
6572 alu.src[0].chan = 2; in tgsi_divmod()
6573 alu.src[1].sel = tmp0; in tgsi_divmod()
6574 alu.src[1].chan = 2; in tgsi_divmod()
6575 alu.src[2].sel = tmp0; in tgsi_divmod()
6576 alu.src[2].chan = 0; in tgsi_divmod()
6578 alu.last = 1; in tgsi_divmod()
6579 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6590 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_divmod()
6591 alu.op = ALU_OP1_MOV; in tgsi_divmod()
6592 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_divmod()
6593 alu.src[0].sel = tmp4; in tgsi_divmod()
6594 alu.src[0].chan = i; in tgsi_divmod()
6597 alu.last = 1; in tgsi_divmod()
6598 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_divmod()
6630 struct r600_bytecode_alu alu; in tgsi_f2i() local
6639 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_f2i()
6640 alu.op = ALU_OP1_TRUNC; in tgsi_f2i()
6642 alu.dst.sel = ctx->temp_reg; in tgsi_f2i()
6643 alu.dst.chan = i; in tgsi_f2i()
6644 alu.dst.write = 1; in tgsi_f2i()
6646 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_f2i()
6648 alu.last = 1; in tgsi_f2i()
6649 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_f2i()
6658 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_f2i()
6659 alu.op = ctx->inst_info->op; in tgsi_f2i()
6661 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_f2i()
6663 alu.src[0].sel = ctx->temp_reg; in tgsi_f2i()
6664 alu.src[0].chan = i; in tgsi_f2i()
6666 if (i == last_inst || alu.op == ALU_OP1_FLT_TO_UINT) in tgsi_f2i()
6667 alu.last = 1; in tgsi_f2i()
6668 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_f2i()
6679 struct r600_bytecode_alu alu; in tgsi_iabs() local
6689 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_iabs()
6690 alu.op = ALU_OP2_SUB_INT; in tgsi_iabs()
6692 alu.dst.sel = ctx->temp_reg; in tgsi_iabs()
6693 alu.dst.chan = i; in tgsi_iabs()
6694 alu.dst.write = 1; in tgsi_iabs()
6696 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_iabs()
6697 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_iabs()
6700 alu.last = 1; in tgsi_iabs()
6701 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_iabs()
6711 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_iabs()
6712 alu.op = ALU_OP3_CNDGE_INT; in tgsi_iabs()
6713 alu.is_op3 = 1; in tgsi_iabs()
6714 alu.dst.write = 1; in tgsi_iabs()
6716 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_iabs()
6718 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_iabs()
6719 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_iabs()
6720 alu.src[2].sel = ctx->temp_reg; in tgsi_iabs()
6721 alu.src[2].chan = i; in tgsi_iabs()
6724 alu.last = 1; in tgsi_iabs()
6725 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_iabs()
6735 struct r600_bytecode_alu alu; in tgsi_issg() local
6745 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_issg()
6746 alu.op = ALU_OP3_CNDGE_INT; in tgsi_issg()
6747 alu.is_op3 = 1; in tgsi_issg()
6749 alu.dst.sel = ctx->temp_reg; in tgsi_issg()
6750 alu.dst.chan = i; in tgsi_issg()
6751 alu.dst.write = 1; in tgsi_issg()
6753 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_issg()
6754 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_issg()
6755 alu.src[2].sel = V_SQ_ALU_SRC_M_1_INT; in tgsi_issg()
6758 alu.last = 1; in tgsi_issg()
6759 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_issg()
6769 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_issg()
6770 alu.op = ALU_OP3_CNDGT_INT; in tgsi_issg()
6771 alu.is_op3 = 1; in tgsi_issg()
6772 alu.dst.write = 1; in tgsi_issg()
6774 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_issg()
6776 alu.src[0].sel = ctx->temp_reg; in tgsi_issg()
6777 alu.src[0].chan = i; in tgsi_issg()
6779 alu.src[1].sel = V_SQ_ALU_SRC_1_INT; in tgsi_issg()
6781 alu.src[2].sel = ctx->temp_reg; in tgsi_issg()
6782 alu.src[2].chan = i; in tgsi_issg()
6785 alu.last = 1; in tgsi_issg()
6786 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_issg()
6800 struct r600_bytecode_alu alu; in tgsi_ssg() local
6807 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_ssg()
6808 alu.op = ALU_OP3_CNDGT; in tgsi_ssg()
6809 alu.is_op3 = 1; in tgsi_ssg()
6811 alu.dst.sel = ctx->temp_reg; in tgsi_ssg()
6812 alu.dst.chan = i; in tgsi_ssg()
6814 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_ssg()
6815 alu.src[1].sel = V_SQ_ALU_SRC_1; in tgsi_ssg()
6816 r600_bytecode_src(&alu.src[2], &ctx->src[0], i); in tgsi_ssg()
6819 alu.last = 1; in tgsi_ssg()
6820 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_ssg()
6829 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_ssg()
6830 alu.op = ALU_OP3_CNDGT; in tgsi_ssg()
6831 alu.is_op3 = 1; in tgsi_ssg()
6832 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_ssg()
6834 alu.src[0].sel = ctx->temp_reg; in tgsi_ssg()
6835 alu.src[0].chan = i; in tgsi_ssg()
6836 alu.src[0].neg = 1; in tgsi_ssg()
6838 alu.src[1].sel = V_SQ_ALU_SRC_1; in tgsi_ssg()
6839 alu.src[1].neg = 1; in tgsi_ssg()
6841 alu.src[2].sel = ctx->temp_reg; in tgsi_ssg()
6842 alu.src[2].chan = i; in tgsi_ssg()
6845 alu.last = 1; in tgsi_ssg()
6846 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_ssg()
6856 struct r600_bytecode_alu alu; in tgsi_bfi() local
6868 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfi()
6869 alu.op = ALU_OP2_SETGE_INT; in tgsi_bfi()
6870 r600_bytecode_src(&alu.src[0], &ctx->src[3], i); in tgsi_bfi()
6871 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_bfi()
6872 alu.src[1].value = 32; in tgsi_bfi()
6873 alu.dst.sel = ctx->temp_reg; in tgsi_bfi()
6874 alu.dst.chan = i; in tgsi_bfi()
6875 alu.dst.write = 1; in tgsi_bfi()
6876 alu.last = i == last_inst; in tgsi_bfi()
6877 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfi()
6887 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfi()
6888 alu.op = ALU_OP2_BFM_INT; in tgsi_bfi()
6889 alu.dst.sel = t1; in tgsi_bfi()
6890 alu.dst.chan = i; in tgsi_bfi()
6891 alu.dst.write = 1; in tgsi_bfi()
6892 alu.last = i == last_inst; in tgsi_bfi()
6894 r600_bytecode_src(&alu.src[0], &ctx->src[3], i); in tgsi_bfi()
6895 r600_bytecode_src(&alu.src[1], &ctx->src[2], i); in tgsi_bfi()
6897 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfi()
6909 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfi()
6910 alu.op = ALU_OP2_LSHL_INT; in tgsi_bfi()
6911 alu.dst.sel = t2; in tgsi_bfi()
6912 alu.dst.chan = i; in tgsi_bfi()
6913 alu.dst.write = 1; in tgsi_bfi()
6914 alu.last = i == last_inst; in tgsi_bfi()
6916 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_bfi()
6917 r600_bytecode_src(&alu.src[1], &ctx->src[2], i); in tgsi_bfi()
6919 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfi()
6929 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfi()
6930 alu.op = ALU_OP3_BFI_INT; in tgsi_bfi()
6931 alu.is_op3 = 1; in tgsi_bfi()
6932 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_bfi()
6933 alu.dst.chan = i; in tgsi_bfi()
6934 alu.dst.write = 1; in tgsi_bfi()
6935 alu.last = i == last_inst; in tgsi_bfi()
6937 alu.src[0].sel = t1; in tgsi_bfi()
6938 alu.src[0].chan = i; in tgsi_bfi()
6939 alu.src[1].sel = t2; in tgsi_bfi()
6940 alu.src[1].chan = i; in tgsi_bfi()
6941 r600_bytecode_src(&alu.src[2], &ctx->src[0], i); in tgsi_bfi()
6943 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfi()
6951 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfi()
6952 alu.op = ALU_OP3_CNDE_INT; in tgsi_bfi()
6953 alu.is_op3 = 1; in tgsi_bfi()
6954 alu.src[0].sel = ctx->temp_reg; in tgsi_bfi()
6955 alu.src[0].chan = i; in tgsi_bfi()
6956 r600_bytecode_src(&alu.src[2], &ctx->src[1], i); in tgsi_bfi()
6958 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_bfi()
6960 alu.src[1].sel = alu.dst.sel; in tgsi_bfi()
6961 alu.src[1].chan = i; in tgsi_bfi()
6963 alu.last = i == last_inst; in tgsi_bfi()
6964 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfi()
6974 struct r600_bytecode_alu alu; in tgsi_msb() local
6991 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_msb()
6992 alu.op = ctx->inst_info->op; in tgsi_msb()
6993 alu.dst.sel = t1; in tgsi_msb()
6994 alu.dst.chan = i; in tgsi_msb()
6995 alu.dst.write = 1; in tgsi_msb()
6996 alu.last = i == last_inst; in tgsi_msb()
6998 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_msb()
7000 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_msb()
7012 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_msb()
7013 alu.op = ALU_OP2_SUB_INT; in tgsi_msb()
7014 alu.dst.sel = t2; in tgsi_msb()
7015 alu.dst.chan = i; in tgsi_msb()
7016 alu.dst.write = 1; in tgsi_msb()
7017 alu.last = i == last_inst; in tgsi_msb()
7019 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_msb()
7020 alu.src[0].value = 31; in tgsi_msb()
7021 alu.src[1].sel = t1; in tgsi_msb()
7022 alu.src[1].chan = i; in tgsi_msb()
7024 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_msb()
7034 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_msb()
7035 alu.op = ALU_OP3_CNDGE_INT; in tgsi_msb()
7036 alu.is_op3 = 1; in tgsi_msb()
7037 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_msb()
7038 alu.dst.chan = i; in tgsi_msb()
7039 alu.dst.write = 1; in tgsi_msb()
7040 alu.last = i == last_inst; in tgsi_msb()
7042 alu.src[0].sel = t1; in tgsi_msb()
7043 alu.src[0].chan = i; in tgsi_msb()
7044 alu.src[1].sel = t2; in tgsi_msb()
7045 alu.src[1].chan = i; in tgsi_msb()
7046 alu.src[2].sel = t1; in tgsi_msb()
7047 alu.src[2].chan = i; in tgsi_msb()
7049 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_msb()
7060 struct r600_bytecode_alu alu; in tgsi_interp_egcm() local
7118 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_interp_egcm()
7119 alu.op = ALU_OP3_MULADD; in tgsi_interp_egcm()
7120 alu.is_op3 = 1; in tgsi_interp_egcm()
7121 alu.src[0].sel = gradientsH; in tgsi_interp_egcm()
7122 alu.src[0].chan = i; in tgsi_interp_egcm()
7124 alu.src[1].sel = sample_gpr; in tgsi_interp_egcm()
7125 alu.src[1].chan = 2; in tgsi_interp_egcm()
7128 r600_bytecode_src(&alu.src[1], &ctx->src[1], 0); in tgsi_interp_egcm()
7130 alu.src[2].sel = interp_gpr; in tgsi_interp_egcm()
7131 alu.src[2].chan = interp_base_chan + i; in tgsi_interp_egcm()
7132 alu.dst.sel = ctx->temp_reg; in tgsi_interp_egcm()
7133 alu.dst.chan = i; in tgsi_interp_egcm()
7134 alu.last = i == 1; in tgsi_interp_egcm()
7136 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_interp_egcm()
7142 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_interp_egcm()
7143 alu.op = ALU_OP3_MULADD; in tgsi_interp_egcm()
7144 alu.is_op3 = 1; in tgsi_interp_egcm()
7145 alu.src[0].sel = gradientsV; in tgsi_interp_egcm()
7146 alu.src[0].chan = i; in tgsi_interp_egcm()
7148 alu.src[1].sel = sample_gpr; in tgsi_interp_egcm()
7149 alu.src[1].chan = 3; in tgsi_interp_egcm()
7152 r600_bytecode_src(&alu.src[1], &ctx->src[1], 1); in tgsi_interp_egcm()
7154 alu.src[2].sel = ctx->temp_reg; in tgsi_interp_egcm()
7155 alu.src[2].chan = i; in tgsi_interp_egcm()
7156 alu.dst.sel = ctx->temp_reg; in tgsi_interp_egcm()
7157 alu.dst.chan = i; in tgsi_interp_egcm()
7158 alu.last = i == 1; in tgsi_interp_egcm()
7160 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_interp_egcm()
7168 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_interp_egcm()
7169 alu.op = i < 4 ? ALU_OP2_INTERP_ZW : ALU_OP2_INTERP_XY; in tgsi_interp_egcm()
7171 alu.dst.sel = tmp; in tgsi_interp_egcm()
7173 alu.dst.write = 1; in tgsi_interp_egcm()
7176 alu.dst.write = 0; in tgsi_interp_egcm()
7178 alu.dst.chan = i % 4; in tgsi_interp_egcm()
7182 alu.src[0].sel = ctx->temp_reg; in tgsi_interp_egcm()
7183 alu.src[0].chan = 1 - (i % 2); in tgsi_interp_egcm()
7185 alu.src[0].sel = interp_gpr; in tgsi_interp_egcm()
7186 alu.src[0].chan = interp_base_chan + 1 - (i % 2); in tgsi_interp_egcm()
7188 alu.src[1].sel = V_SQ_ALU_SRC_PARAM_BASE + ctx->shader->input[input].lds_pos; in tgsi_interp_egcm()
7189 alu.src[1].chan = 0; in tgsi_interp_egcm()
7191 alu.last = i % 4 == 3; in tgsi_interp_egcm()
7192 alu.bank_swizzle_force = SQ_ALU_VEC_210; in tgsi_interp_egcm()
7194 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_interp_egcm()
7205 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_interp_egcm()
7206 alu.op = ALU_OP1_MOV; in tgsi_interp_egcm()
7207 alu.src[0].sel = tmp; in tgsi_interp_egcm()
7208 alu.src[0].chan = ctx->src[0].swizzle[i]; in tgsi_interp_egcm()
7209 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_interp_egcm()
7210 alu.dst.write = 1; in tgsi_interp_egcm()
7211 alu.last = i == lasti; in tgsi_interp_egcm()
7212 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_interp_egcm()
7223 struct r600_bytecode_alu alu; in tgsi_helper_copy() local
7227 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_helper_copy()
7229 alu.op = ALU_OP0_NOP; in tgsi_helper_copy()
7230 alu.dst.chan = i; in tgsi_helper_copy()
7232 alu.op = ALU_OP1_MOV; in tgsi_helper_copy()
7233 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_helper_copy()
7234 alu.src[0].sel = ctx->temp_reg; in tgsi_helper_copy()
7235 alu.src[0].chan = i; in tgsi_helper_copy()
7238 alu.last = 1; in tgsi_helper_copy()
7240 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_helper_copy()
7252 struct r600_bytecode_alu alu; in tgsi_make_src_for_op3() local
7268 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_make_src_for_op3()
7269 alu.op = ALU_OP1_MOV; in tgsi_make_src_for_op3()
7270 alu.dst.sel = temp_reg; in tgsi_make_src_for_op3()
7271 alu.dst.chan = i; in tgsi_make_src_for_op3()
7272 alu.dst.write = 1; in tgsi_make_src_for_op3()
7273 alu.src[0] = bc_src[i]; in tgsi_make_src_for_op3()
7275 alu.last = 1; in tgsi_make_src_for_op3()
7277 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_make_src_for_op3()
7291 struct r600_bytecode_alu alu; in tgsi_op3_dst() local
7312 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_op3_dst()
7313 alu.op = op; in tgsi_op3_dst()
7315 alu.src[j] = srcs[j][i]; in tgsi_op3_dst()
7319 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_op3_dst()
7321 alu.dst.sel = dst; in tgsi_op3_dst()
7323 alu.dst.chan = i; in tgsi_op3_dst()
7324 alu.dst.write = 1; in tgsi_op3_dst()
7325 alu.is_op3 = 1; in tgsi_op3_dst()
7327 alu.last = 1; in tgsi_op3_dst()
7329 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_op3_dst()
7344 struct r600_bytecode_alu alu; in tgsi_dp() local
7352 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_dp()
7353 alu.op = op; in tgsi_dp()
7355 r600_bytecode_src(&alu.src[j], &ctx->src[j], i); in tgsi_dp()
7358 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_dp()
7359 alu.dst.chan = i; in tgsi_dp()
7360 alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1; in tgsi_dp()
7365 alu.src[0].sel = alu.src[1].sel = V_SQ_ALU_SRC_0; in tgsi_dp()
7366 alu.src[0].chan = alu.src[1].chan = 0; in tgsi_dp()
7371 alu.src[0].sel = alu.src[1].sel = V_SQ_ALU_SRC_0; in tgsi_dp()
7372 alu.src[0].chan = alu.src[1].chan = 0; in tgsi_dp()
7379 alu.last = 1; in tgsi_dp()
7381 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_dp()
7409 struct r600_bytecode_alu alu; in do_vtx_fetch_inst() local
7418 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in do_vtx_fetch_inst()
7419 alu.op = ALU_OP1_MOV; in do_vtx_fetch_inst()
7420 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in do_vtx_fetch_inst()
7421 alu.dst.sel = ctx->temp_reg; in do_vtx_fetch_inst()
7422 alu.dst.chan = i; in do_vtx_fetch_inst()
7424 alu.last = 1; in do_vtx_fetch_inst()
7425 alu.dst.write = 1; in do_vtx_fetch_inst()
7426 r = r600_bytecode_add_alu(ctx->bc, &alu); in do_vtx_fetch_inst()
7458 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in do_vtx_fetch_inst()
7459 alu.op = ALU_OP2_AND_INT; in do_vtx_fetch_inst()
7461 alu.dst.chan = i; in do_vtx_fetch_inst()
7462 alu.dst.sel = vtx.dst_gpr; in do_vtx_fetch_inst()
7463 alu.dst.write = 1; in do_vtx_fetch_inst()
7465 alu.src[0].sel = vtx.dst_gpr; in do_vtx_fetch_inst()
7466 alu.src[0].chan = i; in do_vtx_fetch_inst()
7468 alu.src[1].sel = R600_SHADER_BUFFER_INFO_SEL; in do_vtx_fetch_inst()
7469 alu.src[1].sel += (id * 2); in do_vtx_fetch_inst()
7470 alu.src[1].chan = i % 4; in do_vtx_fetch_inst()
7471 alu.src[1].kc_bank = R600_BUFFER_INFO_CONST_BUFFER; in do_vtx_fetch_inst()
7474 alu.last = 1; in do_vtx_fetch_inst()
7475 r = r600_bytecode_add_alu(ctx->bc, &alu); in do_vtx_fetch_inst()
7481 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in do_vtx_fetch_inst()
7482 alu.op = ALU_OP2_OR_INT; in do_vtx_fetch_inst()
7484 alu.dst.chan = 3; in do_vtx_fetch_inst()
7485 alu.dst.sel = vtx.dst_gpr; in do_vtx_fetch_inst()
7486 alu.dst.write = 1; in do_vtx_fetch_inst()
7488 alu.src[0].sel = vtx.dst_gpr; in do_vtx_fetch_inst()
7489 alu.src[0].chan = 3; in do_vtx_fetch_inst()
7491 alu.src[1].sel = R600_SHADER_BUFFER_INFO_SEL + (id * 2) + 1; in do_vtx_fetch_inst()
7492 alu.src[1].chan = 0; in do_vtx_fetch_inst()
7493 alu.src[1].kc_bank = R600_BUFFER_INFO_CONST_BUFFER; in do_vtx_fetch_inst()
7495 alu.last = 1; in do_vtx_fetch_inst()
7496 r = r600_bytecode_add_alu(ctx->bc, &alu); in do_vtx_fetch_inst()
7511 struct r600_bytecode_alu alu; in r600_do_buffer_txq() local
7512 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in r600_do_buffer_txq()
7513 alu.op = ALU_OP1_MOV; in r600_do_buffer_txq()
7514 alu.src[0].sel = R600_SHADER_BUFFER_INFO_SEL; in r600_do_buffer_txq()
7516 alu.src[0].sel += (id * 2) + 1; in r600_do_buffer_txq()
7517 alu.src[0].chan = 1; in r600_do_buffer_txq()
7518 alu.src[0].kc_bank = R600_BUFFER_INFO_CONST_BUFFER; in r600_do_buffer_txq()
7519 tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst); in r600_do_buffer_txq()
7520 alu.last = 1; in r600_do_buffer_txq()
7521 r = r600_bytecode_add_alu(ctx->bc, &alu); in r600_do_buffer_txq()
7553 struct r600_bytecode_alu alu; in tgsi_tex() local
7620 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7621 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_tex()
7622 r600_bytecode_src(&alu.src[0], &ctx->src[0], 3); in tgsi_tex()
7624 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7625 alu.dst.chan = i; in tgsi_tex()
7627 alu.last = 1; in tgsi_tex()
7629 alu.dst.write = 1; in tgsi_tex()
7630 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7637 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7638 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_tex()
7639 r600_bytecode_src(&alu.src[0], &ctx->src[0], 3); in tgsi_tex()
7641 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7642 alu.dst.chan = out_chan; in tgsi_tex()
7643 alu.last = 1; in tgsi_tex()
7644 alu.dst.write = 1; in tgsi_tex()
7645 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7651 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7652 alu.op = ALU_OP2_MUL; in tgsi_tex()
7653 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7654 alu.src[0].chan = out_chan; in tgsi_tex()
7655 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_tex()
7656 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7657 alu.dst.chan = i; in tgsi_tex()
7658 alu.dst.write = 1; in tgsi_tex()
7659 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7663 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7664 alu.op = ALU_OP1_MOV; in tgsi_tex()
7665 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_tex()
7666 alu.src[0].chan = 0; in tgsi_tex()
7667 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7668 alu.dst.chan = 3; in tgsi_tex()
7669 alu.last = 1; in tgsi_tex()
7670 alu.dst.write = 1; in tgsi_tex()
7671 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7690 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7691 alu.op = ALU_OP2_CUBE; in tgsi_tex()
7692 r600_bytecode_src(&alu.src[0], &ctx->src[0], src0_swizzle[i]); in tgsi_tex()
7693 r600_bytecode_src(&alu.src[1], &ctx->src[0], src1_swizzle[i]); in tgsi_tex()
7694 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7695 alu.dst.chan = i; in tgsi_tex()
7697 alu.last = 1; in tgsi_tex()
7698 alu.dst.write = 1; in tgsi_tex()
7699 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7707 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7708 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_tex()
7709 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7710 alu.src[0].chan = 2; in tgsi_tex()
7711 alu.src[0].abs = 1; in tgsi_tex()
7712 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7713 alu.dst.chan = i; in tgsi_tex()
7715 alu.dst.write = 1; in tgsi_tex()
7717 alu.last = 1; in tgsi_tex()
7718 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7723 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7724 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_tex()
7725 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7726 alu.src[0].chan = 2; in tgsi_tex()
7727 alu.src[0].abs = 1; in tgsi_tex()
7728 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7729 alu.dst.chan = 2; in tgsi_tex()
7730 alu.dst.write = 1; in tgsi_tex()
7731 alu.last = 1; in tgsi_tex()
7732 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7741 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7742 alu.op = ALU_OP3_MULADD; in tgsi_tex()
7743 alu.is_op3 = 1; in tgsi_tex()
7745 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7746 alu.src[0].chan = 0; in tgsi_tex()
7747 alu.src[1].sel = ctx->temp_reg; in tgsi_tex()
7748 alu.src[1].chan = 2; in tgsi_tex()
7750 alu.src[2].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
7751 alu.src[2].chan = 0; in tgsi_tex()
7752 alu.src[2].value = u_bitcast_f2u(1.5f); in tgsi_tex()
7754 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7755 alu.dst.chan = 0; in tgsi_tex()
7756 alu.dst.write = 1; in tgsi_tex()
7758 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7762 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7763 alu.op = ALU_OP3_MULADD; in tgsi_tex()
7764 alu.is_op3 = 1; in tgsi_tex()
7766 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7767 alu.src[0].chan = 1; in tgsi_tex()
7768 alu.src[1].sel = ctx->temp_reg; in tgsi_tex()
7769 alu.src[1].chan = 2; in tgsi_tex()
7771 alu.src[2].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
7772 alu.src[2].chan = 0; in tgsi_tex()
7773 alu.src[2].value = u_bitcast_f2u(1.5f); in tgsi_tex()
7775 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7776 alu.dst.chan = 1; in tgsi_tex()
7777 alu.dst.write = 1; in tgsi_tex()
7779 alu.last = 1; in tgsi_tex()
7780 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7788 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7789 alu.op = ALU_OP1_MOV; in tgsi_tex()
7791 r600_bytecode_src(&alu.src[0], &ctx->src[1], 0); in tgsi_tex()
7793 r600_bytecode_src(&alu.src[0], &ctx->src[0], 3); in tgsi_tex()
7794 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7795 alu.dst.chan = 2; in tgsi_tex()
7796 alu.dst.write = 1; in tgsi_tex()
7797 alu.last = 1; in tgsi_tex()
7798 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7807 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7808 alu.op = ALU_OP1_MOV; in tgsi_tex()
7809 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7810 alu.src[0].chan = 3; in tgsi_tex()
7811 alu.dst.sel = mytmp; in tgsi_tex()
7812 alu.dst.chan = 0; in tgsi_tex()
7813 alu.dst.write = 1; in tgsi_tex()
7814 alu.last = 1; in tgsi_tex()
7815 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7823 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7824 r600_bytecode_src(&alu.src[0], &ctx->src[0], 3); in tgsi_tex()
7825 alu.op = ALU_OP1_RNDNE; in tgsi_tex()
7826 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7827 alu.dst.chan = 3; in tgsi_tex()
7828 alu.dst.write = 1; in tgsi_tex()
7829 alu.last = 1; in tgsi_tex()
7830 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7837 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7838 alu.op = ALU_OP2_MAX; in tgsi_tex()
7839 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7840 alu.src[0].chan = 3; in tgsi_tex()
7841 alu.src[1].sel = V_SQ_ALU_SRC_0; in tgsi_tex()
7842 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7843 alu.dst.chan = 3; in tgsi_tex()
7844 alu.dst.write = 1; in tgsi_tex()
7845 alu.last = 1; in tgsi_tex()
7846 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7851 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7852 alu.op = ALU_OP3_MULADD; in tgsi_tex()
7853 alu.is_op3 = 1; in tgsi_tex()
7854 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
7855 alu.src[0].chan = 3; in tgsi_tex()
7856 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
7857 alu.src[1].chan = 0; in tgsi_tex()
7858 alu.src[1].value = u_bitcast_f2u(8.0f); in tgsi_tex()
7859 alu.src[2].sel = mytmp; in tgsi_tex()
7860 alu.src[2].chan = 0; in tgsi_tex()
7861 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7862 alu.dst.chan = 3; in tgsi_tex()
7863 alu.dst.write = 1; in tgsi_tex()
7864 alu.last = 1; in tgsi_tex()
7865 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7883 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7884 alu.op = ALU_OP1_MOV; in tgsi_tex()
7885 r600_bytecode_src(&alu.src[0], &ctx->src[0], 3); in tgsi_tex()
7886 alu.dst.sel = tex.src_gpr; in tgsi_tex()
7887 alu.dst.chan = 0; in tgsi_tex()
7888 alu.last = 1; in tgsi_tex()
7889 alu.dst.write = 1; in tgsi_tex()
7890 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7906 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7907 alu.op = ALU_OP1_MOV; in tgsi_tex()
7910 r600_bytecode_src(&alu.src[0], &ctx->src[1], 0); in tgsi_tex()
7912 r600_bytecode_src(&alu.src[0], &ctx->src[0], 3); in tgsi_tex()
7913 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
7914 alu.dst.chan = 2; in tgsi_tex()
7915 alu.last = 1; in tgsi_tex()
7916 alu.dst.write = 1; in tgsi_tex()
7917 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
7946 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
7947 alu.op = ALU_OP1_MOV; in tgsi_tex()
7948 r600_bytecode_src(&alu.src[0], &ctx->src[i], j); in tgsi_tex()
7949 alu.dst.sel = treg; in tgsi_tex()
7950 alu.dst.chan = j; in tgsi_tex()
7952 alu.last = 1; in tgsi_tex()
7953 alu.dst.write = 1; in tgsi_tex()
7954 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8007 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8008 alu.op = ALU_OP1_MOV; in tgsi_tex()
8009 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
8010 alu.dst.chan = i; in tgsi_tex()
8011 alu.dst.write = 1; in tgsi_tex()
8012 alu.last = (i == end); in tgsi_tex()
8013 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_tex()
8014 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8023 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8024 alu.op = ALU_OP2_ADD; in tgsi_tex()
8025 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
8026 alu.dst.chan = i; in tgsi_tex()
8027 alu.dst.write = 1; in tgsi_tex()
8028 alu.last = i == 1; in tgsi_tex()
8030 alu.src[0].sel = ctx->temp_reg; in tgsi_tex()
8031 alu.src[0].chan = i; in tgsi_tex()
8033 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_tex()
8034 alu.src[1].sel = V_SQ_ALU_SRC_0_5; in tgsi_tex()
8035 alu.src[1].neg = 1; in tgsi_tex()
8036 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8065 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8066 alu.op = ALU_OP1_INT_TO_FLT; in tgsi_tex()
8067 alu.dst.sel = treg; in tgsi_tex()
8068 alu.dst.chan = i; in tgsi_tex()
8069 alu.dst.write = 1; in tgsi_tex()
8070 alu.src[0].sel = treg; in tgsi_tex()
8071 alu.src[0].chan = i; in tgsi_tex()
8072 alu.last = (i == 1) ? 1 : 0; in tgsi_tex()
8073 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8079 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8080 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_tex()
8081 alu.src[0].sel = treg; in tgsi_tex()
8082 alu.src[0].chan = j; in tgsi_tex()
8083 alu.dst.sel = treg; in tgsi_tex()
8084 alu.dst.chan = i; in tgsi_tex()
8086 alu.last = 1; in tgsi_tex()
8088 alu.dst.write = 1; in tgsi_tex()
8089 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8096 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8097 alu.op = ALU_OP1_INT_TO_FLT; in tgsi_tex()
8098 alu.dst.sel = treg; in tgsi_tex()
8099 alu.dst.chan = i; in tgsi_tex()
8100 alu.dst.write = 1; in tgsi_tex()
8101 alu.src[0].sel = treg; in tgsi_tex()
8102 alu.src[0].chan = i; in tgsi_tex()
8103 alu.last = 1; in tgsi_tex()
8104 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8109 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8110 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_tex()
8111 alu.src[0].sel = treg; in tgsi_tex()
8112 alu.src[0].chan = i; in tgsi_tex()
8113 alu.dst.sel = treg; in tgsi_tex()
8114 alu.dst.chan = i; in tgsi_tex()
8115 alu.last = 1; in tgsi_tex()
8116 alu.dst.write = 1; in tgsi_tex()
8117 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8123 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8124 alu.op = ALU_OP3_MULADD; in tgsi_tex()
8125 alu.is_op3 = 1; in tgsi_tex()
8126 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
8127 alu.dst.chan = i; in tgsi_tex()
8128 alu.dst.write = 1; in tgsi_tex()
8129 alu.last = i == 1; in tgsi_tex()
8130 alu.src[0].sel = treg; in tgsi_tex()
8131 alu.src[0].chan = i; in tgsi_tex()
8132 alu.src[1].sel = V_SQ_ALU_SRC_0_5; in tgsi_tex()
8133 alu.src[1].neg = 1; in tgsi_tex()
8135 alu.src[2].sel = ctx->temp_reg; in tgsi_tex()
8136 alu.src[2].chan = i; in tgsi_tex()
8138 r600_bytecode_src(&alu.src[2], &ctx->src[0], i); in tgsi_tex()
8139 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8151 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8152 alu.op = ALU_OP1_MOV; in tgsi_tex()
8153 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_tex()
8154 alu.dst.sel = ctx->temp_reg; in tgsi_tex()
8155 alu.dst.chan = i; in tgsi_tex()
8157 alu.last = 1; in tgsi_tex()
8158 alu.dst.write = 1; in tgsi_tex()
8159 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8178 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8179 alu.op = ALU_OP2_ADD_INT; in tgsi_tex()
8180 alu.src[0].sel = src_gpr; in tgsi_tex()
8181 alu.src[0].chan = 2; in tgsi_tex()
8182 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
8183 alu.src[1].value = ctx->literals[4 * off[0].Index + off[0].SwizzleZ]; in tgsi_tex()
8184 alu.dst.sel = src_gpr; in tgsi_tex()
8185 alu.dst.chan = 2; in tgsi_tex()
8186 alu.dst.write = 1; in tgsi_tex()
8187 alu.last = 1; in tgsi_tex()
8188 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8199 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8200 alu.op = ALU_OP2_ADD_INT; in tgsi_tex()
8201 alu.src[0].sel = src_gpr; in tgsi_tex()
8202 alu.src[0].chan = 1; in tgsi_tex()
8203 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
8204 alu.src[1].value = ctx->literals[4 * off[0].Index + off[0].SwizzleY]; in tgsi_tex()
8205 alu.dst.sel = src_gpr; in tgsi_tex()
8206 alu.dst.chan = 1; in tgsi_tex()
8207 alu.dst.write = 1; in tgsi_tex()
8208 alu.last = 1; in tgsi_tex()
8209 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8218 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8219 alu.op = ALU_OP2_ADD_INT; in tgsi_tex()
8220 alu.src[0].sel = src_gpr; in tgsi_tex()
8221 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
8222 alu.src[1].value = ctx->literals[4 * off[0].Index + off[0].SwizzleX]; in tgsi_tex()
8223 alu.dst.sel = src_gpr; in tgsi_tex()
8224 alu.dst.write = 1; in tgsi_tex()
8225 alu.last = 1; in tgsi_tex()
8226 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8296 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8297 alu.op = ALU_OP2_MULLO_INT; in tgsi_tex()
8298 alu.src[0].sel = src_gpr; in tgsi_tex()
8299 alu.src[0].chan = sample_chan; in tgsi_tex()
8300 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
8301 alu.src[1].value = 4; in tgsi_tex()
8302 alu.dst.sel = temp; in tgsi_tex()
8303 alu.dst.chan = 0; in tgsi_tex()
8304 alu.dst.write = 1; in tgsi_tex()
8305 r = emit_mul_int_op(ctx->bc, &alu); in tgsi_tex()
8310 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8311 alu.op = ALU_OP2_LSHR_INT; in tgsi_tex()
8312 alu.src[0].sel = temp; in tgsi_tex()
8313 alu.src[0].chan = 3; in tgsi_tex()
8314 alu.src[1].sel = temp; in tgsi_tex()
8315 alu.src[1].chan = 0; in tgsi_tex()
8316 alu.dst.sel = src_gpr; in tgsi_tex()
8317 alu.dst.chan = sample_chan; in tgsi_tex()
8318 alu.dst.write = 1; in tgsi_tex()
8319 alu.last = 1; in tgsi_tex()
8320 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8325 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8326 alu.op = ALU_OP2_AND_INT; in tgsi_tex()
8327 alu.src[0].sel = src_gpr; in tgsi_tex()
8328 alu.src[0].chan = sample_chan; in tgsi_tex()
8329 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_tex()
8330 alu.src[1].value = 0xF; in tgsi_tex()
8331 alu.dst.sel = src_gpr; in tgsi_tex()
8332 alu.dst.chan = sample_chan; in tgsi_tex()
8333 alu.dst.write = 1; in tgsi_tex()
8334 alu.last = 1; in tgsi_tex()
8335 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8341 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8342 alu.op = ALU_OP1_INT_TO_FLT; in tgsi_tex()
8343 alu.src[0].sel = src_gpr; in tgsi_tex()
8344 alu.src[0].chan = sample_chan; in tgsi_tex()
8345 alu.dst.sel = ctx->file_offset[inst->Dst[0].Register.File] + inst->Dst[0].Register.Index; in tgsi_tex()
8346 alu.dst.chan = i; in tgsi_tex()
8347 alu.dst.write = 1; in tgsi_tex()
8348 alu.last = 1; in tgsi_tex()
8349 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8361 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8362 alu.op = ALU_OP1_MOV; in tgsi_tex()
8364 alu.src[0].sel = R600_SHADER_BUFFER_INFO_SEL; in tgsi_tex()
8367 alu.src[0].sel += id / 4; in tgsi_tex()
8368 alu.src[0].chan = id % 4; in tgsi_tex()
8371 alu.src[0].sel += (id * 2) + 1; in tgsi_tex()
8372 alu.src[0].chan = 2; in tgsi_tex()
8374 alu.src[0].kc_bank = R600_BUFFER_INFO_CONST_BUFFER; in tgsi_tex()
8375 tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst); in tgsi_tex()
8376 alu.last = 1; in tgsi_tex()
8377 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8590 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_tex()
8591 alu.src[0].sel = tex.src_gpr; in tgsi_tex()
8592 alu.src[0].chan = array_index_offset_channel; in tgsi_tex()
8593 alu.src[0].rel = tex.src_rel; in tgsi_tex()
8594 alu.op = ALU_OP1_RNDNE; in tgsi_tex()
8595 alu.dst.sel = tex.src_gpr; in tgsi_tex()
8596 alu.dst.chan = array_index_offset_channel; in tgsi_tex()
8597 alu.dst.rel = tex.src_rel; in tgsi_tex()
8598 alu.dst.write = 1; in tgsi_tex()
8599 alu.last = 1; in tgsi_tex()
8600 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_tex()
8679 struct r600_bytecode_alu alu; in tgsi_set_gds_temp() local
8680 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_set_gds_temp()
8681 alu.op = ALU_OP2_LSHL_INT; in tgsi_set_gds_temp()
8682 alu.src[0].sel = get_address_file_reg(ctx, inst->Src[0].Indirect.Index); in tgsi_set_gds_temp()
8683 alu.src[0].chan = 0; in tgsi_set_gds_temp()
8684 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_set_gds_temp()
8685 alu.src[1].value = 2; in tgsi_set_gds_temp()
8686 alu.dst.sel = ctx->temp_reg; in tgsi_set_gds_temp()
8687 alu.dst.chan = 0; in tgsi_set_gds_temp()
8688 alu.dst.write = 1; in tgsi_set_gds_temp()
8689 alu.last = 1; in tgsi_set_gds_temp()
8690 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_set_gds_temp()
8756 struct r600_bytecode_alu alu; in load_index_src() local
8761 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_index_src()
8762 alu.op = ALU_OP1_MOV; in load_index_src()
8763 alu.dst.sel = temp_reg; in load_index_src()
8764 alu.dst.chan = i; in load_index_src()
8777 r600_bytecode_src(&alu.src[0], &ctx->src[src_index], 1); in load_index_src()
8792 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in load_index_src()
8793 alu.src[0].value = 0; in load_index_src()
8795 r600_bytecode_src(&alu.src[0], &ctx->src[src_index], i); in load_index_src()
8799 alu.last = 1; in load_index_src()
8800 alu.dst.write = 1; in load_index_src()
8801 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_index_src()
8823 struct r600_bytecode_alu alu; in load_buffer_coord() local
8824 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in load_buffer_coord()
8825 alu.op = ALU_OP2_LSHR_INT; in load_buffer_coord()
8826 r600_bytecode_src(&alu.src[0], &ctx->src[src_idx], 0); in load_buffer_coord()
8827 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in load_buffer_coord()
8828 alu.src[1].value = 2; in load_buffer_coord()
8829 alu.dst.sel = temp_reg; in load_buffer_coord()
8830 alu.dst.write = 1; in load_buffer_coord()
8831 alu.last = 1; in load_buffer_coord()
8832 r = r600_bytecode_add_alu(ctx->bc, &alu); in load_buffer_coord()
8971 struct r600_bytecode_alu alu; in tgsi_load_lds() local
8975 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_load_lds()
8976 alu.op = ALU_OP1_MOV; in tgsi_load_lds()
8977 r600_bytecode_src(&alu.src[0], &ctx->src[1], 0); in tgsi_load_lds()
8978 alu.dst.sel = temp_reg; in tgsi_load_lds()
8979 alu.dst.write = 1; in tgsi_load_lds()
8980 alu.last = 1; in tgsi_load_lds()
8981 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_load_lds()
9024 struct r600_bytecode_alu alu; in tgsi_store_buffer_rat() local
9025 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_store_buffer_rat()
9026 alu.op = ALU_OP1_MOV; in tgsi_store_buffer_rat()
9027 alu.dst.sel = temp_reg; in tgsi_store_buffer_rat()
9028 alu.dst.chan = i; in tgsi_store_buffer_rat()
9029 alu.src[0].sel = V_SQ_ALU_SRC_0; in tgsi_store_buffer_rat()
9030 alu.last = (i == 3); in tgsi_store_buffer_rat()
9031 alu.dst.write = 1; in tgsi_store_buffer_rat()
9032 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_store_buffer_rat()
9039 struct r600_bytecode_alu alu; in tgsi_store_buffer_rat() local
9050 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_store_buffer_rat()
9051 alu.op = ALU_OP1_MOV; in tgsi_store_buffer_rat()
9052 alu.dst.sel = ctx->temp_reg; in tgsi_store_buffer_rat()
9053 alu.dst.chan = 0; in tgsi_store_buffer_rat()
9055 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_store_buffer_rat()
9056 alu.last = 1; in tgsi_store_buffer_rat()
9057 alu.dst.write = 1; in tgsi_store_buffer_rat()
9058 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_store_buffer_rat()
9099 struct r600_bytecode_alu alu; in tgsi_store_rat() local
9101 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_store_rat()
9102 alu.op = ALU_OP1_MOV; in tgsi_store_rat()
9103 alu.dst.sel = ctx->temp_reg; in tgsi_store_rat()
9104 alu.dst.chan = i; in tgsi_store_rat()
9106 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_store_rat()
9108 alu.last = 1; in tgsi_store_rat()
9109 alu.dst.write = 1; in tgsi_store_rat()
9110 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_store_rat()
9140 struct r600_bytecode_alu alu; in tgsi_store_lds() local
9146 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_store_lds()
9147 alu.op = ALU_OP1_MOV; in tgsi_store_lds()
9148 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_store_lds()
9149 alu.dst.sel = temp_reg; in tgsi_store_lds()
9150 alu.dst.write = 1; in tgsi_store_lds()
9151 alu.last = 1; in tgsi_store_lds()
9152 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_store_lds()
9173 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_store_lds()
9174 alu.op = LDS_OP3_LDS_WRITE_REL; in tgsi_store_lds()
9176 alu.src[0].sel = temp_reg; in tgsi_store_lds()
9177 alu.src[0].chan = i; in tgsi_store_lds()
9178 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_store_lds()
9179 r600_bytecode_src(&alu.src[2], &ctx->src[1], i + 1); in tgsi_store_lds()
9180 alu.last = 1; in tgsi_store_lds()
9181 alu.is_lds_idx_op = true; in tgsi_store_lds()
9182 alu.lds_idx = 1; in tgsi_store_lds()
9183 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_store_lds()
9189 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_store_lds()
9190 alu.op = LDS_OP2_LDS_WRITE; in tgsi_store_lds()
9192 alu.src[0].sel = temp_reg; in tgsi_store_lds()
9193 alu.src[0].chan = i; in tgsi_store_lds()
9194 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_store_lds()
9196 alu.last = 1; in tgsi_store_lds()
9197 alu.is_lds_idx_op = true; in tgsi_store_lds()
9199 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_store_lds()
9221 struct r600_bytecode_alu alu; in tgsi_atomic_op_rat() local
9252 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_rat()
9253 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_rat()
9254 alu.dst.sel = ctx->thread_id_gpr; in tgsi_atomic_op_rat()
9255 alu.dst.chan = 0; in tgsi_atomic_op_rat()
9256 alu.dst.write = 1; in tgsi_atomic_op_rat()
9257 r600_bytecode_src(&alu.src[0], &ctx->src[3], 0); in tgsi_atomic_op_rat()
9258 alu.last = 1; in tgsi_atomic_op_rat()
9259 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_rat()
9263 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_rat()
9264 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_rat()
9265 alu.dst.sel = ctx->thread_id_gpr; in tgsi_atomic_op_rat()
9267 alu.dst.chan = 2; in tgsi_atomic_op_rat()
9269 alu.dst.chan = 3; in tgsi_atomic_op_rat()
9270 alu.dst.write = 1; in tgsi_atomic_op_rat()
9271 r600_bytecode_src(&alu.src[0], &ctx->src[2], 0); in tgsi_atomic_op_rat()
9272 alu.last = 1; in tgsi_atomic_op_rat()
9273 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_rat()
9277 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_rat()
9278 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_rat()
9279 alu.dst.sel = ctx->thread_id_gpr; in tgsi_atomic_op_rat()
9280 alu.dst.chan = 0; in tgsi_atomic_op_rat()
9281 alu.dst.write = 1; in tgsi_atomic_op_rat()
9282 r600_bytecode_src(&alu.src[0], &ctx->src[2], 0); in tgsi_atomic_op_rat()
9283 alu.last = 1; in tgsi_atomic_op_rat()
9284 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_rat()
9379 struct r600_bytecode_alu alu; in tgsi_atomic_op_gds() local
9398 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_gds()
9399 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_gds()
9400 alu.dst.sel = ctx->temp_reg; in tgsi_atomic_op_gds()
9401 alu.dst.chan = is_cm ? 2 : 1; in tgsi_atomic_op_gds()
9402 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_atomic_op_gds()
9403 alu.src[0].value = value; in tgsi_atomic_op_gds()
9404 alu.last = 1; in tgsi_atomic_op_gds()
9405 alu.dst.write = 1; in tgsi_atomic_op_gds()
9406 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_gds()
9410 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_gds()
9411 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_gds()
9412 alu.dst.sel = ctx->temp_reg; in tgsi_atomic_op_gds()
9413 alu.dst.chan = is_cm ? 2 : 1; in tgsi_atomic_op_gds()
9414 r600_bytecode_src(&alu.src[0], &ctx->src[3], 0); in tgsi_atomic_op_gds()
9415 alu.last = 1; in tgsi_atomic_op_gds()
9416 alu.dst.write = 1; in tgsi_atomic_op_gds()
9417 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_gds()
9427 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_gds()
9428 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_gds()
9429 alu.dst.sel = ctx->temp_reg; in tgsi_atomic_op_gds()
9430 alu.dst.chan = is_cm ? 1 : 0; in tgsi_atomic_op_gds()
9431 alu.src[0].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_atomic_op_gds()
9432 alu.src[0].value = abs_value; in tgsi_atomic_op_gds()
9433 alu.last = 1; in tgsi_atomic_op_gds()
9434 alu.dst.write = 1; in tgsi_atomic_op_gds()
9435 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_gds()
9439 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_gds()
9440 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_gds()
9441 alu.dst.sel = ctx->temp_reg; in tgsi_atomic_op_gds()
9442 alu.dst.chan = is_cm ? 1 : 0; in tgsi_atomic_op_gds()
9443 r600_bytecode_src(&alu.src[0], &ctx->src[2], 0); in tgsi_atomic_op_gds()
9444 alu.last = 1; in tgsi_atomic_op_gds()
9445 alu.dst.write = 1; in tgsi_atomic_op_gds()
9446 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_gds()
9512 struct r600_bytecode_alu alu; in tgsi_atomic_op_lds() local
9513 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_atomic_op_lds()
9514 alu.op = lds_op; in tgsi_atomic_op_lds()
9515 alu.is_lds_idx_op = true; in tgsi_atomic_op_lds()
9516 alu.last = 1; in tgsi_atomic_op_lds()
9517 r600_bytecode_src(&alu.src[0], &ctx->src[1], 0); in tgsi_atomic_op_lds()
9518 r600_bytecode_src(&alu.src[1], &ctx->src[2], 0); in tgsi_atomic_op_lds()
9520 r600_bytecode_src(&alu.src[2], &ctx->src[3], 0); in tgsi_atomic_op_lds()
9522 alu.src[2].sel = V_SQ_ALU_SRC_0; in tgsi_atomic_op_lds()
9523 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_lds()
9528 memset(&alu, 0, sizeof(alu)); in tgsi_atomic_op_lds()
9530 alu.op = ALU_OP1_MOV; in tgsi_atomic_op_lds()
9531 alu.src[0].sel = EG_V_SQ_ALU_SRC_LDS_OQ_A_POP; in tgsi_atomic_op_lds()
9532 alu.src[0].chan = 0; in tgsi_atomic_op_lds()
9533 tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst); in tgsi_atomic_op_lds()
9534 alu.dst.write = 1; in tgsi_atomic_op_lds()
9535 alu.last = 1; in tgsi_atomic_op_lds()
9536 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_atomic_op_lds()
9590 struct r600_bytecode_alu alu; in tgsi_resq() local
9592 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_resq()
9593 alu.op = ALU_OP1_MOV; in tgsi_resq()
9595 alu.src[0].sel = R600_SHADER_BUFFER_INFO_SEL; in tgsi_resq()
9597 alu.src[0].sel += id / 4; in tgsi_resq()
9598 alu.src[0].chan = id % 4; in tgsi_resq()
9599 alu.src[0].kc_bank = R600_BUFFER_INFO_CONST_BUFFER; in tgsi_resq()
9600 tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst); in tgsi_resq()
9601 alu.last = 1; in tgsi_resq()
9602 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_resq()
9633 struct r600_bytecode_alu alu; in tgsi_lrp() local
9645 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lrp()
9646 alu.op = ALU_OP2_ADD; in tgsi_lrp()
9647 r600_bytecode_src(&alu.src[0], &ctx->src[1], i); in tgsi_lrp()
9648 r600_bytecode_src(&alu.src[1], &ctx->src[2], i); in tgsi_lrp()
9649 alu.omod = 3; in tgsi_lrp()
9650 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_lrp()
9651 alu.dst.chan = i; in tgsi_lrp()
9653 alu.last = 1; in tgsi_lrp()
9655 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lrp()
9667 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lrp()
9668 alu.op = ALU_OP2_ADD; in tgsi_lrp()
9669 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_lrp()
9670 alu.src[0].chan = 0; in tgsi_lrp()
9671 r600_bytecode_src(&alu.src[1], &ctx->src[0], i); in tgsi_lrp()
9672 r600_bytecode_src_toggle_neg(&alu.src[1]); in tgsi_lrp()
9673 alu.dst.sel = ctx->temp_reg; in tgsi_lrp()
9674 alu.dst.chan = i; in tgsi_lrp()
9676 alu.last = 1; in tgsi_lrp()
9678 alu.dst.write = 1; in tgsi_lrp()
9679 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lrp()
9689 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lrp()
9690 alu.op = ALU_OP2_MUL; in tgsi_lrp()
9691 alu.src[0].sel = ctx->temp_reg; in tgsi_lrp()
9692 alu.src[0].chan = i; in tgsi_lrp()
9693 r600_bytecode_src(&alu.src[1], &ctx->src[2], i); in tgsi_lrp()
9694 alu.dst.sel = ctx->temp_reg; in tgsi_lrp()
9695 alu.dst.chan = i; in tgsi_lrp()
9697 alu.last = 1; in tgsi_lrp()
9699 alu.dst.write = 1; in tgsi_lrp()
9700 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lrp()
9718 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_lrp()
9719 alu.op = ALU_OP3_MULADD; in tgsi_lrp()
9720 alu.is_op3 = 1; in tgsi_lrp()
9721 alu.src[0] = srcs[0][i]; in tgsi_lrp()
9722 alu.src[1] = srcs[1][i]; in tgsi_lrp()
9723 alu.src[2].sel = ctx->temp_reg; in tgsi_lrp()
9724 alu.src[2].chan = i; in tgsi_lrp()
9726 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_lrp()
9727 alu.dst.chan = i; in tgsi_lrp()
9729 alu.last = 1; in tgsi_lrp()
9731 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_lrp()
9741 struct r600_bytecode_alu alu; in tgsi_cmp() local
9767 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_cmp()
9768 alu.op = op; in tgsi_cmp()
9769 alu.src[0] = srcs[0][i]; in tgsi_cmp()
9770 alu.src[1] = srcs[2][i]; in tgsi_cmp()
9771 alu.src[2] = srcs[1][i]; in tgsi_cmp()
9773 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_cmp()
9774 alu.dst.chan = i; in tgsi_cmp()
9775 alu.dst.write = 1; in tgsi_cmp()
9776 alu.is_op3 = 1; in tgsi_cmp()
9778 alu.last = 1; in tgsi_cmp()
9779 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_cmp()
9789 struct r600_bytecode_alu alu; in tgsi_ucmp() local
9797 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_ucmp()
9798 alu.op = ALU_OP3_CNDE_INT; in tgsi_ucmp()
9799 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_ucmp()
9800 r600_bytecode_src(&alu.src[1], &ctx->src[2], i); in tgsi_ucmp()
9801 r600_bytecode_src(&alu.src[2], &ctx->src[1], i); in tgsi_ucmp()
9802 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_ucmp()
9803 alu.dst.chan = i; in tgsi_ucmp()
9804 alu.dst.write = 1; in tgsi_ucmp()
9805 alu.is_op3 = 1; in tgsi_ucmp()
9807 alu.last = 1; in tgsi_ucmp()
9808 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_ucmp()
9818 struct r600_bytecode_alu alu; in tgsi_exp() local
9824 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_exp()
9826 alu.op = ALU_OP1_FLOOR; in tgsi_exp()
9827 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_exp()
9829 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9830 alu.dst.chan = 0; in tgsi_exp()
9831 alu.dst.write = 1; in tgsi_exp()
9832 alu.last = 1; in tgsi_exp()
9833 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9839 alu.op = ALU_OP1_EXP_IEEE; in tgsi_exp()
9840 alu.src[0].sel = ctx->temp_reg; in tgsi_exp()
9841 alu.src[0].chan = 0; in tgsi_exp()
9843 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9844 alu.dst.chan = i; in tgsi_exp()
9845 alu.dst.write = i == 0; in tgsi_exp()
9846 alu.last = i == 2; in tgsi_exp()
9847 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9852 alu.op = ALU_OP1_EXP_IEEE; in tgsi_exp()
9853 alu.src[0].sel = ctx->temp_reg; in tgsi_exp()
9854 alu.src[0].chan = 0; in tgsi_exp()
9856 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9857 alu.dst.chan = 0; in tgsi_exp()
9858 alu.dst.write = 1; in tgsi_exp()
9859 alu.last = 1; in tgsi_exp()
9860 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9868 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_exp()
9870 alu.op = ALU_OP1_FRACT; in tgsi_exp()
9871 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_exp()
9873 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9875 r = tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_exp()
9879 alu.dst.write = 1; in tgsi_exp()
9880 alu.dst.chan = 1; in tgsi_exp()
9882 alu.last = 1; in tgsi_exp()
9884 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9893 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_exp()
9894 alu.op = ALU_OP1_EXP_IEEE; in tgsi_exp()
9895 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_exp()
9897 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9898 alu.dst.chan = i; in tgsi_exp()
9900 alu.dst.write = 1; in tgsi_exp()
9901 alu.last = 1; in tgsi_exp()
9904 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9909 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_exp()
9910 alu.op = ALU_OP1_EXP_IEEE; in tgsi_exp()
9911 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_exp()
9913 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9914 alu.dst.write = 1; in tgsi_exp()
9915 alu.dst.chan = 2; in tgsi_exp()
9917 alu.last = 1; in tgsi_exp()
9919 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9927 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_exp()
9929 alu.op = ALU_OP1_MOV; in tgsi_exp()
9930 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_exp()
9931 alu.src[0].chan = 0; in tgsi_exp()
9933 alu.dst.sel = ctx->temp_reg; in tgsi_exp()
9934 alu.dst.chan = 3; in tgsi_exp()
9935 alu.dst.write = 1; in tgsi_exp()
9936 alu.last = 1; in tgsi_exp()
9937 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_exp()
9947 struct r600_bytecode_alu alu; in tgsi_log() local
9955 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9957 alu.op = ALU_OP1_LOG_IEEE; in tgsi_log()
9958 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
9959 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
9961 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9962 alu.dst.chan = i; in tgsi_log()
9964 alu.dst.write = 1; in tgsi_log()
9966 alu.last = 1; in tgsi_log()
9967 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9973 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
9975 alu.op = ALU_OP1_LOG_IEEE; in tgsi_log()
9976 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
9977 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
9979 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9980 alu.dst.chan = 0; in tgsi_log()
9981 alu.dst.write = 1; in tgsi_log()
9982 alu.last = 1; in tgsi_log()
9983 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
9988 alu.op = ALU_OP1_FLOOR; in tgsi_log()
9989 alu.src[0].sel = ctx->temp_reg; in tgsi_log()
9990 alu.src[0].chan = 0; in tgsi_log()
9992 alu.dst.sel = ctx->temp_reg; in tgsi_log()
9993 alu.dst.chan = 0; in tgsi_log()
9994 alu.dst.write = 1; in tgsi_log()
9995 alu.last = 1; in tgsi_log()
9997 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
10007 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
10009 alu.op = ALU_OP1_LOG_IEEE; in tgsi_log()
10010 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
10011 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
10013 alu.dst.sel = ctx->temp_reg; in tgsi_log()
10014 alu.dst.chan = i; in tgsi_log()
10016 alu.dst.write = 1; in tgsi_log()
10018 alu.last = 1; in tgsi_log()
10020 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
10025 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
10027 alu.op = ALU_OP1_LOG_IEEE; in tgsi_log()
10028 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
10029 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
10031 alu.dst.sel = ctx->temp_reg; in tgsi_log()
10032 alu.dst.chan = 1; in tgsi_log()
10033 alu.dst.write = 1; in tgsi_log()
10034 alu.last = 1; in tgsi_log()
10036 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
10041 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
10043 alu.op = ALU_OP1_FLOOR; in tgsi_log()
10044 alu.src[0].sel = ctx->temp_reg; in tgsi_log()
10045 alu.src[0].chan = 1; in tgsi_log()
10047 alu.dst.sel = ctx->temp_reg; in tgsi_log()
10048 alu.dst.chan = 1; in tgsi_log()
10049 alu.dst.write = 1; in tgsi_log()
10050 alu.last = 1; in tgsi_log()
10052 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
10058 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
10059 alu.op = ALU_OP1_EXP_IEEE; in tgsi_log()
10060 alu.src[0].sel = ctx->temp_reg; in tgsi_log()
10061 alu.src[0].chan = 1; in tgsi_log()
10063 alu.dst.sel = ctx->temp_reg; in tgsi_log()
10064 alu.dst.chan = i; in tgsi_log()
10066 alu.dst.write = 1; in tgsi_log()
10068 alu.last = 1; in tgsi_log()
10070 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
10075 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
10076 alu.op = ALU_OP1_EXP_IEEE; in tgsi_log()
10077 alu.src[0].sel = ctx->temp_reg; in tgsi_log()
10078 alu.src[0].chan = 1; in tgsi_log()
10080 alu.dst.sel = ctx->temp_reg; in tgsi_log()
10081 alu.dst.chan = 1; in tgsi_log()
10082 alu.dst.write = 1; in tgsi_log()
10083 alu.last = 1; in tgsi_log()
10085 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
10092 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
10093 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_log()
10094 alu.src[0].sel = ctx->temp_reg; in tgsi_log()
10095 alu.src[0].chan = 1; in tgsi_log()
10097 alu.dst.sel = ctx->temp_reg; in tgsi_log()
10098 alu.dst.chan = i; in tgsi_log()
10100 alu.dst.write = 1; in tgsi_log()
10102 alu.last = 1; in tgsi_log()
10104 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
10109 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
10110 alu.op = ALU_OP1_RECIP_IEEE; in tgsi_log()
10111 alu.src[0].sel = ctx->temp_reg; in tgsi_log()
10112 alu.src[0].chan = 1; in tgsi_log()
10114 alu.dst.sel = ctx->temp_reg; in tgsi_log()
10115 alu.dst.chan = 1; in tgsi_log()
10116 alu.dst.write = 1; in tgsi_log()
10117 alu.last = 1; in tgsi_log()
10119 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
10124 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
10126 alu.op = ALU_OP2_MUL; in tgsi_log()
10128 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
10129 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
10131 alu.src[1].sel = ctx->temp_reg; in tgsi_log()
10132 alu.src[1].chan = 1; in tgsi_log()
10134 alu.dst.sel = ctx->temp_reg; in tgsi_log()
10135 alu.dst.chan = 1; in tgsi_log()
10136 alu.dst.write = 1; in tgsi_log()
10137 alu.last = 1; in tgsi_log()
10139 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
10148 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
10150 alu.op = ALU_OP1_LOG_IEEE; in tgsi_log()
10151 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
10152 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
10154 alu.dst.sel = ctx->temp_reg; in tgsi_log()
10156 alu.dst.write = 1; in tgsi_log()
10157 alu.dst.chan = i; in tgsi_log()
10159 alu.last = 1; in tgsi_log()
10161 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
10166 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
10168 alu.op = ALU_OP1_LOG_IEEE; in tgsi_log()
10169 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_log()
10170 r600_bytecode_src_set_abs(&alu.src[0]); in tgsi_log()
10172 alu.dst.sel = ctx->temp_reg; in tgsi_log()
10173 alu.dst.write = 1; in tgsi_log()
10174 alu.dst.chan = 2; in tgsi_log()
10175 alu.last = 1; in tgsi_log()
10177 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
10185 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_log()
10187 alu.op = ALU_OP1_MOV; in tgsi_log()
10188 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_log()
10189 alu.src[0].chan = 0; in tgsi_log()
10191 alu.dst.sel = ctx->temp_reg; in tgsi_log()
10192 alu.dst.chan = 3; in tgsi_log()
10193 alu.dst.write = 1; in tgsi_log()
10194 alu.last = 1; in tgsi_log()
10196 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_log()
10207 struct r600_bytecode_alu alu; in tgsi_eg_arl() local
10213 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_eg_arl()
10217 alu.op = ALU_OP1_FLT_TO_INT_FLOOR; in tgsi_eg_arl()
10220 alu.op = ALU_OP1_FLT_TO_INT; in tgsi_eg_arl()
10223 alu.op = ALU_OP1_MOV; in tgsi_eg_arl()
10233 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_eg_arl()
10234 alu.last = i == lasti; in tgsi_eg_arl()
10235 alu.dst.sel = reg; in tgsi_eg_arl()
10236 alu.dst.chan = i; in tgsi_eg_arl()
10237 alu.dst.write = 1; in tgsi_eg_arl()
10238 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_eg_arl()
10253 struct r600_bytecode_alu alu; in tgsi_r600_arl() local
10259 memset(&alu, 0, sizeof(alu)); in tgsi_r600_arl()
10260 alu.op = ALU_OP1_FLOOR; in tgsi_r600_arl()
10261 alu.dst.sel = ctx->bc->ar_reg; in tgsi_r600_arl()
10262 alu.dst.write = 1; in tgsi_r600_arl()
10265 alu.dst.chan = i; in tgsi_r600_arl()
10266 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_r600_arl()
10267 alu.last = i == lasti; in tgsi_r600_arl()
10268 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_r600_arl()
10273 memset(&alu, 0, sizeof(alu)); in tgsi_r600_arl()
10274 alu.op = ALU_OP1_FLT_TO_INT; in tgsi_r600_arl()
10275 alu.src[0].sel = ctx->bc->ar_reg; in tgsi_r600_arl()
10276 alu.dst.sel = ctx->bc->ar_reg; in tgsi_r600_arl()
10277 alu.dst.write = 1; in tgsi_r600_arl()
10279 alu.last = TRUE; in tgsi_r600_arl()
10281 alu.dst.chan = i; in tgsi_r600_arl()
10282 alu.src[0].chan = i; in tgsi_r600_arl()
10283 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_r600_arl()
10288 memset(&alu, 0, sizeof(alu)); in tgsi_r600_arl()
10289 alu.op = ALU_OP1_FLT_TO_INT; in tgsi_r600_arl()
10290 alu.dst.sel = ctx->bc->ar_reg; in tgsi_r600_arl()
10291 alu.dst.write = 1; in tgsi_r600_arl()
10293 alu.last = TRUE; in tgsi_r600_arl()
10296 alu.dst.chan = i; in tgsi_r600_arl()
10297 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_r600_arl()
10298 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_r600_arl()
10304 memset(&alu, 0, sizeof(alu)); in tgsi_r600_arl()
10305 alu.op = ALU_OP1_MOV; in tgsi_r600_arl()
10306 alu.dst.sel = ctx->bc->ar_reg; in tgsi_r600_arl()
10307 alu.dst.write = 1; in tgsi_r600_arl()
10310 alu.dst.chan = i; in tgsi_r600_arl()
10311 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_r600_arl()
10312 alu.last = i == lasti; in tgsi_r600_arl()
10313 if ((r = r600_bytecode_add_alu(ctx->bc, &alu))) in tgsi_r600_arl()
10330 struct r600_bytecode_alu alu; in tgsi_opdst() local
10334 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_opdst()
10336 alu.op = ALU_OP2_MUL; in tgsi_opdst()
10337 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_opdst()
10340 alu.src[0].sel = V_SQ_ALU_SRC_1; in tgsi_opdst()
10342 r600_bytecode_src(&alu.src[0], &ctx->src[0], i); in tgsi_opdst()
10346 alu.src[1].sel = V_SQ_ALU_SRC_1; in tgsi_opdst()
10348 r600_bytecode_src(&alu.src[1], &ctx->src[1], i); in tgsi_opdst()
10351 alu.last = 1; in tgsi_opdst()
10352 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_opdst()
10362 struct r600_bytecode_alu alu; in emit_logic_pred() local
10365 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in emit_logic_pred()
10366 alu.op = opcode; in emit_logic_pred()
10367 alu.execute_mask = 1; in emit_logic_pred()
10368 alu.update_pred = 1; in emit_logic_pred()
10370 alu.dst.sel = ctx->temp_reg; in emit_logic_pred()
10371 alu.dst.write = 1; in emit_logic_pred()
10372 alu.dst.chan = 0; in emit_logic_pred()
10374 alu.src[0] = *src; in emit_logic_pred()
10375 alu.src[1].sel = V_SQ_ALU_SRC_0; in emit_logic_pred()
10376 alu.src[1].chan = 0; in emit_logic_pred()
10378 alu.last = 1; in emit_logic_pred()
10380 r = r600_bytecode_add_alu_type(ctx->bc, &alu, alu_type); in emit_logic_pred()
10774 struct r600_bytecode_alu alu; in tgsi_umad() local
10783 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_umad()
10785 alu.dst.chan = i; in tgsi_umad()
10786 alu.dst.sel = ctx->temp_reg; in tgsi_umad()
10787 alu.dst.write = 1; in tgsi_umad()
10789 alu.op = ALU_OP2_MULLO_UINT; in tgsi_umad()
10791 r600_bytecode_src(&alu.src[j], &ctx->src[j], i); in tgsi_umad()
10794 alu.last = 1; in tgsi_umad()
10795 r = emit_mul_int_op(ctx->bc, &alu); in tgsi_umad()
10805 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_umad()
10806 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_umad()
10808 alu.op = ALU_OP2_ADD_INT; in tgsi_umad()
10810 alu.src[0].sel = ctx->temp_reg; in tgsi_umad()
10811 alu.src[0].chan = i; in tgsi_umad()
10813 r600_bytecode_src(&alu.src[1], &ctx->src[2], i); in tgsi_umad()
10815 alu.last = 1; in tgsi_umad()
10817 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_umad()
10827 struct r600_bytecode_alu alu; in tgsi_pk2h() local
10832 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_pk2h()
10833 alu.op = ALU_OP1_FLT32_TO_FLT16; in tgsi_pk2h()
10834 alu.dst.chan = 0; in tgsi_pk2h()
10835 alu.dst.sel = ctx->temp_reg; in tgsi_pk2h()
10836 alu.dst.write = 1; in tgsi_pk2h()
10837 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_pk2h()
10838 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_pk2h()
10841 alu.dst.chan = 1; in tgsi_pk2h()
10842 r600_bytecode_src(&alu.src[0], &ctx->src[0], 1); in tgsi_pk2h()
10843 alu.last = 1; in tgsi_pk2h()
10844 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_pk2h()
10853 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_pk2h()
10854 alu.op = ALU_OP3_MULADD_UINT24; in tgsi_pk2h()
10855 alu.is_op3 = 1; in tgsi_pk2h()
10856 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_pk2h()
10857 alu.last = i == lasti; in tgsi_pk2h()
10858 alu.src[0].sel = ctx->temp_reg; in tgsi_pk2h()
10859 alu.src[0].chan = 1; in tgsi_pk2h()
10860 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_pk2h()
10861 alu.src[1].value = 0x10000; in tgsi_pk2h()
10862 alu.src[2].sel = ctx->temp_reg; in tgsi_pk2h()
10863 alu.src[2].chan = 0; in tgsi_pk2h()
10864 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_pk2h()
10875 struct r600_bytecode_alu alu; in tgsi_up2h() local
10881 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_up2h()
10882 alu.op = ALU_OP1_MOV; in tgsi_up2h()
10883 alu.dst.chan = 0; in tgsi_up2h()
10884 alu.dst.sel = ctx->temp_reg; in tgsi_up2h()
10885 alu.dst.write = 1; in tgsi_up2h()
10886 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_up2h()
10887 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_up2h()
10892 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_up2h()
10893 alu.op = ALU_OP2_LSHR_INT; in tgsi_up2h()
10894 alu.dst.chan = 1; in tgsi_up2h()
10895 alu.dst.sel = ctx->temp_reg; in tgsi_up2h()
10896 alu.dst.write = 1; in tgsi_up2h()
10897 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in tgsi_up2h()
10898 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_up2h()
10899 alu.src[1].value = 16; in tgsi_up2h()
10900 alu.last = 1; in tgsi_up2h()
10901 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_up2h()
10909 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_up2h()
10910 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_up2h()
10911 alu.op = ALU_OP1_FLT16_TO_FLT32; in tgsi_up2h()
10912 alu.src[0].sel = ctx->temp_reg; in tgsi_up2h()
10913 alu.src[0].chan = i % 2; in tgsi_up2h()
10914 alu.last = i == lasti; in tgsi_up2h()
10915 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_up2h()
10926 struct r600_bytecode_alu alu; in tgsi_bfe() local
10942 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfe()
10943 alu.op = ALU_OP2_SETGE_INT; in tgsi_bfe()
10944 r600_bytecode_src(&alu.src[0], &ctx->src[2], i); in tgsi_bfe()
10945 alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; in tgsi_bfe()
10946 alu.src[1].value = 32; in tgsi_bfe()
10947 alu.dst.sel = ctx->temp_reg; in tgsi_bfe()
10948 alu.dst.chan = i; in tgsi_bfe()
10949 alu.dst.write = 1; in tgsi_bfe()
10951 alu.last = 1; in tgsi_bfe()
10952 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfe()
10958 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_bfe()
10959 alu.op = ALU_OP3_CNDE_INT; in tgsi_bfe()
10960 alu.is_op3 = 1; in tgsi_bfe()
10961 alu.src[0].sel = ctx->temp_reg; in tgsi_bfe()
10962 alu.src[0].chan = i; in tgsi_bfe()
10964 tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst); in tgsi_bfe()
10966 alu.src[1].sel = dst; in tgsi_bfe()
10968 alu.src[1].sel = alu.dst.sel; in tgsi_bfe()
10969 alu.src[1].chan = i; in tgsi_bfe()
10970 r600_bytecode_src(&alu.src[2], &ctx->src[0], i); in tgsi_bfe()
10971 alu.dst.write = 1; in tgsi_bfe()
10973 alu.last = 1; in tgsi_bfe()
10974 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_bfe()
10985 struct r600_bytecode_alu alu; in tgsi_clock() local
10988 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_clock()
10989 alu.op = ALU_OP1_MOV; in tgsi_clock()
10990 tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst); in tgsi_clock()
10991 alu.src[0].sel = EG_V_SQ_ALU_SRC_TIME_LO; in tgsi_clock()
10992 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_clock()
10995 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in tgsi_clock()
10996 alu.op = ALU_OP1_MOV; in tgsi_clock()
10997 tgsi_dst(ctx, &inst->Dst[0], 1, &alu.dst); in tgsi_clock()
10998 alu.src[0].sel = EG_V_SQ_ALU_SRC_TIME_HI; in tgsi_clock()
10999 alu.last = 1; in tgsi_clock()
11000 r = r600_bytecode_add_alu(ctx->bc, &alu); in tgsi_clock()
11011 struct r600_bytecode_alu alu; in emit_u64add() local
11020 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in emit_u64add()
11021 alu.op = op; ; in emit_u64add()
11022 alu.dst.sel = treg; in emit_u64add()
11023 alu.dst.chan = 0; in emit_u64add()
11024 alu.dst.write = 1; in emit_u64add()
11025 alu.src[0].sel = src0_sel; in emit_u64add()
11026 alu.src[0].chan = src0_chan + 0; in emit_u64add()
11027 alu.src[1].sel = src1_sel; in emit_u64add()
11028 alu.src[1].chan = src1_chan + 0; in emit_u64add()
11029 alu.src[1].neg = 0; in emit_u64add()
11030 r = r600_bytecode_add_alu(ctx->bc, &alu); in emit_u64add()
11034 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in emit_u64add()
11035 alu.op = op; in emit_u64add()
11036 alu.dst.sel = treg; in emit_u64add()
11037 alu.dst.chan = 1; in emit_u64add()
11038 alu.dst.write = 1; in emit_u64add()
11039 alu.src[0].sel = src0_sel; in emit_u64add()
11040 alu.src[0].chan = src0_chan + 1; in emit_u64add()
11041 alu.src[1].sel = src1_sel; in emit_u64add()
11042 alu.src[1].chan = src1_chan + 1; in emit_u64add()
11043 alu.src[1].neg = 0; in emit_u64add()
11044 r = r600_bytecode_add_alu(ctx->bc, &alu); in emit_u64add()
11048 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in emit_u64add()
11049 alu.op = opc; in emit_u64add()
11050 alu.dst.sel = treg; in emit_u64add()
11051 alu.dst.chan = 2; in emit_u64add()
11052 alu.dst.write = 1; in emit_u64add()
11053 alu.last = 1; in emit_u64add()
11054 alu.src[0].sel = src0_sel; in emit_u64add()
11055 alu.src[0].chan = src0_chan + 0; in emit_u64add()
11056 alu.src[1].sel = src1_sel; in emit_u64add()
11057 alu.src[1].chan = src1_chan + 0; in emit_u64add()
11058 alu.src[1].neg = 0; in emit_u64add()
11059 r = r600_bytecode_add_alu(ctx->bc, &alu); in emit_u64add()
11063 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in emit_u64add()
11064 alu.op = op; in emit_u64add()
11065 alu.dst.sel = treg; in emit_u64add()
11066 alu.dst.chan = 1; in emit_u64add()
11067 alu.dst.write = 1; in emit_u64add()
11068 alu.src[0].sel = treg; in emit_u64add()
11069 alu.src[0].chan = 1; in emit_u64add()
11070 alu.src[1].sel = treg; in emit_u64add()
11071 alu.src[1].chan = 2; in emit_u64add()
11072 alu.last = 1; in emit_u64add()
11073 r = r600_bytecode_add_alu(ctx->bc, &alu); in emit_u64add()
11082 struct r600_bytecode_alu alu; in egcm_u64add() local
11091 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64add()
11092 alu.op = op; ; in egcm_u64add()
11093 alu.dst.sel = treg; in egcm_u64add()
11094 alu.dst.chan = 0; in egcm_u64add()
11095 alu.dst.write = 1; in egcm_u64add()
11096 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in egcm_u64add()
11097 r600_bytecode_src(&alu.src[1], &ctx->src[1], 0); in egcm_u64add()
11098 alu.src[1].neg = 0; in egcm_u64add()
11099 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64add()
11103 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64add()
11104 alu.op = op; in egcm_u64add()
11105 alu.dst.sel = treg; in egcm_u64add()
11106 alu.dst.chan = 1; in egcm_u64add()
11107 alu.dst.write = 1; in egcm_u64add()
11108 r600_bytecode_src(&alu.src[0], &ctx->src[0], 1); in egcm_u64add()
11109 r600_bytecode_src(&alu.src[1], &ctx->src[1], 1); in egcm_u64add()
11110 alu.src[1].neg = 0; in egcm_u64add()
11111 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64add()
11115 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64add()
11116 alu.op = opc ; in egcm_u64add()
11117 alu.dst.sel = treg; in egcm_u64add()
11118 alu.dst.chan = 2; in egcm_u64add()
11119 alu.dst.write = 1; in egcm_u64add()
11120 alu.last = 1; in egcm_u64add()
11121 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in egcm_u64add()
11122 r600_bytecode_src(&alu.src[1], &ctx->src[1], 0); in egcm_u64add()
11123 alu.src[1].neg = 0; in egcm_u64add()
11124 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64add()
11128 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64add()
11129 alu.op = op; in egcm_u64add()
11130 tgsi_dst(ctx, &inst->Dst[0], 1, &alu.dst); in egcm_u64add()
11131 alu.src[0].sel = treg; in egcm_u64add()
11132 alu.src[0].chan = 1; in egcm_u64add()
11133 alu.src[1].sel = treg; in egcm_u64add()
11134 alu.src[1].chan = 2; in egcm_u64add()
11135 alu.last = 1; in egcm_u64add()
11136 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64add()
11139 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64add()
11140 alu.op = ALU_OP1_MOV; in egcm_u64add()
11141 tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst); in egcm_u64add()
11142 alu.src[0].sel = treg; in egcm_u64add()
11143 alu.src[0].chan = 0; in egcm_u64add()
11144 alu.last = 1; in egcm_u64add()
11145 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64add()
11155 struct r600_bytecode_alu alu; in egcm_i64neg() local
11161 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_i64neg()
11162 alu.op = op; ; in egcm_i64neg()
11163 alu.dst.sel = treg; in egcm_i64neg()
11164 alu.dst.chan = 0; in egcm_i64neg()
11165 alu.dst.write = 1; in egcm_i64neg()
11166 alu.src[0].sel = V_SQ_ALU_SRC_0; in egcm_i64neg()
11167 r600_bytecode_src(&alu.src[1], &ctx->src[0], 0); in egcm_i64neg()
11168 alu.src[1].neg = 0; in egcm_i64neg()
11169 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_i64neg()
11173 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_i64neg()
11174 alu.op = op; in egcm_i64neg()
11175 alu.dst.sel = treg; in egcm_i64neg()
11176 alu.dst.chan = 1; in egcm_i64neg()
11177 alu.dst.write = 1; in egcm_i64neg()
11178 alu.src[0].sel = V_SQ_ALU_SRC_0; in egcm_i64neg()
11179 r600_bytecode_src(&alu.src[1], &ctx->src[0], 1); in egcm_i64neg()
11180 alu.src[1].neg = 0; in egcm_i64neg()
11181 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_i64neg()
11185 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_i64neg()
11186 alu.op = opc ; in egcm_i64neg()
11187 alu.dst.sel = treg; in egcm_i64neg()
11188 alu.dst.chan = 2; in egcm_i64neg()
11189 alu.dst.write = 1; in egcm_i64neg()
11190 alu.last = 1; in egcm_i64neg()
11191 alu.src[0].sel = V_SQ_ALU_SRC_0; in egcm_i64neg()
11192 r600_bytecode_src(&alu.src[1], &ctx->src[0], 0); in egcm_i64neg()
11193 alu.src[1].neg = 0; in egcm_i64neg()
11194 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_i64neg()
11198 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_i64neg()
11199 alu.op = op; in egcm_i64neg()
11200 tgsi_dst(ctx, &inst->Dst[0], 1, &alu.dst); in egcm_i64neg()
11201 alu.src[0].sel = treg; in egcm_i64neg()
11202 alu.src[0].chan = 1; in egcm_i64neg()
11203 alu.src[1].sel = treg; in egcm_i64neg()
11204 alu.src[1].chan = 2; in egcm_i64neg()
11205 alu.last = 1; in egcm_i64neg()
11206 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_i64neg()
11209 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_i64neg()
11210 alu.op = ALU_OP1_MOV; in egcm_i64neg()
11211 tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst); in egcm_i64neg()
11212 alu.src[0].sel = treg; in egcm_i64neg()
11213 alu.src[0].chan = 0; in egcm_i64neg()
11214 alu.last = 1; in egcm_i64neg()
11215 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_i64neg()
11228 struct r600_bytecode_alu alu; in egcm_u64mul() local
11233 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64mul()
11234 alu.op = ALU_OP2_MULLO_UINT; in egcm_u64mul()
11235 alu.dst.sel = treg; in egcm_u64mul()
11236 alu.dst.chan = 0; in egcm_u64mul()
11237 alu.dst.write = 1; in egcm_u64mul()
11238 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in egcm_u64mul()
11239 r600_bytecode_src(&alu.src[1], &ctx->src[1], 0); in egcm_u64mul()
11240 r = emit_mul_int_op(ctx->bc, &alu); in egcm_u64mul()
11245 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64mul()
11246 alu.op = ALU_OP2_MULHI_UINT; in egcm_u64mul()
11247 alu.dst.sel = treg; in egcm_u64mul()
11248 alu.dst.chan = 1; in egcm_u64mul()
11249 alu.dst.write = 1; in egcm_u64mul()
11250 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in egcm_u64mul()
11251 r600_bytecode_src(&alu.src[1], &ctx->src[1], 0); in egcm_u64mul()
11252 r = emit_mul_int_op(ctx->bc, &alu); in egcm_u64mul()
11257 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64mul()
11258 alu.op = ALU_OP2_MULLO_UINT; in egcm_u64mul()
11259 alu.dst.sel = treg; in egcm_u64mul()
11260 alu.dst.chan = 2; in egcm_u64mul()
11261 alu.dst.write = 1; in egcm_u64mul()
11262 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in egcm_u64mul()
11263 r600_bytecode_src(&alu.src[1], &ctx->src[1], 1); in egcm_u64mul()
11264 r = emit_mul_int_op(ctx->bc, &alu); in egcm_u64mul()
11269 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64mul()
11270 alu.op = ALU_OP2_MULLO_UINT; in egcm_u64mul()
11271 alu.dst.sel = treg; in egcm_u64mul()
11272 alu.dst.chan = 3; in egcm_u64mul()
11273 alu.dst.write = 1; in egcm_u64mul()
11274 r600_bytecode_src(&alu.src[0], &ctx->src[0], 1); in egcm_u64mul()
11275 r600_bytecode_src(&alu.src[1], &ctx->src[1], 0); in egcm_u64mul()
11276 r = emit_mul_int_op(ctx->bc, &alu); in egcm_u64mul()
11281 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64mul()
11282 alu.op = ALU_OP2_ADD_INT; in egcm_u64mul()
11283 alu.dst.sel = treg; in egcm_u64mul()
11284 alu.dst.chan = 2; in egcm_u64mul()
11285 alu.dst.write = 1; in egcm_u64mul()
11286 alu.src[0].sel = treg; in egcm_u64mul()
11287 alu.src[0].chan = 2; in egcm_u64mul()
11288 alu.src[1].sel = treg; in egcm_u64mul()
11289 alu.src[1].chan = 3; in egcm_u64mul()
11290 alu.last = 1; in egcm_u64mul()
11291 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64mul()
11296 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64mul()
11297 alu.op = ALU_OP2_ADD_INT; in egcm_u64mul()
11298 alu.dst.sel = treg; in egcm_u64mul()
11299 alu.dst.chan = 1; in egcm_u64mul()
11300 alu.dst.write = 1; in egcm_u64mul()
11301 alu.src[0].sel = treg; in egcm_u64mul()
11302 alu.src[0].chan = 1; in egcm_u64mul()
11303 alu.src[1].sel = treg; in egcm_u64mul()
11304 alu.src[1].chan = 2; in egcm_u64mul()
11305 alu.last = 1; in egcm_u64mul()
11306 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64mul()
11311 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64mul()
11312 alu.op = ALU_OP1_MOV; in egcm_u64mul()
11313 tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst); in egcm_u64mul()
11314 alu.src[0].sel = treg; in egcm_u64mul()
11315 alu.src[0].chan = 0; in egcm_u64mul()
11316 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64mul()
11321 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64mul()
11322 alu.op = ALU_OP1_MOV; in egcm_u64mul()
11323 tgsi_dst(ctx, &inst->Dst[0], 1, &alu.dst); in egcm_u64mul()
11324 alu.src[0].sel = treg; in egcm_u64mul()
11325 alu.src[0].chan = 1; in egcm_u64mul()
11326 alu.last = 1; in egcm_u64mul()
11327 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64mul()
11382 struct r600_bytecode_alu alu; in egcm_u64div() local
11689 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64div()
11690 alu.op = ALU_OP1_MOV; in egcm_u64div()
11691 tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst); in egcm_u64div()
11692 alu.src[0].sel = tmp_num; in egcm_u64div()
11693 alu.src[0].chan = 2; in egcm_u64div()
11694 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64div()
11698 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64div()
11699 alu.op = ALU_OP1_MOV; in egcm_u64div()
11700 tgsi_dst(ctx, &inst->Dst[0], 1, &alu.dst); in egcm_u64div()
11701 alu.src[0].sel = tmp_num; in egcm_u64div()
11702 alu.src[0].chan = 3; in egcm_u64div()
11703 alu.last = 1; in egcm_u64div()
11704 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64div()
11713 struct r600_bytecode_alu alu; in egcm_u64sne() local
11717 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64sne()
11718 alu.op = ALU_OP2_SETNE_INT; in egcm_u64sne()
11719 alu.dst.sel = treg; in egcm_u64sne()
11720 alu.dst.chan = 0; in egcm_u64sne()
11721 alu.dst.write = 1; in egcm_u64sne()
11722 r600_bytecode_src(&alu.src[0], &ctx->src[0], 0); in egcm_u64sne()
11723 r600_bytecode_src(&alu.src[1], &ctx->src[1], 0); in egcm_u64sne()
11724 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64sne()
11728 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64sne()
11729 alu.op = ALU_OP2_SETNE_INT; in egcm_u64sne()
11730 alu.dst.sel = treg; in egcm_u64sne()
11731 alu.dst.chan = 1; in egcm_u64sne()
11732 alu.dst.write = 1; in egcm_u64sne()
11733 r600_bytecode_src(&alu.src[0], &ctx->src[0], 1); in egcm_u64sne()
11734 r600_bytecode_src(&alu.src[1], &ctx->src[1], 1); in egcm_u64sne()
11735 alu.last = 1; in egcm_u64sne()
11736 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64sne()
11740 memset(&alu, 0, sizeof(struct r600_bytecode_alu)); in egcm_u64sne()
11741 alu.op = ALU_OP2_OR_INT; in egcm_u64sne()
11742 tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst); in egcm_u64sne()
11743 alu.src[0].sel = treg; in egcm_u64sne()
11744 alu.src[0].chan = 0; in egcm_u64sne()
11745 alu.src[1].sel = treg; in egcm_u64sne()
11746 alu.src[1].chan = 1; in egcm_u64sne()
11747 alu.last = 1; in egcm_u64sne()
11748 r = r600_bytecode_add_alu(ctx->bc, &alu); in egcm_u64sne()