Changeset 9057


Ignore:
Timestamp:
Apr 8, 2008, 4:57:24 AM (11 years ago)
Author:
gb
Message:

Test new global flag 'bogus_fp_exceptions' at runtime after return
from ff-call, rather than just doing ifdef([DARWIN]). (The bug
that this was working around seems to have been fixed for quite
a while.)

File:
1 edited

Legend:

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

    r8608 r9057  
    40304030        __(clr %fn)
    40314031        __(pxor %fpzero,%fpzero)
    4032         /* Darwin's math library seems to be pretty casual
    4033            about causing spurious FP exceptions */
    4034         __ifdef([DARWIN])
    4035          __(movl %arg_x_l,rcontext(tcr.ffi_exception))
    4036         __else
    4037          __(stmxcsr rcontext(tcr.ffi_exception))
    4038         __endif
    4039         __(movq rcontext(tcr.save_vsp),%rsp)
     4032        __(cmpb $0,C(bogus_fp_exceptions)(%rip))
     4033        __(je 0f)
     4034        __(movl %arg_x_l,rcontext(tcr.ffi_exception))
     4035        __(jmp 1f)
     40360:      __(stmxcsr rcontext(tcr.ffi_exception))
     40371:      __(movq rcontext(tcr.save_vsp),%rsp)
    40404038        __(movq rcontext(tcr.save_rbp),%rbp)
    40414039        __(movq $TCR_STATE_LISP,rcontext(tcr.valence))
     
    42494247        __(clr %fn)
    42504248        __(pxor %fpzero,%fpzero)
    4251         /* Darwin's math library seems to be pretty casual
    4252            about causing spurious FP exceptions */
    4253         __ifdef([DARWIN])
    4254          __(movl %arg_x_l,rcontext(tcr.ffi_exception))
    4255         __else
    4256          __(stmxcsr rcontext(tcr.ffi_exception))
    4257         __endif
    4258         __(movq rcontext(tcr.save_vsp),%rsp)
     4249        __(cmpb $0,C(bogus_fp_exceptions)(%rip))
     4250        __(je 0f)
     4251        __(movl %arg_x_l,rcontext(tcr.ffi_exception))
     4252        __(jmp 1f)
     42530:      __(stmxcsr rcontext(tcr.ffi_exception))
     42541:      __(movq rcontext(tcr.save_vsp),%rsp)
    42594255        __(movq rcontext(tcr.save_rbp),%rbp)
    42604256        __(movq $TCR_STATE_LISP,rcontext(tcr.valence))
Note: See TracChangeset for help on using the changeset viewer.