Auto merge of #52032 - DiamondLovesYou:amdgpu-kernel-abi, r=alexcrichton
Add the `amdgpu-kernel` ABI. Technically, there are requirements imposed by the LLVM `AMDGPUTargetMachine` on functions with this ABI (eg, the return type must be void), but I'm unsure exactly where this should be enforced.
This commit is contained in:
commit
84755473dc
9 changed files with 137 additions and 59 deletions
|
|
@ -343,6 +343,7 @@ impl<'a, 'tcx> FnTypeExt<'a, 'tcx> for FnType<'tcx, Ty<'tcx>> {
|
|||
PtxKernel => Conv::PtxKernel,
|
||||
Msp430Interrupt => Conv::Msp430Intr,
|
||||
X86Interrupt => Conv::X86Intr,
|
||||
AmdGpuKernel => Conv::AmdGpuKernel,
|
||||
|
||||
// These API constants ought to be more specific...
|
||||
Cdecl => Conv::C,
|
||||
|
|
@ -608,6 +609,7 @@ impl<'a, 'tcx> FnTypeExt<'a, 'tcx> for FnType<'tcx, Ty<'tcx>> {
|
|||
fn llvm_cconv(&self) -> llvm::CallConv {
|
||||
match self.conv {
|
||||
Conv::C => llvm::CCallConv,
|
||||
Conv::AmdGpuKernel => llvm::AmdGpuKernel,
|
||||
Conv::ArmAapcs => llvm::ArmAapcsCallConv,
|
||||
Conv::Msp430Intr => llvm::Msp430Intr,
|
||||
Conv::PtxKernel => llvm::PtxKernel,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue