From 1678e1a3ac203a6d72424c71be1edd4187af6a6e Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Thu, 10 Sep 2015 15:15:19 -0400 Subject: [PATCH] capture_context_mac (32-bit x86): Comments and code should agree more MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It looks like I wrote the x86_64 version first and didn’t adapt everything perfectly when transitioning to 32-bit x86. This shouldn’t affect anything functionally. R=rsesek@chromium.org Review URL: https://codereview.chromium.org/1332913002 . --- client/capture_context_mac.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/capture_context_mac.S b/client/capture_context_mac.S index 2e845bcc..942d8413 100644 --- a/client/capture_context_mac.S +++ b/client/capture_context_mac.S @@ -39,11 +39,11 @@ CAPTURECONTEXT_SYMBOL: // does not call out to any other. // pushfl first, because some instructions (but probably none used here) - // affect %eflags. %eflags will be in -4(%rbp). + // affect %eflags. %eflags will be in -4(%ebp). pushfl // Save the original value of %eax, and use %eax to hold the x86_thread_state* - // argument. The original value of %eax will be in -8(%rbp). + // argument. The original value of %eax will be in -8(%ebp). pushl %eax movl 8(%ebp), %eax @@ -107,6 +107,7 @@ CAPTURECONTEXT_SYMBOL: // Clean up by restoring clobbered registers, even those considered volatile // by the ABI, so that the captured context represents the state at this // function’s exit. + movl 20(%eax), %edx // x86_thread_state->uts.ts32.__edx popl %eax popfl