Changeset 16138


Ignore:
Timestamp:
Jul 25, 2014, 4:26:02 AM (7 years ago)
Author:
rme
Message:

Use system-provided fpu.h and update platform-freebsd8632.h and
x86-exceptions.c acccordingly.

In l1-numbers.lisp, use the libc exp and expf like we do on the other
platforms. Our custom versions weren't giving us the FP exception
handling that we want, so it seems best to remove them for now.

This has been tested on FreeBSD 10.

Location:
trunk/source
Files:
4 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-numbers.lisp

    r16085 r16138  
    757757  (with-stack-double-floats ((temp))
    758758    #+arm-target (%set-fpscr-status 0)
    759     #-freebsdx8632-target
    760759    (%setf-double-float TEMP (#_exp n))
    761     #+freebsdx8632-target
    762     (%setf-double-float TEMP (external-call "__ieee754_exp" :double-float n :double-float))
    763760    (%df-check-exception-1 'exp n (%ffi-exception-status))
    764761    #+linux-target
     
    776773  (target::with-stack-short-floats ((temp))
    777774    #+arm-target (%set-fpscr-status 0)
    778     #-freebsdx8632-target
    779775    (%setf-short-float TEMP (#_expf n))
    780     #+freebsdx8632-target
    781     (%setf-short-float TEMP (external-call "__ieee754_expf" :single-float n :single-float))
    782776    (%sf-check-exception-1 'exp n (%ffi-exception-status))
    783777    #+linux-target
  • trunk/source/lisp-kernel/freebsdx8632/Makefile

    r15198 r16138  
    4242KERNELOBJ= $(COBJ) x86-asmutils32.o  imports.o
    4343
    44 PLATFORM_OBJ = e_exp.o e_expf.o
    45 PLATFORM_HEADERS = fdlibm.h
    46 
    4744SPINC = lisp.s m4macros.m4 x86-constants.s x86-macros.s errors.s x86-uuo.s \
    4845        x86-constants32.s lisp_globals.s
     
    7168LINKSCRIPT =  # -T $(LINKSCRIPTFILE)
    7269
    73 ../../fx86cl:   $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(PLATFORM_OBJ) $(LINKSCRIPTFILE)
    74         $(CC) -m32 $(CDEBUG)  -Wl,--export-dynamic  $(LINKSCRIPT)  -o $@  $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(PLATFORM_OBJ) $(OSLIBS)
     70../../fx86cl:   $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(LINKSCRIPTFILE)
     71        $(CC) -m32 $(CDEBUG)  -Wl,--export-dynamic  $(LINKSCRIPT)  -o $@  $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(OSLIBS)
    7572
    7673
     
    7976$(COBJ): $(CHEADERS)
    8077$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
    81 $(PLATFORM_OBJ): $(PLATFORM_HEADERS)
    82 
    8378
    8479cclean:
    85         $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) $(PLATFORM_OBJ) ../../fx86cl
     80        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../fx86cl
    8681
    8782clean:  cclean
  • trunk/source/lisp-kernel/platform-freebsdx8632.h

    r16134 r16138  
    4242
    4343
    44 #include "freebsdx8632/fpu.h"
     44#include <machine/fpu.h>
    4545#define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext)))
    4646#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
     
    4848#define eflags_register(xp) xpGPR(xp,Iflags)
    4949#define xpPC(x) xpGPR(x,Iip)
    50 #define xpMMXreg(x,n) *((natural *)(&(((struct ccl_savexmm *)(&(x)->uc_mcontext.mc_fpstate))->sv_fp[n])))
    51 #define xpXMMregs(x)(&(((struct ccl_savexmm *)(&(x)->uc_mcontext.mc_fpstate))->sv_xmm[0]))
     50#define xpMMXreg(x,n) *((natural *)(&(((struct savexmm *)(&(x)->uc_mcontext.mc_fpstate))->sv_fp[n])))
     51#define xpXMMregs(x)(&(((struct savexmm *)(&(x)->uc_mcontext.mc_fpstate))->sv_xmm[0]))
    5252#define xpMXCSR(x) ((struct savefpu *)((x)->uc_mcontext.mc_fpstate)->sv_env.en_mxcsr)
    5353extern void freebsd_sigreturn(ExceptionInformation *);
  • trunk/source/lisp-kernel/x86-exceptions.c

    r16134 r16138  
    11361136    struct savefpu *fpu = (struct savefpu *) &(xp->uc_mcontext.mc_fpstate);
    11371137#else
    1138     struct ccl_savexmm *fpu = (struct ccl_savexmm *) &(xp->uc_mcontext.mc_fpstate);
     1138    struct savexmm *fpu = (struct savexmm *) &(xp->uc_mcontext.mc_fpstate);
    11391139#endif
    11401140    uint32_t mxcsr = fpu->sv_env.en_mxcsr;
Note: See TracChangeset for help on using the changeset viewer.