diff options
author | Eric Christopher <echristo@gmail.com> | 2014-01-23 21:41:10 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-01-23 21:41:10 +0000 |
commit | 22221ee0e33b6b992aca34c80bf3bee1fc507ff6 (patch) | |
tree | 79b213561eceda47d92612a954bb44471d75cca9 /lib/Target/Sparc | |
parent | 6f1f7957175aadcf7e30428a04ac1a20b7112878 (diff) | |
download | llvm-22221ee0e33b6b992aca34c80bf3bee1fc507ff6.tar.gz llvm-22221ee0e33b6b992aca34c80bf3bee1fc507ff6.tar.bz2 llvm-22221ee0e33b6b992aca34c80bf3bee1fc507ff6.tar.xz |
Fix out of bounds access to the double regs array. Given the
code this looks correct, but could use review. The previous
was definitely not correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199940 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc')
-rw-r--r-- | lib/Target/Sparc/AsmParser/SparcAsmParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp b/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp index 8234e5df8a..0775889477 100644 --- a/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp +++ b/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp @@ -734,7 +734,7 @@ bool SparcAsmParser::matchRegisterName(const AsmToken &Tok, && !name.substr(1, 2).getAsInteger(10, intVal) && intVal >= 32 && intVal <= 62 && (intVal % 2 == 0)) { // FIXME: Check V9 - RegNo = DoubleRegs[16 + intVal/2]; + RegNo = DoubleRegs[intVal/2]; RegKind = SparcOperand::rk_DoubleReg; return true; } |