3 * \brief Arch specific definition of the registers, can be included by anyone.
4 * Definitions only seen in the user.
8 * Copyright (c) 2010, 2012, ETH Zurich.
11 * This file is distributed under the terms in the attached LICENSE file.
12 * If you do not find this file, copies can be found by writing to:
13 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
16 #ifndef TARGET_K1OM_BARRELFISH_REGISTERS_H
17 #define TARGET_K1OM_BARRELFISH_REGISTERS_H
19 #include <target/k1om/barrelfish_kpi/registers_target.h>
20 #include <target/k1om/barrelfish_kpi/cpu_target.h>
21 #include "threads_priv.h"
24 registers_x86_64_set_initial(struct registers_x86_64 *regs, struct thread *thread,
25 lvaddr_t entry, lvaddr_t stack, uint64_t arg1,
26 uint64_t arg2, uint64_t arg3, uint64_t arg4)
28 // XXX: the x86-64 ELF ABI requires that (RSP - 8) be 16-byte aligned. why?!
29 assert((stack % 16) == 0);
30 stack -= sizeof(uintptr_t);
34 regs->eflags = USER_EFLAGS;
35 regs->fs = thread->thread_seg_selector;
44 #endif // TARGET_X86_64_BARRELFISH_REGISTERS_H