- int err = 0;
- int space = 0;
-
- if (inst->header.predicate_control) {
- string (file, "(");
- err |= control (file, "predicate inverse", pred_inv, inst->header.predicate_inverse, NULL);
- string (file, "f0");
- if (inst->bits2.da1.flag_reg_nr)
- format (file, ".%d", inst->bits2.da1.flag_reg_nr);
- if (inst->header.access_mode == BRW_ALIGN_1)
- err |= control (file, "predicate control align1", pred_ctrl_align1,
- inst->header.predicate_control, NULL);
- else
- err |= control (file, "predicate control align16", pred_ctrl_align16,
- inst->header.predicate_control, NULL);
- string (file, ") ");
- }
-
- err |= print_opcode (file, inst->header.opcode);
- err |= control (file, "saturate", saturate, inst->header.saturate, NULL);
- err |= control (file, "debug control", debug_ctrl, inst->header.debug_control, NULL);
-
- if (inst->header.opcode == BRW_OPCODE_MATH) {
- string (file, " ");
- err |= control (file, "function", math_function,
- inst->header.destreg__conditionalmod, NULL);
- } else if (inst->header.opcode != BRW_OPCODE_SEND &&
- inst->header.opcode != BRW_OPCODE_SENDC)
- err |= control (file, "conditional modifier", conditional_modifier,
- inst->header.destreg__conditionalmod, NULL);
-
- if (inst->header.opcode != BRW_OPCODE_NOP) {
- string (file, "(");
- err |= control (file, "execution size", exec_size, inst->header.execution_size, NULL);
- string (file, ")");
- }
-
- if (inst->header.opcode == BRW_OPCODE_SEND && gen < 6)
- format (file, " %d", inst->header.destreg__conditionalmod);
-
- if (opcode[inst->header.opcode].ndst > 0) {
- pad (file, 16);
- err |= dest (file, inst);
- } else if (gen >= 6 && (inst->header.opcode == BRW_OPCODE_IF ||
- inst->header.opcode == BRW_OPCODE_ELSE ||
- inst->header.opcode == BRW_OPCODE_ENDIF ||
- inst->header.opcode == BRW_OPCODE_WHILE)) {
- format (file, " %d", inst->bits1.branch_gen6.jump_count);
- }
-
- if (opcode[inst->header.opcode].nsrc > 0) {
- pad (file, 32);
- err |= src0 (file, inst);
- }
- if (opcode[inst->header.opcode].nsrc > 1) {
- pad (file, 48);
- err |= src1 (file, inst);
- }
-
- if (inst->header.opcode == BRW_OPCODE_SEND ||
- inst->header.opcode == BRW_OPCODE_SENDC) {
- int target;
-
- if (gen >= 6)
- target = inst->header.destreg__conditionalmod;
- else if (gen == 5)
- target = inst->bits2.send_gen5.sfid;
- else
- target = inst->bits3.generic.msg_target;
-
- newline (file);
- pad (file, 16);
- space = 0;
- err |= control (file, "target function", target_function,
- target, &space);
-
- switch (target) {
- case BRW_MESSAGE_TARGET_MATH:
- err |= control (file, "math function", math_function,
- inst->bits3.math.function, &space);
- err |= control (file, "math saturate", math_saturate,
- inst->bits3.math.saturate, &space);
- err |= control (file, "math signed", math_signed,
- inst->bits3.math.int_type, &space);
- err |= control (file, "math scalar", math_scalar,
- inst->bits3.math.data_type, &space);
- err |= control (file, "math precision", math_precision,
- inst->bits3.math.precision, &space);
- break;
- case BRW_MESSAGE_TARGET_SAMPLER:
- if (gen >= 5) {
- format (file, " (%d, %d, %d, %d)",
- inst->bits3.sampler_gen5.binding_table_index,
- inst->bits3.sampler_gen5.sampler,
- inst->bits3.sampler_gen5.msg_type,
- inst->bits3.sampler_gen5.simd_mode);
- } else if (0 /* FINISHME: is_g4x */) {
- format (file, " (%d, %d)",
- inst->bits3.sampler_g4x.binding_table_index,
- inst->bits3.sampler_g4x.sampler);
- } else {
- format (file, " (%d, %d, ",
- inst->bits3.sampler.binding_table_index,
- inst->bits3.sampler.sampler);
- err |= control (file, "sampler target format",
- sampler_target_format,
- inst->bits3.sampler.return_format, NULL);
- string (file, ")");
- }
- break;
- case BRW_MESSAGE_TARGET_DATAPORT_READ:
- if (gen >= 6) {
- format (file, " (%d, %d, %d, %d, %d, %d)",
- inst->bits3.dp_render_cache.binding_table_index,
- inst->bits3.dp_render_cache.msg_control,
- inst->bits3.dp_render_cache.msg_type,
- inst->bits3.dp_render_cache.send_commit_msg,
- inst->bits3.dp_render_cache.msg_length,
- inst->bits3.dp_render_cache.response_length);
- } else if (gen >= 5) {
- format (file, " (%d, %d, %d)",
- inst->bits3.dp_read_gen5.binding_table_index,
- inst->bits3.dp_read_gen5.msg_control,
- inst->bits3.dp_read_gen5.msg_type);
- } else {
- format (file, " (%d, %d, %d)",
- inst->bits3.dp_read.binding_table_index,
- inst->bits3.dp_read.msg_control,
- inst->bits3.dp_read.msg_type);
- }
- break;
- case BRW_MESSAGE_TARGET_DATAPORT_WRITE:
- if (gen >= 6) {
- format (file, " (%d, %d, %d, %d, %d, %d)",
- inst->bits3.dp_render_cache.binding_table_index,
- inst->bits3.dp_render_cache.msg_control,
- inst->bits3.dp_render_cache.msg_type,
- inst->bits3.dp_render_cache.send_commit_msg,
- inst->bits3.dp_render_cache.msg_length,
- inst->bits3.dp_render_cache.response_length);
- } else {
- format (file, " (%d, %d, %d, %d)",
- inst->bits3.dp_write.binding_table_index,
- (inst->bits3.dp_write.pixel_scoreboard_clear << 3) |
- inst->bits3.dp_write.msg_control,
- inst->bits3.dp_write.msg_type,
- inst->bits3.dp_write.send_commit_msg);
- }
- break;
- case BRW_MESSAGE_TARGET_URB:
- if (gen >= 5) {
- format (file, " %d", inst->bits3.urb_gen5.offset);
- } else {
- format (file, " %d", inst->bits3.urb.offset);
- }
-
- space = 1;
- if (gen >= 5) {
- err |= control (file, "urb opcode", urb_opcode,
- inst->bits3.urb_gen5.opcode, &space);
- }
- err |= control (file, "urb swizzle", urb_swizzle,
- inst->bits3.urb.swizzle_control, &space);
- err |= control (file, "urb allocate", urb_allocate,
- inst->bits3.urb.allocate, &space);
- err |= control (file, "urb used", urb_used,
- inst->bits3.urb.used, &space);
- err |= control (file, "urb complete", urb_complete,
- inst->bits3.urb.complete, &space);
- if (gen >= 5) {
- format (file, " mlen %d, rlen %d\n",
- inst->bits3.urb_gen5.msg_length,
- inst->bits3.urb_gen5.response_length);
- }
- break;
- case BRW_MESSAGE_TARGET_THREAD_SPAWNER:
- break;
- default:
- format (file, "unsupported target %d", target);
- break;
- }
- if (space)
- string (file, " ");
- if (gen >= 5) {
- format (file, "mlen %d",
- inst->bits3.generic_gen5.msg_length);
- format (file, " rlen %d",
- inst->bits3.generic_gen5.response_length);
- } else {
- format (file, "mlen %d",
- inst->bits3.generic.msg_length);
- format (file, " rlen %d",
- inst->bits3.generic.response_length);
- }
- }
- pad (file, 64);
- if (inst->header.opcode != BRW_OPCODE_NOP) {
- string (file, "{");
- space = 1;
- err |= control(file, "access mode", access_mode, inst->header.access_mode, &space);
- if (gen >= 6)
- err |= control (file, "write enable control", wectrl, inst->header.mask_control, &space);
- else
- err |= control (file, "mask control", mask_ctrl, inst->header.mask_control, &space);
- err |= control (file, "dependency control", dep_ctrl, inst->header.dependency_control, &space);
-
- if (gen >= 6)
- err |= qtr_ctrl (file, inst);
- else {
- if (inst->header.compression_control == BRW_COMPRESSION_COMPRESSED &&
- opcode[inst->header.opcode].ndst > 0 &&
- inst->bits1.da1.dest_reg_file == BRW_MESSAGE_REGISTER_FILE &&
- inst->bits1.da1.dest_reg_nr & (1 << 7)) {
- format (file, " compr4");
- } else {
- err |= control (file, "compression control", compr_ctrl,
- inst->header.compression_control, &space);
- }
- }
-
- err |= control (file, "thread control", thread_ctrl, inst->header.thread_control, &space);
- if (gen >= 6)
- err |= control (file, "acc write control", accwr, inst->header.acc_wr_control, &space);
- if (inst->header.opcode == BRW_OPCODE_SEND ||
- inst->header.opcode == BRW_OPCODE_SENDC)
- err |= control (file, "end of thread", end_of_thread,
- inst->bits3.generic.end_of_thread, &space);
- if (space)
- string (file, " ");
- string (file, "}");
- }
- string (file, ";");
- newline (file);
- return err;
+ int err = 0;
+ int space = 0;
+
+ const enum opcode opcode = brw_inst_opcode(devinfo, inst);
+
+ if (brw_inst_pred_control(devinfo, inst)) {
+ string(file, "(");
+ err |= control(file, "predicate inverse", pred_inv,
+ brw_inst_pred_inv(devinfo, inst), NULL);
+ format(file, "f%ld", devinfo->gen >= 7 ? brw_inst_flag_reg_nr(devinfo, inst) : 0);
+ if (brw_inst_flag_subreg_nr(devinfo, inst))
+ format(file, ".%ld", brw_inst_flag_subreg_nr(devinfo, inst));
+ if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1) {
+ err |= control(file, "predicate control align1", pred_ctrl_align1,
+ brw_inst_pred_control(devinfo, inst), NULL);
+ } else {
+ err |= control(file, "predicate control align16", pred_ctrl_align16,
+ brw_inst_pred_control(devinfo, inst), NULL);
+ }
+ string(file, ") ");
+ }
+
+ err |= print_opcode(file, opcode);
+ err |= control(file, "saturate", saturate, brw_inst_saturate(devinfo, inst),
+ NULL);
+
+ err |= control(file, "debug control", debug_ctrl,
+ brw_inst_debug_control(devinfo, inst), NULL);
+
+ if (opcode == BRW_OPCODE_MATH) {
+ string(file, " ");
+ err |= control(file, "function", math_function,
+ brw_inst_math_function(devinfo, inst), NULL);
+ } else if (opcode != BRW_OPCODE_SEND && opcode != BRW_OPCODE_SENDC) {
+ err |= control(file, "conditional modifier", conditional_modifier,
+ brw_inst_cond_modifier(devinfo, inst), NULL);
+
+ /* If we're using the conditional modifier, print which flags reg is
+ * used for it. Note that on gen6+, the embedded-condition SEL and
+ * control flow doesn't update flags.
+ */
+ if (brw_inst_cond_modifier(devinfo, inst) &&
+ (devinfo->gen < 6 || (opcode != BRW_OPCODE_SEL &&
+ opcode != BRW_OPCODE_IF &&
+ opcode != BRW_OPCODE_WHILE))) {
+ format(file, ".f%ld",
+ devinfo->gen >= 7 ? brw_inst_flag_reg_nr(devinfo, inst) : 0);
+ if (brw_inst_flag_subreg_nr(devinfo, inst))
+ format(file, ".%ld", brw_inst_flag_subreg_nr(devinfo, inst));
+ }
+ }
+
+ if (opcode != BRW_OPCODE_NOP && opcode != BRW_OPCODE_NENOP) {
+ string(file, "(");
+ err |= control(file, "execution size", exec_size,
+ brw_inst_exec_size(devinfo, inst), NULL);
+ string(file, ")");
+ }
+
+ if (opcode == BRW_OPCODE_SEND && devinfo->gen < 6)
+ format(file, " %ld", brw_inst_base_mrf(devinfo, inst));
+
+ if (has_uip(devinfo, opcode)) {
+ /* Instructions that have UIP also have JIP. */
+ pad(file, 16);
+ format(file, "JIP: %d", brw_inst_jip(devinfo, inst));
+ pad(file, 32);
+ format(file, "UIP: %d", brw_inst_uip(devinfo, inst));
+ } else if (has_jip(devinfo, opcode)) {
+ pad(file, 16);
+ if (devinfo->gen >= 7) {
+ format(file, "JIP: %d", brw_inst_jip(devinfo, inst));
+ } else {
+ format(file, "JIP: %d", brw_inst_gen6_jump_count(devinfo, inst));
+ }
+ } else if (devinfo->gen < 6 && (opcode == BRW_OPCODE_BREAK ||
+ opcode == BRW_OPCODE_CONTINUE ||
+ opcode == BRW_OPCODE_ELSE)) {
+ pad(file, 16);
+ format(file, "Jump: %d", brw_inst_gen4_jump_count(devinfo, inst));
+ pad(file, 32);
+ format(file, "Pop: %ld", brw_inst_gen4_pop_count(devinfo, inst));
+ } else if (devinfo->gen < 6 && (opcode == BRW_OPCODE_IF ||
+ opcode == BRW_OPCODE_IFF ||
+ opcode == BRW_OPCODE_HALT)) {
+ pad(file, 16);
+ format(file, "Jump: %d", brw_inst_gen4_jump_count(devinfo, inst));
+ } else if (devinfo->gen < 6 && opcode == BRW_OPCODE_ENDIF) {
+ pad(file, 16);
+ format(file, "Pop: %ld", brw_inst_gen4_pop_count(devinfo, inst));
+ } else if (opcode == BRW_OPCODE_JMPI) {
+ pad(file, 16);
+ err |= src1(file, devinfo, inst);
+ } else if (opcode_descs[opcode].nsrc == 3) {
+ pad(file, 16);
+ err |= dest_3src(file, devinfo, inst);
+
+ pad(file, 32);
+ err |= src0_3src(file, devinfo, inst);
+
+ pad(file, 48);
+ err |= src1_3src(file, devinfo, inst);
+
+ pad(file, 64);
+ err |= src2_3src(file, devinfo, inst);
+ } else {
+ if (opcode_descs[opcode].ndst > 0) {
+ pad(file, 16);
+ err |= dest(file, devinfo, inst);
+ }
+
+ if (opcode_descs[opcode].nsrc > 0) {
+ pad(file, 32);
+ err |= src0(file, devinfo, inst);
+ }
+
+ if (opcode_descs[opcode].nsrc > 1) {
+ pad(file, 48);
+ err |= src1(file, devinfo, inst);
+ }
+ }
+
+ if (opcode == BRW_OPCODE_SEND || opcode == BRW_OPCODE_SENDC) {
+ enum brw_message_target sfid = brw_inst_sfid(devinfo, inst);
+
+ if (brw_inst_src1_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE) {
+ /* show the indirect descriptor source */
+ pad(file, 48);
+ err |= src1(file, devinfo, inst);
+ }
+
+ newline(file);
+ pad(file, 16);
+ space = 0;
+
+ fprintf(file, " ");
+ err |= control(file, "SFID", devinfo->gen >= 6 ? gen6_sfid : gen4_sfid,
+ sfid, &space);
+
+
+ if (brw_inst_src1_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE) {
+ format(file, " indirect");
+ } else {
+ switch (sfid) {
+ case BRW_SFID_MATH:
+ err |= control(file, "math function", math_function,
+ brw_inst_math_msg_function(devinfo, inst), &space);
+ err |= control(file, "math saturate", math_saturate,
+ brw_inst_math_msg_saturate(devinfo, inst), &space);
+ err |= control(file, "math signed", math_signed,
+ brw_inst_math_msg_signed_int(devinfo, inst), &space);
+ err |= control(file, "math scalar", math_scalar,
+ brw_inst_math_msg_data_type(devinfo, inst), &space);
+ err |= control(file, "math precision", math_precision,
+ brw_inst_math_msg_precision(devinfo, inst), &space);
+ break;
+ case BRW_SFID_SAMPLER:
+ if (devinfo->gen >= 5) {
+ err |= control(file, "sampler message", gen5_sampler_msg_type,
+ brw_inst_sampler_msg_type(devinfo, inst), &space);
+ err |= control(file, "sampler simd mode", gen5_sampler_simd_mode,
+ brw_inst_sampler_simd_mode(devinfo, inst), &space);
+ format(file, " Surface = %ld Sampler = %ld",
+ brw_inst_binding_table_index(devinfo, inst),
+ brw_inst_sampler(devinfo, inst));
+ } else {
+ format(file, " (%ld, %ld, %ld, ",
+ brw_inst_binding_table_index(devinfo, inst),
+ brw_inst_sampler(devinfo, inst),
+ brw_inst_sampler_msg_type(devinfo, inst));
+ if (!devinfo->is_g4x) {
+ err |= control(file, "sampler target format",
+ sampler_target_format,
+ brw_inst_sampler_return_format(devinfo, inst), NULL);
+ }
+ string(file, ")");
+ }
+ break;
+ case GEN6_SFID_DATAPORT_SAMPLER_CACHE:
+ /* aka BRW_SFID_DATAPORT_READ on Gen4-5 */
+ if (devinfo->gen >= 6) {
+ format(file, " (%ld, %ld, %ld, %ld)",
+ brw_inst_binding_table_index(devinfo, inst),
+ brw_inst_dp_msg_control(devinfo, inst),
+ brw_inst_dp_msg_type(devinfo, inst),
+ devinfo->gen >= 7 ? 0 : brw_inst_dp_write_commit(devinfo, inst));
+ } else {
+ format(file, " (%ld, %ld, %ld)",
+ brw_inst_binding_table_index(devinfo, inst),
+ brw_inst_dp_read_msg_control(devinfo, inst),
+ brw_inst_dp_read_msg_type(devinfo, inst));
+ }
+ break;
+
+ case GEN6_SFID_DATAPORT_RENDER_CACHE: {
+ /* aka BRW_SFID_DATAPORT_WRITE on Gen4-5 */
+ unsigned msg_type = brw_inst_dp_write_msg_type(devinfo, inst);
+
+ err |= control(file, "DP rc message type",
+ devinfo->gen >= 6 ? dp_rc_msg_type_gen6
+ : dp_write_port_msg_type,
+ msg_type, &space);
+
+ bool is_rt_write = msg_type ==
+ (devinfo->gen >= 6 ? GEN6_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_WRITE
+ : BRW_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_WRITE);
+
+ if (is_rt_write) {
+ err |= control(file, "RT message type", m_rt_write_subtype,
+ brw_inst_rt_message_type(devinfo, inst), &space);
+ if (devinfo->gen >= 6 && brw_inst_rt_slot_group(devinfo, inst))
+ string(file, " Hi");
+ if (brw_inst_rt_last(devinfo, inst))
+ string(file, " LastRT");
+ if (devinfo->gen < 7 && brw_inst_dp_write_commit(devinfo, inst))
+ string(file, " WriteCommit");
+ } else {
+ format(file, " MsgCtrl = 0x%lx",
+ brw_inst_dp_write_msg_control(devinfo, inst));
+ }
+
+ format(file, " Surface = %ld", brw_inst_binding_table_index(devinfo, inst));
+ break;
+ }
+
+ case BRW_SFID_URB:
+ format(file, " %ld", brw_inst_urb_global_offset(devinfo, inst));
+
+ space = 1;
+ if (devinfo->gen >= 7) {
+ err |= control(file, "urb opcode", gen7_urb_opcode,
+ brw_inst_urb_opcode(devinfo, inst), &space);
+ } else if (devinfo->gen >= 5) {
+ err |= control(file, "urb opcode", gen5_urb_opcode,
+ brw_inst_urb_opcode(devinfo, inst), &space);
+ }
+ err |= control(file, "urb swizzle", urb_swizzle,
+ brw_inst_urb_swizzle_control(devinfo, inst), &space);
+ if (devinfo->gen < 7) {
+ err |= control(file, "urb allocate", urb_allocate,
+ brw_inst_urb_allocate(devinfo, inst), &space);
+ err |= control(file, "urb used", urb_used,
+ brw_inst_urb_used(devinfo, inst), &space);
+ }
+ if (devinfo->gen < 8) {
+ err |= control(file, "urb complete", urb_complete,
+ brw_inst_urb_complete(devinfo, inst), &space);
+ }
+ break;
+ case BRW_SFID_THREAD_SPAWNER:
+ break;
+
+ case BRW_SFID_MESSAGE_GATEWAY:
+ format(file, " (%s)",
+ gen7_gateway_subfuncid[brw_inst_gateway_subfuncid(devinfo, inst)]);
+ break;
+
+ case GEN7_SFID_DATAPORT_DATA_CACHE:
+ if (devinfo->gen >= 7) {
+ format(file, " (");
+
+ err |= control(file, "DP DC0 message type",
+ dp_dc0_msg_type_gen7,
+ brw_inst_dp_msg_type(devinfo, inst), &space);
+
+ format(file, ", %ld, ", brw_inst_binding_table_index(devinfo, inst));
+
+ switch (brw_inst_dp_msg_type(devinfo, inst)) {
+ case GEN7_DATAPORT_DC_UNTYPED_ATOMIC_OP:
+ control(file, "atomic op", aop,
+ brw_inst_imm_ud(devinfo, inst) >> 8 & 0xf, &space);
+ break;
+ default:
+ format(file, "%ld", brw_inst_dp_msg_control(devinfo, inst));
+ }
+ format(file, ")");
+ break;
+ }
+ /* FALLTHROUGH */
+
+ case HSW_SFID_DATAPORT_DATA_CACHE_1: {
+ if (devinfo->gen >= 7) {
+ format(file, " (");
+
+ unsigned msg_ctrl = brw_inst_dp_msg_control(devinfo, inst);
+
+ err |= control(file, "DP DC1 message type",
+ dp_dc1_msg_type_hsw,
+ brw_inst_dp_msg_type(devinfo, inst), &space);
+
+ format(file, ", Surface = %ld, ",
+ brw_inst_binding_table_index(devinfo, inst));
+
+ switch (brw_inst_dp_msg_type(devinfo, inst)) {
+ case HSW_DATAPORT_DC_PORT1_UNTYPED_ATOMIC_OP:
+ case HSW_DATAPORT_DC_PORT1_TYPED_ATOMIC_OP:
+ case HSW_DATAPORT_DC_PORT1_ATOMIC_COUNTER_OP:
+ format(file, "SIMD%d,", (msg_ctrl & (1 << 4)) ? 8 : 16);
+ /* fallthrough */
+ case HSW_DATAPORT_DC_PORT1_UNTYPED_ATOMIC_OP_SIMD4X2:
+ case HSW_DATAPORT_DC_PORT1_TYPED_ATOMIC_OP_SIMD4X2:
+ case HSW_DATAPORT_DC_PORT1_ATOMIC_COUNTER_OP_SIMD4X2:
+ control(file, "atomic op", aop, msg_ctrl & 0xf, &space);
+ break;
+ case HSW_DATAPORT_DC_PORT1_UNTYPED_SURFACE_READ:
+ case HSW_DATAPORT_DC_PORT1_UNTYPED_SURFACE_WRITE:
+ case HSW_DATAPORT_DC_PORT1_TYPED_SURFACE_READ:
+ case HSW_DATAPORT_DC_PORT1_TYPED_SURFACE_WRITE: {
+ static const char *simd_modes[] = { "4x2", "16", "8" };
+ format(file, "SIMD%s, Mask = 0x%x",
+ simd_modes[msg_ctrl >> 4], msg_ctrl & 0xf);
+ break;
+ }
+ default:
+ format(file, "0x%x", msg_ctrl);
+ }
+ format(file, ")");
+ break;
+ }
+ /* FALLTHROUGH */
+ }
+
+ case GEN7_SFID_PIXEL_INTERPOLATOR:
+ if (devinfo->gen >= 7) {
+ format(file, " (%s, %s, 0x%02lx)",
+ brw_inst_pi_nopersp(devinfo, inst) ? "linear" : "persp",
+ pixel_interpolator_msg_types[brw_inst_pi_message_type(devinfo, inst)],
+ brw_inst_pi_message_data(devinfo, inst));
+ break;
+ }
+ /* FALLTHROUGH */
+
+ default:
+ format(file, "unsupported shared function ID %d", sfid);
+ break;
+ }
+
+ if (space)
+ string(file, " ");
+ format(file, "mlen %ld", brw_inst_mlen(devinfo, inst));
+ format(file, " rlen %ld", brw_inst_rlen(devinfo, inst));
+ }
+ }
+ pad(file, 64);
+ if (opcode != BRW_OPCODE_NOP && opcode != BRW_OPCODE_NENOP) {
+ string(file, "{");
+ space = 1;
+ err |= control(file, "access mode", access_mode,
+ brw_inst_access_mode(devinfo, inst), &space);
+ if (devinfo->gen >= 6) {
+ err |= control(file, "write enable control", wectrl,
+ brw_inst_mask_control(devinfo, inst), &space);
+ } else {
+ err |= control(file, "mask control", mask_ctrl,
+ brw_inst_mask_control(devinfo, inst), &space);
+ }
+ err |= control(file, "dependency control", dep_ctrl,
+ ((brw_inst_no_dd_check(devinfo, inst) << 1) |
+ brw_inst_no_dd_clear(devinfo, inst)), &space);
+
+ if (devinfo->gen >= 6)
+ err |= qtr_ctrl(file, devinfo, inst);
+ else {
+ if (brw_inst_qtr_control(devinfo, inst) == BRW_COMPRESSION_COMPRESSED &&
+ opcode_descs[opcode].ndst > 0 &&
+ brw_inst_dst_reg_file(devinfo, inst) == BRW_MESSAGE_REGISTER_FILE &&
+ brw_inst_dst_da_reg_nr(devinfo, inst) & (1 << 7)) {
+ format(file, " compr4");
+ } else {
+ err |= control(file, "compression control", compr_ctrl,
+ brw_inst_qtr_control(devinfo, inst), &space);
+ }
+ }
+
+ err |= control(file, "compaction", cmpt_ctrl, is_compacted, &space);
+ err |= control(file, "thread control", thread_ctrl,
+ brw_inst_thread_control(devinfo, inst), &space);
+ if (has_branch_ctrl(devinfo, opcode)) {
+ err |= control(file, "branch ctrl", branch_ctrl,
+ brw_inst_branch_control(devinfo, inst), &space);
+ } else if (devinfo->gen >= 6) {
+ err |= control(file, "acc write control", accwr,
+ brw_inst_acc_wr_control(devinfo, inst), &space);
+ }
+ if (opcode == BRW_OPCODE_SEND || opcode == BRW_OPCODE_SENDC)
+ err |= control(file, "end of thread", end_of_thread,
+ brw_inst_eot(devinfo, inst), &space);
+ if (space)
+ string(file, " ");
+ string(file, "}");
+ }
+ string(file, ";");
+ newline(file);
+ return err;