m68k: set errno in sin, cos, tan
This commit is contained in:
parent
429ee403b8
commit
27c1f49d4b
@ -1,3 +1,18 @@
|
||||
2012-02-24 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* sysdeps/m68k/m680x0/fpu/s_sin.c: Set errno to EDOM if argument
|
||||
is infinite.
|
||||
* sysdeps/m68k/m680x0/fpu/s_cos.c: Include <s_sin.c>.
|
||||
* sysdeps/m68k/m680x0/fpu/s_tan.c: Likewise.
|
||||
* sysdeps/m68k/m680x0/fpu/s_cosf.c: Include <s_sinf.c>.
|
||||
* sysdeps/m68k/m680x0/fpu/s_cosl.c: Include <s_sinl.c>.
|
||||
* sysdeps/m68k/m680x0/fpu/s_sinf.c: Include <s_sin.c>.
|
||||
(FUNC): Don't define if already defined.
|
||||
(float_type): Define.
|
||||
* sysdeps/m68k/m680x0/fpu/s_sinl.c: Likewise.
|
||||
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h [__OPTIMIZE__]: Don't
|
||||
define sin, cos, tan as inlines.
|
||||
|
||||
2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* sysdeps/m68k/crti.S: New file.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Definitions of inline math functions implemented by the m68881/2.
|
||||
Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004, 2008, 2010
|
||||
Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004, 2008, 2010, 2012
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -175,9 +175,6 @@ __inline_mathop(__trunc, intrz)
|
||||
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
|
||||
|
||||
__inline_mathop(atan, atan)
|
||||
__inline_mathop(cos, cos)
|
||||
__inline_mathop(sin, sin)
|
||||
__inline_mathop(tan, tan)
|
||||
__inline_mathop(tanh, tanh)
|
||||
|
||||
# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
|
||||
|
@ -1,2 +1,2 @@
|
||||
#define FUNC cos
|
||||
#include <s_atan.c>
|
||||
#include <s_sin.c>
|
||||
|
@ -1,2 +1,2 @@
|
||||
#define FUNC cosf
|
||||
#include <s_atanf.c>
|
||||
#define FUNC cosf
|
||||
#include <s_sinf.c>
|
||||
|
@ -1,2 +1,2 @@
|
||||
#define FUNC cosl
|
||||
#include <s_atanl.c>
|
||||
#include <s_sinl.c>
|
||||
|
@ -1,2 +1,41 @@
|
||||
#define FUNC sin
|
||||
#include <s_atan.c>
|
||||
/* Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <math.h>
|
||||
#include <errno.h>
|
||||
#include "mathimpl.h"
|
||||
|
||||
#ifndef FUNC
|
||||
# define FUNC sin
|
||||
#endif
|
||||
#ifndef float_type
|
||||
# define float_type double
|
||||
#endif
|
||||
|
||||
#define CONCATX(a,b) __CONCAT(a,b)
|
||||
|
||||
float_type
|
||||
CONCATX(__,FUNC) (float_type x)
|
||||
{
|
||||
if (__m81_test (x) & __M81_COND_INF)
|
||||
__set_errno (EDOM);
|
||||
return __m81_u(CONCATX(__, FUNC)) (x);
|
||||
}
|
||||
|
||||
#define weak_aliasx(a, b) weak_alias(a, b)
|
||||
weak_aliasx (CONCATX(__, FUNC), FUNC)
|
||||
|
@ -1,2 +1,5 @@
|
||||
#define FUNC sinf
|
||||
#include <s_atanf.c>
|
||||
#ifndef FUNC
|
||||
# define FUNC sinf
|
||||
#endif
|
||||
#define float_type float
|
||||
#include <s_sin.c>
|
||||
|
@ -1,2 +1,5 @@
|
||||
#define FUNC sinl
|
||||
#include <s_atanl.c>
|
||||
#ifndef FUNC
|
||||
# define FUNC sinl
|
||||
#endif
|
||||
#define float_type long double
|
||||
#include <s_sin.c>
|
||||
|
@ -1,2 +1,2 @@
|
||||
#define FUNC tan
|
||||
#include <s_atan.c>
|
||||
#include <s_sin.c>
|
||||
|
@ -1,2 +1,2 @@
|
||||
#define FUNC tanf
|
||||
#include <s_atanf.c>
|
||||
#define FUNC tanf
|
||||
#include <s_sinf.c>
|
||||
|
@ -1,2 +1,2 @@
|
||||
#define FUNC tanl
|
||||
#include <s_atanl.c>
|
||||
#include <s_sinl.c>
|
||||
|
Loading…
x
Reference in New Issue
Block a user