Commit Graph

22 Commits

Author SHA1 Message Date
Ed Maste
29e54af43e libc: use standard LF line endings, not CRLF 2021-04-03 16:20:07 -04:00
Konstantin Belousov
0c0288a218 Add implementations for clog(3), clogf(3), and clog(3).
PR:	216863
Submitted by:	bde, Steven G. Kargl <sgk@troutmask.apl.washington.edu>
MFC after:	2 weeks
2018-05-13 09:54:34 +00:00
John Baldwin
fbb7370d33 Move softfloat symbol map entries to softfloat/Symbol.map.
The arm, mips, and riscv MD Symbol.map files listed some (but not all)
of the softfloat symbols that were actually defined in softfloat.c.

While here, also remove entries for __fixuns[sd]fsi which are provided
by libcompiler_rt and not by libc.

Sponsored by:	DARPA / AFRL
2018-03-05 20:51:23 +00:00
Pedro F. Giffuni
d915a14ef0 libc: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2017-11-25 17:12:48 +00:00
Ruslan Bukin
7804dd5212 Add full softfloat and hardfloat support for RISC-V.
Hardfloat is now default (use riscv64sf as TARGET_ARCH
for softfloat).

Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D8529
2016-11-16 15:21:32 +00:00
Pedro F. Giffuni
513004a23d libc: replace 0 with NULL for pointers.
While here also cleanup some surrounding code; particularly
drop some malloc() casts.

Found with devel/coccinelle.

Reviewed by:	bde (previous version - all new bugs are mine)
2016-04-10 19:33:58 +00:00
Marcel Moolenaar
8876613dc5 Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}
if not already defined. This allows building libc from outside of
lib/libc using a reach-over makefile.

A typical use-case is to build a standard ILP32 version and a COMPAT32
version in a single iteration by building the COMPAT32 version using a
reach-over makefile.

Obtained from:	Juniper Networks, Inc.
2014-03-04 02:19:39 +00:00
David Schultz
7ea324df88 Conditionalize the __floatunsisf and __floatunsidf functions, added in
NetBSD's rev 1.6 of this file, on !defined(SOFTFLOAT_FOR_GCC).  These
functions are provided by libgcc, so we don't need them.  This should
unbreak mips.
2012-01-20 14:44:21 +00:00
David Schultz
c36abe0dcf Merge in the latest SoftFloat changes from NetBSD. (NetBSD isn't the
original vendor, but we're using their heavily modified version.)
This brings in functions for long double emulation (both extended and
quad formats), which may be useful for testing, and also for replacing
libc/sparc64/fpu/.
2012-01-20 06:16:14 +00:00
David Schultz
980ece8077 Remove functions from softfloat's Symbol.map that don't need to be exported.
Also use the proper number of underscores for internal names.  (Changing
the names should be fine, since apparently the symbols are currently
unused.)
2012-01-16 04:06:56 +00:00
David Schultz
b1d046441d Convert softfloat to use the standard exception flag and rounding macros
in fenv.h instead of the non-standard and incomplete ones in ieeefp.h.

Thanks to Ian Lepore for testing this patch.
2012-01-16 04:05:53 +00:00
Warner Losh
2c0959ae6b Powerpc is special here. powerpc and powerpc64 use different ABIs, so
their implementations aren't in the same files.  Introduce LIBC_ARCH
and use that in preference to MACHINE_CPUARCH.  Tested by amd64 and
powerpc64 builds (thanks nathanw@)
2010-08-24 20:54:43 +00:00
Warner Losh
25faff346c MFtbemd:
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
2010-08-23 22:24:11 +00:00
Marius Strobl
92cb9b0578 Add #endif missed in r206490. 2010-04-11 21:22:02 +00:00
Marius Strobl
b7e9bee71c While SPARC V9 allows tininess to be detected either before or after
rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and
UltraSPARC processors defines that in all cases  tininess is detected
before rounding therefore rounding up to the smallest normalized number
should set the underflow flag. This change is needed for using SoftFloat
on sparc64 for reference purposes.

PR:		144900
Submitted by:	Peter Jeremy
2010-04-11 20:08:54 +00:00
Xin LI
38f92d0c69 Reflect license change from NetBSD.
Obtained from:	NetBSD
2009-03-10 21:13:26 +00:00
Daniel Eischen
5f864214bb Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
Daniel Eischen
6fad3aaf15 Add each directory's symbol map file to SYM_MAPS. 2006-03-13 01:15:01 +00:00
Daniel Eischen
cce72e8860 Add symbol maps and initial symbol version definitions to libc.
Reviewed by:	davidxu
2006-03-13 00:53:21 +00:00
David Schultz
7b74e4a759 Remove fpsetsticky(). This was added for SysV compatibility, but due
to mistakes from day 1, it has always had semantics inconsistent with
SVR4 and its successors.  In particular, given argument M:

- On Solaris and FreeBSD/{alpha,sparc64}, it clobbers the old flags
  and *sets* the new flag word to M.  (NetBSD, too?)
- On FreeBSD/{amd64,i386}, it *clears* the flags that are specified in M
  and leaves the remaining flags unchanged (modulo a small bug on amd64.)
- On FreeBSD/ia64, it is not implemented.

There is no way to fix fpsetsticky() to DTRT for both old FreeBSD apps
and apps ported from other operating systems, so the best approach
seems to be to kill the function and fix any apps that break.  I
couldn't find any ports that use it, and any such ports would already
be broken on FreeBSD/ia64 and Linux anyway.

By the way, the routine has always been undocumented in FreeBSD,
except for an MLINK to a manpage that doesn't describe it.  This
manpage has stated since 5.3-RELEASE that the functions it describes
are deprecated, so that must mean that functions that it is *supposed*
to describe but doesn't are even *more* deprecated.  ;-)

Note that fpresetsticky() has been retained on FreeBSD/i386.  As far
as I can tell, no other operating systems or ports of FreeBSD
implement it, so there's nothing for it to be inconsistent with.

PR:		75862
Suggested by:	bde
2005-03-15 15:53:39 +00:00
Olivier Houchard
6f831b072a Oooops I forgot to commit that.
Use fp_rnd_t, not fp_rnd.

Reported by:	Jia-Shiun Li (jiashiun at gmail dot com)
2004-12-08 18:41:42 +00:00
Olivier Houchard
15144b0f96 Import the softfloat emulation library, needed for FreeBSD/arm right now.
It should become useless when gcc 3.4 will be imported, as libgcc from
gcc 3.4 contains this bits for arm.
2004-05-14 12:13:06 +00:00