From: Daniel Schürmann Date: Thu, 27 Feb 2020 12:05:24 +0000 (+0100) Subject: aco: add comparison operators for PhysReg X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=00312f3c95d9ef2f545a8479d6ad289bc791974b;p=mesa.git aco: add comparison operators for PhysReg Reviewed-by: Rhys Perry Reviewed-By: Timur Kristóf Part-of: --- diff --git a/src/amd/compiler/aco_ir.h b/src/amd/compiler/aco_ir.h index 986b2d666be..05a9754c6b1 100644 --- a/src/amd/compiler/aco_ir.h +++ b/src/amd/compiler/aco_ir.h @@ -271,6 +271,9 @@ struct PhysReg { constexpr unsigned reg() const { return reg_b >> 2; } constexpr unsigned byte() const { return reg_b & 0x3; } constexpr operator unsigned() const { return reg(); } + constexpr bool operator==(PhysReg other) const { return reg_b == other.reg_b; } + constexpr bool operator!=(PhysReg other) const { return reg_b != other.reg_b; } + constexpr bool operator <(PhysReg other) const { return reg_b < other.reg_b; } uint16_t reg_b = 0; };