@@ -9,7 +9,7 @@ use rustc_middle::ty::Ty;
99use rustc_middle:: ty:: layout:: LayoutOf ;
1010#[ cfg( feature = "master" ) ]
1111use rustc_session:: config;
12- use rustc_target:: abi :: call :: { ArgAttributes , CastTarget , FnAbi , PassMode } ;
12+ use rustc_target:: callconv :: { ArgAttributes , CastTarget , FnAbi , PassMode } ;
1313#[ cfg( feature = "master" ) ]
1414use rustc_target:: callconv:: Conv ;
1515
@@ -239,7 +239,7 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
239239}
240240
241241#[ cfg( feature = "master" ) ]
242- pub fn conv_to_fn_attribute < ' gcc > ( conv : Conv , _arch : & str ) -> Option < FnAttribute < ' gcc > > {
242+ pub fn conv_to_fn_attribute < ' gcc > ( conv : Conv , arch : & str ) -> Option < FnAttribute < ' gcc > > {
243243 // TODO: handle the calling conventions returning None.
244244 let attribute = match conv {
245245 Conv :: C
@@ -250,20 +250,19 @@ pub fn conv_to_fn_attribute<'gcc>(conv: Conv, _arch: &str) -> Option<FnAttribute
250250 Conv :: Cold => return None ,
251251 Conv :: PreserveMost => return None ,
252252 Conv :: PreserveAll => return None ,
253- /* Conv::GpuKernel => {
253+ Conv :: GpuKernel => {
254254 if arch == "amdgpu" {
255255 return None
256256 } else if arch == "nvptx64" {
257257 return None
258258 } else {
259- panic!("Architecture {arch } does not support GpuKernel calling convention");
259+ panic ! ( "Architecture {} does not support GpuKernel calling convention" , arch ) ;
260260 }
261- }*/
261+ }
262262 Conv :: AvrInterrupt => return None ,
263263 Conv :: AvrNonBlockingInterrupt => return None ,
264264 Conv :: ArmAapcs => return None ,
265265 Conv :: Msp430Intr => return None ,
266- Conv :: PtxKernel => return None ,
267266 Conv :: X86Fastcall => return None ,
268267 Conv :: X86Intr => return None ,
269268 Conv :: X86Stdcall => return None ,
0 commit comments