2 Copyright © 1995-2018, The AROS Development Team. All rights reserved.
5 Desc: CPU-specific definitions.
11 #include <aros/i386/cpucontext.h>
15 /* We use native context format, no conversion needed */
16 #define regs_t struct ExceptionContext
17 /* There are no private add-ons */
18 #define AROSCPUContext ExceptionContext
20 /* We have no VBlank emulation */
23 /* User/supervisor mode switching - not used */
24 #define cpumode_t __unused char
30 /* A command to issue a syscall */
31 #define krnSysCall(num) asm volatile("int $0xfe"::"a"(num):"memory")
33 #define IN_USER_MODE \
35 __asm__ __volatile__ ("mov %%cs,%%ax":"=a"(__value)); \
38 #define PRINT_CPUCONTEXT(regs) \
40 bug("[Kernel] Flags=0x%08X\n", regs->Flags); \
41 bug("[Kernel] stack=%04x:%08x eflags=%08x eip=%04x:%08x ds=0x%04X\n", \
42 regs->ss, regs->esp, regs->eflags, regs->cs, regs->eip, regs->ds); \
43 bug("[Kernel] eax=%08x ebx=%08x ecx=%08x edx=%08x\n", regs->eax, regs->ebx, regs->ecx, regs->edx); \
44 bug("[Kernel] esi=%08x edi=%08x ebp=%08x esp=%08x\n", regs->esi, regs->edi, regs->ebp, regs->esp); \
47 #define SP(regs) regs->esp