summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdlib/mprec.h
Commit message (Collapse)AuthorAgeFilesLines
* Import correctly working strtold from David M. Gay.Corinna Vinschen2015-11-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add strtodg.c and strtorx.c. * libc/stdlib/Makefile.in: Regenerate. * libc/stdlib/strtodg.c: New file implementing generic string to long double conversion. * libc/stdlib/strtorx.c: New file, implementing IEEE format string to long double conversion. * libc/stdlib/mprec.h (_strtodg_r): Declare. (_strtorx_r): Declare. * libc/stdlib/gdtoa.h (__UShort): Define. * libc/stdlib/strtold.c (__flt_rounds): Define for i386 and x86_64 target. (FLT_ROUNDS): Define, as 0 on platforms missing a __flt_rounds function. (_strtold_r): Converted from strtold. Call _strtorx_r on targets supporting distinct long doubles. (strtold): Just call _strtold_r. * libc/include/stdlib.h (_strtold_r): Declare. * libc/stdlib/ldtoa.c (_strtold): Comment out. Explain why. * libc/stdio/vfscanf.c (__SVFSCANF_R): Call _strtold_r instead of _strtold. * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto. * common.din (strtold): Drop redirection to _strtold. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Make match function globally available to stdlib functions.Corinna Vinschen2015-11-201-0/+2
| | | | | | | | * libc/stdlib/strtod.c (match): Move from here... * libc/stdlib/gdtoa-hexnan.c (match): ...to here. * libc/stdlib/mprec.h (match): Declare and add __match define. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* * libc/stdlib/gdtoa-gethex.c (__hexdig): Constify.Corinna Vinschen2013-06-101-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | (hexdig_init): Remove. (__hexdig_fun): New function. hexdig_init, added __hexdig_fun (gethex): Call __get_hexdig macro rather than hexdig. * libc/stdlib/gdtoa-hexnan.c (hexnan): Constify fpi argument. Call __get_hexdig macro rather than hexdig. * libc/stdlib/ldtoa.c: Throughout constify functions arguments where required by constifying the following arrays. (ezero): Constify. (eone): Constify. (ermsg): Constify. (etens): Constify. (emtens): Constify. (nan113): Constify. (nan64): Constify. (nan53): Constify. (nan24): Constify. * libc/stdlib/mprec.h (__get_hexdig): Define. (gethex): Constify args in declaration where appropriate. (hexnan): Ditto. (hexdig_init): Remove declaration. (__hexdig_fun): Declare. * libc/stdlib/strtod.c (fpi): Constify. (fpinan): Constify.
* * libc/stdlib/mprec.h (Storeinc): Add parenthesis to avoid compilerCorinna Vinschen2012-08-071-1/+1
| | | | warning.
* Fix strict-aliasing issues with _strtod_r and Storeinc.Hans-Peter Nilsson2008-06-251-38/+11
| | | | | | | | | | | | | | * libc/stdlib/strtod.c (_strtod_r): Change local variables aadj, rv, rv0 from double to type U. Use accessor macros dval, dword0 and dword1 for all accesses except for the ULtod call, where rv.i replaces the pointer cast. * libc/stdlib/mprec.h (U): Rename member L to i for easier re-use of access macros. Tweak comment. Remove #ifdef'd YES_ALIAS code. (dword0, dword1, dval): Define in terms of uncast union member access. Ditto for _DOUBLE_IS_32BITS variants. (Storeinc): Replace aliasing-flawed microoptimized definition with alternative suggested in comment. Remove now stale comment.
* 2007-08-31 Antony King <antony.king@st.com>Jeff Johnston2007-08-311-9/+5
| | | | | | | | * libc/stdlib/mprec.h [_DOUBLE_IS_32BITS}: Define IEEE_Arith bits and redefine associated dword0 macro (rvalue issue). * libc/stdio/vfieeefp.h: Ditto. * libc/stdlib/strtod.c: Add checks for _DOUBLE_IS_32BITS to prevent setting dword1 which is an rvalue only.
* 2007-06-06 Christian Groessler <chris@groessler.org>Jeff Johnston2007-06-061-4/+8
| | | | | | | | | * libc/stdlib/ldtoa (_ldcheck): Make sure the setting of rnd is done after the last local variable declaration. 2007-06-06 Jeff Johnston <jjohnstn@redhat.com> * libc/stdlib/mprec.h[Just_16]: Make sure that Pack_16 is defined.
* 2006-07-05 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2006-07-051-3/+14
| | | | | | | | * libc/stdlib/mprec.h [_DOUBLE_IS_32BITS]: Turn off C99 hex floating-point format support. Also redefine dword0 and dword1 macros. * libc/stdlib/strtod.c: Add checks for _DOUBLE_IS_32BITS to prevent setting dword1 which is an rvalue only.
* 2006-06-22 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2006-06-221-23/+140
| | | | | | | | | | | | | | | | * libc/stdlib/Makefile.am: Add new gdtoa routines. * libc/stdlib/Makefile.in: Regenerated. * libc/stdlib/gd_qnan.h: New file. * libc/stdlib/gdtoa-gethex.c: Ditto. * libc/stdlib/gdtoa-hexnan.c: Ditto. * libc/stdlib/gdtoa.h: Ditto. * libc/stdlib/mprec.c: Add new helper routines needed by the new gdtoa code. * libc/stdlib/mprec.h: Integrate some defines and prototypes used by gdtoa routines here. * libc/stdlib/strtod.c: Rebased on David M. Gay's gdtoa-strtod.c which adds C99 support such as nan, inf, and hexadecimal input format.
* 2002-06-24 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2002-06-241-0/+1
| | | | | | | | | * libc/include/math.h: Remove <sys/types.h>. (__dmath): Use __ULong instead of _uint32_t. * libc/include/sys/reent.h: If long or int is not 32-bits, include <sys/types.h> to get definitions for _int32_t and _uint32_t. * libc/stdlib/mprec.h: Include <sys/types.h> to get integer defs. * libm/common/fdlibm.h: Ditto.
* Handle ARMs with big endian IEEE words but little endian IEEE bytesNick Clifton2001-06-281-1/+1
|
* import newlib-2000-02-17 snapshotChristopher Faylor2000-02-171-0/+313