mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
bsd-user: FreeBSD update
basic FreeBSD sysarch(2) handling fixed syscall errno return Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
976b2037e5
commit
78cfb07fe0
9 changed files with 462 additions and 31 deletions
|
@ -126,6 +126,9 @@ static inline void init_thread(struct target_pt_regs *regs, struct image_info *i
|
|||
regs->rax = 0;
|
||||
regs->rsp = infop->start_stack;
|
||||
regs->rip = infop->entry;
|
||||
if (bsd_type == target_freebsd) {
|
||||
regs->rdi = infop->start_stack;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -249,8 +252,13 @@ static inline void init_thread(struct target_pt_regs *regs, struct image_info *i
|
|||
#else
|
||||
if (personality(infop->personality) == PER_LINUX32)
|
||||
regs->u_regs[14] = infop->start_stack - 16 * 4;
|
||||
else
|
||||
else {
|
||||
regs->u_regs[14] = infop->start_stack - 16 * 8 - STACK_BIAS;
|
||||
if (bsd_type == target_freebsd) {
|
||||
regs->u_regs[8] = infop->start_stack;
|
||||
regs->u_regs[11] = infop->start_stack;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue