[LoongArch] Add an option for MCInstPrinter to print numeric reg names
authorwanglei <wanglei@loongson.cn>
Thu, 19 Jan 2023 08:29:14 +0000 (16:29 +0800)
committerwanglei <wanglei@loongson.cn>
Thu, 19 Jan 2023 08:29:22 +0000 (16:29 +0800)
commit7fa0a3c92377c2ce5b836b43e33a4a7107a3af38
tree4b0ffc75a12e7a1161b22fbf08c4e9b546c831bf
parent9ef43ad7bfff8aed5255c4b5b29ab2883ab9c913
[LoongArch] Add an option for MCInstPrinter to print numeric reg names

`-loongarch-numeric-reg` for llvm-mc and llc.
`-M numeric` (which matches GNU objdump) for llvm-objdump and llvm-mc.

Reviewed By: SixWeining

Differential Revision: https://reviews.llvm.org/D141743
llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchInstPrinter.cpp
llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchInstPrinter.h
llvm/test/CodeGen/LoongArch/numeric-reg-names.ll [new file with mode: 0644]
llvm/test/MC/LoongArch/Misc/numeric-reg-names.s [new file with mode: 0644]