From: Rob Clark Date: Tue, 28 Jul 2020 14:55:49 +0000 (-0700) Subject: freedreno/tools: check rnn parse status X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=751af16e1d4d21fdc26b65adfe84975fb2f8d699;p=mesa.git freedreno/tools: check rnn parse status Don't silently ignore issues. Signed-off-by: Rob Clark Part-of: --- diff --git a/src/freedreno/afuc/asm.c b/src/freedreno/afuc/asm.c index 321d06adfef..5b19c7fd9c0 100644 --- a/src/freedreno/afuc/asm.c +++ b/src/freedreno/afuc/asm.c @@ -21,6 +21,7 @@ * SOFTWARE. */ +#include #include #include #include @@ -416,6 +417,8 @@ int main(int argc, char **argv) ctx = rnndec_newcontext(db); rnn_parsefile(db, "adreno.xml"); + if (db->estatus) + errx(db->estatus, "failed to parse register database"); dom[0] = rnn_finddomain(db, name); dom[1] = rnn_finddomain(db, "AXXX"); control_regs = rnn_finddomain(db, control_reg_name); diff --git a/src/freedreno/afuc/disasm.c b/src/freedreno/afuc/disasm.c index ea9f34cd97f..66e40c1d188 100644 --- a/src/freedreno/afuc/disasm.c +++ b/src/freedreno/afuc/disasm.c @@ -21,6 +21,7 @@ * SOFTWARE. */ +#include #include #include #include @@ -815,6 +816,8 @@ int main(int argc, char **argv) ctx->colors = colors ? &envy_def_colors : &envy_null_colors; rnn_parsefile(db, "adreno.xml"); + if (db->estatus) + errx(db->estatus, "failed to parse register database"); dom[0] = rnn_finddomain(db, variant); dom[1] = rnn_finddomain(db, "AXXX"); control_regs = rnn_finddomain(db, control_reg_name); diff --git a/src/freedreno/decode/rnnutil.c b/src/freedreno/decode/rnnutil.c index 78915977de4..ae5fe826834 100644 --- a/src/freedreno/decode/rnnutil.c +++ b/src/freedreno/decode/rnnutil.c @@ -26,6 +26,7 @@ * Rob Clark */ +#include #include #include #include @@ -87,6 +88,8 @@ static void init(struct rnn *rnn, char *file, char *domain) rnndec_varadd(rnn->vc, "chip", domain); if (rnn->vc != rnn->vc_nocolor) rnndec_varadd(rnn->vc_nocolor, "chip", domain); + if (rnn->db->estatus) + errx(rnn->db->estatus, "failed to parse register database"); } void rnn_load_file(struct rnn *rnn, char *file, char *domain)