From 6574fe3c4a9e36791cde88dfd73429ba4faf3215 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Tue, 31 Jul 2012 18:30:45 +0200 Subject: [PATCH] radeon/llvm: fix calculation of max register number MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König Reviewed-by: Tom Stellard --- src/gallium/drivers/radeon/SICodeEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/SICodeEmitter.cpp b/src/gallium/drivers/radeon/SICodeEmitter.cpp index a7647aa3ec4..9fc4aab136e 100644 --- a/src/gallium/drivers/radeon/SICodeEmitter.cpp +++ b/src/gallium/drivers/radeon/SICodeEmitter.cpp @@ -154,7 +154,7 @@ void SICodeEmitter::InitProgramInfo(MachineFunction &MF) { assert("!Unknown register class"); } hwReg = RI->getHWRegNum(reg); - maxUsed = ((hwReg + 1) * width) - 1; + maxUsed = hwReg + width - 1; if (isSGPR) { MaxSGPR = maxUsed > MaxSGPR ? maxUsed : MaxSGPR; } else { -- 2.30.2