Ticket #312: fpucw.diff

File fpucw.diff, 465 bytes (added by KO Myung-Hun, 10 years ago)

patch to initialize FPU CW at startup

  • src/emx/src/lib/startup/startup.c

    diff --git a/src/emx/src/lib/startup/startup.c b/src/emx/src/lib/startup/startup.c
    index 50ef590..2009423 100755
    a b int _CRT_init(void)  
    7777     * to zero before calling main().
    7878     */
    7979    errno = 0;
     80
     81    /*
     82     * Initialize FPU control word.
     83     */
     84    unsigned cw = 0x37f;
     85    __asm__ __volatile__("fldcw %0" : : "m" (cw));
     86
    8087    LIBCLOG_RETURN_INT(0);
    8188}
    8289