From 8d37aa91d680d801258ef643d6efb106daff5b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Fri, 4 Dec 2020 16:18:18 +0100 Subject: [PATCH] aco: Add Operand(Temp, PhysReg) constructor. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Timur Kristóf Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_ir.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/amd/compiler/aco_ir.h b/src/amd/compiler/aco_ir.h index fba36457050..3b6280c8a6c 100644 --- a/src/amd/compiler/aco_ir.h +++ b/src/amd/compiler/aco_ir.h @@ -476,6 +476,13 @@ public: setFixed(PhysReg{128}); } }; + explicit Operand(Temp r, PhysReg reg) noexcept + { + assert(r.id()); /* Don't allow fixing an undef to a register */ + data_.temp = r; + isTemp_ = true; + setFixed(reg); + }; explicit Operand(uint8_t v) noexcept { /* 8-bit constants are only used for copies and copies from any 8-bit