-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new EFIAPI ABI #65809
Add new EFIAPI ABI #65809
Changes from 1 commit
093ec70
6173280
13d27af
e54ae51
174d4f9
1099826
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please file a real tracking issue instead of directing people to #1 |
||
|
||
// ------------------------------------------------------------------------- | ||
// feature-group-end: actual feature gates | ||
// ------------------------------------------------------------------------- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Checks if the correct annotation for the efiapi ABI is passed to llvm. | ||
|
||
// compile-flags: -C no-prepopulate-passes | ||
|
||
#![crate_type = "lib"] | ||
#![feature(abi_efiapi)] | ||
|
||
// CHECK: define win64 i64 @has_efiapi | ||
#[no_mangle] | ||
#[cfg(target_arch = "x86_64")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than using |
||
pub extern "efiapi" fn has_efiapi(a: i64) -> i64 { | ||
a * 2 | ||
} | ||
|
||
// CHECK: define c i64 @has_efiapi | ||
#[no_mangle] | ||
#[cfg(not(target_arch = "x86_64"))] | ||
pub extern "efiapi" fn has_efiapi(a: i64) -> i64 { | ||
a * 2 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is inverted, isn’t it?