Changeset 10409 for trunk/src


Ignore:
Timestamp:
Jan 20, 2004, 2:41:11 PM (22 years ago)
Author:
sandervl
Message:

Assembly wrapper for clearing the direction flag before calling our real

Location:
trunk/src/kernel32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/exceptions.cpp

    r10377 r10409  
    1 /* $Id: exceptions.cpp,v 1.73 2004-01-11 11:57:52 sandervl Exp $ */
     1/* $Id: exceptions.cpp,v 1.74 2004-01-20 13:41:10 sandervl Exp $ */
    22
    33/*
     
    11311131#endif
    11321132
     1133// Assembly wrapper for clearing the direction flag before calling our real
     1134// exception handler
    11331135ULONG APIENTRY OS2ExceptionHandler(PEXCEPTIONREPORTRECORD       pERepRec,
    11341136                                   PEXCEPTIONREGISTRATIONRECORD pERegRec,
    11351137                                   PCONTEXTRECORD               pCtxRec,
    1136                                    PVOID                        p)
     1138                                   PVOID                        p);
     1139
     1140ULONG APIENTRY OS2ExceptionHandler2ndLevel(PEXCEPTIONREPORTRECORD       pERepRec,
     1141                                           PEXCEPTIONREGISTRATIONRECORD pERegRec,
     1142                                           PCONTEXTRECORD               pCtxRec,
     1143                                           PVOID                        p)
    11371144{
    11381145    //SvL: Check if exception inside debug fprintf -> if so, clear lock so
  • trunk/src/kernel32/exceptutil.asm

    r9913 r10409  
    1 ; $Id: exceptutil.asm,v 1.25 2003-03-06 12:49:08 sandervl Exp $
     1; $Id: exceptutil.asm,v 1.26 2004-01-20 13:41:11 sandervl Exp $
    22
    33;/*
     
    108108
    109109
     110        PUBLIC OS2ExceptionHandler
     111        EXTRN  OS2ExceptionHandler2ndLevel:NEAR
     112
     113OS2ExceptionHandler proc near
     114        ;Clear the direction flag (as specified by the _System calling convention)
     115        ;(OS/2 doesn't bother checking before calling our exception handler)
     116        cld
     117        jmp OS2ExceptionHandler2ndLevel
     118OS2ExceptionHandler endp
     119
    110120        PUBLIC QueryExceptionChain
    111121
     
    198208@goodthreadstack:
    199209
     210        mov     eax, esp
     211        sub     eax, 16
     212        and     eax, 0FFFFFFF0h
     213;now we make sure the stack is aligned at 16 bytes when the entrypoint is called
     214;(8+4+4(return address) = 16)
     215        add     eax, 8
     216        mov     esp, eax
     217
    200218        push    dword ptr [ebp+16]
    201219        mov     eax, dword ptr [ebp+12]
     
    247265        sub     eax, 16
    248266        and     eax, 0FFFFFFF0h
    249         add     eax, 4
     267;now we make sure the stack is aligned at 16 bytes when the entrypoint is called
     268;(8+4+4(return address) = 16)
     269        add     eax, 8
    250270        mov     esp, eax
    251271
Note: See TracChangeset for help on using the changeset viewer.