[PATCH] D97581: [SystemZ] Introduce distinction between the jg/jl family of mnemonics for GNU as vs HLASM
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 1 04:05:34 PST 2021
uweigand added a comment.
Looks good in general. Just as a cosmetic issue, it would be nicer to be able to simply write:
def BRUAsm#V : MnemonicCondBranchAlias <CV<V>, "br#", "j#">;
def BRULAsm#V : MnemonicCondBranchAlias <CV<V>, "br#l", "jg#", "att">;
def BRUL_HLASMAsm#V : MnemonicCondBranchAlias <CV<V>, "br#l", "jl#", "hlasm">;
and have the additional assembler dialect constraint based on the mnemonic handled within MnemonicCondBranchAlias. Completely untested, but would something along the following lines work?
class MnemonicCondBranchAlias<CondVariant V, string from, string to,
string asmvariant = V.asmvariant> {
if !or(!eq(V.asmvariant, ""), !eq(V.asmvariant, asmvariant)) then
def "" : MnemonicAlias<!subst("#", V.suffix, from), !subst("#", V.suffix, to),
asmvariant>;
}
(It might have to be a multiclass instead of class, possibly.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97581/new/
https://reviews.llvm.org/D97581
More information about the llvm-commits
mailing list