From 671be241051d318a0ea18a892aaf9d9609106568 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 31 Dec 2017 16:44:47 -0800 Subject: [PATCH] irjit: Add extra temps to make lwl/swl/etc. easier. --- Core/MIPS/IR/IRInst.cpp | 2 ++ Core/MIPS/IR/IRInst.h | 2 ++ Core/MIPS/IR/IRPassSimplify.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Core/MIPS/IR/IRInst.cpp b/Core/MIPS/IR/IRInst.cpp index 2c216bf9c5..655a736cee 100644 --- a/Core/MIPS/IR/IRInst.cpp +++ b/Core/MIPS/IR/IRInst.cpp @@ -207,6 +207,8 @@ const char *GetGPRName(int r) { switch (r) { case IRTEMP_0: return "irtemp0"; case IRTEMP_1: return "irtemp1"; + case IRTEMP_2: return "irtemp2"; + case IRTEMP_3: return "irtemp3"; case IRTEMP_LHS: return "irtemp_lhs"; case IRTEMP_RHS: return "irtemp_rhs"; default: return "(unk)"; diff --git a/Core/MIPS/IR/IRInst.h b/Core/MIPS/IR/IRInst.h index 50d9a6707d..1506542177 100644 --- a/Core/MIPS/IR/IRInst.h +++ b/Core/MIPS/IR/IRInst.h @@ -275,6 +275,8 @@ enum IRFpCompareMode { enum { IRTEMP_0 = 192, IRTEMP_1, + IRTEMP_2, + IRTEMP_3, IRTEMP_LHS, // Reserved for use in branches IRTEMP_RHS, // Reserved for use in branches diff --git a/Core/MIPS/IR/IRPassSimplify.cpp b/Core/MIPS/IR/IRPassSimplify.cpp index aba843689b..c8fdbafbbc 100644 --- a/Core/MIPS/IR/IRPassSimplify.cpp +++ b/Core/MIPS/IR/IRPassSimplify.cpp @@ -662,6 +662,8 @@ bool PurgeTemps(const IRWriter &in, IRWriter &out) { switch (dest) { case IRTEMP_0: case IRTEMP_1: + case IRTEMP_2: + case IRTEMP_3: case IRTEMP_LHS: case IRTEMP_RHS: // Unlike other ops, these don't need to persist between blocks.