diff options
author | Christian König <[email protected]> | 2012-07-31 18:30:45 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2012-08-01 11:15:06 +0200 |
commit | 6574fe3c4a9e36791cde88dfd73429ba4faf3215 (patch) | |
tree | 63c06c8a39b2643d8bf798b950b109b5ba32a3d5 | |
parent | a488fdd3d97a6e9fa1ff8b8d22193551391170d3 (diff) |
radeon/llvm: fix calculation of max register number
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Tom Stellard <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeon/SICodeEmitter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |