summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Trick lint into recording the right prototypes in the llib-lc.lnmartynas2011-07-027-29/+56
| | | | database on the vax, similarly like has been done in gen.
* - The 0x1p514 was wrong on VAX, but remove FP_SUBNORMAL, FP_INFINITE,martynas2011-06-082-20/+6
| | | | | | | | and FP_NAN cases altogether, since they are not supported, and fpclassify() will never return that. (Leftovers when this was cloned.) - Kill unused INFSTR, NANSTR, LDBL_ADJ. - Teach hdtoa() that rv_alloc can fail. - Move STRTOG_NoMemory above STRTOG_Infinite (fallthru).
* On PowerPC we cannot manipulate FPSCR[VX]--it's a summary of allmartynas2011-05-251-2/+6
| | | | | | | | the invalid exception bits, as described in Section 3.3.6.1.1 of PowerPC Architecture Programming Environments Manual. A proper way to cause an invalid operation exception is to set FPSCR[VXSOFT]. Similarly, we clear all the FPSCR[VX*] bits otherwise.
* Merge the same fix for hppa64; reminded by miod@:martynas2011-04-231-2/+2
| | | | | Sticky flags are in the left half of fpsr;  not the undefined bits in the right half.  OK miod@.
* Sticky flags are in the left half of fpsr; not the undefined bitsmartynas2011-04-221-2/+2
| | | | in the right half. OK miod@.
* Make this code actually compile on hppa64.jsing2011-04-219-79/+79
| | | | ok kettenis@
* Rework setjmp so that it works for hppa64.jsing2011-04-211-67/+67
| | | | ok kettenis@
* Provide reasonable gdtoa headers.jsing2011-04-212-2/+15
| | | | ok kettenis@
* Make SYS.h actually compile on hppa64.jsing2011-04-211-14/+14
| | | | ok kettenis@
* Remove wrong check.ariane2011-04-151-10/+1
| | | | | | | | | | | | | HPPA longjmp tests that the env parameter < the current stack pointer. The test relies on the stack being at the end of the memory space. This test is wrong for a couple of reasons: - the main stack is at 0x78000000-0x80000000, but allocations between 0x80000000-0xc0000000 are available to the program, - pthread stacks may be at any place in the address space, allowing a heap-allocated env parameter to fail the check. ok deraadt@, kettenis@, guenther@ at least
* On the a.out architectures, WEAK_ALIAS does an implicit _C_LABEL()deraadt2011-04-093-6/+6
| | | | ok miod
* Fix the previous commit: define ___cerror, no __cerrorguenther2011-04-051-4/+4
| | | | tested by otto@; ok miod@
* Move __cerror to ___cerror with a weak alias so that rthreads can override it.guenther2011-04-0429-73/+103
| | | | | | 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-122-4/+4
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Provide a WEAK_ALIAS macro in <machine/asm.h> for the few platformsguenther2010-10-015-14/+12
| | | | | | | that didn't already have one, and then immediately use it in libc's SYS.h ok miod@
* Provide IRIX-compatible get_fpc_csr() and set_fpc_csr() for mips, althoughmiod2010-09-242-2/+46
| | | | | | | | we don't provide the silly union to decompose the value. This will allow userland to flip the ``flush denormalized to zero'' setting, which apparently is being relied upon by tcl. Asked by jasper@ a long time ago. Riding upon the upcoming libc major crank.
* Give little-endian fp on mips a change to be handled correctly.miod2010-01-231-0/+4
|
* More changes to avoid truncating 64 bit pointers to 32 bits and sign-extendingmiod2009-12-118-69/+69
| | | | them; allows userland with stack beyond 2GB to run.
* Use a local numeric label to branch to the start of the function, instead ofmiod2009-11-011-2/+3
| | | | referencing it by name; silences a linker warning; no functional change.
* more rcsid/sccs cleanupderaadt2009-10-2842-223/+18
|
* teach gdtoa & its subroutines that malloc can fail; in which casemartynas2009-10-161-0/+4
| | | | | | ecvt, fcvt, gcvt, *printf, strtof, strtod, strtold act per ieee 1003.1. after these massive changes, remove unused files which would not work now. reported by Maksymilian Arciemowicz; ok theo
* Add an implementation of IRIX-compatible cacheflush() routine to mips ports,miod2009-09-272-1/+39
| | | | | | | needed for gcc -ftrampoline operation as well as by some third-party software. Although the implementation uses the sysarch() sysctl, the wrapper is added to libc as it was a direct system call (which it is on IRIX).
* Load symbol address with dla, not la; good thing userland is still limitedmiod2009-07-131-2/+2
| | | | to 2GB of vm space.
* fix rcs ids. ok sthen@martynas2009-06-211-1/+1
|
* Fix signed vs unsigned issue with memcmp/strncmp where the size parameterdrahn2009-05-032-10/+16
| | | | was incorrectly being treated as signed. ok miod@
* junk spacederaadt2009-04-291-1/+1
|
* remove from gen so that lint doesn't check gen if assembly versionsmartynas2009-04-2112-26/+27
| | | | are available. spotted by theo
* - ldexp implementation has issues. switch to the one from libmmartynas2009-04-1928-3111/+23
| | | | | | - remove frexp in hppa64, cloned from hppa - move generic ieee754 implementations of modf and ldexp to gen ok kettenis@, "looks good" millert@
* this is not a write-only register. might have caused to optimizemartynas2009-04-051-2/+2
| | | | it away. ok miod@
* __isinff and __isnanfmartynas2008-12-122-4/+4
|
* do the same as was done in mi version: do not include math.h, since isinf,martynas2008-12-122-4/+2
| | | | and isnan would expand to macros and compatibility aliases won't work
* no spaces allowed in the macro arguments. completely insanity!deraadt2008-12-102-4/+4
|
* use sys/cdefs.h; pointed out by theomartynas2008-12-1014-28/+28
|
* use sys/cdefs.hderaadt2008-12-102-4/+3
|
* these were not neededmartynas2008-12-096-12/+6
|
* ditto frexpl and ldexplmartynas2008-12-0914-15/+45
|
* alias fabsl to fabs on these archsmartynas2008-12-097-7/+23
|
* remove unusedmartynas2008-12-096-201/+0
|
* - add long double signbitmartynas2008-12-0952-55/+348
| | | | | | | | | | | | | - 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@
* Use large pic asm for access to errno (needed for pie). Originally fromkurt2008-09-291-2/+4
| | | | | drahn@ but tweaked to use same scratch reg as PIC_PROLOGUE. okay miod@ drahn@
* - replace dtoa w/ David's gdtoa, version 2008-03-15martynas2008-09-07101-11/+2160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* fix apps that use isinff, isnanf; use ieee 754 mi code, as allmartynas2008-07-253-119/+2
| | | | other ieee fp archs do; pointed out by theo. tested by theo
* - move isinf, isnan dups to gen, since most is ieee 754martynas2008-07-2458-1168/+376
| | | | | | | | | | | | | | | | - 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
* clear sign bit, instead of comparing to zero and setting x=-x.martynas2008-07-232-41/+34
| | | | | | | fixes special cases, such as neg. zero, and makes C99 conformant ok miod@, millert@ since there's nothing else in arm's fabs.c, replace 4-clause license w/ the one at /usr/share/misc/license.template
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-2623-184/+23
| | | | | | | | | 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@
* Use _C_LABEL when appropriate.miod2008-05-2112-38/+40
|
* Use _PROF_PROLOGUE insteaf of rolling our own.miod2008-05-211-4/+6
|
* Repair FLT_ROUNDS operation. ok kettenis@miod2007-10-272-6/+6
|
* Change the syscall invocation sequences to no longer fetch the last fewmiod2007-10-242-8/+2
| | | | | | | | | | arguments from the stack, since the kernel will now copyin() them when necessary. This makes all system calls (but mmap()) slightly faster. WARNING! After this commit, your binaries must run against a kernel featuring m88k/m88k/trap.c r1.34 or better - i.e. a 4.1 or later kernel.
* "boundries" -> "boundaries" in various comments. Started by Diego Casati.krw2007-05-252-4/+4
|