mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-19 11:55:55 +00:00

This patch adds proper handling of -target-abi, as accepted by llvm-mc and llc. Lowering (codegen) for the hard-float ABIs will follow in a subsequent patch. However, this patch does add MC layer support for the hard float and RVE ABIs (emission of the appropriate ELF flags https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#-file-header). ABI parsing must be shared between codegen and the MC layer, so we add computeTargetABI to RISCVUtils. A warning will be printed if an invalid or unrecognized ABI is given. Differential Revision: https://reviews.llvm.org/D59023 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355771 91177308-0d34-0410-b5e6-96231b3b80d8