Skip to content

Commit f6b21e9

Browse files
committed
Remove the abi_amdgpu_kernel feature
1 parent c401f09 commit f6b21e9

File tree

26 files changed

+70
-268
lines changed

26 files changed

+70
-268
lines changed

compiler/rustc_codegen_cranelift/src/abi/mod.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@ pub(crate) fn conv_to_call_conv(sess: &Session, c: Conv, default_call_conv: Call
5656
sess.dcx().fatal("C-cmse-nonsecure-call call conv is not yet implemented");
5757
}
5858

59-
Conv::Msp430Intr
60-
| Conv::PtxKernel
61-
| Conv::AmdGpuKernel
62-
| Conv::AvrInterrupt
63-
| Conv::AvrNonBlockingInterrupt => {
59+
Conv::Msp430Intr | Conv::PtxKernel | Conv::AvrInterrupt | Conv::AvrNonBlockingInterrupt => {
6460
unreachable!("tried to use {c:?} call conv which only exists on an unsupported target");
6561
}
6662
}

compiler/rustc_codegen_llvm/src/abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,6 @@ impl From<Conv> for llvm::CallConv {
590590
Conv::Cold => llvm::ColdCallConv,
591591
Conv::PreserveMost => llvm::PreserveMost,
592592
Conv::PreserveAll => llvm::PreserveAll,
593-
Conv::AmdGpuKernel => llvm::AmdGpuKernel,
594593
Conv::AvrInterrupt => llvm::AvrInterrupt,
595594
Conv::AvrNonBlockingInterrupt => llvm::AvrNonBlockingInterrupt,
596595
Conv::ArmAapcs => llvm::ArmAapcsCallConv,

compiler/rustc_codegen_llvm/src/llvm/ffi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ pub enum CallConv {
106106
X86_Intr = 83,
107107
AvrNonBlockingInterrupt = 84,
108108
AvrInterrupt = 85,
109-
AmdGpuKernel = 91,
110109
}
111110

112111
/// LLVMRustLinkage

compiler/rustc_feature/src/removed.rs

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ declare_features! (
3232
// feature-group-start: removed features
3333
// -------------------------------------------------------------------------
3434

35+
/// Allows using the `amdgpu-kernel` ABI.
36+
(removed, abi_amdgpu_kernel, "CURRENT_RUSTC_VERSION", Some(51575), None),
3537
(removed, advanced_slice_patterns, "1.0.0", Some(62254),
3638
Some("merged into `#![feature(slice_patterns)]`")),
3739
(removed, allocator, "1.0.0", None, None),

compiler/rustc_feature/src/unstable.rs

-2
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,6 @@ declare_features! (
321321
// feature-group-start: actual feature gates
322322
// -------------------------------------------------------------------------
323323

324-
/// Allows using the `amdgpu-kernel` ABI.
325-
(unstable, abi_amdgpu_kernel, "1.29.0", Some(51575)),
326324
/// Allows `extern "avr-interrupt" fn()` and `extern "avr-non-blocking-interrupt" fn()`.
327325
(unstable, abi_avr_interrupt, "1.45.0", Some(69664)),
328326
/// Allows `extern "C-cmse-nonsecure-call" fn()`.

compiler/rustc_middle/src/ty/layout.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,6 @@ pub fn fn_can_unwind(tcx: TyCtxt<'_>, fn_def_id: Option<DefId>, abi: SpecAbi) ->
12471247
PtxKernel
12481248
| Msp430Interrupt
12491249
| X86Interrupt
1250-
| AmdGpuKernel
12511250
| EfiApi
12521251
| AvrInterrupt
12531252
| AvrNonBlockingInterrupt

compiler/rustc_mir_transform/src/ffi_unwind_calls.rs

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ fn abi_can_unwind(abi: Abi) -> bool {
2626
PtxKernel
2727
| Msp430Interrupt
2828
| X86Interrupt
29-
| AmdGpuKernel
3029
| EfiApi
3130
| AvrInterrupt
3231
| AvrNonBlockingInterrupt

compiler/rustc_smir/src/rustc_internal/internal.rs

-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ impl RustcInternal for Abi {
449449
Abi::PtxKernel => rustc_target::spec::abi::Abi::PtxKernel,
450450
Abi::Msp430Interrupt => rustc_target::spec::abi::Abi::Msp430Interrupt,
451451
Abi::X86Interrupt => rustc_target::spec::abi::Abi::X86Interrupt,
452-
Abi::AmdGpuKernel => rustc_target::spec::abi::Abi::AmdGpuKernel,
453452
Abi::EfiApi => rustc_target::spec::abi::Abi::EfiApi,
454453
Abi::AvrInterrupt => rustc_target::spec::abi::Abi::AvrInterrupt,
455454
Abi::AvrNonBlockingInterrupt => rustc_target::spec::abi::Abi::AvrNonBlockingInterrupt,

compiler/rustc_smir/src/rustc_smir/convert/abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ impl<'tcx> Stable<'tcx> for rustc_target::abi::call::Conv {
111111
Conv::X86VectorCall => CallConvention::X86VectorCall,
112112
Conv::X86_64SysV => CallConvention::X86_64SysV,
113113
Conv::X86_64Win64 => CallConvention::X86_64Win64,
114-
Conv::AmdGpuKernel => CallConvention::AmdGpuKernel,
115114
Conv::AvrInterrupt => CallConvention::AvrInterrupt,
116115
Conv::AvrNonBlockingInterrupt => CallConvention::AvrNonBlockingInterrupt,
117116
Conv::RiscvInterrupt { .. } => CallConvention::RiscvInterrupt,

compiler/rustc_smir/src/rustc_smir/convert/ty.rs

-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ impl<'tcx> Stable<'tcx> for ty::FnSig<'tcx> {
223223
abi::Abi::PtxKernel => Abi::PtxKernel,
224224
abi::Abi::Msp430Interrupt => Abi::Msp430Interrupt,
225225
abi::Abi::X86Interrupt => Abi::X86Interrupt,
226-
abi::Abi::AmdGpuKernel => Abi::AmdGpuKernel,
227226
abi::Abi::EfiApi => Abi::EfiApi,
228227
abi::Abi::AvrInterrupt => Abi::AvrInterrupt,
229228
abi::Abi::AvrNonBlockingInterrupt => Abi::AvrNonBlockingInterrupt,

compiler/rustc_target/src/abi/call/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,6 @@ pub enum Conv {
705705
X86_64SysV,
706706
X86_64Win64,
707707

708-
AmdGpuKernel,
709708
AvrInterrupt,
710709
AvrNonBlockingInterrupt,
711710

@@ -887,7 +886,6 @@ impl FromStr for Conv {
887886
"X86VectorCall" => Ok(Conv::X86VectorCall),
888887
"X86_64SysV" => Ok(Conv::X86_64SysV),
889888
"X86_64Win64" => Ok(Conv::X86_64Win64),
890-
"AmdGpuKernel" => Ok(Conv::AmdGpuKernel),
891889
"AvrInterrupt" => Ok(Conv::AvrInterrupt),
892890
"AvrNonBlockingInterrupt" => Ok(Conv::AvrNonBlockingInterrupt),
893891
"RiscvInterrupt(machine)" => {

compiler/rustc_target/src/json.rs

-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ impl ToJson for crate::abi::call::Conv {
110110
Self::X86VectorCall => "X86VectorCall",
111111
Self::X86_64SysV => "X86_64SysV",
112112
Self::X86_64Win64 => "X86_64Win64",
113-
Self::AmdGpuKernel => "AmdGpuKernel",
114113
Self::AvrInterrupt => "AvrInterrupt",
115114
Self::AvrNonBlockingInterrupt => "AvrNonBlockingInterrupt",
116115
Self::RiscvInterrupt { kind } => {

compiler/rustc_target/src/spec/abi/mod.rs

+14-21
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ pub enum Abi {
4444
PtxKernel,
4545
Msp430Interrupt,
4646
X86Interrupt,
47-
AmdGpuKernel,
4847
EfiApi,
4948
AvrInterrupt,
5049
AvrNonBlockingInterrupt,
@@ -121,7 +120,6 @@ const AbiDatas: &[AbiData] = &[
121120
AbiData { abi: Abi::PtxKernel, name: "ptx-kernel" },
122121
AbiData { abi: Abi::Msp430Interrupt, name: "msp430-interrupt" },
123122
AbiData { abi: Abi::X86Interrupt, name: "x86-interrupt" },
124-
AbiData { abi: Abi::AmdGpuKernel, name: "amdgpu-kernel" },
125123
AbiData { abi: Abi::EfiApi, name: "efiapi" },
126124
AbiData { abi: Abi::AvrInterrupt, name: "avr-interrupt" },
127125
AbiData { abi: Abi::AvrNonBlockingInterrupt, name: "avr-non-blocking-interrupt" },
@@ -237,10 +235,6 @@ pub fn is_stable(name: &str) -> Result<(), AbiDisabled> {
237235
feature: sym::abi_x86_interrupt,
238236
explain: "x86-interrupt ABI is experimental and subject to change",
239237
}),
240-
"amdgpu-kernel" => Err(AbiDisabled::Unstable {
241-
feature: sym::abi_amdgpu_kernel,
242-
explain: "amdgpu-kernel ABI is experimental and subject to change",
243-
}),
244238
"avr-interrupt" | "avr-non-blocking-interrupt" => Err(AbiDisabled::Unstable {
245239
feature: sym::abi_avr_interrupt,
246240
explain: "avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change",
@@ -295,22 +289,21 @@ impl Abi {
295289
PtxKernel => 19,
296290
Msp430Interrupt => 20,
297291
X86Interrupt => 21,
298-
AmdGpuKernel => 22,
299-
EfiApi => 23,
300-
AvrInterrupt => 24,
301-
AvrNonBlockingInterrupt => 25,
302-
CCmseNonSecureCall => 26,
303-
Wasm => 27,
292+
EfiApi => 22,
293+
AvrInterrupt => 23,
294+
AvrNonBlockingInterrupt => 24,
295+
CCmseNonSecureCall => 25,
296+
Wasm => 26,
304297
// Cross-platform ABIs
305-
System { unwind: false } => 28,
306-
System { unwind: true } => 29,
307-
RustIntrinsic => 30,
308-
RustCall => 31,
309-
PlatformIntrinsic => 32,
310-
Unadjusted => 33,
311-
RustCold => 34,
312-
RiscvInterruptM => 35,
313-
RiscvInterruptS => 36,
298+
System { unwind: false } => 27,
299+
System { unwind: true } => 28,
300+
RustIntrinsic => 29,
301+
RustCall => 30,
302+
PlatformIntrinsic => 31,
303+
Unadjusted => 32,
304+
RustCold => 33,
305+
RiscvInterruptM => 34,
306+
RiscvInterruptS => 35,
314307
};
315308
debug_assert!(
316309
AbiDatas

compiler/rustc_target/src/spec/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2458,7 +2458,6 @@ impl Target {
24582458
Win64 { .. } | SysV64 { .. } => self.arch == "x86_64",
24592459
PtxKernel => self.arch == "nvptx64",
24602460
Msp430Interrupt => self.arch == "msp430",
2461-
AmdGpuKernel => self.arch == "amdgcn",
24622461
RiscvInterruptM | RiscvInterruptS => ["riscv32", "riscv64"].contains(&&self.arch[..]),
24632462
AvrInterrupt | AvrNonBlockingInterrupt => self.arch == "avr",
24642463
Wasm => ["wasm32", "wasm64"].contains(&&self.arch[..]),

compiler/rustc_ty_utils/src/abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ fn conv_from_spec_abi(tcx: TyCtxt<'_>, abi: SpecAbi, c_variadic: bool) -> Conv {
258258
PtxKernel => Conv::PtxKernel,
259259
Msp430Interrupt => Conv::Msp430Intr,
260260
X86Interrupt => Conv::X86Intr,
261-
AmdGpuKernel => Conv::AmdGpuKernel,
262261
AvrInterrupt => Conv::AvrInterrupt,
263262
AvrNonBlockingInterrupt => Conv::AvrNonBlockingInterrupt,
264263
RiscvInterruptM => Conv::RiscvInterrupt { kind: RiscvInterruptKind::Machine },

compiler/stable_mir/src/abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ pub enum CallConvention {
275275
X86_64SysV,
276276
X86_64Win64,
277277

278-
AmdGpuKernel,
279278
AvrInterrupt,
280279
AvrNonBlockingInterrupt,
281280

compiler/stable_mir/src/ty.rs

-1
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,6 @@ pub enum Abi {
864864
PtxKernel,
865865
Msp430Interrupt,
866866
X86Interrupt,
867-
AmdGpuKernel,
868867
EfiApi,
869868
AvrInterrupt,
870869
AvrNonBlockingInterrupt,
+10-16
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,53 @@
11
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
2-
--> $DIR/unsupported.rs:30:1
2+
--> $DIR/unsupported.rs:29:1
33
|
44
LL | extern "ptx-kernel" fn ptx() {}
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

7-
error[E0570]: `"amdgpu-kernel"` is not a supported ABI for the current target
8-
--> $DIR/unsupported.rs:32:1
9-
|
10-
LL | extern "amdgpu-kernel" fn amdgpu() {}
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12-
137
error[E0570]: `"wasm"` is not a supported ABI for the current target
14-
--> $DIR/unsupported.rs:34:1
8+
--> $DIR/unsupported.rs:31:1
159
|
1610
LL | extern "wasm" fn wasm() {}
1711
| ^^^^^^^^^^^^^^^^^^^^^^^
1812

1913
error[E0570]: `"aapcs"` is not a supported ABI for the current target
20-
--> $DIR/unsupported.rs:36:1
14+
--> $DIR/unsupported.rs:33:1
2115
|
2216
LL | extern "aapcs" fn aapcs() {}
2317
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2418

2519
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
26-
--> $DIR/unsupported.rs:42:1
20+
--> $DIR/unsupported.rs:39:1
2721
|
2822
LL | extern "msp430-interrupt" fn msp430() {}
2923
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3024

3125
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
32-
--> $DIR/unsupported.rs:44:1
26+
--> $DIR/unsupported.rs:41:1
3327
|
3428
LL | extern "avr-interrupt" fn avr() {}
3529
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3630

3731
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
38-
--> $DIR/unsupported.rs:46:1
32+
--> $DIR/unsupported.rs:43:1
3933
|
4034
LL | extern "riscv-interrupt-m" fn riscv() {}
4135
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4236

4337
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
44-
--> $DIR/unsupported.rs:51:1
38+
--> $DIR/unsupported.rs:48:1
4539
|
4640
LL | extern "x86-interrupt" fn x86() {}
4741
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4842

4943
error[E0570]: `"thiscall"` is not a supported ABI for the current target
50-
--> $DIR/unsupported.rs:56:1
44+
--> $DIR/unsupported.rs:53:1
5145
|
5246
LL | extern "thiscall" fn thiscall() {}
5347
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5448

5549
warning: use of calling convention not supported on this target
56-
--> $DIR/unsupported.rs:62:1
50+
--> $DIR/unsupported.rs:59:1
5751
|
5852
LL | extern "stdcall" fn stdcall() {}
5953
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -62,6 +56,6 @@ LL | extern "stdcall" fn stdcall() {}
6256
= note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
6357
= note: `#[warn(unsupported_calling_conventions)]` on by default
6458

65-
error: aborting due to 9 previous errors; 1 warning emitted
59+
error: aborting due to 8 previous errors; 1 warning emitted
6660

6761
For more information about this error, try `rustc --explain E0570`.

tests/ui/abi/unsupported.arm.stderr

+9-15
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,47 @@
11
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
2-
--> $DIR/unsupported.rs:30:1
2+
--> $DIR/unsupported.rs:29:1
33
|
44
LL | extern "ptx-kernel" fn ptx() {}
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

7-
error[E0570]: `"amdgpu-kernel"` is not a supported ABI for the current target
8-
--> $DIR/unsupported.rs:32:1
9-
|
10-
LL | extern "amdgpu-kernel" fn amdgpu() {}
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12-
137
error[E0570]: `"wasm"` is not a supported ABI for the current target
14-
--> $DIR/unsupported.rs:34:1
8+
--> $DIR/unsupported.rs:31:1
159
|
1610
LL | extern "wasm" fn wasm() {}
1711
| ^^^^^^^^^^^^^^^^^^^^^^^
1812

1913
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
20-
--> $DIR/unsupported.rs:42:1
14+
--> $DIR/unsupported.rs:39:1
2115
|
2216
LL | extern "msp430-interrupt" fn msp430() {}
2317
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2418

2519
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
26-
--> $DIR/unsupported.rs:44:1
20+
--> $DIR/unsupported.rs:41:1
2721
|
2822
LL | extern "avr-interrupt" fn avr() {}
2923
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3024

3125
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
32-
--> $DIR/unsupported.rs:46:1
26+
--> $DIR/unsupported.rs:43:1
3327
|
3428
LL | extern "riscv-interrupt-m" fn riscv() {}
3529
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3630

3731
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
38-
--> $DIR/unsupported.rs:51:1
32+
--> $DIR/unsupported.rs:48:1
3933
|
4034
LL | extern "x86-interrupt" fn x86() {}
4135
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4236

4337
error[E0570]: `"thiscall"` is not a supported ABI for the current target
44-
--> $DIR/unsupported.rs:56:1
38+
--> $DIR/unsupported.rs:53:1
4539
|
4640
LL | extern "thiscall" fn thiscall() {}
4741
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4842

4943
warning: use of calling convention not supported on this target
50-
--> $DIR/unsupported.rs:62:1
44+
--> $DIR/unsupported.rs:59:1
5145
|
5246
LL | extern "stdcall" fn stdcall() {}
5347
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -56,6 +50,6 @@ LL | extern "stdcall" fn stdcall() {}
5650
= note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
5751
= note: `#[warn(unsupported_calling_conventions)]` on by default
5852

59-
error: aborting due to 8 previous errors; 1 warning emitted
53+
error: aborting due to 7 previous errors; 1 warning emitted
6054

6155
For more information about this error, try `rustc --explain E0570`.

0 commit comments

Comments
 (0)