Skip to content

Commit

Permalink
🐛 remove naked function feature to fix nightly build (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong-Huang committed Sep 4, 2020
1 parent 188f42b commit 5bb439a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/detail/x86_64_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ mod asm_impl {
);
}

#[naked]
#[inline(never)]
pub unsafe extern "C" fn bootstrap_green_task() {
llvm_asm!(
Expand All @@ -42,7 +41,6 @@ mod asm_impl {
);
}

#[naked]
#[inline(never)]
pub unsafe extern "C" fn swap_registers(out_regs: *mut Registers, in_regs: *const Registers) {
// The first argument is in %rdi, and the second one is in %rsi
Expand All @@ -55,7 +53,7 @@ mod asm_impl {
);

// introduce this function to workaround rustc bug! (#6)
#[naked]
#[inline(never)]
unsafe extern "C" fn _swap_reg() {
// Save registers
llvm_asm!(
Expand Down
4 changes: 1 addition & 3 deletions src/detail/x86_64_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ mod asm_impl {
);
}

#[naked]
#[inline(never)]
pub unsafe extern "C" fn bootstrap_green_task() {
llvm_asm!(
Expand All @@ -48,7 +47,6 @@ mod asm_impl {
);
}

#[naked]
#[inline(never)]
pub unsafe extern "C" fn swap_registers(out_regs: *mut Registers, in_regs: *const Registers) {
// The first argument is in %rcx, and the second one is in %rdx
Expand All @@ -61,7 +59,7 @@ mod asm_impl {
);

// introduce this function to workaround rustc bug! (#6)
#[naked]
#[inline(never)]
unsafe extern "C" fn _swap_reg() {
// Save registers
llvm_asm!(
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#![cfg_attr(nightly, feature(llvm_asm))]
#![cfg_attr(nightly, feature(repr_simd))]
#![cfg_attr(nightly, feature(core_intrinsics))]
#![cfg_attr(nightly, feature(naked_functions))]
#![cfg_attr(nightly, feature(thread_local))]
#![cfg_attr(test, deny(warnings))]
#![deny(missing_docs)]
Expand Down

0 comments on commit 5bb439a

Please sign in to comment.