mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
658f68dc26
The TableGen-based calling convention definitions are inflexible, while writing a function to implement the calling convention is very straight-forward, and allows difficult cases to be handled more easily. With this patch adds support for: * Passing large scalars according to the RV32I calling convention * Byval arguments * Passing values on the stack when the argument registers are exhausted The custom CC_RISCV calling convention is also used for returns. This patch also documents the ABI lowering that a language frontend is expected to perform. I would like to work to simplify these requirements over time, but this will require further discussion within the LLVM community. We add PendingArgFlags CCState, as a companion to PendingLocs. The PendingLocs vector is used by a number of backends to handle arguments that are split during legalisation. However CCValAssign doesn't keep track of the original argument alignment. Therefore, add a PendingArgFlags vector which can be used to keep track of the ISD::ArgFlagsTy for every value added to PendingLocs. Differential Revision: https://reviews.llvm.org/D39898 llvm-svn: 320359
32 lines
989 B
CMake
32 lines
989 B
CMake
set(LLVM_TARGET_DEFINITIONS RISCV.td)
|
|
|
|
tablegen(LLVM RISCVGenRegisterInfo.inc -gen-register-info)
|
|
tablegen(LLVM RISCVGenInstrInfo.inc -gen-instr-info)
|
|
tablegen(LLVM RISCVGenMCCodeEmitter.inc -gen-emitter)
|
|
tablegen(LLVM RISCVGenMCPseudoLowering.inc -gen-pseudo-lowering)
|
|
tablegen(LLVM RISCVGenAsmMatcher.inc -gen-asm-matcher)
|
|
tablegen(LLVM RISCVGenAsmWriter.inc -gen-asm-writer)
|
|
tablegen(LLVM RISCVGenDAGISel.inc -gen-dag-isel)
|
|
tablegen(LLVM RISCVGenSubtargetInfo.inc -gen-subtarget)
|
|
tablegen(LLVM RISCVGenDisassemblerTables.inc -gen-disassembler)
|
|
|
|
add_public_tablegen_target(RISCVCommonTableGen)
|
|
|
|
add_llvm_target(RISCVCodeGen
|
|
RISCVAsmPrinter.cpp
|
|
RISCVFrameLowering.cpp
|
|
RISCVInstrInfo.cpp
|
|
RISCVISelDAGToDAG.cpp
|
|
RISCVISelLowering.cpp
|
|
RISCVMCInstLower.cpp
|
|
RISCVRegisterInfo.cpp
|
|
RISCVSubtarget.cpp
|
|
RISCVTargetMachine.cpp
|
|
)
|
|
|
|
add_subdirectory(AsmParser)
|
|
add_subdirectory(Disassembler)
|
|
add_subdirectory(InstPrinter)
|
|
add_subdirectory(MCTargetDesc)
|
|
add_subdirectory(TargetInfo)
|