]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/llvm/patches/patch-r262261-llvm-r199940-sparc.diff
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / llvm / patches / patch-r262261-llvm-r199940-sparc.diff
1 Pull in r199940 from upstream llvm trunk (by Eric Christopher):
2
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.
6
7 Introduced here: http://svnweb.freebsd.org/changeset/base/262261
8
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)) {
16        // FIXME: Check V9
17 -      RegNo = DoubleRegs[16 + intVal/2];
18 +      RegNo = DoubleRegs[intVal/2];
19        RegKind = SparcOperand::rk_DoubleReg;
20        return true;
21      }