[llvm] r199940 - Fix out of bounds access to the double regs array. Given the
Eric Christopher
echristo at gmail.com
Thu Jan 23 22:38:28 PST 2014
Ah sweet, thanks. I wasn't sure how to get it easily tested since I've
not looked at sparc assembly... in some time.
-eric
On Thu, Jan 23, 2014 at 9:31 PM, Venkatraman Govindaraju
<venkatra at cs.wisc.edu> wrote:
> Good catch. Thank you for taking care of this.
> Added a test case to check this in r199974.
>
> Thanks,
> Venkat
>
> On Thu, Jan 23, 2014 at 3:41 PM, Eric Christopher <echristo at gmail.com> wrote:
>> Author: echristo
>> Date: Thu Jan 23 15:41:10 2014
>> New Revision: 199940
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=199940&view=rev
>> Log:
>> 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.
>>
>> Modified:
>> llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
>>
>> Modified: llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp?rev=199940&r1=199939&r2=199940&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp Thu Jan 23 15:41:10 2014
>> @@ -734,7 +734,7 @@ bool SparcAsmParser::matchRegisterName(c
>> && !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;
>> }
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list