[llvm] r339567 - Check for tied operands
Sid Manning via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 13 07:01:25 PDT 2018
Author: sidneym
Date: Mon Aug 13 07:01:25 2018
New Revision: 339567
URL: http://llvm.org/viewvc/llvm-project?rev=339567&view=rev
Log:
Check for tied operands
Differential Revision: https://reviews.llvm.org/D50592
Added:
llvm/trunk/test/MC/Hexagon/tied-ops.s
Modified:
llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp
Modified: llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp?rev=339567&r1=339566&r2=339567&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp Mon Aug 13 07:01:25 2018
@@ -581,6 +581,7 @@ bool HexagonAsmParser::matchOneInstructi
case Match_MnemonicFail:
return Error(IDLoc, "unrecognized instruction");
case Match_InvalidOperand:
+ case Match_InvalidTiedOperand:
SMLoc ErrorLoc = IDLoc;
if (ErrorInfo != ~0U) {
if (ErrorInfo >= InstOperands.size())
Added: llvm/trunk/test/MC/Hexagon/tied-ops.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Hexagon/tied-ops.s?rev=339567&view=auto
==============================================================================
--- llvm/trunk/test/MC/Hexagon/tied-ops.s (added)
+++ llvm/trunk/test/MC/Hexagon/tied-ops.s Mon Aug 13 07:01:25 2018
@@ -0,0 +1,6 @@
+# RUN: llvm-mc -arch=hexagon -filetype=asm %s 2> %t; FileCheck %s < %t
+
+# Check that tied operands are caught
+
+ { r0 = sub(##_start, asl(r1, #1)) }
+# CHECK: error: invalid operand for instruction
More information about the llvm-commits
mailing list