/picolibc-latest/newlib/libm/common/ |
D | pow_log_data.c | 4 SPDX-License-Identifier: BSD-3-Clause 20 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 37 .ln2hi = 0x1.62e42fefa3800p-1, 38 .ln2lo = 0x1.ef35793c76730p-45, 41 // relative error: 0x1.11922ap-70 42 // in -0x1.6bp-8 0x1.6bp-8 44 -0x1p-1, 45 0x1.555555555556p-2 * -2, 46 -0x1.0000000000006p-2 * -2, 47 0x1.999999959554ep-3 * 4, [all …]
|
D | s_isnan.c | 7 * Developed at SunPro, a Sun Microsystems, Inc. business. 16 …>>, and <<isnormal>>---floating-point classification macros; <<finite>>, <<finitef>>, <<isinf>>, <… 49 int fpclassify(real-floating <[x]>); 50 int isfinite(real-floating <[x]>); 51 int isinf(real-floating <[x]>); 52 int isnan(real-floating <[x]>); 53 int isnormal(real-floating <[x]>); 66 defined for use in classifying floating-point numbers. This is a help because 68 "real-floating" indicates that the argument is an expression of real floating 69 type. These function-like macros are C99 and POSIX-compliant, and should be [all …]
|
/picolibc-latest/newlib/ |
D | README | 1 README for newlib-4.2.0 release 2 (mostly cribbed from the README in the gdb-4.13 release) 4 This is `newlib', a simple ANSI C library, math library, and collection 7 Prior to the 3.0.0 release, newlib supported both ANSI and K&R-style 10 The newlib and libgloss subdirectories are a collection of software from 17 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 Unpacking and Installation -- quick overview 23 When you unpack the newlib-4.2.0.tar.gz file, you'll find a directory 24 called `newlib-4.2.0', which contains many files. Interesting ones: 25 COPYING* - License files for the sources [all …]
|
/picolibc-latest/newlib/libm/machine/spu/headers/ |
D | recipf4.h | 1 /* -------------------------------------------------------------- */ 13 /* - Redistributions of source code must retain the above copyright*/ 16 /* - Redistributions in binary form must reproduce the above */ 21 /* - Neither the name of IBM Corporation nor the names of its */ 29 /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ 39 /* -------------------------------------------------------------- */ 56 static __inline vector float _recipf4(vector float a) in _recipf4() argument 58 /* This function has been designed to provide a in _recipf4() 61 * single precision input <a>. This includes: in _recipf4() 66 * mode of the processor - truncated toward zero. in _recipf4() [all …]
|
D | divf4.h | 1 /* -------------------------------------------------------------- */ 13 /* - Redistributions of source code must retain the above copyright*/ 16 /* - Redistributions in binary form must reproduce the above */ 21 /* - Neither the name of IBM Corporation nor the names of its */ 29 /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ 39 /* -------------------------------------------------------------- */ 56 static __inline vector float _divf4(vector float a, vector float b) in _divf4() argument 59 /* This function has been designed to provide a in _divf4() 62 * single precision inputs <a> and <b>. This includes: in _divf4() 67 * mode of the processor - truncated toward zero. in _divf4() [all …]
|
/picolibc-latest/newlib/libc/tinystdio/ |
D | stdio_private.h | 19 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 30 /* $Id: stdio_private.h 847 2005-09-06 18:49:15Z joerg_wunsch $ */ 49 #include <stdio-bufio.h> 96 * non-const as in the generic case, this buffer is obtained 100 * a chance to get write access to it again. 138 #define _FDEV_BUFIO_FD(bf) ((int)((intptr_t) (bf)->ptr)) 143 * callbacks (one with an int and the other with a pointer), they are 156 if (!(bf->bflags & __BFPTR)) in bufio_read() 157 return (bf->read_int)(_FDEV_BUFIO_FD(bf), buf, count); in bufio_read() 159 return (bf->read_ptr)((void *) bf->ptr, buf, count); in bufio_read() [all …]
|
/picolibc-latest/doc/ |
D | os.md | 3 Picolibc is designed to be operating-system independent, so it doesn't 15 complex file operations so that a minimal system can easily support 16 the former with only a few functions. 20 FILE objects. The pointers may reside in read-only memory, but the 21 FILE objects may not. A single FILE object may be used for all three 43 It also contains a pointer to an optional `flush` function, which, if 55 These functions are used to initialize a FILE structure: 62 This defines a FILE which can read and write characters using the putc 68 |-------------------|------------|--------------------| 82 Support for these requires malloc/free along with a handful of [all …]
|
D | locking.md | 3 When newlib-multithread and newlib-retargetable-locking are enabled, 6 that a single-threaded application can still use a Picolibc compiled 7 with locking enabled. An application needing locking must provide a 12 Picolibc has a single global lock for APIs that share global 21 Tinystdio (the default stdio) uses per-file locks for the buffered 26 The legacy stdio implementation is full of locking, and has per-file 33 * newlib-retargetable-locking. When 'true', locking operations are 36 * newlib-multithread. When 'true', the library is built with 40 interrelated as to make them effectively co-dependent, so users must 45 When newlib-multithread and newlib-retargetable-locking are enabled [all …]
|
D | using.md | 4 running either no operating system or a small RTOS. It is designed to 23 the users have everything in place. But some third-party toolchains 25 it is not possible as these headers have compiler-specific parts and 36 compile a single file and generate a .o file: 38 $ gcc --specs=picolibc.specs -c foo.c 42 the file. If installed in a separate location, you will need to 45 $ gcc --specs=/usr/local/picolibc/picolibc.specs -c foo.c 47 When building for an embedded system, you'll probably need to use a 48 longer name for the compiler, something like `riscv-unknown-elf-gcc` 49 or `arm-none-eabi-gcc`. [all …]
|
/picolibc-latest/newlib/libc/string/ |
D | wcwidth.c | 4 <<wcwidth>>---number of column positions of a wide-character code 16 shall ensure that the value of <[wc]> is a character representable 17 as a wint_t (combining Unicode surrogate pairs into single 21-bit 18 Unicode code points), and is a wide-character code corresponding to a 22 The <<wcwidth>> function shall either return 0 (if <[wc]> is a null 23 wide-character code), or return the number of column positions to 24 be occupied by the wide-character code <[wc]>, or return -1 (if <[wc]> 25 does not correspond to a printable wide-character code). 34 * IEEE Std 1002.1-2001) for Unicode. 38 * In fixed-width output devices, Latin characters all occupy a single [all …]
|
/picolibc-latest/ |
D | README.md | 2 Copyright © 2018-2023 Keith Packard 7 [AVR Libc](https://www.nongnu.org/avr-libc/). 17 Picolibc source comes from a variety of places and has a huge variety 19 from Newlib, none of the GPL-related bits used to build the library 20 are left in the repository, so all of the source code uses BSD-like 21 licenses, a mixture of 2- and 3- clause BSD itself and a variety of 24 There are two files used for testing printf, test/printf-tests.c and 26 later. There is also a shell script, GeneratePicolibcCrossFile.sh 28 as a helper for people building the library, but not used by picolibc 32 license information in the Debian standard machine-readable format. It [all …]
|
/picolibc-latest/newlib/libm/ld/ld80/ |
D | e_hypotl.c | 6 * Developed at SunPro, a Sun Microsystems, Inc. business. 16 * If (assume round-to-nearest) z=x*x+y*y 24 * (if possible, set rounding to round-to-nearest) 27 * where x1 = x with lower 32 bits cleared, x2 = x-x1; else 29 * t1*yy1+((x-y)*(x-y)+(t1*y2+t2*y)) 30 * where t1 = 2x with lower 32 bits cleared, t2 = 2x-t1, 31 * yy1= y with lower 32 bits chopped, y2 = y-yy1. 37 * hypot(x,y) is INF if x or y is +INF or -INF; else 50 long double a,b,t1,t2,yy1,y2,w; in hypotl() local 57 if(eb > ea) {a=y;b=x;j=ea; ea=eb;eb=j;} else {a=x;b=y;} in hypotl() [all …]
|
/picolibc-latest/newlib/libm/math/ |
D | sf_jn.c | 1 /* ef_jn.c -- float version of e_jn.c. 9 * Developed at SunPro, a Sun Microsystems, Inc. business. 27 float a, b, temp, di; in jnf() local 30 /* J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x) in jnf() 31 * Thus, J(-n,x) = J(n,-x) in jnf() 39 n = -n; in jnf() 40 x = -x; in jnf() 47 sgn = (n & 1) & (hx >> 31); /* even n -- 0, odd n -- sign(x) */ in jnf() 52 /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */ in jnf() 53 a = j0f(x); in jnf() [all …]
|
D | s_hypot.c | 7 * Developed at SunPro, a Sun Microsystems, Inc. business. 17 * If (assume round-to-nearest) z=x*x+y*y 25 * (if possible, set rounding to round-to-nearest) 28 * where x1 = x with lower 32 bits cleared, x2 = x-x1; else 30 * t1*y1+((x-y)*(x-y)+(t1*y2+t2*y)) 31 * where t1 = 2x with lower 32 bits cleared, t2 = 2x-t1, 32 * y1= y with lower 32 bits chopped, y2 = y-y1. 38 * hypot(x,y) is INF if x or y is +INF or -INF; else 53 __float64 a = x, b = y, t1, t2, y1, y2, w; in hypot64() local 61 a = y; in hypot64() [all …]
|
D | sf_hypot.c | 1 /* ef_hypot.c -- float version of e_hypot.c. 9 * Developed at SunPro, a Sun Microsystems, Inc. business. 21 float a = x, b = y, t1, t2, y1, y2, w; in hypotf() local 33 SET_FLOAT_WORD(a, ha); /* a <- |a| */ in hypotf() 34 SET_FLOAT_WORD(b, hb); /* b <- |b| */ in hypotf() 35 if ((ha - hb) > 0xf000000L) { in hypotf() 36 return a + b; in hypotf() 39 if (ha > 0x58800000L) { /* a>2**50 */ in hypotf() 41 w = a + b; /* for sNaN */ in hypotf() 43 w = a; in hypotf() [all …]
|
D | s_jn.c | 6 * Developed at SunPro, a Sun Microsystems, Inc. business. 19 * y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal; 20 * y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal. 26 * for n>x, a continued fraction approximation to 27 * j(n,x)/j(n-1,x) is evaluated and then backward 28 * recursion is used starting from a supposed value 44 invsqrtpi = _F_64(5.64189583547756279280e-01), /* 0x3FE20DD7, 0x50429B6D */ 54 __float64 a, b, temp, di; in jn64() local 63 /* J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x) in jn64() 64 * Thus, J(-n,x) = J(n,-x) in jn64() [all …]
|
/picolibc-latest/newlib/libm/ld/ld128/ |
D | e_hypotl.c | 6 * Developed at SunPro, a Sun Microsystems, Inc. business. 16 * If (assume round-to-nearest) z=x*x+y*y 24 * (if possible, set rounding to round-to-nearest) 27 * where x1 = x with lower 64 bits cleared, x2 = x-x1; else 29 * t1*yy1+((x-y)*(x-y)+(t1*y2+t2*y)) 30 * where t1 = 2x with lower 64 bits cleared, t2 = 2x-t1, 31 * yy1= y with lower 64 bits chopped, y2 = y-yy1. 37 * hypotl(x,y) is INF if x or y is +INF or -INF; else 50 long double a,b,t1,t2,yy1,y2,w; in hypotl() local 57 if(hb > ha) {a=y;b=x;j=ha; ha=hb;hb=j;} else {a=x;b=y;} in hypotl() [all …]
|
/picolibc-latest/newlib/libc/stdlib/ |
D | a64l.c | 4 <<a64l>>, <<l64a>>---convert between radix-64 ASCII string and long 17 Conversion is performed between long and radix-64 characters. The 20 is split up into a maximum of 5 groups of 6 bits and possibly one 23 Each group of 6 bits forms a value from 0--63 which is translated into 24 a character as follows: 29 o 2--11 = '0' to '9' 30 o 12--37 = 'A' to 'Z' 31 o 38--63 = 'a' to 'z' 32 O- 34 When the remaining bits are zero or all bits have been translated, a [all …]
|
D | mprec.c | 9 * is included in all copies of any software which is or includes a copy 22 AT&T Bell Laboratories, Room 2C-463 24 Murray Hill, NJ 07974-2070 25 U.S.A. 29 /* strtod for IEEE-, VAX-, and IBM-arithmetic machines. 31 * This strtod returns a nearest machine number to the input decimal 33 * broken by the IEEE round-even rule. Otherwise ties are broken by 37 * Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101]. 41 * 1. We only require IEEE, IBM, or VAX double-precision 42 * arithmetic (not IEEE double-extended). [all …]
|
D | mallocr.c | 8 /* ---------- To make a malloc.h, start cutting here ------------ */ 11 A version of malloc/free/realloc written by Doug Lea and released to the 21 Note: This version differs from 2.6.4 only by correcting a 28 This is not the fastest, most space-conserving, most portable, or 30 while also being among the most space-conserving, portable and tunable. 31 Consistent balance across these factors results in a good general-purpose 32 allocator. For a high-level description, see 40 Return a pointer to a newly allocated chunk of at least n bytes, or null 45 Return a pointer to a chunk of size n that contains the same data 49 #define REALLOC_ZERO_BYTES_FREES below is set, realloc with a [all …]
|
/picolibc-latest/newlib/libc/stdio/ |
D | fflush.c | 15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 <<fflush>>, <<fflush_unlocked>>---flush buffered file output 56 Additionally, if <[fp]> is a seekable input stream visiting a file 58 unread byte, useful for obeying POSIX semantics when ending a process 61 <<fflush_unlocked>> is a non-thread-safe version of <<fflush>>. 62 <<fflush_unlocked>> may only safely be used within a scope 64 function may safely be used in a multi-threaded program if and only 66 object, as is the case after a successful call to the flockfile() or 71 reentrant versions, where the extra argument <[reent]> is a pointer to 72 a reentrancy structure, and <[fp]> must not be NULL. [all …]
|
D | fmemopen.c | 8 <<fmemopen>>---open a stream around a fixed-length string 19 <<fmemopen>> creates a seekable <<FILE>> stream that wraps a 20 fixed-length buffer of <[size]> bytes starting at <[buf]>. The stream 27 The stream maintains a current position, which moves according to 29 The stream also maintains a current file size, which is never greater 34 <[mode]> starts with <<a>>, the position and file size start at the 42 buffer). When the stream is flushed or closed after a write that 43 changed the file size, a NUL byte is written at the current position 44 if there is still room; if the stream is not also open for reading, a 46 stream has exceeded <[size]>, so that a write-only <[buf]> is always [all …]
|
/picolibc-latest/test/libc-testsuite/ |
D | fnmatch.c | 2 * Copyright © 2005-2020 Rich Felker 5 * a copy of this software and associated documentation files (the 17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 30 /* adapted from dietlibc's test-newfnmatch.c */ 58 for (; map->str; map++) { in printflags() 59 if (map->val && (flags & map->val) == map->val) { in printflags() 60 printf("%s%s", sep, map->str); in printflags() 62 flags &= ~(map->val); in printflags() 80 { "*.a", "foo.c", 0, FNM_NOMATCH }, 84 { "a\\*.c", "a*.c", FNM_NOESCAPE, FNM_NOMATCH }, [all …]
|
/picolibc-latest/scripts/ |
D | run-arm | 3 # SPDX-License-Identifier: BSD-3-Clause 26 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 37 qemu="qemu-system-arm" 51 cpu_arch=`arm-none-eabi-readelf -A "$elf" | awk '/Tag_CPU_arch:/ { print $2 }'` 52 cpu_profile=`arm-none-eabi-readelf -A "$elf" | awk '/Tag_CPU_arch_profile:/ { print $2 }'` 53 fp_arch=`arm-none-eabi-readelf -A "$elf" | awk '/Tag_FP_arch/ { print $2 }'` 54 fp_use=`arm-none-eabi-readelf -A "$elf" | awk '/Tag_ABI_HardFP_use/ { print $2 }'` 55 ram_addr=`arm-none-eabi-readelf -l "$elf" | awk '/LOAD.*RW/ { if (min_va == 0 || $3 < min_va) min_v… 64 v6S-M/Microcontroller) 65 cpu=cortex-m0 [all …]
|
/picolibc-latest/newlib/libm/test/ |
D | math.c | 15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 These vectors were originally generated on a sun3 with a 68881 using 24 Each function is called with a variety of interesting arguments. 27 useful to test - eg sin(1e30) is pointless - the arg has to be 29 left to evaluate with - any number would be just as precise as any 74 (f) = -__builtin_nansf(""); \ 79 (f) = -__builtin_nanf(""); \ 89 (d) = -__builtin_nans(""); \ 94 (d) = -__builtin_nan(""); \ 117 thedouble(p->qs[id].msw, p->qs[id].lsw, &correct.value); in ffcheck_id() [all …]
|