OSDN Git Service

[TableGen][AsmMatcherEmitter] Allow tied operands of different classes in aliases.
authorSander de Smalen <sander.desmalen@arm.com>
Mon, 18 Jun 2018 13:39:29 +0000 (13:39 +0000)
committerSander de Smalen <sander.desmalen@arm.com>
Mon, 18 Jun 2018 13:39:29 +0000 (13:39 +0000)
commitb0c87384295699bd9e8b5be344b71f8805195753
tree6581dba1d4b0977b62ffbdc4129ea06d7e34e922
parent74a06eaa778e54cce98d123fa9fd0ab87f3a7392
[TableGen][AsmMatcherEmitter] Allow tied operands of different classes in aliases.

Allow a tied operand of a different operand class in InstAliases,
so that the operand can be printed (and added to the MC instruction)
as the appropriate register. For example, 'GPR64as32', which would
be printed/parsed as a 32bit register and should match a tied 64bit
register operand, where the former is a sub-register of the latter.

This patch also generalizes the constraint checking to an overrideable
method in MCTargetAsmParser, so that target asmparsers can specify
whether a given operand satisfies the tied register constraint.

Reviewers: olista01, rengolin, fhahn, SjoerdMeijer, samparker, dsanders, craig.topper

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D47714

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334942 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCParser/MCTargetAsmParser.h
utils/TableGen/AsmMatcherEmitter.cpp
utils/TableGen/CodeGenInstruction.cpp