Changeset 3900 for trunk


Ignore:
Timestamp:
Oct 22, 2014, 10:26:07 PM (11 years ago)
Author:
bird
Message:

trunk+0.6: Load default FPU.CW value in crt0 to avoid getting bitten by DLLs messing it up during static DLL initialization.

Location:
trunk/libc/src/libc/startup/os2/x86
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libc/src/libc/startup/os2/x86/crt0.asm

    r3895 r3900  
    6161        sub     esp, 10h
    6262
     63        ;
     64        ; Fix the FPU control word since it may have been perverted by
     65        ; statically imported DLLs.
     66        ;
     67        fldcw   .crt0_fpucw
    6368
    6469%ifndef NOFORK
     
    124129        call    NAME_FUNC(exit)
    125130        jmp     .do_exit
     131
     132        align   4, db 0cch
     133.crt0_fpucw:
     134        dd      0x37f
    126135
    127136
  • trunk/libc/src/libc/startup/os2/x86/crt0.s

    r3886 r3900  
    44 * OS/2 crt0.
    55 *
    6  * Copyright (c) 2006 knut st. osmundsen <bird@innotek.de>
     6 * Copyright (c) 2006-2014 knut st. osmundsen <bird@innotek.de>
    77 *
    88 *
     
    6464    subl    $0x10, %esp
    6565
     66    /*
     67     * Fix the FPU control word since it may have been perverted by
     68     * statically imported DLLs.
     69     */
     70    fldcw   __crt0_fpucw
    6671
    6772#if !defined(NOFORK) && !defined(NOUNIX)
     
    125130    jmp     do_exit
    126131
     132
     133/**
     134 * Initial FPU CW value.
     135 */
     136    .align  2, 0xcc
     137__crt0_fpucw:
     138    .long   0x37f
    127139
    128140
Note: See TracChangeset for help on using the changeset viewer.