Implement i686 RunThread with inline assembly
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in 30s
Builds / ExectOS (i686, release) (push) Successful in 36s
Builds / ExectOS (amd64, release) (push) Successful in 40s
Builds / ExectOS (i686, debug) (push) Successful in 29s

This commit is contained in:
2026-06-16 12:25:26 +02:00
parent 8597e37650
commit 55eb3047e3

View File

@@ -142,8 +142,28 @@ KE::KThread::InitializeThreadContext(IN PKTHREAD Thread,
*
* @since XT 1.0
*/
XTASSEMBLY
XTAPI
VOID
KE::KThread::RunThread(VOID)
{
/* Initialize execution context, adjust runlevel and dispatch the thread */
__asm__ volatile("xorl %%ebx, %%ebx\n"
"xorl %%ebp, %%ebp\n"
"xorl %%edi, %%edi\n"
"xorl %%esi, %%esi\n"
"movl $%c[RunLevel], %%ecx\n"
"call %P[LowerRunLevel]\n"
"movl 0(%%esp), %%esi\n"
"movl 4(%%esp), %%ebx\n"
"movl 8(%%esp), %%edi\n"
"pushl %%esi\n"
"pushl %%ebx\n"
"call *%%edi\n"
"addl $16, %%esp\n"
"ret\n"
:
: [RunLevel] "i" (APC_LEVEL),
[LowerRunLevel] "i" (KE::RunLevel::LowerRunLevel)
: "memory");
}