From ca925c49e0c3044f437047fe819d69aec7c05bd9 Mon Sep 17 00:00:00 2001 From: Leon Loopik Date: Thu, 4 Aug 2016 00:19:12 +0200 Subject: [PATCH] Add rsi to the clobber list (#195) In the second macro (handler_with_error_code), we pop the error code into rsi, this means we are changing the value of rsi in the assembly block, so we should add it to the clobbers. I am quite new to this, so please close this request if I am completely wrong. (Side question: An other thing I came across while trying to figure out if this was correct, is that every documentation says you should add curly brackets around register names, can someone tell me why this is not done here?) --- blog/post/2016-08-03-better-exception-messages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/post/2016-08-03-better-exception-messages.md b/blog/post/2016-08-03-better-exception-messages.md index c22a73a8..bc3f537e 100644 --- a/blog/post/2016-08-03-better-exception-messages.md +++ b/blog/post/2016-08-03-better-exception-messages.md @@ -509,7 +509,7 @@ macro_rules! handler_with_error_code { call $0" :: "i"($name as extern "C" fn( *const ExceptionStackFrame, u64) -> !) - : "rdi" : "intel"); + : "rdi,rsi" : "intel"); ::core::intrinsics::unreachable(); } }