Do not initialize the floating-point environment in i386 assembly.
authorMatt Birkholz <puck@birchwood-abbey.net>
Tue, 5 Jan 2016 22:55:59 +0000 (15:55 -0700)
committerMatt Birkholz <puck@birchwood-abbey.net>
Tue, 5 Jan 2016 22:55:59 +0000 (15:55 -0700)
The floating-point environment is managed (and needs to be
initialized) by libc.

src/microcode/cmpauxmd/i386.m4

index 697f63490a99ba93a2ec04007d3c44ca5431da28..a2794a17d5a21a849fa270a8521433382ed26db5 100644 (file)
@@ -335,14 +335,6 @@ define(REGBLOCK_SIZE_IN_OBJECTS,
            +(COMPILER_REGBLOCK_N_HOOKS*COMPILER_HOOK_SIZE)
            +(COMPILER_REGBLOCK_N_TEMPS*COMPILER_TEMP_SIZE)))
 
-# Define the floating-point processor control word.  Always set
-# round-to-even and double precision.  Under Win32, mask all
-# exceptions.  Under unix and OS/2, mask only the inexact result
-# exception.
-ifdef(`WIN32',
-      `define(FP_CONTROL_WORD,HEX(023f))',
-      `define(FP_CONTROL_WORD,HEX(0220))')
-
 define(regs,REG(esi))
 define(rfree,REG(edi))
 define(rmask,REG(ebp))
@@ -410,12 +402,6 @@ ifdef(`VALGRIND_MODE',`',`
        jne     i386_initialize_no_fp
 ')
        OP(inc,l)       REG(eax)                        # 387 available
-       OP(sub,l)       TW(IMM(4),REG(esp))
-       fclex
-       fnstcw          WOF(-2,REG(ebp))
-       OP(and,w)       TW(IMM(HEX(f0e0)),WOF(-2,REG(ebp)))
-       OP(or,w)        TW(IMM(FP_CONTROL_WORD),WOF(-2,REG(ebp)))
-       fldcw           WOF(-2,REG(ebp))
 i386_initialize_no_fp:
 ')
        OP(mov,l)       TW(REG(eax),ABS(EVR(i387_presence)))