Implement ArGetStackPointer() routine

Tento commit je obsažen v:
2023-11-19 00:09:16 +01:00
rodič 83c692bfcb
revize 71d0608643
4 změnil soubory, kde provedl 50 přidání a 0 odebrání

Zobrazit soubor

@@ -67,6 +67,26 @@ ArCpuId(IN OUT PCPUID_REGISTERS Registers)
return TRUE;
}
/**
* Gets the address of the current stack register.
*
* @return This routine returns the current stack pointer.
*
* @since XT 1.0
*/
XTASSEMBLY
XTCDECL
ULONG_PTR
ArGetStackPointer()
{
/* Get current stack pointer */
asm volatile("mov %%esp, %%eax\n"
"ret\n"
:
:
:);
}
/**
* Halts the central processing unit (CPU).
*