summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/sparc64/gen (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Userland timecounter implementation for sparc64.kettenis2020-07-082-4/+41
| | | | ok deraadt@, pirofti@
* Add support for timeconting in userland.pirofti2020-07-062-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | This diff exposes parts of clock_gettime(2) and gettimeofday(2) to userland via libc eliberating processes from the need for a context switch everytime they want to count the passage of time. If a timecounter clock can be exposed to userland than it needs to set its tc_user member to a non-zero value. Tested with one or multiple counters per architecture. The timing data is shared through a pointer found in the new ELF auxiliary vector AUX_openbsd_timekeep containing timehands information that is frequently updated by the kernel. Timing differences between the last kernel update and the current time are adjusted in userland by the tc_get_timecount() function inside the MD usertc.c file. This permits a much more responsive environment, quite visible in browsers, office programs and gaming (apparently one is are able to fly in Minecraft now). Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others! OK from at least kettenis@, cheloha@, naddy@, sthen@
* Remove __builtin_saveregs: gcc hasn't used it for years.guenther2017-10-282-62/+2
| | | | | suggested by miod@ ok kettenis@
* Copy files from ../librthread in preparation for moving functionalityguenther2017-08-151-0/+41
| | | | | | | from libpthread to libc. No changes to the build yet, just making it easier to review the substantive diffs. ok beck@ kettenis@ tedu@
* 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@
* Simplify sig{set,long}jmp(): just Do The Job instead of calling othersguenther2016-05-081-52/+50
| | | | ok kettenis@
* Don't use sigreturn(2) in longjmp(3). Instead use a similar approach as inkettenis2016-04-281-59/+22
| | | | | | _longjmp(3) but also restore the signal mask. ok deraadt@
* Wrap the remaining math functions in libc: __fpclassify*(), __flt_rounds(),guenther2015-10-272-2/+4
| | | | | | and ldexp(). ok millert@
* Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure ccpascal2012-08-223-8/+8
| | | | | | | 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
* rely on the compiler giving us a built-in alloca. any new architecturederaadt2012-04-191-6/+6
| | | | | or compiler we use will. ok millert
* alloca.c cannot be usedderaadt2012-04-121-3/+1
|
* Revert (leaving the complex math part alone). Some stuff is dependingmartynas2011-07-083-2/+225
| | | | | 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-225/+2
| | | | them in libc for a very long time. OK guenther@.
* 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.
* 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-147/+2
| | | | | | - remove frexp in hppa64, cloned from hppa - move generic ieee754 implementations of modf and ldexp to gen ok kettenis@, "looks good" millert@
* these were not neededmartynas2008-12-091-2/+1
|
* ditto frexpl and ldexplmartynas2008-12-091-1/+2
|
* - add long double signbitmartynas2008-12-096-6/+38
| | | | | | | | | | | | | - 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-076-1/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* Repair FLT_ROUNDS operation. ok kettenis@miod2007-10-271-3/+3
|
* if we pull in a .S file, we must fake out the lint with a .c filederaadt2005-11-291-1/+2
| | | | | for this first cut, we will do this for alloca() using alloca.c by adding it to LSRCS
* zap rcsid.espie2005-08-072-10/+2
| | | | okay deraadt@ (tested them all)
* Replace broken frexp() with a working one from FreeBSD. There'smillert2005-02-012-76/+2
| | | | | | no need to have a copy for each platform with ieee floating point, only vax needs a special version (which probably has similar bugs). OK and with help from otto@
* In _longjmp(), flush windows rather than attempting to backtrack manually,miod2004-05-041-31/+16
| | | | | | | | | since the latter is not reliable in all cases. This allows ruby to work on sparc64. Problem spotted by claudio@; fix adapted from NetBSD for sparc, FreeBSD for sparc64; ok deraadt@
* fix to use sigaltstack again. help miod ok miod deraadttedu2004-01-291-5/+5
|
* ABI breakage happened with the sigaltstack replacement. It is too late,deraadt2004-01-151-4/+4
| | | | | | | now we just have to cope. Since setjmp uses it, the alpha and sparc64 are unhappy with the structure change. In a few days, we will make the second hop here, for now, use the old system call until all binaries have the new struct in them.
* implementation of __ftoul (float -> unsigned long) (based on __dtoul above it)jason2003-07-211-6/+53
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-0212-74/+26
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Add Doug Gwyn's portable alloca() for platforms w/o an assemblermillert2003-05-021-1/+2
| | | | | | | version. Normally, gcc provides its own alloca() (unless -fno-builtin is specified). The C version is decidedly suboptimal--we really need proper assembler versions but this will work as a stop-gap measure.
* indent delay slotjason2003-02-181-2/+2
|
* Obey calling convention and use the right opcode (fabss -> fabsd); Fabulous...jason2003-02-081-4/+2
| | | | (based on netbsd pr 20140)
* Correct length of jmpbuf, it is sizeof(long) * _JBLEN == 8*14millert2001-10-111-5/+5
| | | | This fixes sigsetjmp()/siglongjmp() on sparc64
* Use the LBL isnan() and isinf() on all platforms with ieee floating point.millert2001-09-102-4/+14
|
* Use the LBL frexp() on all platforms with ieee floating point.millert2001-09-101-2/+5
|
* Adapt to our sigcontext and fix the obvious bugs.art2001-09-071-21/+25
|
* explicit alignment, just like on alpha.art2001-09-051-2/+3
|
* Last pieces needed to build libc on sparc64.art2001-08-291-0/+6
|
* Bunch of necessary files from NetBSD.art2001-08-2911-0/+965
|
* more files from sparc.art2001-08-294-0/+183
|
* bunch of files from sparc.art2001-08-297-0/+399