From: Timothy Arceri Date: Thu, 14 Jul 2016 00:27:06 +0000 (+1000) Subject: i965: fix compiler warnings for 32bit build X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a738732abf07e6264f079bbb31adb8723b8e91e3;p=mesa.git i965: fix compiler warnings for 32bit build Reviewed-by: Matt Turner --- diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c index 068c120acc7..d74d5d575f6 100644 --- a/src/mesa/drivers/dri/i965/brw_disasm.c +++ b/src/mesa/drivers/dri/i965/brw_disasm.c @@ -719,7 +719,7 @@ dest(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst) if (err == -1) return 0; if (brw_inst_dst_da1_subreg_nr(devinfo, inst)) - format(file, ".%ld", brw_inst_dst_da1_subreg_nr(devinfo, inst) / + format(file, ".%"PRIu64, brw_inst_dst_da1_subreg_nr(devinfo, inst) / reg_type_size[brw_inst_dst_reg_type(devinfo, inst)]); string(file, "<"); err |= control(file, "horiz stride", horiz_stride, @@ -730,7 +730,7 @@ dest(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst) } else { string(file, "g[a0"); if (brw_inst_dst_ia_subreg_nr(devinfo, inst)) - format(file, ".%ld", brw_inst_dst_ia_subreg_nr(devinfo, inst) / + format(file, ".%"PRIu64, brw_inst_dst_ia_subreg_nr(devinfo, inst) / reg_type_size[brw_inst_dst_reg_type(devinfo, inst)]); if (brw_inst_dst_ia1_addr_imm(devinfo, inst)) format(file, " %d", brw_inst_dst_ia1_addr_imm(devinfo, inst)); @@ -748,7 +748,7 @@ dest(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst) if (err == -1) return 0; if (brw_inst_dst_da16_subreg_nr(devinfo, inst)) - format(file, ".%ld", brw_inst_dst_da16_subreg_nr(devinfo, inst) / + format(file, ".%"PRIu64, brw_inst_dst_da16_subreg_nr(devinfo, inst) / reg_type_size[brw_inst_dst_reg_type(devinfo, inst)]); string(file, "<1>"); err |= control(file, "writemask", writemask, @@ -779,7 +779,7 @@ dest_3src(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst) if (err == -1) return 0; if (brw_inst_3src_dst_subreg_nr(devinfo, inst)) - format(file, ".%ld", brw_inst_3src_dst_subreg_nr(devinfo, inst)); + format(file, ".%"PRIu64, brw_inst_3src_dst_subreg_nr(devinfo, inst)); string(file, "<1>"); err |= control(file, "writemask", writemask, brw_inst_3src_dst_writemask(devinfo, inst), NULL); @@ -1216,9 +1216,9 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, 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); + format(file, "f%"PRIu64, 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)); + format(file, ".%"PRIu64, 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); @@ -1252,10 +1252,10 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, (devinfo->gen < 6 || (opcode != BRW_OPCODE_SEL && opcode != BRW_OPCODE_IF && opcode != BRW_OPCODE_WHILE))) { - format(file, ".f%ld", + format(file, ".f%"PRIu64, 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)); + format(file, ".%"PRIu64, brw_inst_flag_subreg_nr(devinfo, inst)); } } @@ -1267,7 +1267,7 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, } if (opcode == BRW_OPCODE_SEND && devinfo->gen < 6) - format(file, " %ld", brw_inst_base_mrf(devinfo, inst)); + format(file, " %"PRIu64, brw_inst_base_mrf(devinfo, inst)); if (has_uip(devinfo, opcode)) { /* Instructions that have UIP also have JIP. */ @@ -1288,7 +1288,7 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, 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)); + format(file, "Pop: %"PRIu64, brw_inst_gen4_pop_count(devinfo, inst)); } else if (devinfo->gen < 6 && (opcode == BRW_OPCODE_IF || opcode == BRW_OPCODE_IFF || opcode == BRW_OPCODE_HALT)) { @@ -1296,7 +1296,7 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, 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)); + format(file, "Pop: %"PRIu64, brw_inst_gen4_pop_count(devinfo, inst)); } else if (opcode == BRW_OPCODE_JMPI) { pad(file, 16); err |= src1(file, devinfo, inst); @@ -1369,11 +1369,11 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, 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", + format(file, " Surface = %"PRIu64" Sampler = %"PRIu64, brw_inst_binding_table_index(devinfo, inst), brw_inst_sampler(devinfo, inst)); } else { - format(file, " (%ld, %ld, %ld, ", + format(file, " (%"PRIu64", %"PRIu64", %"PRIu64", ", brw_inst_binding_table_index(devinfo, inst), brw_inst_sampler(devinfo, inst), brw_inst_sampler_msg_type(devinfo, inst)); @@ -1388,7 +1388,7 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, case GEN6_SFID_DATAPORT_SAMPLER_CACHE: /* aka BRW_SFID_DATAPORT_READ on Gen4-5 */ if (devinfo->gen >= 6) { - format(file, " (%ld, %ld, %ld, %ld)", + format(file, " (%"PRIu64", %"PRIu64", %"PRIu64", %"PRIu64")", brw_inst_binding_table_index(devinfo, inst), brw_inst_dp_msg_control(devinfo, inst), brw_inst_dp_msg_type(devinfo, inst), @@ -1401,10 +1401,10 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, brw_inst_dp_read_msg_type(devinfo, inst), &space); - format(file, " MsgCtrl = 0x%lx", + format(file, " MsgCtrl = 0x%"PRIx64, brw_inst_dp_read_msg_control(devinfo, inst)); - format(file, " Surface = %ld", brw_inst_binding_table_index(devinfo, inst)); + format(file, " Surface = %"PRIu64, brw_inst_binding_table_index(devinfo, inst)); } break; @@ -1431,18 +1431,18 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, if (devinfo->gen < 7 && brw_inst_dp_write_commit(devinfo, inst)) string(file, " WriteCommit"); } else { - format(file, " MsgCtrl = 0x%lx", + format(file, " MsgCtrl = 0x%"PRIx64, brw_inst_dp_write_msg_control(devinfo, inst)); } - format(file, " Surface = %ld", brw_inst_binding_table_index(devinfo, inst)); + format(file, " Surface = %"PRIu64, brw_inst_binding_table_index(devinfo, inst)); break; } case BRW_SFID_URB: { unsigned opcode = brw_inst_urb_opcode(devinfo, inst); - format(file, " %ld", brw_inst_urb_global_offset(devinfo, inst)); + format(file, " %"PRIu64, brw_inst_urb_global_offset(devinfo, inst)); space = 1; @@ -1494,7 +1494,7 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, dp_dc0_msg_type_gen7, brw_inst_dp_msg_type(devinfo, inst), &space); - format(file, ", %ld, ", brw_inst_binding_table_index(devinfo, inst)); + format(file, ", %"PRIu64", ", brw_inst_binding_table_index(devinfo, inst)); switch (brw_inst_dp_msg_type(devinfo, inst)) { case GEN7_DATAPORT_DC_UNTYPED_ATOMIC_OP: @@ -1502,7 +1502,7 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, brw_inst_imm_ud(devinfo, inst) >> 8 & 0xf, &space); break; default: - format(file, "%ld", brw_inst_dp_msg_control(devinfo, inst)); + format(file, "%"PRIu64, brw_inst_dp_msg_control(devinfo, inst)); } format(file, ")"); break; @@ -1519,7 +1519,7 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, dp_dc1_msg_type_hsw, brw_inst_dp_msg_type(devinfo, inst), &space); - format(file, ", Surface = %ld, ", + format(file, ", Surface = %"PRIu64", ", brw_inst_binding_table_index(devinfo, inst)); switch (brw_inst_dp_msg_type(devinfo, inst)) { @@ -1553,7 +1553,7 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, case GEN7_SFID_PIXEL_INTERPOLATOR: if (devinfo->gen >= 7) { - format(file, " (%s, %s, 0x%02lx)", + format(file, " (%s, %s, 0x%02"PRIx64")", 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)); @@ -1568,8 +1568,8 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo, if (space) string(file, " "); - format(file, "mlen %ld", brw_inst_mlen(devinfo, inst)); - format(file, " rlen %ld", brw_inst_rlen(devinfo, inst)); + format(file, "mlen %"PRIu64, brw_inst_mlen(devinfo, inst)); + format(file, " rlen %"PRIu64, brw_inst_rlen(devinfo, inst)); } } pad(file, 64); diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 4a208210c70..6d45856326d 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -668,7 +668,7 @@ brw_print_dirty_count(struct dirty_bit_map *bit_map) { for (int i = 0; bit_map[i].bit != 0; i++) { if (bit_map[i].count > 1) { - fprintf(stderr, "0x%016lx: %12d (%s)\n", + fprintf(stderr, "0x%016"PRIx64": %12d (%s)\n", bit_map[i].bit, bit_map[i].count, bit_map[i].name); } }