From 2ad2d86e495485d1aff7049e07a1bb62be9d6d1b Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Mon, 17 Jun 2024 13:06:07 +0200 Subject: [PATCH] etnaviv: isa: Add struct etna_asm_result This struct contains the result of an assembler run and will be filled in Rust and consumed via a C API. Signed-off-by: Christian Gmeiner Reviewed-by: @LingMan Part-of: --- src/etnaviv/isa/asm.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/etnaviv/isa/asm.h b/src/etnaviv/isa/asm.h index dd4805d524e..4174c4b723d 100644 --- a/src/etnaviv/isa/asm.h +++ b/src/etnaviv/isa/asm.h @@ -9,6 +9,7 @@ #pragma once +#include #include #include "etnaviv/isa/enums.h" @@ -93,3 +94,11 @@ struct etna_inst { struct etna_inst_src src[ETNA_NUM_SRC]; /* source operand */ unsigned imm; /* takes place of src[2] for BRANCH/CALL */ }; + +struct etna_asm_result { + struct etna_inst *instr; + char *error; + size_t num_instr; + size_t capacity_instr; + bool success; +};