Make some i386 code conditional

Add missing svn:eol-style=native property

svn path=/trunk/; revision=28778
This commit is contained in:
Hervé Poussineau 2007-09-02 18:05:16 +00:00
parent 2d5d8783a9
commit b2454a486f
11 changed files with 659 additions and 603 deletions

View file

@ -27,9 +27,13 @@ RtlRaiseException(PEXCEPTION_RECORD ExceptionRecord)
CONTEXT Context;
NTSTATUS Status;
/* Capture the context and fixup ESP */
/* Capture the context */
RtlCaptureContext(&Context);
#ifdef _M_IX86
/* Fixup ESP */
Context.Esp += sizeof(ULONG);
#endif
/* Save the exception address */
ExceptionRecord->ExceptionAddress = RtlpGetExceptionAddress();
@ -75,8 +79,10 @@ RtlRaiseStatus(NTSTATUS Status)
/* Capture the context */
RtlCaptureContext(&Context);
#ifdef _M_IX86
/* Add one argument to ESP */
Context.Esp += sizeof(PVOID);
#endif
/* Create an exception record */
ExceptionRecord.ExceptionAddress = RtlpGetExceptionAddress();
@ -123,10 +129,16 @@ RtlWalkFrameChain(OUT PVOID *Callers,
ULONG i = 0;
/* Get current EBP */
#if defined(_M_IX86)
#if defined __GNUC__
__asm__("mov %%ebp, %0" : "=r" (Stack) : );
#elif defined(_MSC_VER)
__asm mov Stack, ebp
#endif
#elif defined(_M_MIPS)
__asm__("move $sp, %0" : "=r" (Stack) : );
#else
#error Unknown architecture
#endif
/* Set it as the stack begin limit as well */