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?)
This commit is contained in:
Leon Loopik
2016-08-04 00:19:12 +02:00
committed by Philipp Oppermann
parent 5e6a8cb69b
commit ca925c49e0

View File

@@ -509,7 +509,7 @@ macro_rules! handler_with_error_code {
call $0" call $0"
:: "i"($name as extern "C" fn( :: "i"($name as extern "C" fn(
*const ExceptionStackFrame, u64) -> !) *const ExceptionStackFrame, u64) -> !)
: "rdi" : "intel"); : "rdi,rsi" : "intel");
::core::intrinsics::unreachable(); ::core::intrinsics::unreachable();
} }
} }