about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorRichard Diamond <wichard@vitalitystudios.com>2018-07-01 22:42:00 -0500
committerRichard Diamond <wichard@vitalitystudios.com>2018-07-13 17:22:23 -0500
commit6332bb15062b3e193ba64a4ddb2619e8940a079f (patch)
treec068e7c0f403156254845624d27142ddd1abb8d6 /src/librustc_codegen_llvm
parentc0955a34bcb17f0b31d7b86522a520ebe7fa93ac (diff)
downloadrust-6332bb15062b3e193ba64a4ddb2619e8940a079f.tar.gz
rust-6332bb15062b3e193ba64a4ddb2619e8940a079f.zip
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.
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/abi.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_codegen_llvm/abi.rs b/src/librustc_codegen_llvm/abi.rs
index dbada85098b..b1502902079 100644
--- a/src/librustc_codegen_llvm/abi.rs
+++ b/src/librustc_codegen_llvm/abi.rs
@@ -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,