[CSKY] Add CSKYDisassembler.cpp to construct objdump
authorZi Xuan Wu <zixuan.wu@linux.alibaba.com>
Tue, 8 Feb 2022 07:18:59 +0000 (15:18 +0800)
committerZi Xuan Wu <zixuan.wu@linux.alibaba.com>
Tue, 8 Feb 2022 08:02:59 +0000 (16:02 +0800)
commitec642ceebc1aacc8b16249df7734b8cf90ae2963
treea5f79638d93c0b0a3e6a6d0f55084fe332f850da
parent9ee96aaab2aa6043accf7937f8b2c9158283fa5d
[CSKY] Add CSKYDisassembler.cpp to construct objdump

CSKYDisassembler tries to disassemble register MC operand from register num for different register class, and
also handles immediate num and carry flag operand which is not encoded in instruction binary.

Also enhance the printer of instruction to accept sub-option to control the print format. Sometimes, it prefers to
print number in hex, especially when immediate number represents symbol address.
llvm/lib/Target/CSKY/CMakeLists.txt
llvm/lib/Target/CSKY/CSKYRegisterInfo.td
llvm/lib/Target/CSKY/Disassembler/CMakeLists.txt [new file with mode: 0644]
llvm/lib/Target/CSKY/Disassembler/CSKYDisassembler.cpp [new file with mode: 0644]
llvm/lib/Target/CSKY/MCTargetDesc/CSKYInstPrinter.cpp
llvm/test/MC/CSKY/basic-16bit.s
llvm/test/MC/CSKY/basic.s
llvm/test/MC/CSKY/fpuv2.s
llvm/test/MC/CSKY/fpuv3.s