mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-27 12:18:11 +02:00
This will switch everyone to the isa specific functions. Fixes the output of etnaviv's pre_instr_cb callback if freedreno and etnaviv are build at the same time. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28176>
33 lines
715 B
C
33 lines
715 B
C
/*
|
|
* Copyright © 2023 Igalia S.L.
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "util/os_file.h"
|
|
|
|
#include "etnaviv-isa.h"
|
|
|
|
static void
|
|
pre_instr_cb(void *d, unsigned n, void *instr)
|
|
{
|
|
uint32_t *dwords = (uint32_t *)instr;
|
|
printf("%03d [%08x %08x %08x %08x] ", n, dwords[0], dwords[1], dwords[2], dwords[3]);
|
|
}
|
|
|
|
int
|
|
main(int argc, char *argv[])
|
|
{
|
|
size_t sz;
|
|
void *raw = os_read_file(argv[1], &sz);
|
|
|
|
etnaviv_isa_disasm(raw, sz, stdout,
|
|
&(struct isa_decode_options){
|
|
.show_errors = true,
|
|
.branch_labels = true,
|
|
.pre_instr_cb = pre_instr_cb,
|
|
});
|
|
|
|
return 0;
|
|
}
|