- This patch adds in the distinction between jg[*] and jl[*] pc-relative mnemonics based on the variant/dialect.
- Under the hlasm variant, we use the jl[*] family of mnemonics and under the att (GNU as) variant, we use the jg[*] family of mnemonics.
- jgnop which was added in https://reviews.llvm.org/D92185, is now restricted to att variant. jlnop is introduced and restricted to hlasm variant.
- The br[*]l additional mnemonics are mapped to either jl[*]/jg[*] based on the variant.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
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.)
Comment Actions
- Improved the implementation of MnemonicCondBranch by abstracting away details from SystemZInstrInfo.td
- For this, a multi-class had to be used.
Comment Actions
I abstracted away the implementation into SystemZInstrFormats.td. As you pointed out, it should be a multiclass.