Auto merge of #135047 - Flakebi:amdgpu-kernel-cc, r=workingjubilee · rust-lang/rust@0c2c096 (original) (raw)
`@@ -45,6 +45,9 @@ pub enum ExternAbi {
`
45
45
`PtxKernel,
`
46
46
`Msp430Interrupt,
`
47
47
`X86Interrupt,
`
``
48
`+
/// An entry-point function called by the GPU's host
`
``
49
`+
// FIXME: should not be callable from Rust on GPU targets, is for host's use only
`
``
50
`+
GpuKernel,
`
48
51
`EfiApi,
`
49
52
`AvrInterrupt,
`
50
53
`AvrNonBlockingInterrupt,
`
`@@ -122,6 +125,7 @@ const AbiDatas: &[AbiData] = &[
`
122
125
`AbiData { abi: Abi::PtxKernel, name: "ptx-kernel" },
`
123
126
`AbiData { abi: Abi::Msp430Interrupt, name: "msp430-interrupt" },
`
124
127
`AbiData { abi: Abi::X86Interrupt, name: "x86-interrupt" },
`
``
128
`+
AbiData { abi: Abi::GpuKernel, name: "gpu-kernel" },
`
125
129
`AbiData { abi: Abi::EfiApi, name: "efiapi" },
`
126
130
`AbiData { abi: Abi::AvrInterrupt, name: "avr-interrupt" },
`
127
131
`AbiData { abi: Abi::AvrNonBlockingInterrupt, name: "avr-non-blocking-interrupt" },
`
`@@ -239,6 +243,10 @@ pub fn is_stable(name: &str) -> Result<(), AbiDisabled> {
`
239
243
`feature: sym::abi_x86_interrupt,
`
240
244
`explain: "x86-interrupt ABI is experimental and subject to change",
`
241
245
`}),
`
``
246
`+
"gpu-kernel" => Err(AbiDisabled::Unstable {
`
``
247
`+
feature: sym::abi_gpu_kernel,
`
``
248
`+
explain: "gpu-kernel ABI is experimental and subject to change",
`
``
249
`+
}),
`
242
250
`"avr-interrupt" | "avr-non-blocking-interrupt" => Err(AbiDisabled::Unstable {
`
243
251
`feature: sym::abi_avr_interrupt,
`
244
252
`explain: "avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change",
`
`@@ -293,20 +301,21 @@ impl Abi {
`
293
301
`PtxKernel => 19,
`
294
302
`Msp430Interrupt => 20,
`
295
303
`X86Interrupt => 21,
`
296
``
`-
EfiApi => 22,
`
297
``
`-
AvrInterrupt => 23,
`
298
``
`-
AvrNonBlockingInterrupt => 24,
`
299
``
`-
CCmseNonSecureCall => 25,
`
300
``
`-
CCmseNonSecureEntry => 26,
`
``
304
`+
GpuKernel => 22,
`
``
305
`+
EfiApi => 23,
`
``
306
`+
AvrInterrupt => 24,
`
``
307
`+
AvrNonBlockingInterrupt => 25,
`
``
308
`+
CCmseNonSecureCall => 26,
`
``
309
`+
CCmseNonSecureEntry => 27,
`
301
310
`// Cross-platform ABIs
`
302
``
`-
System { unwind: false } => 27,
`
303
``
`-
System { unwind: true } => 28,
`
304
``
`-
RustIntrinsic => 29,
`
305
``
`-
RustCall => 30,
`
306
``
`-
Unadjusted => 31,
`
307
``
`-
RustCold => 32,
`
308
``
`-
RiscvInterruptM => 33,
`
309
``
`-
RiscvInterruptS => 34,
`
``
311
`+
System { unwind: false } => 28,
`
``
312
`+
System { unwind: true } => 29,
`
``
313
`+
RustIntrinsic => 30,
`
``
314
`+
RustCall => 31,
`
``
315
`+
Unadjusted => 32,
`
``
316
`+
RustCold => 33,
`
``
317
`+
RiscvInterruptM => 34,
`
``
318
`+
RiscvInterruptS => 35,
`
310
319
`};
`
311
320
`debug_assert!(
`
312
321
`AbiDatas
`