[SystemZ][z/OS] Remove register prefixes when printing out the register.
authorAnirudh Prasad <anirudh_prasad@hotmail.com>
Tue, 27 Apr 2021 17:37:16 +0000 (13:37 -0400)
committerAnirudh Prasad <anirudh_prasad@hotmail.com>
Tue, 27 Apr 2021 17:47:32 +0000 (13:47 -0400)
commit21db4cc2ea1518900b4a4c8235c4e1131fa0e613
tree36897c4c10c58518a33c84e29b8d665ec4ec06d3
parente05fdab1250c0956ef9fc87fe764c9f0c144304d
[SystemZ][z/OS] Remove register prefixes when printing out the register.

- This patch is the first part in enforcing prefix-less registers for the HLASM dialect in z/OS
- This patch removes the "%[r|f|v]" prefix while printing registers
- To achieve this, the `AssemblerDialect` field of MAI was used
- There is also a bit of refactoring done to ensure code repetition is reduced.
- Currently the LLVM assembler for SystemZ/z/OS accepts both prefixed registers and prefix-less registers. A subsequent follow-up patch will restrict the SystemZAsmParser to only accept prefix-less registers.

Crediting @kianm as an author as well.

Reviewed By: uweigand, abhina.sreeskantharajan

Differential Revision: https://reviews.llvm.org/D101308
llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinter.cpp
llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinter.h
llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp