From 093ec70b1e4da3d814a137f5aea6f4ff75ad3399 Mon Sep 17 00:00:00 2001 From: roblabla Date: Thu, 24 Oct 2019 15:29:29 +0000 Subject: Add new EFIAPI ABI Adds a new ABI for the EFIAPI calls. This ABI should reflect the latest version of the UEFI specification at the time of commit (UEFI spec 2.8, URL below). The specification says that for x86_64, we should follow the win64 ABI, while on all other supported platforms (ia32, itanium, arm, arm64 and risc-v), we should follow the C ABI. To simplify the implementation, we will simply follow the C ABI on all platforms except x86_64, even those technically unsupported by the UEFI specification. https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf --- src/libsyntax/feature_gate/active.rs | 3 +++ src/libsyntax/feature_gate/check.rs | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'src/libsyntax') diff --git a/src/libsyntax/feature_gate/active.rs b/src/libsyntax/feature_gate/active.rs index 1386eac48da..5ca2695fe35 100644 --- a/src/libsyntax/feature_gate/active.rs +++ b/src/libsyntax/feature_gate/active.rs @@ -531,6 +531,9 @@ declare_features! ( /// Non-object safe trait objects safe to use but cannot be created in safe rust (active, object_safe_for_dispatch, "1.40.0", Some(43561), None), + /// Allows using the `efiapi` ABI. + (active, abi_efiapi, "1.40.0", Some(1), None), + // ------------------------------------------------------------------------- // feature-group-end: actual feature gates // ------------------------------------------------------------------------- diff --git a/src/libsyntax/feature_gate/check.rs b/src/libsyntax/feature_gate/check.rs index 172511f0f09..e68675a9b8e 100644 --- a/src/libsyntax/feature_gate/check.rs +++ b/src/libsyntax/feature_gate/check.rs @@ -234,6 +234,10 @@ impl<'a> PostExpansionVisitor<'a> { gate_feature_post!(&self, abi_amdgpu_kernel, span, "amdgpu-kernel ABI is experimental and subject to change"); }, + Abi::EfiApi => { + gate_feature_post!(&self, abi_efiapi, span, + "efiapi ABI is experimental and subject to change"); + }, // Stable Abi::Cdecl | Abi::Stdcall | -- cgit 1.4.1-3-g733a5 From e54ae5126c669853465178c98745e23a5d87d0a9 Mon Sep 17 00:00:00 2001 From: roblabla Date: Fri, 25 Oct 2019 15:08:28 +0000 Subject: Add proper tracking issue for EFIAPI --- src/libsyntax/feature_gate/active.rs | 2 +- src/test/ui/feature-gates/feature-gate-abi.stderr | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/feature_gate/active.rs b/src/libsyntax/feature_gate/active.rs index 5ca2695fe35..586b1b42fcd 100644 --- a/src/libsyntax/feature_gate/active.rs +++ b/src/libsyntax/feature_gate/active.rs @@ -532,7 +532,7 @@ declare_features! ( (active, object_safe_for_dispatch, "1.40.0", Some(43561), None), /// Allows using the `efiapi` ABI. - (active, abi_efiapi, "1.40.0", Some(1), None), + (active, abi_efiapi, "1.40.0", Some(65815), None), // ------------------------------------------------------------------------- // feature-group-end: actual feature gates diff --git a/src/test/ui/feature-gates/feature-gate-abi.stderr b/src/test/ui/feature-gates/feature-gate-abi.stderr index 22b6ee4cd15..0f2622f1065 100644 --- a/src/test/ui/feature-gates/feature-gate-abi.stderr +++ b/src/test/ui/feature-gates/feature-gate-abi.stderr @@ -82,7 +82,7 @@ error[E0658]: efiapi ABI is experimental and subject to change LL | extern "efiapi" fn f10() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: for more information, see https://github.com/rust-lang/rust/issues/1 + = note: for more information, see https://github.com/rust-lang/rust/issues/65815 = help: add `#![feature(abi_efiapi)]` to the crate attributes to enable error[E0658]: intrinsics are subject to change @@ -169,7 +169,7 @@ error[E0658]: efiapi ABI is experimental and subject to change LL | extern "efiapi" fn m10(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: for more information, see https://github.com/rust-lang/rust/issues/1 + = note: for more information, see https://github.com/rust-lang/rust/issues/65815 = help: add `#![feature(abi_efiapi)]` to the crate attributes to enable error[E0658]: vectorcall is experimental and subject to change @@ -239,7 +239,7 @@ error[E0658]: efiapi ABI is experimental and subject to change LL | extern "efiapi" fn dm10() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: for more information, see https://github.com/rust-lang/rust/issues/1 + = note: for more information, see https://github.com/rust-lang/rust/issues/65815 = help: add `#![feature(abi_efiapi)]` to the crate attributes to enable error[E0658]: intrinsics are subject to change @@ -326,7 +326,7 @@ error[E0658]: efiapi ABI is experimental and subject to change LL | extern "efiapi" fn m10() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: for more information, see https://github.com/rust-lang/rust/issues/1 + = note: for more information, see https://github.com/rust-lang/rust/issues/65815 = help: add `#![feature(abi_efiapi)]` to the crate attributes to enable error[E0658]: intrinsics are subject to change @@ -413,7 +413,7 @@ error[E0658]: efiapi ABI is experimental and subject to change LL | extern "efiapi" fn im10() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: for more information, see https://github.com/rust-lang/rust/issues/1 + = note: for more information, see https://github.com/rust-lang/rust/issues/65815 = help: add `#![feature(abi_efiapi)]` to the crate attributes to enable error[E0658]: intrinsics are subject to change @@ -500,7 +500,7 @@ error[E0658]: efiapi ABI is experimental and subject to change LL | type A10 = extern "efiapi" fn(); | ^^^^^^^^^^^^^^^^^^^^ | - = note: for more information, see https://github.com/rust-lang/rust/issues/1 + = note: for more information, see https://github.com/rust-lang/rust/issues/65815 = help: add `#![feature(abi_efiapi)]` to the crate attributes to enable error[E0658]: intrinsics are subject to change @@ -587,7 +587,7 @@ error[E0658]: efiapi ABI is experimental and subject to change LL | extern "efiapi" {} | ^^^^^^^^^^^^^^^^^^ | - = note: for more information, see https://github.com/rust-lang/rust/issues/1 + = note: for more information, see https://github.com/rust-lang/rust/issues/65815 = help: add `#![feature(abi_efiapi)]` to the crate attributes to enable error: intrinsic must be in `extern "rust-intrinsic" { ... }` block -- cgit 1.4.1-3-g733a5 From b925eb5f42a70a481ae75495c25818c1cc4cea46 Mon Sep 17 00:00:00 2001 From: varkor Date: Mon, 14 Oct 2019 00:37:55 +0100 Subject: Update bitflags --- Cargo.lock | 4 ++-- src/librustc/Cargo.toml | 2 +- src/librustc_apfloat/Cargo.toml | 2 +- src/librustc_codegen_ssa/Cargo.toml | 2 +- src/librustc_resolve/Cargo.toml | 2 +- src/librustc_target/Cargo.toml | 2 +- src/libsyntax/Cargo.toml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libsyntax') diff --git a/Cargo.lock b/Cargo.lock index fbac2c7879d..eabbb51545c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -150,9 +150,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "blake2-rfc" diff --git a/src/librustc/Cargo.toml b/src/librustc/Cargo.toml index 93274ef0c92..5b59924c353 100644 --- a/src/librustc/Cargo.toml +++ b/src/librustc/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] arena = { path = "../libarena" } -bitflags = "1.0" +bitflags = "1.2.1" fmt_macros = { path = "../libfmt_macros" } graphviz = { path = "../libgraphviz" } jobserver = "0.1" diff --git a/src/librustc_apfloat/Cargo.toml b/src/librustc_apfloat/Cargo.toml index af6c2feed00..4fc15f99e48 100644 --- a/src/librustc_apfloat/Cargo.toml +++ b/src/librustc_apfloat/Cargo.toml @@ -9,5 +9,5 @@ name = "rustc_apfloat" path = "lib.rs" [dependencies] -bitflags = "1.0" +bitflags = "1.2.1" smallvec = { version = "0.6.7", features = ["union", "may_dangle"] } diff --git a/src/librustc_codegen_ssa/Cargo.toml b/src/librustc_codegen_ssa/Cargo.toml index 6992f93d999..051b1e25234 100644 --- a/src/librustc_codegen_ssa/Cargo.toml +++ b/src/librustc_codegen_ssa/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" test = false [dependencies] -bitflags = "1.0.4" +bitflags = "1.2.1" cc = "1.0.1" num_cpus = "1.0" memmap = "0.6" diff --git a/src/librustc_resolve/Cargo.toml b/src/librustc_resolve/Cargo.toml index 06bf3085989..08ce7fd520e 100644 --- a/src/librustc_resolve/Cargo.toml +++ b/src/librustc_resolve/Cargo.toml @@ -11,7 +11,7 @@ test = false doctest = false [dependencies] -bitflags = "1.0" +bitflags = "1.2.1" log = "0.4" syntax = { path = "../libsyntax" } syntax_expand = { path = "../libsyntax_expand" } diff --git a/src/librustc_target/Cargo.toml b/src/librustc_target/Cargo.toml index fba2ea02bb4..c73d0adea38 100644 --- a/src/librustc_target/Cargo.toml +++ b/src/librustc_target/Cargo.toml @@ -9,7 +9,7 @@ name = "rustc_target" path = "lib.rs" [dependencies] -bitflags = "1.0" +bitflags = "1.2.1" log = "0.4" rustc_data_structures = { path = "../librustc_data_structures" } rustc_serialize = { path = "../libserialize", package = "serialize" } diff --git a/src/libsyntax/Cargo.toml b/src/libsyntax/Cargo.toml index d8de21cc677..3ce47e6a7b8 100644 --- a/src/libsyntax/Cargo.toml +++ b/src/libsyntax/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" doctest = false [dependencies] -bitflags = "1.0" +bitflags = "1.2.1" rustc_serialize = { path = "../libserialize", package = "serialize" } log = "0.4" scoped-tls = "1.0" -- cgit 1.4.1-3-g733a5