Mesa (master): freedreno/ir3: Refactor out print_reg_src().

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 27 19:55:15 UTC 2020


Module: Mesa
Branch: master
Commit: 292231596b24a65861d6f63c1886131b33102527
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=292231596b24a65861d6f63c1886131b33102527

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Apr 24 11:40:40 2020 -0700

freedreno/ir3: Refactor out print_reg_src().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4736>

---

 src/freedreno/ir3/disasm-a3xx.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/freedreno/ir3/disasm-a3xx.c b/src/freedreno/ir3/disasm-a3xx.c
index a14cde9f220..8d4604fa714 100644
--- a/src/freedreno/ir3/disasm-a3xx.c
+++ b/src/freedreno/ir3/disasm-a3xx.c
@@ -149,15 +149,6 @@ static void print_reg_dst(struct disasm_ctx *ctx, reg_t reg, bool full, bool add
 	print_reg(ctx, reg, full, false, false, false, false, false, addr_rel);
 }
 
-static void print_reg_src(struct disasm_ctx *ctx, reg_t reg, bool full, bool r,
-		bool c, bool im, bool neg, bool abs, bool addr_rel)
-{
-	if (r)
-		reg = idxreg(regidx(reg) + ctx->repeatidx);
-
-	print_reg(ctx, reg, full, r, c, im, neg, abs, addr_rel);
-}
-
 /* TODO switch to using reginfo struct everywhere, since more readable
  * than passing a bunch of bools to print_reg_src
  */
@@ -175,7 +166,12 @@ struct reginfo {
 
 static void print_src(struct disasm_ctx *ctx, struct reginfo *info)
 {
-	print_reg_src(ctx, info->reg, info->full, info->r, info->c, info->im,
+	reg_t reg = info->reg;
+
+	if (info->r)
+		reg = idxreg(regidx(info->reg) + ctx->repeatidx);
+
+	print_reg(ctx, reg, info->full, info->r, info->c, info->im,
 			info->neg, info->abs, info->addr_rel);
 }
 



More information about the mesa-commit mailing list