Fixes math with register offsets (#1314)

This commit is contained in:
WilliamParks 2023-06-15 15:53:22 -04:00 committed by GitHub
parent c66c3ff2b8
commit dec202e6d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2416,7 +2416,7 @@ impl AsanRuntime {
} }
X86Register::Rdi => { X86Register::Rdi => {
// In this case rdi is already clobbered, so we want it from the stack (we pushed rdi onto stack before!) // In this case rdi is already clobbered, so we want it from the stack (we pushed rdi onto stack before!)
writer.put_mov_reg_reg_offset_ptr(X86Register::Rsi, X86Register::Rsp, -0x28); writer.put_mov_reg_reg_offset_ptr(X86Register::Rsi, X86Register::Rsp, 0x20);
} }
X86Register::Rsp => { X86Register::Rsp => {
// In this case rsp is also clobbered // In this case rsp is also clobbered