diff options
author | Jonas Paulsson <jonas.paulsson@ericsson.com> | 2015-10-09 07:19:12 +0000 |
---|---|---|
committer | Jonas Paulsson <jonas.paulsson@ericsson.com> | 2015-10-09 07:19:12 +0000 |
commit | 0a9049ba82cbd8702711d38c29329d4f498e0410 (patch) | |
tree | a4ddcc9b87fc5ee01d77975d1db89e94b88553f1 /llvm/lib/Target/SystemZ | |
parent | 8087745c47509e2ebc088d0226a888ede2054154 (diff) | |
download | bcm5719-llvm-0a9049ba82cbd8702711d38c29329d4f498e0410.tar.gz bcm5719-llvm-0a9049ba82cbd8702711d38c29329d4f498e0410.zip |
[SystemZ] Bugfix in SystemZAsmParser.cpp.
Let parseRegister() allow RegFP Group if expecting RegV Group, since the
%f register prefix yields the FP group even while used with vector instructions.
Reviewed by Ulrich Weigand.
llvm-svn: 249810
Diffstat (limited to 'llvm/lib/Target/SystemZ')
-rw-r--r-- | llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp b/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp index 0b59786ae22..670eba239ca 100644 --- a/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp +++ b/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp @@ -533,14 +533,16 @@ bool SystemZAsmParser::parseRegister(Register &Reg) { } // Parse a register of group Group. If Regs is nonnull, use it to map -// the raw register number to LLVM numbering, with zero entries indicating -// an invalid register. IsAddress says whether the register appears in an -// address context. +// the raw register number to LLVM numbering, with zero entries +// indicating an invalid register. IsAddress says whether the +// register appears in an address context. Allow FP Group if expecting +// RegV Group, since the f-prefix yields the FP group even while used +// with vector instructions. bool SystemZAsmParser::parseRegister(Register &Reg, RegisterGroup Group, const unsigned *Regs, bool IsAddress) { if (parseRegister(Reg)) return true; - if (Reg.Group != Group) + if (Reg.Group != Group && !(Reg.Group == RegFP && Group == RegV)) return Error(Reg.StartLoc, "invalid operand for instruction"); if (Regs && Regs[Reg.Num] == 0) return Error(Reg.StartLoc, "invalid register pair"); |