Changeset 3900


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.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/src/lib/startup/386/crt0.s

    r2289 r3900  
    5353__text:
    5454
     55    /*
     56     * Fix the FPU control word since it may have been perverted by
     57     * statically imported DLLs.
     58     */
     59    fldcw   __crt0_fpucw
     60
    5561#if !defined(NOFORK) && !defined(NOUNIX)
    5662    /* Registering the fork module. If we're forking this call will not return. */
     
    88941:  jmp     1b      /* Just in case exit() returns :-) */
    8995
     96/** Initial FPU CW value. */
     97    .align  2, 0xcc
     98__crt0_fpucw:
     99    .long   0x37f
    90100
    91101    .data
  • 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.