From 0e9425a1b74ed7e38656eee43f72a527404bf0b6 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Thu, 3 Sep 2020 15:41:32 +0100 Subject: [PATCH] aco: fix one-off error in Operand(uint16_t) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Fixes: 3d6f67950d9 ('aco: improve 8/16-bit constants') Part-of: --- src/amd/compiler/aco_ir.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_ir.h b/src/amd/compiler/aco_ir.h index d27726d..9b3f5a3 100644 --- a/src/amd/compiler/aco_ir.h +++ b/src/amd/compiler/aco_ir.h @@ -449,7 +449,7 @@ public: if (v <= 64) setFixed(PhysReg{128u + v}); else if (v >= 0xFFF0) /* [-16 .. -1] */ - setFixed(PhysReg{192u + (0xFFFF - v)}); + setFixed(PhysReg{(unsigned)(192 - (int16_t)v)}); else if (v == 0x3800) /* 0.5 */ setFixed(PhysReg{240}); else if (v == 0xB800) /* -0.5 */ -- 2.7.4