[llvm] r261977 - [X86] Explicitly diagnose use of %xmm16-%xmm31, %ymm16-%ymm31 and %zmm16-%zmm31 when AVX512 is not enabled in the asm parser.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 25 22:55:27 PST 2016
Tests commited in r261983
On Thu, Feb 25, 2016 at 9:59 PM, Sean Silva <chisophugis at gmail.com> wrote:
> Did you have a local test case you were iterating on that you could add?
>
> -- Sean Silva
>
> On Thu, Feb 25, 2016 at 9:29 PM, Craig Topper via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: ctopper
>> Date: Thu Feb 25 23:29:32 2016
>> New Revision: 261977
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=261977&view=rev
>> Log:
>> [X86] Explicitly diagnose use of %xmm16-%xmm31, %ymm16-%ymm31 and
>> %zmm16-%zmm31 when AVX512 is not enabled in the asm parser.
>>
>> Modified:
>> llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
>>
>> Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=261977&r1=261976&r2=261977&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
>> +++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Thu Feb 25
>> 23:29:32 2016
>> @@ -908,10 +908,16 @@ bool X86AsmParser::ParseRegister(unsigne
>> if (RegNo == X86::RIZ ||
>> X86MCRegisterClasses[X86::GR64RegClassID].contains(RegNo) ||
>> X86II::isX86_64NonExtLowByteReg(RegNo) ||
>> - X86II::isX86_64ExtendedReg(RegNo))
>> + X86II::isX86_64ExtendedReg(RegNo) ||
>> + X86II::is32ExtendedReg(RegNo))
>> return Error(StartLoc, "register %"
>> + Tok.getString() + " is only available in 64-bit
>> mode",
>> SMRange(StartLoc, EndLoc));
>> + } else if (!getSTI().getFeatureBits()[X86::FeatureAVX512]) {
>> + if (X86II::is32ExtendedReg(RegNo))
>> + return Error(StartLoc, "register %"
>> + + Tok.getString() + " is only available in with
>> AVX512",
>> + SMRange(StartLoc, EndLoc));
>> }
>>
>> // Parse "%st" as "%st(0)" and "%st(1)", which is multiple tokens.
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
>
--
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160225/439216a9/attachment.html>
More information about the llvm-commits
mailing list