diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-05-10 03:47:31 -0300 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-22 21:51:31 -0400 |
commit | deda89372f78dc78b37e941bf86e3026708e3ea2 (patch) | |
tree | 070a356b32b84b57b9ef409869e2476b57c00bfb /src/shader_recompiler/backend/glasm/reg_alloc.h | |
parent | 0839e46736858986b422b2ffb163ded59c16421f (diff) |
glasm: Fix register allocation when moving immediate on GLASM
Diffstat (limited to 'src/shader_recompiler/backend/glasm/reg_alloc.h')
-rw-r--r-- | src/shader_recompiler/backend/glasm/reg_alloc.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/shader_recompiler/backend/glasm/reg_alloc.h b/src/shader_recompiler/backend/glasm/reg_alloc.h index 8df73ca181..5742436cfb 100644 --- a/src/shader_recompiler/backend/glasm/reg_alloc.h +++ b/src/shader_recompiler/backend/glasm/reg_alloc.h @@ -99,8 +99,12 @@ public: Register LongDefine(IR::Inst& inst); + [[nodiscard]] Value Peek(const IR::Value& value); + Value Consume(const IR::Value& value); + void Unref(IR::Inst& inst); + [[nodiscard]] Register AllocReg(); [[nodiscard]] Register AllocLongReg(); @@ -123,9 +127,13 @@ private: static constexpr size_t NUM_REGS = 4096; static constexpr size_t NUM_ELEMENTS = 4; + Value MakeImm(const IR::Value& value); + Register Define(IR::Inst& inst, bool is_long); - Value Consume(IR::Inst& inst); + Value PeekInst(IR::Inst& inst); + + Value ConsumeInst(IR::Inst& inst); Id Alloc(bool is_long); |