| 1 | /* |
| 2 | * x86_64 thread support |
| 3 | * |
| 4 | * Copyright (c) 2013 Stacey D. Son |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 7 | */ |
| 8 | #ifndef TARGET_ARCH_THREAD_H |
| 9 | #define TARGET_ARCH_THREAD_H |
| 10 | |
| 11 | /* Compare to vm_machdep.c cpu_set_upcall_kse() */ |
| 12 | static inline void target_thread_set_upcall(CPUX86State *regs, abi_ulong entry, |
| 13 | abi_ulong arg, abi_ulong stack_base, abi_ulong stack_size) |
| 14 | { |
| 15 | /* XXX */ |
| 16 | } |
| 17 | |
| 18 | static inline void target_thread_init(struct target_pt_regs *regs, |
| 19 | struct image_info *infop) |
| 20 | { |
| 21 | regs->rax = 0; |
| 22 | regs->rsp = ((infop->start_stack - 8) & ~0xfUL) + 8; |
| 23 | regs->rip = infop->entry; |
| 24 | regs->rdi = infop->start_stack; |
| 25 | } |
| 26 | |
| 27 | #endif /* TARGET_ARCH_THREAD_H */ |