- This patch consists of the addition of some common additional extended mnemonics to the SystemZ target
- These are jnop, jct, jctg, jas, jasl, jxh, jxhg, jxle, jxleg, bru, brul, br*, br*l.
- These mnemonics and the instructions they map to are defined here, Chapter 4 - Branching with extended mnemonic codes
- Except for jnop (which is a variant of brc 0, label), every other mnemonic is marked as a MnemonicAlias since there is already a "defined" instruction with the same encoding and/or condition mask values
- brc 0, label doesn't have a defined extended mnemonic, thus jnop is defined using as an InstAlias.
- Furthermore, the applyMnemonicAliases function is called in the overridden parseInstruction function in SystemZAsmParser.cpp to ensure any mnemonic aliases are applied before any further processing on the instruction is done.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This looks good to me. The only thing I'm wondering is whether we shouldn't complete the NOP set by adding a 6-byte "jgnop". (I guess this is called jlnop with HLASM, but in order to keep with the jg* naming scheme in GAS we probably ought to use jgnop here.)
- Added the jgnop extended mnemonic. This is an alias to brcl 0, label. brcl 0, label also doesn't have a defined extended mnemonic, thus jgnop is also defined as using an InstAlias
This looks good to me. The only thing I'm wondering is whether we shouldn't complete the NOP set by adding a 6-byte "jgnop". (I guess this is called jlnop with HLASM, but in order to keep with the jg* naming scheme in GAS we probably ought to use jgnop here.)
This is a good idea. I have updated the patch to reflect the same. Thanks for the hint!
@uweigand If you are happy with this patch and have no other comments for me to address, would you please be able to commit this? (Since I don't have commit access)