about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/abi.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/abi.rs b/src/abi.rs
index 1f522f64c9c..3b0ab9f0042 100644
--- a/src/abi.rs
+++ b/src/abi.rs
@@ -9,7 +9,7 @@ use rustc_middle::ty::Ty;
 use rustc_middle::ty::layout::LayoutOf;
 #[cfg(feature = "master")]
 use rustc_session::config;
-use rustc_target::abi::call::{ArgAttributes, CastTarget, FnAbi, PassMode};
+use rustc_target::callconv::{ArgAttributes, CastTarget, FnAbi, PassMode};
 #[cfg(feature = "master")]
 use rustc_target::callconv::Conv;
 
@@ -239,7 +239,7 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
 }
 
 #[cfg(feature = "master")]
-pub fn conv_to_fn_attribute<'gcc>(conv: Conv, _arch: &str) -> Option<FnAttribute<'gcc>> {
+pub fn conv_to_fn_attribute<'gcc>(conv: Conv, arch: &str) -> Option<FnAttribute<'gcc>> {
     // TODO: handle the calling conventions returning None.
     let attribute = match conv {
         Conv::C
@@ -250,20 +250,19 @@ pub fn conv_to_fn_attribute<'gcc>(conv: Conv, _arch: &str) -> Option<FnAttribute
         Conv::Cold => return None,
         Conv::PreserveMost => return None,
         Conv::PreserveAll => return None,
-        /*Conv::GpuKernel => {
+        Conv::GpuKernel => {
             if arch == "amdgpu" {
                 return None
             } else if arch == "nvptx64" {
                 return None
             } else {
-                panic!("Architecture {arch} does not support GpuKernel calling convention");
+                panic!("Architecture {} does not support GpuKernel calling convention", arch);
             }
-        }*/
+        }
         Conv::AvrInterrupt => return None,
         Conv::AvrNonBlockingInterrupt => return None,
         Conv::ArmAapcs => return None,
         Conv::Msp430Intr => return None,
-        Conv::PtxKernel => return None,
         Conv::X86Fastcall => return None,
         Conv::X86Intr => return None,
         Conv::X86Stdcall => return None,