capture_context_mac (32-bit x86): Comments and code should agree more

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 .
This commit is contained in:
Mark Mentovai 2015-09-10 15:15:19 -04:00
parent d7f90b45b6
commit 1678e1a3ac

View File

@ -39,11 +39,11 @@ CAPTURECONTEXT_SYMBOL:
// does not call out to any other. // does not call out to any other.
// pushfl first, because some instructions (but probably none used here) // 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 pushfl
// Save the original value of %eax, and use %eax to hold the x86_thread_state* // 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 pushl %eax
movl 8(%ebp), %eax movl 8(%ebp), %eax
@ -107,6 +107,7 @@ CAPTURECONTEXT_SYMBOL:
// Clean up by restoring clobbered registers, even those considered volatile // Clean up by restoring clobbered registers, even those considered volatile
// by the ABI, so that the captured context represents the state at this // by the ABI, so that the captured context represents the state at this
// functions exit. // functions exit.
movl 20(%eax), %edx // x86_thread_state->uts.ts32.__edx
popl %eax popl %eax
popfl popfl