aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-01-13 00:41:53 +0000
committerBill Wendling <isanbard@gmail.com>2012-01-13 00:41:53 +0000
commitb4ee5168abd0580a29f5c9becce26e3ea7bb2b8d (patch)
tree357df63972a6953758eb6307d92c76df46465c3c
parent79522dc569d3fb51b4a12cdacf24b82e5d5992d2 (diff)
downloadexternal_llvm-b4ee5168abd0580a29f5c9becce26e3ea7bb2b8d.zip
external_llvm-b4ee5168abd0580a29f5c9becce26e3ea7bb2b8d.tar.gz
external_llvm-b4ee5168abd0580a29f5c9becce26e3ea7bb2b8d.tar.bz2
Fix off-by-one error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148077 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86FrameLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/X86/X86FrameLowering.cpp b/lib/Target/X86/X86FrameLowering.cpp
index 5dfc0bb..b438672 100644
--- a/lib/Target/X86/X86FrameLowering.cpp
+++ b/lib/Target/X86/X86FrameLowering.cpp
@@ -458,7 +458,7 @@ encodeCompactUnwindRegistersWithFrame(unsigned SavedRegs[CU_NUM_SAVED_REGS],
// Encode the registers in the order they were saved, 3-bits per register. The
// registers are numbered from 1 to CU_NUM_SAVED_REGS.
uint32_t RegEnc = 0;
- for (int I = CU_NUM_SAVED_REGS, Idx = 0; I != -1; --I) {
+ for (int I = CU_NUM_SAVED_REGS - 1, Idx = 0; I != -1; --I) {
unsigned Reg = SavedRegs[I];
if (Reg == 0) continue;