summaryrefslogtreecommitdiffstats
path: root/lib/libc/i386
Commit message (Collapse)AuthorAgeFilesLines
* Make FLT_ROUNDS correctly reflect the dynamic rounding mode.das2004-07-192-1/+26
|
* Replace seven nominally MD implementations of frexp() that are brokendas2004-07-182-68/+1
| | | | for subnormals with one implementation that works.
* Implement the classification macros isfinite(), isinf(), isnan(), anddas2004-07-092-76/+1
| | | | | | | | | | | | | | | | | | | | | isnormal() the hard way, rather than relying on fpclassify(). This is a lose in the sense that we need a total of 12 functions, but it is necessary for binary compatibility because we have never bumped libm's major version number. In particular, isinf(), isnan(), and isnanf() were BSD libc functions before they were C99 macros, so we can't reimplement them in terms of fpclassify() without adding a dependency on libc.so.5. I have tried to arrange things so that programs that could be compiled in FreeBSD 4.X will generate the same external references when compiled in 5.X. At the same time, the new macros should remain C99-compliant. The isinf() and isnan() functions remain in libc for historical reasons; however, I have moved the functions that implement the macros isfinite() and isnormal() to libm where they belong. Moreover, half a dozen MD versions of isinf() and isnan() have been replaced with MI versions that work equally well. Prodded by: kris
* Mechanically kill hard sentence breaks.ru2004-07-022-6/+12
|
* Follow previous change in makecontext. Use %esi to store next ucpdavidxu2004-07-021-1/+1
| | | | | pointer, here we keep orignal %ebp, so we can see where signal handler comes in and interrupt normal code.
* Removed trailing whitespace.ru2004-07-021-10/+10
|
* Use %esi to store next ucp pointer. Mark end of stack bydavidxu2004-07-022-3/+4
| | | | | setting %ebp to zero, this avoids new gdb to dump a weird backtrace.
* Remove the code and an associated comment for gcc 1.x compatibilitydas2004-02-161-9/+1
| | | | and fix a typo in the !__GNUC__ case.
* Fix some aliasing problems.das2004-02-161-14/+19
|
* style cleanup: Remove duplicate $FreeBSD$ tags.cperciva2004-02-101-3/+1
| | | | | | | | These files had tags after the copyright notice, inside the comment block (incorrect, removed), and outside the comment block (correct). Approved by: rwatson (mentor)
* Define LDBL_MANH_SIZE and LDBL_MANL_SIZE to be the sizes of thedas2004-01-181-0/+3
| | | | high and low words of the mantissa in bits, respectively.
* Provide sysarch(2) prototypes in the MD sysarch.h headers. While I'mnectar2004-01-095-15/+5
| | | | | | | | | | at it, use the ANSI C generic pointer type for the second argument, thus matching the documentation. Remove the now extraneous (and now conflicting) function declarations in various libc sources. Remove now unnecessary casts. Reviewed by: bde
* mdoc(7): Use the new feature of the .In macro.ru2003-09-081-1/+1
|
* Make getcontext(2) work on i386. It needs a small wrapper in libcpeter2003-09-042-2/+52
| | | | | | | | | | | | | | | | | | | | | | | otherwise the return from the syscall stub for getcontext will pop off the return value for the caller to the getcontext stub and it will appear as though the setcontext() syscall returned instead of the getcontext(). The same bug exists on amd64, a fix is coming there too. The bug can be demonstrated with this test code fragment: main() { ucontext_t top; if (getcontext(&top) == 0) { write(2, "PING!\n", 6); /* Cause a return value of 1 from getcontext this time */ top.uc_mcontext.mc_eax = 1; setcontext(&top); err(1, "setcontext() returned"); } write(2, "PONG!\n", 6); _exit(0); }
* Add the mlockall() and munlockall() system calls.bms2003-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | - All those diffs to syscalls.master for each architecture *are* necessary. This needed clarification; the stub code generation for mlockall() was disabled, which would prevent applications from linking to this API (suggested by mux) - Giant has been quoshed. It is no longer held by the code, as the required locking has been pushed down within vm_map.c. - Callers must specify VM_MAP_WIRE_HOLESOK or VM_MAP_WIRE_NOHOLES to express their intention explicitly. - Inspected at the vmstat, top and vm pager sysctl stats level. Paging-in activity is occurring correctly, using a test harness. - The RES size for a process may appear to be greater than its SIZE. This is believed to be due to mappings of the same shared library page being wired twice. Further exploration is needed. - Believed to back out of allocations and locks correctly (tested with WITNESS, MUTEX_PROFILING, INVARIANTS and DIAGNOSTIC). PR: kern/43426, standards/54223 Reviewed by: jake, alc Approved by: jake (mentor) MFC after: 2 weeks
* Allow foot shooting as Linux emulation needs it.julian2003-08-041-1/+2
| | | | | | | | | Also change "Auto mode" to use a "special" value instead of 0, and define and document it. I had thought libpthread had already been switched to use auto mode but it appears that patch hasn't been committed yet. Discussed with: Davidxu
* Update manual for i386_set_ldt to reflect newly added features.davidxu2003-07-311-0/+34
| | | | Submitted by: julian
* Push the alloca #error warning farther down to play nicer with some out ofobrien2003-06-251-2/+4
| | | | | | tree local translator. Requested by: jmallett
* Only use this with a non-GCC compiler.obrien2003-06-141-0/+2
|
* Remove stale reference to the deprecated USER_LDT option. The associatedjhb2003-06-091-4/+0
| | | | | | | code is always compiled into the kernel now. Submitted by: Hubert Tournier <hubert@frbsd.org> PR: docs/53068
* Use C99 compatible ASM statements.obrien2003-06-021-1/+1
|
* Assorted mdoc(7) fixes.ru2003-05-221-6/+9
| | | | Approved by: re (blanket)
* Fixed troff(1) and mdoc(7) warnings.ru2003-05-181-1/+1
| | | | Approved by: re (blanket)
* Add a comment describing why it's important for the values in thisdas2003-05-081-0/+7
| | | | | | file to be correct, and how to generate them automatically. Caused much pain and suffering for: peter
* Properly cleanup the stack before jumping to cerror() if rfork(2) fails.jhb2003-05-071-0/+4
| | | | | Submitted by: Igor Sysoev <is@rambler-co.ru> Approved by: re (scottl)
* Document VM86_INTCALL.mdodd2003-04-291-4/+35
| | | | Submitted by: Bruce M Simpson
* Add __ldtoa(), a wrapper around gdtoa() to make it look like dtoa().das2003-04-051-0/+5
| | | | | | | In support of this, add some MD macros to assist in converting long doubles to the format expected by gdtoa(). Reviewed by: silence on standards@
* MFp4: Pentium/Athlon-optimised implementation of wcschr().tjr2003-04-052-1/+78
|
* Align signal frame placed on stack to 16 bytes so that SSE FPU registerdeischen2003-03-291-1/+2
| | | | | | restores can work. Also correct allocation for signal frame size. Reviewed by: mini
* MFp4: Pentium/Athlon-optimised implementation of wcslen().tjr2003-03-142-1/+69
|
* Replace our ancient dtoa/strtod implementation with the gdtoadas2003-03-122-0/+13
| | | | | | | | | | | | | | | | | | package, a more recent, generalized set of routines. Among the changes: - Declare strtof() and strtold() in stdlib.h. - Add glue to libc to support these routines for all kinds of ``long double''. - Update printf() to reflect the fact that dtoa works slightly differently now. As soon as I see that nothing has blown up, I will kill src/lib/libc/stdlib/strtod.c. Soon printf() will be able to use the new routines to output long doubles without loss of precision, but numerous bugs in the existing code must be addressed first. Reviewed by: bde (briefly), mike (mentor), obrien
* MFp4: Reduce code size by 26 bytes by only aligning the jump targets thattjr2003-03-121-10/+1
| | | | are at the top of loops.
* MFp4: Pentium/Athlon-optimised implementation of wmemchr().tjr2003-03-122-1/+115
|
* MFp4: Pentium-optimised implementation of wcscmp(). Performs significantlytjr2003-03-102-1/+80
| | | | better than the code generated by gcc in many cases.
* Remove these from libc; they are now system calls.deischen2003-02-181-158/+0
| | | | Prompted by: mini
* Call the weak symbol for sigprocmask, so that it can be overridden.mini2003-02-171-1/+1
|
* Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).nectar2003-02-166-0/+11
| | | | | | | Only warnings that could be fixed without changing the generated object code and without restructuring the source code have been handled. Reviewed by: /sbin/md5
* o Implement C99 classification macros isfinite(), isinf(), isnan(),mike2003-02-121-0/+2
| | | | | | | | | isnormal(). The current isinf() and isnan() are perserved for binary compatibility with 5.0, but new programs will use the macros. o Implement C99 comparison macros isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), isunordered(). Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU>
* Implement fpclassify():mike2003-02-082-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | o Add a MD header private to libc called _fpmath.h; this header contains bitfield layouts of MD floating-point types. o Add a MI header private to libc called fpmath.h; this header contains bitfield layouts of MI floating-point types. o Add private libc variables to lib/libc/$arch/gen/infinity.c for storing NaN values. o Add __double_t and __float_t to <machine/_types.h>, and provide double_t and float_t typedefs in <math.h>. o Add some C99 manifest constants (FP_ILOGB0, FP_ILOGBNAN, HUGE_VALF, HUGE_VALL, INFINITY, NAN, and return values for fpclassify()) to <math.h> and others (FLT_EVAL_METHOD, DECIMAL_DIG) to <float.h> via <machine/float.h>. o Add C99 macro fpclassify() which calls __fpclassify{d,f,l}() based on the size of its argument. __fpclassifyl() is never called on alpha because (sizeof(long double) == sizeof(double)), which is good since __fpclassifyl() can't deal with such a small `long double'. This was developed by David Schultz and myself with input from bde and fenner. PR: 23103 Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU> (significant portions) Reviewed by: bde, fenner (earlier versions)
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-1/+1
| | | | especially in troff files.
* english(4) police.schweikh2002-12-271-1/+1
|
* Back out the -fpcc-struct-return fixes.kan2002-12-222-24/+68
| | | | Approved by: re (rwatson)
* Import newer versions of div() and ldiv() from NetBSD which handletjr2002-12-212-68/+24
| | | | | | the -fpcc-struct-return calling convention properly instead of returning garbage. This may break backwards compatibility with some old binaries that were compiled when -fno-pcc-struct-return was the default.
* mdoc(7) police: "The .Fa argument.".ru2002-12-193-3/+15
|
* mdoc(7) police: Fixed abuses of the .Ar and .Em macros.ru2002-12-181-1/+1
|
* mdoc(7) police: "The .Fn function".ru2002-12-181-0/+8
|
* mdoc(7) police: "The .Fn system call".ru2002-12-183-0/+18
|
* libc_r wasn't so tied to libc for 22 months.ru2002-11-181-2/+0
|
* Disconnect the userland get/set/swapcontext() functions fromdeischen2002-11-161-2/+2
| | | | | | | | | libc. I want to keep these in some version for the thread library/ies, but don't know whether to have them repo-copied to libc_r or renamed and kept in libc. Change the name of an alpha macro that was changed with the system call commit.
* Re-apply the previously backed-out commit that fixes the problem wherearchie2002-10-311-1/+1
| | | | | | | | HUGE_VAL is not properly aligned on some architectures. The previous fix now works because the two versions of 'math.h' (include/math.h and lib/msun/src/math.h) have since been merged into one. PR: bin/43544
OpenPOWER on IntegriCloud