[RTL] Get rid of x86 asm version of RtlpGetStackLimits

There is no point in writing this function in asm.
This commit is contained in:
Timo Kreuzer
2023-05-20 11:59:09 +03:00
parent 393a88a372
commit 4bd1e81998
5 changed files with 6 additions and 43 deletions

View File

@@ -275,20 +275,4 @@ PUBLIC _KiFastSystemCallRet@0
.ENDP
PUBLIC _RtlpGetStackLimits@8
_RtlpGetStackLimits@8:
/* Get the stack limits */
mov eax, [fs:TEB_STACK_LIMIT]
mov ecx, [fs:TEB_STACK_BASE]
/* Return them */
mov edx, [esp+4]
mov [edx], eax
mov edx, [esp+8]
mov [edx], ecx
/* return */
ret 8
END

View File

@@ -330,7 +330,6 @@ RtlWalkFrameChain(OUT PVOID *Callers,
}
#endif
#ifdef _AMD64_
VOID
NTAPI
RtlpGetStackLimits(
@@ -341,7 +340,6 @@ RtlpGetStackLimits(
*HighLimit = (ULONG_PTR)NtCurrentTeb()->NtTib.StackBase;
return;
}
#endif
BOOLEAN
NTAPI

View File

@@ -309,7 +309,7 @@ if(ARCH STREQUAL "i386")
${REACTOS_SOURCE_DIR}/ntoskrnl/ke/i386/trap.s
${REACTOS_SOURCE_DIR}/ntoskrnl/ke/i386/usercall_asm.S
${REACTOS_SOURCE_DIR}/ntoskrnl/ke/i386/zeropage.S
${REACTOS_SOURCE_DIR}/ntoskrnl/rtl/i386/stack.S)
${REACTOS_SOURCE_DIR}/ntoskrnl/rtl/i386/prefetch.S)
list(APPEND SOURCE
${REACTOS_SOURCE_DIR}/ntoskrnl/config/i386/cmhardwr.c
${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/i386/kdx86.c

View File

@@ -16,28 +16,6 @@ EXTERN _KePrefetchNTAGranularity:DWORD
/* FUNCTIONS *****************************************************************/
.code
PUBLIC _RtlpGetStackLimits@8
_RtlpGetStackLimits@8:
/* Get the current thread */
mov eax, [fs:KPCR_CURRENT_THREAD]
/* Get the stack limits */
mov ecx, [eax+KTHREAD_STACK_LIMIT]
mov edx, [eax+KTHREAD_INITIAL_STACK]
sub edx, SIZEOF_FX_SAVE_AREA
/* Return them */
mov eax, [esp+4]
mov [eax], ecx
mov eax, [esp+8]
mov [eax], edx
/* return */
ret 8
PUBLIC @RtlPrefetchMemoryNonTemporal@8
@RtlPrefetchMemoryNonTemporal@8:

View File

@@ -506,7 +506,6 @@ RtlWalkFrameChain(OUT PVOID *Callers,
#endif
#if defined(_M_AMD64) || defined(_M_ARM)
VOID
NTAPI
RtlpGetStackLimits(
@@ -514,10 +513,14 @@ RtlpGetStackLimits(
OUT PULONG_PTR HighLimit)
{
PKTHREAD CurrentThread = KeGetCurrentThread();
#ifdef _M_IX86
* HighLimit = (ULONG_PTR)CurrentThread->InitialStack -
sizeof(FX_SAVE_AREA);
#else
*HighLimit = (ULONG_PTR)CurrentThread->InitialStack;
#endif
*LowLimit = (ULONG_PTR)CurrentThread->StackLimit;
}
#endif
/* RTL Atom Tables ************************************************************/