Make log1p and log1pf work in shared libraries again.

This commit is contained in:
fvdl 2003-09-14 21:26:14 +00:00
parent 6a75fbb636
commit 8eb02ce5c0
3 changed files with 18 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: abi.h,v 1.1 2001/06/19 00:26:29 fvdl Exp $ */
/* $NetBSD: abi.h,v 1.2 2003/09/14 21:26:14 fvdl Exp $ */
/*
* Written by Frank van der Linden (fvdl@wasabisystems.com)
@ -42,6 +42,9 @@
#define XMM_FLOAT_EPILOGUE \
fstps ARG_FLOAT_ONE ; \
movss ARG_FLOAT_ONE, %xmm0
#define FLDL_VAR(x) fldl x(%rip)
#else
#define ARG_DOUBLE_ONE 4(%esp)
@ -57,4 +60,14 @@
#define XMM_DOUBLE_EPILOGUE
#define XMM_FLOAT_EPILOGUE
#ifdef PIC
#define FLDL_VAR(x) \
PIC_PROLOGUE ; \
fldl PIC_GOTOFF(x) ; \
PIC_EPILOGUE
#else
#define FLDL_VAR(x) \
fldl x
#endif
#endif

View File

@ -12,7 +12,7 @@
#include "abi.h"
RCSID("$NetBSD: s_log1p.S,v 1.11 2003/09/10 16:45:43 wennmach Exp $")
RCSID("$NetBSD: s_log1p.S,v 1.12 2003/09/14 21:26:14 fvdl Exp $")
/*
* The log1p() function is provided to compute an accurate value of
@ -51,7 +51,7 @@ ENTRY(log1p)
XMM_ONE_ARG_DOUBLE_PROLOGUE
fldl ARG_DOUBLE_ONE
fabs
fldl BOUND
FLDL_VAR(BOUND)
fcompp
fnstsw %ax
andb $69,%ah

View File

@ -12,7 +12,7 @@
#include "abi.h"
RCSID("$NetBSD: s_log1pf.S,v 1.8 2003/09/10 16:45:43 wennmach Exp $")
RCSID("$NetBSD: s_log1pf.S,v 1.9 2003/09/14 21:26:14 fvdl Exp $")
/*
* The log1pf() function is provided to compute an accurate value of
@ -51,7 +51,7 @@ ENTRY(log1pf)
XMM_ONE_ARG_FLOAT_PROLOGUE
flds ARG_FLOAT_ONE
fabs
fldl BOUND
FLDL_VAR(BOUND)
fcompp
fnstsw %ax
andb $69,%ah