From 430bd6200dd290497423c5f3a1f9ee4e9bd35d67 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Mon, 17 Oct 2022 22:38:37 +0100 Subject: [PATCH] Stabilize asm_sym --- compiler/rustc_ast_lowering/src/asm.rs | 10 ------- compiler/rustc_codegen_gcc/tests/run/asm.rs | 9 ++++--- compiler/rustc_feature/src/accepted.rs | 2 ++ compiler/rustc_feature/src/active.rs | 2 -- .../src/language-features/asm-sym.md | 13 ---------- src/test/assembly/asm/aarch64-types.rs | 2 +- src/test/assembly/asm/arm-types.rs | 2 +- src/test/assembly/asm/avr-types.rs | 2 +- src/test/assembly/asm/bpf-types.rs | 2 +- src/test/assembly/asm/global_asm.rs | 6 +++-- src/test/assembly/asm/hexagon-types.rs | 2 +- src/test/assembly/asm/mips-types.rs | 2 +- src/test/assembly/asm/msp430-types.rs | 2 +- src/test/assembly/asm/nvptx-types.rs | 2 +- src/test/assembly/asm/powerpc-types.rs | 2 +- src/test/assembly/asm/riscv-types.rs | 2 +- src/test/assembly/asm/s390x-types.rs | 2 +- src/test/assembly/asm/wasm-types.rs | 2 +- src/test/assembly/asm/x86-types.rs | 2 +- src/test/ui/abi/abi-sysv64-register-usage.rs | 26 +++++++++++++------ src/test/ui/asm/aarch64/bad-reg.rs | 2 +- src/test/ui/asm/aarch64/may_unwind.rs | 2 +- src/test/ui/asm/aarch64/sym.rs | 2 +- src/test/ui/asm/aarch64/type-check-2-2.rs | 2 +- src/test/ui/asm/aarch64/type-check-2.rs | 2 +- src/test/ui/asm/generic-const.rs | 2 +- src/test/ui/asm/naked-functions.rs | 2 +- src/test/ui/asm/type-check-1.rs | 2 +- src/test/ui/asm/x86_64/bad-reg.rs | 2 +- src/test/ui/asm/x86_64/issue-96797.rs | 2 -- src/test/ui/asm/x86_64/may_unwind.rs | 2 +- .../ui/asm/x86_64/multiple-clobber-abi.rs | 2 -- src/test/ui/asm/x86_64/sym.rs | 2 +- src/test/ui/asm/x86_64/type-check-2.rs | 2 +- src/test/ui/asm/x86_64/type-check-4.rs | 5 ++-- src/test/ui/asm/x86_64/type-check-4.stderr | 6 ++--- src/test/ui/asm/x86_64/type-check-5.rs | 2 +- .../ui/feature-gates/feature-gate-asm_sym.rs | 19 -------------- .../feature-gates/feature-gate-asm_sym.stderr | 21 --------------- 39 files changed, 61 insertions(+), 114 deletions(-) delete mode 100644 src/doc/unstable-book/src/language-features/asm-sym.md delete mode 100644 src/test/ui/feature-gates/feature-gate-asm_sym.rs delete mode 100644 src/test/ui/feature-gates/feature-gate-asm_sym.stderr diff --git a/compiler/rustc_ast_lowering/src/asm.rs b/compiler/rustc_ast_lowering/src/asm.rs index 54c83fb760460..450cdf246b150 100644 --- a/compiler/rustc_ast_lowering/src/asm.rs +++ b/compiler/rustc_ast_lowering/src/asm.rs @@ -192,16 +192,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { } } InlineAsmOperand::Sym { ref sym } => { - if !self.tcx.features().asm_sym { - feature_err( - &sess.parse_sess, - sym::asm_sym, - *op_sp, - "sym operands for inline assembly are unstable", - ) - .emit(); - } - let static_def_id = self .resolver .get_partial_res(sym.id) diff --git a/compiler/rustc_codegen_gcc/tests/run/asm.rs b/compiler/rustc_codegen_gcc/tests/run/asm.rs index 46abbb553bf2f..38c1eac7adf69 100644 --- a/compiler/rustc_codegen_gcc/tests/run/asm.rs +++ b/compiler/rustc_codegen_gcc/tests/run/asm.rs @@ -3,11 +3,12 @@ // Run-time: // status: 0 -#![feature(asm_const, asm_sym)] +#![feature(asm_const)] use std::arch::{asm, global_asm}; -global_asm!(" +global_asm!( + " .global add_asm add_asm: mov rax, rdi @@ -132,7 +133,9 @@ fn main() { assert_eq!(x, 43); // check sym fn - extern "C" fn foo() -> u64 { 42 } + extern "C" fn foo() -> u64 { + 42 + } let x: u64; unsafe { asm!("call {}", sym foo, lateout("rax") x); diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index ca12659695feb..54bf5a2c34b82 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -53,6 +53,8 @@ declare_features! ( (accepted, abi_sysv64, "1.24.0", Some(36167), None), /// Allows using ADX intrinsics from `core::arch::{x86, x86_64}`. (accepted, adx_target_feature, "1.61.0", Some(44839), None), + /// Allows using `sym` operands in inline assembly. + (accepted, asm_sym, "CURRENT_RUSTC_VERSION", Some(93333), None), /// Allows the definition of associated constants in `trait` or `impl` blocks. (accepted, associated_consts, "1.20.0", Some(29646), None), /// Allows using associated `type`s in `trait`s. diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 5ea433e6b3d3e..1b8d683b13361 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -300,8 +300,6 @@ declare_features! ( (active, asm_const, "1.58.0", Some(93332), None), /// Enables experimental inline assembly support for additional architectures. (active, asm_experimental_arch, "1.58.0", Some(93335), None), - /// Allows using `sym` operands in inline assembly. - (active, asm_sym, "1.58.0", Some(93333), None), /// Allows the `may_unwind` option in inline assembly. (active, asm_unwind, "1.58.0", Some(93334), None), /// Allows users to enforce equality of associated constants `TraitImpl`. diff --git a/src/doc/unstable-book/src/language-features/asm-sym.md b/src/doc/unstable-book/src/language-features/asm-sym.md deleted file mode 100644 index 103d91caf4ccd..0000000000000 --- a/src/doc/unstable-book/src/language-features/asm-sym.md +++ /dev/null @@ -1,13 +0,0 @@ -# `asm_sym` - -The tracking issue for this feature is: [#93333] - -[#93333]: https://github.com/rust-lang/rust/issues/93333 - ------------------------- - -This feature adds a `sym ` operand type to `asm!` and `global_asm!`. -- `` must refer to a `fn` or `static`. -- A mangled symbol name referring to the item is substituted into the asm template string. -- The substituted string does not include any modifiers (e.g. GOT, PLT, relocations, etc). -- `` is allowed to point to a `#[thread_local]` static, in which case the asm code can combine the symbol with relocations (e.g. `@plt`, `@TPOFF`) to read from thread-local data. diff --git a/src/test/assembly/asm/aarch64-types.rs b/src/test/assembly/asm/aarch64-types.rs index 04b5f4aed9bb5..66c39a48c6e1d 100644 --- a/src/test/assembly/asm/aarch64-types.rs +++ b/src/test/assembly/asm/aarch64-types.rs @@ -2,7 +2,7 @@ // compile-flags: --target aarch64-unknown-linux-gnu // needs-llvm-components: aarch64 -#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_sym)] +#![feature(no_core, lang_items, rustc_attrs, repr_simd)] #![crate_type = "rlib"] #![no_core] #![allow(asm_sub_register, non_camel_case_types)] diff --git a/src/test/assembly/asm/arm-types.rs b/src/test/assembly/asm/arm-types.rs index 5ac1af6afd67d..b22a26ce36f14 100644 --- a/src/test/assembly/asm/arm-types.rs +++ b/src/test/assembly/asm/arm-types.rs @@ -3,7 +3,7 @@ // compile-flags: -C target-feature=+neon // needs-llvm-components: arm -#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_sym)] +#![feature(no_core, lang_items, rustc_attrs, repr_simd)] #![crate_type = "rlib"] #![no_core] #![allow(asm_sub_register, non_camel_case_types)] diff --git a/src/test/assembly/asm/avr-types.rs b/src/test/assembly/asm/avr-types.rs index 58bf1ad9e35eb..b2d11a8826f6b 100644 --- a/src/test/assembly/asm/avr-types.rs +++ b/src/test/assembly/asm/avr-types.rs @@ -2,7 +2,7 @@ // compile-flags: --target avr-unknown-gnu-atmega328 // needs-llvm-components: avr -#![feature(no_core, lang_items, rustc_attrs, asm_sym, asm_experimental_arch)] +#![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)] #![crate_type = "rlib"] #![no_core] #![allow(non_camel_case_types)] diff --git a/src/test/assembly/asm/bpf-types.rs b/src/test/assembly/asm/bpf-types.rs index f894644cc20ee..e177b8d0dbe50 100644 --- a/src/test/assembly/asm/bpf-types.rs +++ b/src/test/assembly/asm/bpf-types.rs @@ -2,7 +2,7 @@ // compile-flags: --target bpfel-unknown-none -C target_feature=+alu32 // needs-llvm-components: bpf -#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_sym, asm_experimental_arch)] +#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)] #![crate_type = "rlib"] #![no_core] #![allow(asm_sub_register, non_camel_case_types)] diff --git a/src/test/assembly/asm/global_asm.rs b/src/test/assembly/asm/global_asm.rs index 4cf73b40faf0b..0b361a7ed963d 100644 --- a/src/test/assembly/asm/global_asm.rs +++ b/src/test/assembly/asm/global_asm.rs @@ -4,7 +4,7 @@ // compile-flags: -C llvm-args=--x86-asm-syntax=intel // compile-flags: -C symbol-mangling-version=v0 -#![feature(asm_const, asm_sym)] +#![feature(asm_const)] #![crate_type = "rlib"] use std::arch::global_asm; @@ -28,4 +28,6 @@ global_asm!("lea rax, [rip + {}]", sym MY_STATIC); // CHECK: call _RNvCsiubXh4Yz005_10global_asm6foobar global_asm!("call {}", sym foobar); // CHECK: _RNvCsiubXh4Yz005_10global_asm6foobar: -fn foobar() { loop {} } +fn foobar() { + loop {} +} diff --git a/src/test/assembly/asm/hexagon-types.rs b/src/test/assembly/asm/hexagon-types.rs index eff9a0bb431d4..af16faedbc4a2 100644 --- a/src/test/assembly/asm/hexagon-types.rs +++ b/src/test/assembly/asm/hexagon-types.rs @@ -2,7 +2,7 @@ // compile-flags: --target hexagon-unknown-linux-musl // needs-llvm-components: hexagon -#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_sym, asm_experimental_arch)] +#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)] #![crate_type = "rlib"] #![no_core] #![allow(asm_sub_register, non_camel_case_types)] diff --git a/src/test/assembly/asm/mips-types.rs b/src/test/assembly/asm/mips-types.rs index 04bf49a40efbc..6aa28b062db8a 100644 --- a/src/test/assembly/asm/mips-types.rs +++ b/src/test/assembly/asm/mips-types.rs @@ -5,7 +5,7 @@ //[mips64] compile-flags: --target mips64-unknown-linux-gnuabi64 //[mips64] needs-llvm-components: mips -#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_sym, asm_experimental_arch)] +#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)] #![crate_type = "rlib"] #![no_core] #![allow(asm_sub_register, non_camel_case_types)] diff --git a/src/test/assembly/asm/msp430-types.rs b/src/test/assembly/asm/msp430-types.rs index 4fa2e8081f816..2c73b3b098de4 100644 --- a/src/test/assembly/asm/msp430-types.rs +++ b/src/test/assembly/asm/msp430-types.rs @@ -2,7 +2,7 @@ // compile-flags: --target msp430-none-elf // needs-llvm-components: msp430 -#![feature(no_core, lang_items, rustc_attrs, asm_sym, asm_experimental_arch, asm_const)] +#![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch, asm_const)] #![crate_type = "rlib"] #![no_core] #![allow(non_camel_case_types)] diff --git a/src/test/assembly/asm/nvptx-types.rs b/src/test/assembly/asm/nvptx-types.rs index 3ebd5b4b89681..c319946b5f5c1 100644 --- a/src/test/assembly/asm/nvptx-types.rs +++ b/src/test/assembly/asm/nvptx-types.rs @@ -3,7 +3,7 @@ // compile-flags: --crate-type cdylib // needs-llvm-components: nvptx -#![feature(no_core, lang_items, rustc_attrs, asm_sym, asm_experimental_arch)] +#![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)] #![no_core] #[rustc_builtin_macro] diff --git a/src/test/assembly/asm/powerpc-types.rs b/src/test/assembly/asm/powerpc-types.rs index 0ca8908497ad7..e27b005206835 100644 --- a/src/test/assembly/asm/powerpc-types.rs +++ b/src/test/assembly/asm/powerpc-types.rs @@ -5,7 +5,7 @@ //[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu //[powerpc64] needs-llvm-components: powerpc -#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_sym, asm_experimental_arch)] +#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)] #![crate_type = "rlib"] #![no_core] #![allow(asm_sub_register, non_camel_case_types)] diff --git a/src/test/assembly/asm/riscv-types.rs b/src/test/assembly/asm/riscv-types.rs index 68dc186ea0c76..f18ba294d0cff 100644 --- a/src/test/assembly/asm/riscv-types.rs +++ b/src/test/assembly/asm/riscv-types.rs @@ -6,7 +6,7 @@ //[riscv32] needs-llvm-components: riscv // compile-flags: -C target-feature=+d -#![feature(no_core, lang_items, rustc_attrs, asm_sym)] +#![feature(no_core, lang_items, rustc_attrs)] #![crate_type = "rlib"] #![no_core] #![allow(asm_sub_register)] diff --git a/src/test/assembly/asm/s390x-types.rs b/src/test/assembly/asm/s390x-types.rs index 6a12902a0461f..2fb404dd9b280 100644 --- a/src/test/assembly/asm/s390x-types.rs +++ b/src/test/assembly/asm/s390x-types.rs @@ -3,7 +3,7 @@ //[s390x] compile-flags: --target s390x-unknown-linux-gnu //[s390x] needs-llvm-components: systemz -#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_sym, asm_experimental_arch)] +#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)] #![crate_type = "rlib"] #![no_core] #![allow(asm_sub_register, non_camel_case_types)] diff --git a/src/test/assembly/asm/wasm-types.rs b/src/test/assembly/asm/wasm-types.rs index 3aa128c46ac01..3b1ac1b455ad8 100644 --- a/src/test/assembly/asm/wasm-types.rs +++ b/src/test/assembly/asm/wasm-types.rs @@ -3,7 +3,7 @@ // compile-flags: --crate-type cdylib // needs-llvm-components: webassembly -#![feature(no_core, lang_items, rustc_attrs, asm_sym, asm_experimental_arch)] +#![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)] #![no_core] #[rustc_builtin_macro] diff --git a/src/test/assembly/asm/x86-types.rs b/src/test/assembly/asm/x86-types.rs index e871535cfdeef..81be79cbaac18 100644 --- a/src/test/assembly/asm/x86-types.rs +++ b/src/test/assembly/asm/x86-types.rs @@ -7,7 +7,7 @@ // compile-flags: -C llvm-args=--x86-asm-syntax=intel // compile-flags: -C target-feature=+avx512bw -#![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_sym)] +#![feature(no_core, lang_items, rustc_attrs, repr_simd)] #![crate_type = "rlib"] #![no_core] #![allow(asm_sub_register, non_camel_case_types)] diff --git a/src/test/ui/abi/abi-sysv64-register-usage.rs b/src/test/ui/abi/abi-sysv64-register-usage.rs index 9404e71d0fe24..39330693677eb 100644 --- a/src/test/ui/abi/abi-sysv64-register-usage.rs +++ b/src/test/ui/abi/abi-sysv64-register-usage.rs @@ -6,20 +6,30 @@ // ignore-arm // ignore-aarch64 // needs-asm-support -#![feature(asm_sym)] #[cfg(target_arch = "x86_64")] -pub extern "sysv64" fn all_the_registers(rdi: i64, rsi: i64, rdx: i64, - rcx: i64, r8 : i64, r9 : i64, - xmm0: f32, xmm1: f32, xmm2: f32, - xmm3: f32, xmm4: f32, xmm5: f32, - xmm6: f32, xmm7: f32) -> i64 { +pub extern "sysv64" fn all_the_registers( + rdi: i64, + rsi: i64, + rdx: i64, + rcx: i64, + r8: i64, + r9: i64, + xmm0: f32, + xmm1: f32, + xmm2: f32, + xmm3: f32, + xmm4: f32, + xmm5: f32, + xmm6: f32, + xmm7: f32, +) -> i64 { assert_eq!(rdi, 1); assert_eq!(rsi, 2); assert_eq!(rdx, 3); assert_eq!(rcx, 4); - assert_eq!(r8, 5); - assert_eq!(r9, 6); + assert_eq!(r8, 5); + assert_eq!(r9, 6); assert_eq!(xmm0, 1.0f32); assert_eq!(xmm1, 2.0f32); assert_eq!(xmm2, 4.0f32); diff --git a/src/test/ui/asm/aarch64/bad-reg.rs b/src/test/ui/asm/aarch64/bad-reg.rs index 2b6a9b71cd506..9ccb8ed676269 100644 --- a/src/test/ui/asm/aarch64/bad-reg.rs +++ b/src/test/ui/asm/aarch64/bad-reg.rs @@ -1,7 +1,7 @@ // only-aarch64 // compile-flags: -C target-feature=+neon -#![feature(asm_const, asm_sym)] +#![feature(asm_const)] use std::arch::asm; diff --git a/src/test/ui/asm/aarch64/may_unwind.rs b/src/test/ui/asm/aarch64/may_unwind.rs index dfd891b4212d5..6af8728bbaa96 100644 --- a/src/test/ui/asm/aarch64/may_unwind.rs +++ b/src/test/ui/asm/aarch64/may_unwind.rs @@ -2,7 +2,7 @@ // run-pass // needs-asm-support -#![feature(asm_sym, asm_unwind)] +#![feature(asm_unwind)] use std::arch::asm; use std::panic::{catch_unwind, resume_unwind, AssertUnwindSafe}; diff --git a/src/test/ui/asm/aarch64/sym.rs b/src/test/ui/asm/aarch64/sym.rs index 3f659363cc848..6a6cdb00d5173 100644 --- a/src/test/ui/asm/aarch64/sym.rs +++ b/src/test/ui/asm/aarch64/sym.rs @@ -3,7 +3,7 @@ // needs-asm-support // run-pass -#![feature(thread_local, asm_sym)] +#![feature(thread_local)] use std::arch::asm; diff --git a/src/test/ui/asm/aarch64/type-check-2-2.rs b/src/test/ui/asm/aarch64/type-check-2-2.rs index aa12d4aa4b40c..0ce1f1d8f7f4a 100644 --- a/src/test/ui/asm/aarch64/type-check-2-2.rs +++ b/src/test/ui/asm/aarch64/type-check-2-2.rs @@ -1,6 +1,6 @@ // only-aarch64 -#![feature(repr_simd, never_type, asm_sym)] +#![feature(repr_simd, never_type)] use std::arch::{asm, global_asm}; diff --git a/src/test/ui/asm/aarch64/type-check-2.rs b/src/test/ui/asm/aarch64/type-check-2.rs index fdafe63c7b07b..1c71c1185d465 100644 --- a/src/test/ui/asm/aarch64/type-check-2.rs +++ b/src/test/ui/asm/aarch64/type-check-2.rs @@ -1,6 +1,6 @@ // only-aarch64 -#![feature(repr_simd, never_type, asm_sym)] +#![feature(repr_simd, never_type)] use std::arch::{asm, global_asm}; diff --git a/src/test/ui/asm/generic-const.rs b/src/test/ui/asm/generic-const.rs index 55c5587804b32..caa9b7dbce6a8 100644 --- a/src/test/ui/asm/generic-const.rs +++ b/src/test/ui/asm/generic-const.rs @@ -1,7 +1,7 @@ // needs-asm-support // build-pass -#![feature(asm_const, asm_sym)] +#![feature(asm_const)] use std::arch::asm; diff --git a/src/test/ui/asm/naked-functions.rs b/src/test/ui/asm/naked-functions.rs index 9e626f5711db4..2f3716ca77f65 100644 --- a/src/test/ui/asm/naked-functions.rs +++ b/src/test/ui/asm/naked-functions.rs @@ -4,7 +4,7 @@ // ignore-wasm32 #![feature(naked_functions)] -#![feature(asm_const, asm_sym, asm_unwind)] +#![feature(asm_const, asm_unwind)] #![crate_type = "lib"] use std::arch::asm; diff --git a/src/test/ui/asm/type-check-1.rs b/src/test/ui/asm/type-check-1.rs index 50b369ae04527..59f7b36afcd89 100644 --- a/src/test/ui/asm/type-check-1.rs +++ b/src/test/ui/asm/type-check-1.rs @@ -3,7 +3,7 @@ // ignore-spirv // ignore-wasm32 -#![feature(asm_const, asm_sym)] +#![feature(asm_const)] use std::arch::{asm, global_asm}; diff --git a/src/test/ui/asm/x86_64/bad-reg.rs b/src/test/ui/asm/x86_64/bad-reg.rs index a4f50a534a158..f5728079a6a56 100644 --- a/src/test/ui/asm/x86_64/bad-reg.rs +++ b/src/test/ui/asm/x86_64/bad-reg.rs @@ -1,7 +1,7 @@ // only-x86_64 // compile-flags: -C target-feature=+avx2 -#![feature(asm_const, asm_sym)] +#![feature(asm_const)] use std::arch::asm; diff --git a/src/test/ui/asm/x86_64/issue-96797.rs b/src/test/ui/asm/x86_64/issue-96797.rs index d3e0906f37aff..954f8c5ccc33d 100644 --- a/src/test/ui/asm/x86_64/issue-96797.rs +++ b/src/test/ui/asm/x86_64/issue-96797.rs @@ -7,8 +7,6 @@ // regression test for #96797 -#![feature(asm_sym)] - use std::arch::global_asm; #[no_mangle] diff --git a/src/test/ui/asm/x86_64/may_unwind.rs b/src/test/ui/asm/x86_64/may_unwind.rs index 2f5d1a360246a..c11f0938d0b6c 100644 --- a/src/test/ui/asm/x86_64/may_unwind.rs +++ b/src/test/ui/asm/x86_64/may_unwind.rs @@ -3,7 +3,7 @@ // needs-asm-support // needs-unwind -#![feature(asm_sym, asm_unwind)] +#![feature(asm_unwind)] use std::arch::asm; use std::panic::{catch_unwind, resume_unwind, AssertUnwindSafe}; diff --git a/src/test/ui/asm/x86_64/multiple-clobber-abi.rs b/src/test/ui/asm/x86_64/multiple-clobber-abi.rs index 513eb270e4f36..06589431a445f 100644 --- a/src/test/ui/asm/x86_64/multiple-clobber-abi.rs +++ b/src/test/ui/asm/x86_64/multiple-clobber-abi.rs @@ -4,8 +4,6 @@ // Checks that multiple clobber_abi options can be used -#![feature(asm_sym)] - use std::arch::asm; extern "sysv64" fn foo(x: i32) -> i32 { diff --git a/src/test/ui/asm/x86_64/sym.rs b/src/test/ui/asm/x86_64/sym.rs index 447e11e6eabca..93ef4f090622e 100644 --- a/src/test/ui/asm/x86_64/sym.rs +++ b/src/test/ui/asm/x86_64/sym.rs @@ -3,7 +3,7 @@ // needs-asm-support // run-pass -#![feature(thread_local, asm_sym)] +#![feature(thread_local)] use std::arch::asm; diff --git a/src/test/ui/asm/x86_64/type-check-2.rs b/src/test/ui/asm/x86_64/type-check-2.rs index 59d8cde3fb6c7..80b29ec870fc1 100644 --- a/src/test/ui/asm/x86_64/type-check-2.rs +++ b/src/test/ui/asm/x86_64/type-check-2.rs @@ -1,6 +1,6 @@ // only-x86_64 -#![feature(repr_simd, never_type, asm_sym)] +#![feature(repr_simd, never_type)] use std::arch::{asm, global_asm}; diff --git a/src/test/ui/asm/x86_64/type-check-4.rs b/src/test/ui/asm/x86_64/type-check-4.rs index da3b76c3d23a6..3d5d3807c530e 100644 --- a/src/test/ui/asm/x86_64/type-check-4.rs +++ b/src/test/ui/asm/x86_64/type-check-4.rs @@ -1,14 +1,13 @@ // only-x86_64 // compile-flags: -C target-feature=+avx512f -#![feature(asm_const, asm_sym)] +#![feature(asm_const)] use std::arch::{asm, global_asm}; use std::arch::x86_64::{_mm256_setzero_ps, _mm_setzero_ps}; -fn main() { -} +fn main() {} // Constants must be... constant diff --git a/src/test/ui/asm/x86_64/type-check-4.stderr b/src/test/ui/asm/x86_64/type-check-4.stderr index 33f4638fb4b37..3875bcc211252 100644 --- a/src/test/ui/asm/x86_64/type-check-4.stderr +++ b/src/test/ui/asm/x86_64/type-check-4.stderr @@ -1,5 +1,5 @@ error[E0013]: constants cannot refer to statics - --> $DIR/type-check-4.rs:22:25 + --> $DIR/type-check-4.rs:21:25 | LL | global_asm!("{}", const S); | ^ @@ -7,7 +7,7 @@ LL | global_asm!("{}", const S); = help: consider extracting the value of the `static` to a `const`, and referring to that error[E0013]: constants cannot refer to statics - --> $DIR/type-check-4.rs:25:35 + --> $DIR/type-check-4.rs:24:35 | LL | global_asm!("{}", const const_foo(S)); | ^ @@ -15,7 +15,7 @@ LL | global_asm!("{}", const const_foo(S)); = help: consider extracting the value of the `static` to a `const`, and referring to that error[E0013]: constants cannot refer to statics - --> $DIR/type-check-4.rs:28:35 + --> $DIR/type-check-4.rs:27:35 | LL | global_asm!("{}", const const_bar(S)); | ^ diff --git a/src/test/ui/asm/x86_64/type-check-5.rs b/src/test/ui/asm/x86_64/type-check-5.rs index 6190e0b52f4e9..8198df91095f9 100644 --- a/src/test/ui/asm/x86_64/type-check-5.rs +++ b/src/test/ui/asm/x86_64/type-check-5.rs @@ -1,6 +1,6 @@ // only-x86_64 -#![feature(repr_simd, never_type, asm_sym)] +#![feature(repr_simd, never_type)] use std::arch::asm; diff --git a/src/test/ui/feature-gates/feature-gate-asm_sym.rs b/src/test/ui/feature-gates/feature-gate-asm_sym.rs deleted file mode 100644 index 0de6b3abb18bb..0000000000000 --- a/src/test/ui/feature-gates/feature-gate-asm_sym.rs +++ /dev/null @@ -1,19 +0,0 @@ -// only-x86_64 - -use std::arch::asm; - -fn bar() {} - -fn foo() { - unsafe { - asm!("mov eax, {}", sym bar::); - //~^ ERROR sym operands for inline assembly are unstable - } -} - -fn main() { - unsafe { - asm!("mov eax, {}", sym foo::<0>); - //~^ ERROR sym operands for inline assembly are unstable - } -} diff --git a/src/test/ui/feature-gates/feature-gate-asm_sym.stderr b/src/test/ui/feature-gates/feature-gate-asm_sym.stderr deleted file mode 100644 index d4b16f60b0b41..0000000000000 --- a/src/test/ui/feature-gates/feature-gate-asm_sym.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0658]: sym operands for inline assembly are unstable - --> $DIR/feature-gate-asm_sym.rs:9:29 - | -LL | asm!("mov eax, {}", sym bar::); - | ^^^^^^^^^^^^ - | - = note: see issue #93333 for more information - = help: add `#![feature(asm_sym)]` to the crate attributes to enable - -error[E0658]: sym operands for inline assembly are unstable - --> $DIR/feature-gate-asm_sym.rs:16:29 - | -LL | asm!("mov eax, {}", sym foo::<0>); - | ^^^^^^^^^^^^ - | - = note: see issue #93333 for more information - = help: add `#![feature(asm_sym)]` to the crate attributes to enable - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`.