1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #error COOP_MULTITASKING does not currently support x86_64
11 * stack layout after pushad:
13 * | save stack | <-- esp + 0x28
15 * | new stack | <-- esp + 0x24
17 * | ret addr | <-- esp + 0x20
19 * | eax | <-- esp + 0x1c
21 * | ecx | <-- esp + 0x18
23 * | edx | <-- esp + 0x14
25 * | ebx | <-- esp + 0x10
27 * | orig esp | <-- esp + 0x0c
29 * | ebp | <-- esp + 0x08
31 * | esi | <-- esp + 0x04
33 * | edi | <-- esp + 0x00
36 .globl switch_to_thread
39 /* Save the current stack */
42 /* Switch to the new stack. */