Changeset 14425


Ignore:
Timestamp:
Nov 12, 2010, 10:43:22 AM (8 years ago)
Author:
gb
Message:

Win64 FP functions signal FP exceptions in software after disabling
them in the MXCSR. (Windows just doesn't laugh and play like the
other children.) Revert back to the old FP exception on ff call scheme
ifdef(`WINDOWS').

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-spentry64.s

    r13994 r14425  
    39903990        __(movq %rbp,rcontext(tcr.save_rbp))
    39913991        __(movq $TCR_STATE_FOREIGN,rcontext(tcr.valence))
     3992        __(movq rcontext(tcr.foreign_sp),%rsp)
     3993        __ifdef(`WINDOWS')
     3994        __(stmxcsr rcontext(tcr.lisp_mxcsr))
     3995        __else
    39923996        __(movq $0,rcontext(tcr.ffi_exception))
    3993         __(movq rcontext(tcr.foreign_sp),%rsp)
     3997        __endif
    39943998        __(emms)
     3999        __ifdef(`WINDOWS')
     4000        __(ldmxcsr rcontext(tcr.foreign_mxcsr))
     4001        __endif
    39954002        __(movq (%rsp),%rbp)
    39964003        __ifdef(`DARWIN_GS_HACK')
     
    40704077        __(pxor %fpzero,%fpzero)
    40714078
     4079        __ifndef(`WINDOWS')
    40724080        /* If we got a floating-point exception during the ff-call,
    40734081           our handler will have set a flag, preserved lisp's MXCSR,
     
    40754083        __(btrq $TCR_FLAG_BIT_FOREIGN_FPE,rcontext(tcr.flags))
    40764084        __(jnc 1f)
     4085        __endif
    40774086        __(cmpb $0,C(bogus_fp_exceptions)(%rip))
    40784087        __(je 0f)
     
    40804089        __(jmp 1f)
    408140900:      __(stmxcsr rcontext(tcr.ffi_exception))
     4091        __ifndef(`WINDOWS')
    40824092        __(ldmxcsr rcontext(tcr.lisp_mxcsr)) /* preserved by the handler */
     4093        __endif
    408340941:      __(movq rcontext(tcr.save_vsp),%rsp)
    40844095        __(movq rcontext(tcr.save_rbp),%rbp)
     
    40964107        __(pop %temp2)
    40974108        __(pop %temp1)
     4109        __ifdef(`WINDOWS')
     4110        __(ldmxcsr rcontext(tcr.lisp_mxcsr))
     4111        __endif
    40984112        __(check_pending_interrupt(%temp0))
    40994113        __(pop %temp0)
Note: See TracChangeset for help on using the changeset viewer.