summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/i386/gen (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Geode CPU does not support SSE, so MXCSR does not exists there. Asbluhm2020-12-133-9/+3
| | | | | | | | our i386 compiler does not generate SSE instructions by default, it is not strictly necessary to save MXCSR content between setjmp(3) and longjmp(3). We do not want to end supporting such old processors now. Remove the stmxcsr and ldmxcsr instructions from libc. reported by Johan Huldtgren; OK jsg@ kettenis@
* On i386 setjmp(3) should store the FPU state and longjmp(3) restorebluhm2020-12-063-3/+15
| | | | | | it. There is enough space in jmp_buf to save MXCSR and CW register. Idea taken from amd64. This fixes regress/lib/libc/setjmp-fpu . OK kettenis@
* Introduce constants to access the setjmp(3) jmp_buf fields frombluhm2020-12-063-76/+79
| | | | | | | i386 libc. The assembler code is more readable than with magic numbers. This brings i386 in line with amd64. No change in object file. OK kettenis@
* 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@
* clang doesn't propagate attributes like "asm labels" and "visibility(hidden)"guenther2017-11-291-2/+2
| | | | | | | | | to builtins like mem{set,cpy,move} and __stack_smash_handler. So, when building with clang, instead mark those as protected visibility to get rid of the PLT relocations. We can't take the address of them then, but that's ok: it's a build-time error not a run-time error. ok kettenis@
* Put _map table into .rodata instead of .textderaadt2017-08-191-2/+2
|
* Copy files from ../librthread in preparation for moving functionalityguenther2017-08-151-0/+25
| | | | | | | from libpthread to libc. No changes to the build yet, just making it easier to review the substantive diffs. ok beck@ kettenis@ tedu@
* Do setjmp cookies for eip, esp, and ebp. For bonus points, mix howguenther2016-05-303-70/+124
| | | | | | | | the cookies are used in setjmp/_setjmp/sigsetjmp so that mixing calls (e.g., longjmp on a _setjmp buffer) will scramble all three registers and jump you to a random location on a random stack! ok deraadt@
* Wrap the remaining math functions in libc: __fpclassify*(), __flt_rounds(),guenther2015-10-273-4/+7
| | | | | | and ldexp(). ok millert@
* Do provide hidden _libc_* aliases for sig{block,setmask} and use them inguenther2015-09-132-10/+10
| | | | | | | the ASM *setjmp implementations. Skip the PLT when calling them on amd64 (other archs to do this after testing) ok miod@
* remove code for ancient gcc.daniel2015-01-041-6/+1
| | | | ok millert@, kettenis@
* let this compile with clang; no binary change with gcc.daniel2014-11-141-2/+2
| | | | ok deraadt@
* add proto for amd64 case; unify otherwisederaadt2013-11-121-1/+1
|
* Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure ccpascal2012-08-224-11/+11
| | | | | | | 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@
* rely on the compiler giving us a built-in alloca. any new architecturederaadt2012-04-192-52/+2
| | | | | 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-3/+110
| | | | | 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-110/+3
| | | | them in libc for a very long time. OK guenther@.
* fix rcs ids. ok sthen@martynas2009-06-211-1/+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-191-2/+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/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-99/+12
| | | | | | | | | | | | | | | | - 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
* if we pull in a .S file, we must fake out the lint with a .c filederaadt2005-11-291-1/+3
| | | | | for this first cut, we will do this for alloca() using alloca.c by adding it to LSRCS
* zap rcsid, tested there. okay deraadt@espie2005-08-0721-103/+20
|
* Fix typo in comment (_setjmp -> setjmp)hshoexer2005-04-011-2/+2
| | | | ok deraadt
* Replace broken frexp() with a working one from FreeBSD. There'smillert2005-02-012-77/+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@
* proto repairsderaadt2003-07-151-1/+3
|
* pull in headersderaadt2003-06-253-6/+9
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-0214-87/+31
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* ELF fixups, ELF PIC syscall support, asm changes as requested by assembler.drahn2003-04-173-4/+18
|
* use _C_LABELmickey2001-11-012-10/+10
|
* Use the LBL isnan() and isinf() on all platforms with ieee floating point.millert2001-09-103-28/+72
|
* Use the LBL frexp() on all platforms with ieee floating point.millert2001-09-101-15/+28
|
* tabifykstailey1997-07-231-6/+6
|
* Remove dead codetholo1996-09-151-2/+2
| | | | | | Remove unused variables Silence some warnings lint(1) is your friend
* Fix RCS idstholo1996-08-1922-50/+52
| | | | Make sure everything uses {SYS,}LIBC_SCCS properly
* Use __asm, not asmtholo1996-03-251-3/+3
|
* From NetBSD: Add explicit return typeniklas1996-02-241-1/+3
|
* from netbsd: Use <machine/asm.h> instead of DEFS.hderaadt1995-12-307-28/+28
|
* from netbsd:deraadt1995-12-303-15/+12
| | | | Remove #include "SYS.h"; it is not needed (by normal assembly functions)
* initial import of NetBSD treederaadt1995-10-1822-0/+1062