Paolo Bonzini<bonzini@gnu.org> writes:
movl 4(%ebp), %eax # Increment return address
inc %eax
movl %eax, -8(%ebp) # Store it in an unused slot
movl -4(%ebp), %eax # Restore 3rd register
call *-8(%ebp) # Call our caller via slot
Also, would it make sense to reserve 3 bytes for the ret, so that
stdcall functions could have split stack? Alternatively, you need to
disable split stack (with a sorry) for stdcall functions.
stdcall functions don't work yet, but this isn't why. The ret we're
skipping here is just magic inserted to make the call/return predictor
line up. It's really the split_stack_return insn, not a regular
return. The actual stack popping ret is at the end of the function as
usual.