1 Pull in r199940 from upstream llvm trunk (by Eric Christopher):
3 Fix out of bounds access to the double regs array. Given the
4 code this looks correct, but could use review. The previous
5 was definitely not correct.
7 Introduced here: http://svnweb.freebsd.org/changeset/base/262261
9 Index: lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
10 ===================================================================
11 --- lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
12 +++ lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
13 @@ -734,7 +734,7 @@ bool SparcAsmParser::matchRegisterName(const AsmTo
14 && !name.substr(1, 2).getAsInteger(10, intVal)
15 && intVal >= 32 && intVal <= 62 && (intVal % 2 == 0)) {
17 - RegNo = DoubleRegs[16 + intVal/2];
18 + RegNo = DoubleRegs[intVal/2];
19 RegKind = SparcOperand::rk_DoubleReg;