From 4fb48af618a815b49c4f72afce0d51b6d76f11f0 Mon Sep 17 00:00:00 2001 From: Sarah Date: Tue, 8 Oct 2024 10:05:55 +0200 Subject: [PATCH] fix asm macros for rust nightly --- proxygen-macros/src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/proxygen-macros/src/lib.rs b/proxygen-macros/src/lib.rs index ff2cd3c..c434137 100644 --- a/proxygen-macros/src/lib.rs +++ b/proxygen-macros/src/lib.rs @@ -112,7 +112,7 @@ pub fn forward(_attr_input: TokenStream, item: TokenStream) -> TokenStream { pub unsafe extern "C" fn #func_name() { #[cfg(target_arch = "x86_64")] { - std::arch::asm!( + std::arch::naked_asm!( "call {wait_dll_proxy_init}", "mov rax, qword ptr [rip + {ORIG_FUNCS_PTR}]", "add rax, {orig_index} * 8", @@ -122,13 +122,12 @@ pub fn forward(_attr_input: TokenStream, item: TokenStream) -> TokenStream { wait_dll_proxy_init = sym crate::wait_dll_proxy_init, ORIG_FUNCS_PTR = sym crate::ORIG_FUNCS_PTR, orig_index = const #orig_index_ident, - options(noreturn) ) } #[cfg(target_arch = "x86")] { - std::arch::asm!( + std::arch::naked_asm!( "call {wait_dll_proxy_init}", "mov eax, dword ptr [{ORIG_FUNCS_PTR}]", "add eax, {orig_index} * 4", @@ -138,7 +137,6 @@ pub fn forward(_attr_input: TokenStream, item: TokenStream) -> TokenStream { wait_dll_proxy_init = sym crate::wait_dll_proxy_init, ORIG_FUNCS_PTR = sym crate::ORIG_FUNCS_PTR, orig_index = const #orig_index_ident, - options(noreturn) ) } }