#include <string.h>
#include <signal.h>
#include <errno.h>
+#include <inttypes.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
const int dword = f->start / 32;
if (*dword_num != dword) {
- printf("0x%08lx: 0x%08x : Dword %d\n",
+ printf("0x%08"PRIx64": 0x%08x : Dword %d\n",
offset + 4 * dword, iter->p[dword], dword);
*dword_num = dword;
}
start = instruction_base + descriptors[0];
if (!valid_offset(start)) {
- printf("kernel: %08lx <not valid>\n", start);
+ printf("kernel: %08"PRIx64" <not valid>\n", start);
continue;
} else {
- printf("kernel: %08lx\n", start);
+ printf("kernel: %08"PRIx64"\n", start);
}
insns = (struct brw_instruction *) (gtt + start);
}
if (vs_enable) {
- printf("instruction_base %08lx, start %08lx\n",
+ printf("instruction_base %08"PRIx64", start %08"PRIx64"\n",
instruction_base, start);
insns = (struct brw_instruction *) (gtt + instruction_base + start);
hs_enable = p[2] & 0x80000000;
if (hs_enable) {
- printf("instruction_base %08lx, start %08lx\n",
+ printf("instruction_base %08"PRIx64", start %08"PRIx64"\n",
instruction_base, start);
insns = (struct brw_instruction *) (gtt + instruction_base + start);
else
offset = 0;
- printf("%s0x%08lx: 0x%08x: %s%s\n",
+ printf("%s0x%08"PRIx64": 0x%08x: %s%s\n",
color, offset, p[0],
gen_group_get_name(inst), reset_color);
if (dword_num > 0)
token = print_iterator_values(&iter, &idx);
if (token != NULL) {
- printf("0x%08lx: 0x%08x : Dword %d\n",
+ printf("0x%08"PRIx64": 0x%08x : Dword %d\n",
offset + 4 * idx, p[idx], idx);
handle_struct_decode(spec,token, &p[idx]);
token = NULL;
break;
case MAKE_HEADER(TYPE_AUB, OPCODE_NEW_AUB, SUBOPCODE_MEM_WRITE):
printf("memory write block (dwords %d):\n", h & 0xffff);
- printf(" address 0x%lx\n", *(uint64_t *) &p[1]);
+ printf(" address 0x%"PRIx64"\n", *(uint64_t *) &p[1]);
data_type = (p[3] >> 20) & 0xff;
if (data_type != 0)
printf(" data type 0x%x\n", data_type);
#include <stdarg.h>
#include <string.h>
#include <expat.h>
+#include <inttypes.h>
#include <util/macros.h>
case GEN_TYPE_UNKNOWN:
case GEN_TYPE_INT:
snprintf(iter->value, sizeof(iter->value),
- "%ld", field(v.qw, f->start, f->end));
+ "%"PRId64, field(v.qw, f->start, f->end));
break;
case GEN_TYPE_UINT:
snprintf(iter->value, sizeof(iter->value),
- "%lu", field(v.qw, f->start, f->end));
+ "%"PRIu64, field(v.qw, f->start, f->end));
break;
case GEN_TYPE_BOOL:
snprintf(iter->value, sizeof(iter->value),
case GEN_TYPE_ADDRESS:
case GEN_TYPE_OFFSET:
snprintf(iter->value, sizeof(iter->value),
- "0x%08lx", field_address(v.qw, f->start, f->end));
+ "0x%08"PRIx64, field_address(v.qw, f->start, f->end));
break;
case GEN_TYPE_STRUCT:
snprintf(iter->value, sizeof(iter->value),