From 2096359cf9bd253315a7728e425ecc7e61374471 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 5 Feb 2021 18:16:45 -0500 Subject: [PATCH] pan/bi: Add pcrel_idx to bi_clause Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/bifrost/bi_print.c | 3 +++ src/panfrost/bifrost/compiler.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c index dbfb8508322..c3e21b77c2f 100644 --- a/src/panfrost/bifrost/bi_print.c +++ b/src/panfrost/bifrost/bi_print.c @@ -101,6 +101,9 @@ bi_print_clause(bi_clause *clause, FILE *fp) if (clause->staging_barrier) fprintf(fp, " osrb"); + if (clause->pcrel_idx != ~0) + fprintf(fp, " pcrel(%u)", clause->pcrel_idx); + fprintf(fp, "\n"); for (unsigned i = 0; i < clause->tuple_count; ++i) diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 2afd165637e..138d49d6f49 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -455,6 +455,9 @@ typedef struct { uint64_t constants[8]; unsigned constant_count; + /* Index of a constant to be PC-relative */ + unsigned pcrel_idx; + /* Branches encode a constant offset relative to the program counter * with some magic flags. By convention, if there is a branch, its * constant will be last. Set this flag to indicate this is required.