mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 22:40:05 +00:00
hurd: Use uintptr_t for register values in trampoline.c
This is more correct, if only because these fields are defined as having the type unsigned int in the Mach headers, so casting them to a signed int and then back is suboptimal. Also, remove an extra reassignment of uesp -- this is another remnant of the ecx kludge. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230319151017.531737-16-bugaevc@gmail.com>
This commit is contained in:
parent
b43cb67457
commit
a1fbae7527
@ -270,24 +270,23 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
|
||||
|
||||
_hurdsig_end_catch_fault ();
|
||||
|
||||
state->basic.eip = (int) rpc_wait_trampoline;
|
||||
state->basic.eip = (uintptr_t) rpc_wait_trampoline;
|
||||
/* The reply-receiving trampoline code runs initially on the original
|
||||
user stack. We pass it the signal stack pointer in %ebx. */
|
||||
state->basic.uesp = state->basic.esp; /* Restore mach_msg syscall SP. */
|
||||
state->basic.ebx = (int) sigsp;
|
||||
state->basic.ebx = (uintptr_t) sigsp;
|
||||
/* After doing the message receive, the trampoline code will need to
|
||||
update the %eax value to be restored by sigreturn. To simplify
|
||||
the assembly code, we pass the address of its slot in SCP to the
|
||||
trampoline code in %ecx. */
|
||||
state->basic.ecx = (int) &scp->sc_eax;
|
||||
state->basic.ecx = (uintptr_t) &scp->sc_eax;
|
||||
}
|
||||
else
|
||||
{
|
||||
state->basic.eip = (int) trampoline;
|
||||
state->basic.uesp = (int) sigsp;
|
||||
state->basic.eip = (uintptr_t) trampoline;
|
||||
state->basic.uesp = (uintptr_t) sigsp;
|
||||
}
|
||||
/* We pass the handler function to the trampoline code in %edx. */
|
||||
state->basic.edx = (int) handler;
|
||||
state->basic.edx = (uintptr_t) handler;
|
||||
|
||||
/* The x86 ABI says the DF bit is clear on entry to any function. */
|
||||
state->basic.efl &= ~EFL_DF;
|
||||
|
Loading…
Reference in New Issue
Block a user