freebsd-dev/contrib/llvm/patches/patch-r262261-llvm-r199940-sparc.diff
Dimitry Andric a426b286c8 Add the clang patch for r265477. While here, add a description to the
patch for r263619, and unify all the URLs to point to svnweb.
2014-05-24 22:27:31 +00:00

22 lines
877 B
Diff

Pull in r199940 from upstream llvm trunk (by Eric Christopher):
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.
Introduced here: http://svnweb.freebsd.org/changeset/base/262261
Index: lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
===================================================================
--- lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
+++ lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
@@ -734,7 +734,7 @@ bool SparcAsmParser::matchRegisterName(const AsmTo
&& !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;
}