Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit eaacd7b

Browse files
author
Jonas Paulsson
committed
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249810 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 002f1b0 commit eaacd7b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -533,14 +533,16 @@ bool SystemZAsmParser::parseRegister(Register &Reg) {
533533
}
534534

535535
// Parse a register of group Group. If Regs is nonnull, use it to map
536-
// the raw register number to LLVM numbering, with zero entries indicating
537-
// an invalid register. IsAddress says whether the register appears in an
538-
// address context.
536+
// the raw register number to LLVM numbering, with zero entries
537+
// indicating an invalid register. IsAddress says whether the
538+
// register appears in an address context. Allow FP Group if expecting
539+
// RegV Group, since the f-prefix yields the FP group even while used
540+
// with vector instructions.
539541
bool SystemZAsmParser::parseRegister(Register &Reg, RegisterGroup Group,
540542
const unsigned *Regs, bool IsAddress) {
541543
if (parseRegister(Reg))
542544
return true;
543-
if (Reg.Group != Group)
545+
if (Reg.Group != Group && !(Reg.Group == RegFP && Group == RegV))
544546
return Error(Reg.StartLoc, "invalid operand for instruction");
545547
if (Regs && Regs[Reg.Num] == 0)
546548
return Error(Reg.StartLoc, "invalid register pair");

0 commit comments

Comments
 (0)