summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/sparc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* retire the sparc library codetedu2016-09-0145-2600/+0
|
* Wrap fpgetround() so internal calls to it (seen on arm, powerpc, and sh)guenther2016-07-261-2/+3
| | | | | | go direct instead of through the PLT. ok millert@ kettenis@
* More fixes from miodguenther2016-05-231-4/+4
|
* Include SYS.h instead of DEFS.h now that this does a direct syscallguenther2016-05-231-2/+2
|
* Remove sigreturn declaration and the now-unused libc syscall stubguenther2016-05-091-41/+0
|
* Don't use sigreturn(2) in longjmp(3). Instead use a similar approach as inkettenis2016-05-091-60/+39
| | | | | | _longjmp(3) but also restore the signal mask. ok deraadt@
* Use a Thread Information Block in both single and multi-threaded programs.guenther2016-05-075-125/+15
| | | | | | | | | | | | | | | | | This stores errno, the cancelation flags, and related bits for each thread and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable! Make libpthread dlopen'able by moving the cancelation wrappers into libc and doing locking and fork/errno handling via callbacks that libpthread registers when it first initializes. 'errno' *must* be declared via <errno.h> now! Clean up libpthread's symbol exports like libc. On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec. Testing by various, particularly sthen@ and patrick@ ok kettenis@
* Switch to RSYSCALL: no special handling is needed here any more andguenther2016-03-271-6/+2
| | | | | | we do need the hidden _libc_syscall alias. from miod@
* The asm in the MD_DISABLE_KBIND macro was too fragile and broke alpha and hppa.guenther2016-03-211-27/+0
| | | | | | So instead, do the kbind disabling with syscall(). debugging and ok deraadt@, ok kettenis@
* Rearrange C runtime bits: now that ld.so exports environ and __progname,guenther2016-03-201-0/+27
| | | | | | | | | | | move their definitions and initialization in static links to libc.a Make crt0 always invoke a new func _csu_finish() in libc to process the auxv and to either register the ld.so cleanup function (in dynamic links) or initialize environ and __progname and do MC_DISABLE_KBIND (in static links). In libc, get pagesize from auxv; cache that between getpagesize() and sysconf(_SC_PAGESIZE) ok mpi@ "good time" deraadt@
* Wrap the remaining math functions in libc: __fpclassify*(), __flt_rounds(),guenther2015-10-271-1/+2
| | | | | | and ldexp(). ok millert@
* Merge the sigaction() and sigprocmask() overloads/wrappers from libpthreadguenther2015-10-232-4/+6
| | | | | | | | | into libc, and move pthread_sigmask() as well (just a trivial wrapper). This provides consistent handling of SIGTHR between single- and multi-threaded programs and is a step in the merge of all the libpthread overloads, providing some ASM and Makefile bits that the other wrappers will need. ok deraadt@ millert@
* Add hidden _libc_ aliases and symbol sizesguenther2015-09-131-0/+1
|
* Adds hidden _libc_FOO aliases for the system call stubs.guenther2015-09-107-15/+34
| | | | | | | | | | Stop generating _brk and _sbrk symbols: they've already been hidden. Set the ELF symbol size on the syscall stubs. Give the __{min,cur}brk symbols a size and type, and hide more jump labels. alpha, arm, m88k, sh, sparc, and vax assistance miod@ hppa assistance kettenis@ ok deraadt@ miod@
* Add framework for resolving (pun intended) libc namespace issues, usingguenther2015-08-315-6/+32
| | | | | | | | | | | | wrapper .h files and asm labels to let internal calls resolve directly and not be overridable or use the PLT. Then, apply that framework to most of the functions in stdio.h, string.h, err.h, and wchar.h. Delete the should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here. tests clean on i386, amd64, sparc64, powerpc, and mips64 naming feedback from kettenis@ and millert@ ok kettenis@
* Hide many (194!) symbols that nothing should be using.guenther2015-08-264-54/+17
| | | | | | | Delete exect(2); it wasn't portable across archs and nothing used it. ports test build by naddy@ ok deraadt@ kettenis@
* Explicitly list the symbols permitted to be exported by libc.guenther2015-08-221-0/+17
| | | | | | | | This is primed with the current list of exported symbols so it doesn't change the ABI yet, but will prevent unintentional additions in the future and sets the stage for reductions. ok deraadt@ kettenis@
* Make index/rindex weak aliases of strchr/strrchr since they are notmillert2015-05-151-3/+3
| | | | | part of the ISO C standard and have also been dropped from POSIX. OK guenther@ kettenis@
* Make pthread_atfork() track the DSO that called it like atexit() does,guenther2015-04-072-4/+9
| | | | | | | | | | unregistering callbacks if the DSO is unloaded. Move the callback handling from libpthread to libc, though libpthread still overrides the inner call to handle locking and thread-library reinitialization. Major version bump for both libc and libpthread. verification that this fixes various ports ajacoutot@ asm assistance miod@; ok millert@ deraadt@
* Simplify fork/vfork logic: the kernel has handled returning zero in the childguenther2015-03-312-17/+4
| | | | | | | for a long time, so there's no need to test the second return register here in the asm stub. ok and testing of many archs by krw@ miod@
* restructure libc/string + libc/arch/*/string coperation regardingderaadt2014-11-301-4/+7
| | | | | | | | | | | | | | | | (potentially) MD versions (function dependent, not filename dependent) split out memcpy/memmove/bcopy and strchr/index/strrchr/rindex Bring back amd64 .S versions And the final touch: switch all architectures temporarily to MI memcpy.c, which contains syslog + abort for overlapping copies. A nice harsh undefined behaviour. We will clean the entire userland of the remaining issues in this catagory, then switch to the optimised memcpy which skips the memmove check. I tried to cut this change into pieces, but testing each sub-step on every architecture is too time consuming and mindnumbing. ok miod
* Nuke the machinery to sync libkern with libc, it's not been used in themiod2014-06-091-6/+1
| | | | | | last 15 years and there is no point to use it in the future. From Jean-Philippe Ouellet
* Fix modf() on sparctobiasu2014-06-071-3/+3
| | | | | | | For large integral values, modf returned uninitialized data in iptr since 1992. Found while debugging python segfaults. ok miod
* Apply "unifdef -D__STDC__" to libc/arch/*/SYS.hmatthew2014-06-041-5/+1
| | | | | | | | A while back, pascal@ converted our system call stubs from using "cpp | as" to "cc -x assembler-with-cpp", so there's no need to stay compatible with ancient preprocessor semantics. ok miod
* Switch libc and libm to use strong aliases rather than weak aliasesmartynas2013-03-281-2/+2
| | | | | | | | | | | where appropriate. Among other things makes the symbols consistent across all architectures (notably where ldbl mantissa is 53 bits). While at it, kill unused LINTLIBRARY/PROTOLIB1 cruft which was there to trick lint into recording the right prototypes for aliased functions. Most of the work done at the awesome n2k13 hackathon. Agreed by kettenis@, guenther@, matthew@.
* Add support for -fPICderaadt2012-09-045-8/+61
| | | | ok kettenis
* remove lint leftovers; ok guenther@okan2012-09-042-4/+2
|
* these are no longer used; ok guentherderaadt2012-09-041-49/+0
|
* Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure ccpascal2012-08-229-19/+19
| | | | | | | invocations. This allows us to use the compiler builtin define __PIC__ to check for PIC/PIEness rather than passing -DPIC. Simplifies PIE work a lot. ok matthew@, conceptually ok kurt@
* Do not use <machine/float.h>, that is an deformed BSD-ism.deraadt2012-06-251-2/+2
| | | | | It turns out <float.h> is the right file to pull in. ok millert
* __tfork() needs to set the stack address of the new thread in the kernel,guenther2012-06-211-9/+3
| | | | | | | | | so that it can't get a signal while still running on the parent thread's stack. Also, pass in sizeof(struct __tfork) to provide forward compat when more members are added. This is an ABI change, so switch syscall numbers and bump lib majors this time. ok deraadt@ matthew@
* alloca.c cannot be usedderaadt2012-04-121-3/+1
|
* remove rfork(); ok guenther miodderaadt2012-04-121-40/+0
|
* Move __tfork_thread() from rthreads (libpthread) to libc so thatguenther2012-03-221-0/+74
| | | | | | it can be used for not-strictly-threading purposes ok matthew@ kurt@
* sigstack() is long dead, and the compat sigaltstack syscall is gone too.guenther2011-11-221-2/+2
| | | | | | Correct the namespace protections for sigreturn(), sigwait(), and psignal() ok millert@
* Revert (leaving the complex math part alone). Some stuff is dependingmartynas2011-07-083-2/+232
| | | | | on this historical behavior; so we're stuck in this stupid situation. No cookie for me.
* Move fabs(3), frexp(3), and modf(3) to libm--nothing has been usingmartynas2011-07-083-232/+2
| | | | them in libc for a very long time. OK guenther@.
* Move __cerror to ___cerror with a weak alias so that rthreads can override it.guenther2011-04-041-7/+6
| | | | | | On mips64, also correct the name called from plain cerror to __cerror. "looks correct" miod@
* In the original sparc V7 book (and in the v8 book), the divrem leaf code usedderaadt2011-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | local registers for a few temporaries. This was changed to use two global registers. Maybe to permit use in-kernel without conflicting with the register V7 register window handlers. (Was this done by Chris Torek? Is this related to Gordon Irlam's work? Or was it in NetBSD? Hard to tell because NetBSD removed their original cvs tree.) In V8 the ABI was tightened; more global registers became offlimits in different ways. We started supporting sun4m, and did not consider this. As a result, the global registers chosen are the wrong choice. In particular, %g7 is a poor choice for upcoming TLS work. It looks like it is safer to use %g5 and %g6 since these functions are "system software". All re-entrant parts of the system save it. On sparc64 these functions are in libc per ABI requirement, but are unused. On sparc, they occur in bootblocks (no reentrancy), kernel (reentrancy saves globals; kernel is not ABI compliant), userland libc (signal handlers save globals), and ld.so (symbol binding is not re-entrant on its own). Discussed rather extensively with guenther, kettenis, miod and drahn.
* more rcsid/sccs cleanupderaadt2009-10-286-30/+1
|
* remove from gen so that lint doesn't check gen if assembly versionsmartynas2009-04-211-2/+2
| | | | are available. spotted by theo
* - ldexp implementation has issues. switch to the one from libmmartynas2009-04-192-143/+2
| | | | | | - remove frexp in hppa64, cloned from hppa - move generic ieee754 implementations of modf and ldexp to gen ok kettenis@, "looks good" millert@
* use sys/cdefs.h; pointed out by theomartynas2008-12-101-2/+2
|
* ditto frexpl and ldexplmartynas2008-12-091-1/+4
|
* alias fabsl to fabs on these archsmartynas2008-12-091-1/+2
|
* remove unusedmartynas2008-12-096-201/+0
|
* - add long double signbitmartynas2008-12-092-4/+3
| | | | | | | | | | | | | - make long double versions weak aliases to double versions, on archs where long doubles are 64 bits - no need to have two finites. finite() and finitef() are non-standard 3BSD obsolete versions of isfinite. remove from libm. make them weak_alias in libc to __isfinite and __isfinitef instead. similarly make 3BSD obsolete versions of isinf, isinff, isnan, isnanf weak_aliases to C99's __isinf, __isinff, __isnan, __isnanf - bump major ok millert@
* - replace dtoa w/ David's gdtoa, version 2008-03-15martynas2008-09-0710-1/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - provide proper dtoa locks - use the real strtof implementation - add strtold, __hdtoa, __hldtoa - add %a/%A support - don't lose precision in printf, don't round to double anymore - implement extended-precision versions of libc functions: fpclassify, isnan, isinf, signbit, isnormal, isfinite, now that the ieee.h is fixed - separate vax versions of strtof, and __hdtoa - add complex math support. added functions: cacos, casin, catan, ccos, csin, ctan, cacosh, casinh, catanh, ccosh, csinh, ctanh, cexp, clog, cabs, cpow, csqrt, carg, cimag, conj, cproj, creal, cacosf, casinf, catanf, ccosf, csinf, ctanf, cacoshf, casinhf, catanhf, ccoshf, csinhf, ctanhf, cexpf, clogf, cabsf, cpowf, csqrtf, cargf, cimagf, conjf, cprojf, crealf - add fdim, fmax, fmin - add log2. (adapted implementation e_log.c. could be more acruate & faster, but it's good enough for now) - remove wrappers & cruft in libm, supposed to work-around mistakes in SVID, etc.; use ieee versions. fixes issues in python 2.6 for djm@ - make _digittoint static - proper definitions for i386, and amd64 in ieee.h - sh, powerpc don't really have extended-precision - add missing definitions for mips64 (quad), m{6,8}k (96-bit) float.h for LDBL_* - merge lead to frac for m{6,8}k, for gdtoa to work properly - add FRAC*BITS & EXT_TO_ARRAY32 definitions in ieee.h, for hdtoa&ldtoa to use - add EXT_IMPLICIT_NBIT definition, which indicates implicit normalization bit - add regression tests for libc: fpclassify and printf - arith.h & gd_qnan.h definitions - update ieee.h: hppa doesn't have quad-precision, hppa64 does - add missing prototypes to gdtoaimp - on 64-bit platforms make sure gdtoa doesn't use a long when it really wants an int - etc., what i may have forgotten... - bump libm major, due to removed&changed symbols - no libc bump, since this is riding on djm's libc major crank from a day ago discussed with / requested by / testing theo, sthen@, djm@, jsg@, merdely@, jsing@, tedu@, brad@, jakemsr@, and others. looks good to millert@ parts of the diff ok kettenis@ this commit does not include: - man page changes
* - move isinf, isnan dups to gen, since most is ieee 754martynas2008-07-244-96/+11
| | | | | | | | | | | | | | | | - is{inf,nan} should be macros for real-floating, so rename to __is{inf,nan}, per C99 - implement C99 __fpclassify(), __fpclassifyf(), __isfinite(), __isfinitef(), __isnormal(), __isnormalf(), __signbit(), __signbitf() - long functions added, but not yet enabled, till ieee.h is fixed - implement vax equivalents of the functions - reimplement isinff, isnanf in a better way, and move to libc - add qnan bytes for all archs - bump major man pages will follow ok millert@. arm bits looked over by drahn@ discussed w/ theo, who showed the right direction, to put these functions in libc
* Repair FLT_ROUNDS operation. ok kettenis@miod2007-10-271-3/+3
|