mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 01:40:14 +01:00
bi: Make disassembler take a const void*
All access are readonly. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
This commit is contained in:
parent
1c2f2955ac
commit
c309933987
2 changed files with 5 additions and 5 deletions
|
|
@ -448,7 +448,7 @@ decode_M(enum bi_constmod *mod, unsigned M1, unsigned M2, bool single)
|
|||
}
|
||||
|
||||
static void
|
||||
dump_clause(FILE *fp, uint32_t *words, unsigned *size, unsigned offset,
|
||||
dump_clause(FILE *fp, const uint32_t *words, unsigned *size, unsigned offset,
|
||||
bool verbose)
|
||||
{
|
||||
// State for a decoded clause
|
||||
|
|
@ -699,10 +699,10 @@ dump_clause(FILE *fp, uint32_t *words, unsigned *size, unsigned offset,
|
|||
}
|
||||
|
||||
void
|
||||
disassemble_bifrost(FILE *fp, uint8_t *code, size_t size, bool verbose)
|
||||
disassemble_bifrost(FILE *fp, const void *code, size_t size, bool verbose)
|
||||
{
|
||||
uint32_t *words = (uint32_t *)code;
|
||||
uint32_t *words_end = words + (size / 4);
|
||||
const uint32_t *words = (const uint32_t *)code;
|
||||
const uint32_t *words_end = words + (size / 4);
|
||||
// used for displaying branch targets
|
||||
unsigned offset = 0;
|
||||
while (words != words_end) {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
#include <stdio.h>
|
||||
#include "../bifrost.h"
|
||||
|
||||
void disassemble_bifrost(FILE *fp, uint8_t *code, size_t size, bool verbose);
|
||||
void disassemble_bifrost(FILE *fp, const void *code, size_t size, bool verbose);
|
||||
|
||||
void bi_disasm_fma(FILE *fp, unsigned bits, struct bifrost_regs *srcs,
|
||||
struct bifrost_regs *next_regs, unsigned staging_register,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue