/picolibc-latest/test/ |
D | malloc.c | 53 void *r, *q; in main() local 58 r = malloc(0); in main() 59 printf("malloc(0): %p\n", r); in main() 61 printf("malloc(0) failed: %s. got %p\n", strerror(errno), r); in main() 64 free(r); in main() 66 r = memalign(128, 237); in main() 67 printf("memalign(128, 237): %p\n", r); in main() 68 if ((uintptr_t) r & 127) { in main() 69 printf("memalign(128, 237) unaligned (%p)\n", r); in main() 72 free(r); in main() [all …]
|
/picolibc-latest/newlib/libc/machine/sparc/machine/ |
D | fenv-fp.h | 42 fexcept_t r; in feclearexcept() local 47 __stfsr(&r); in feclearexcept() 48 r &= ~ex; in feclearexcept() 49 __ldfsr(r); in feclearexcept() 63 fexcept_t r; in fegetexceptflag() local 68 __stfsr(&r); in fegetexceptflag() 69 *flagp = r & ex; in fegetexceptflag() 84 fexcept_t r; in fesetexceptflag() local 89 __stfsr(&r); in fesetexceptflag() 90 r &= ~ex; in fesetexceptflag() [all …]
|
/picolibc-latest/newlib/libc/stdlib/ |
D | nano-malloc.c | 133 chunk_t **p, *r; in malloc() local 147 for (p = &__malloc_free_list; (r = *p) != NULL; p = &r->next) in malloc() 149 if (_size(r) >= alloc_size) in malloc() 151 size_t rem = _size(r) - alloc_size; in malloc() 159 chunk_t *s = (chunk_t *)((char *)r + alloc_size); in malloc() 161 s->next = r->next; in malloc() 164 _set_size(r, alloc_size); in malloc() 171 *p = r->next; in malloc() 175 if (!r->next && __malloc_grow_chunk(r, alloc_size)) in malloc() 180 *p = r->next; in malloc() [all …]
|
D | seed48.c | 17 _seed48_r (struct _rand48 *r, in _seed48_r() argument 22 sseed[0] = r->_seed[0]; in _seed48_r() 23 sseed[1] = r->_seed[1]; in _seed48_r() 24 sseed[2] = r->_seed[2]; in _seed48_r() 25 r->_seed[0] = xseed[0]; in _seed48_r() 26 r->_seed[1] = xseed[1]; in _seed48_r() 27 r->_seed[2] = xseed[2]; in _seed48_r() 28 r->_mult[0] = _RAND48_MULT_0; in _seed48_r() 29 r->_mult[1] = _RAND48_MULT_1; in _seed48_r() 30 r->_mult[2] = _RAND48_MULT_2; in _seed48_r() [all …]
|
D | div.c | 82 div_t r; in div() local 84 r.quot = num / denom; in div() 85 r.rem = num % denom; in div() 112 if (num >= 0 && r.rem < 0) { in div() 113 ++r.quot; in div() 114 r.rem -= denom; in div() 116 else if (num < 0 && r.rem > 0) { in div() 117 --r.quot; in div() 118 r.rem += denom; in div() 120 return (r); in div()
|
D | ldiv.c | 83 ldiv_t r; in ldiv() local 87 r.quot = num / denom; in ldiv() 88 r.rem = num % denom; in ldiv() 89 if (num >= 0 && r.rem < 0) { in ldiv() 90 ++r.quot; in ldiv() 91 r.rem -= denom; in ldiv() 93 else if (num < 0 && r.rem > 0) { in ldiv() 94 --r.quot; in ldiv() 95 r.rem += denom; in ldiv() 97 return (r); in ldiv()
|
D | nano-free.c | 44 chunk_t **p, *r; in free() local 57 for (p = &__malloc_free_list; (r = *p) != NULL; p = &r->next) in free() 60 if (p_to_free <= r) { in free() 63 if (p_to_free == r) in free() 73 if (chunk_after(r) == p_to_free) in free() 75 *_size_ref(r) += _size(p_to_free); in free() 76 p_to_free = r; in free() 77 r = r->next; in free() 83 p_to_free->next = r; in free() 89 if (chunk_after(p_to_free) == r) in free() [all …]
|
D | mbtowc_r.c | 83 ___iso_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, in ___iso_mbtowc() argument 105 _REENT_ERRNO(r) = EILSEQ; in ___iso_mbtowc() 121 __iso_8859_1_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, in __iso_8859_1_mbtowc() argument 124 return ___iso_mbtowc (r, pwc, s, n, -1, state); in __iso_8859_1_mbtowc() 128 __iso_8859_2_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, in __iso_8859_2_mbtowc() argument 131 return ___iso_mbtowc (r, pwc, s, n, 0, state); in __iso_8859_2_mbtowc() 135 __iso_8859_3_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, in __iso_8859_3_mbtowc() argument 138 return ___iso_mbtowc (r, pwc, s, n, 1, state); in __iso_8859_3_mbtowc() 142 __iso_8859_4_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, in __iso_8859_4_mbtowc() argument 145 return ___iso_mbtowc (r, pwc, s, n, 2, state); in __iso_8859_4_mbtowc() [all …]
|
D | srand48.c | 17 _srand48_r (struct _rand48 *r, in _srand48_r() argument 20 r->_seed[0] = _RAND48_SEED_0; in _srand48_r() 21 r->_seed[1] = (unsigned short) seed; in _srand48_r() 22 r->_seed[2] = (unsigned short) ((unsigned long)seed >> 16); in _srand48_r() 23 r->_mult[0] = _RAND48_MULT_0; in _srand48_r() 24 r->_mult[1] = _RAND48_MULT_1; in _srand48_r() 25 r->_mult[2] = _RAND48_MULT_2; in _srand48_r() 26 r->_add = _RAND48_ADD; in _srand48_r()
|
D | lcong48.c | 17 _lcong48_r (struct _rand48 *r, in _lcong48_r() argument 20 r->_seed[0] = p[0]; in _lcong48_r() 21 r->_seed[1] = p[1]; in _lcong48_r() 22 r->_seed[2] = p[2]; in _lcong48_r() 23 r->_mult[0] = p[3]; in _lcong48_r() 24 r->_mult[1] = p[4]; in _lcong48_r() 25 r->_mult[2] = p[5]; in _lcong48_r() 26 r->_add = p[6]; in _lcong48_r()
|
D | rand48.c | 140 __dorand48 (struct _rand48 *r, in __dorand48() argument 146 accu = (unsigned long) r->_mult[0] * (unsigned long) xseed[0] + in __dorand48() 147 (unsigned long) r->_add; in __dorand48() 150 accu += (unsigned long) r->_mult[0] * (unsigned long) xseed[1] + in __dorand48() 151 (unsigned long) r->_mult[1] * (unsigned long) xseed[0]; in __dorand48() 154 accu += r->_mult[0] * xseed[2] + r->_mult[1] * xseed[1] + r->_mult[2] * xseed[0]; in __dorand48()
|
/picolibc-latest/newlib/libm/complex/ |
D | csqrt.c | 77 double x, y, r, t, scale; in csqrt() local 86 r = fabs(x); in csqrt() 87 r = sqrt(r); in csqrt() 89 w = 0.0 + r * (double complex) I; in csqrt() 91 w = r + y * (double complex) I; in csqrt() 97 r = fabs(y); in csqrt() 98 r = sqrt(0.5 * r); in csqrt() 100 w = r + r * (double complex) I; in csqrt() 102 w = r - r * (double complex) I; in csqrt() 122 r = cabs(w); in csqrt() [all …]
|
D | csqrtf.c | 42 float x, y, r, t, scale; in csqrtf() local 60 r = fabsf(y); in csqrtf() 61 r = sqrtf(0.5f * r); in csqrtf() 63 w = r + r * I; in csqrtf() 65 w = r - r * I; in csqrtf() 86 r = cabsf(w); in csqrtf() 88 t = sqrtf(0.5f * r + 0.5f * x); in csqrtf() 89 r = scale * fabsf((0.5f * y) / t); in csqrtf() 92 r = sqrtf(0.5f * r - 0.5f * x); in csqrtf() 93 t = scale * fabsf((0.5f * y) / r); in csqrtf() [all …]
|
/picolibc-latest/ |
D | find-copyright | 9 end_pats = (r'This implementation just', 10 r'Synopsis of public', 11 r'The SPU must have', 12 r'This is a simple version', 13 r'This is a dummy', 14 r'stdio_ext\.h', 15 r'python script to', 16 r'libgen\.h', 17 r'Id:.*Exp', 18 r'sccs\.', [all …]
|
/picolibc-latest/newlib/libm/common/ |
D | log.c | 56 double_t w, z, r, r2, r3, y, invc, logc, kd, hi, lo; in log() local 77 r = x - 1.0; in log() 78 r2 = r * r; in log() 79 r3 = r * r2; in log() 82 y = r3 * (B[1] + r * B[2] + r2 * B[3] in log() 83 + r3 * (B[4] + r * B[5] + r2 * B[6] + r3 * (B[7] + r * B[8]))); in log() 85 hi = r + w; in log() 86 y += r - hi + w; in log() 90 y = r3 * (B[1] + r * B[2] in log() 91 + r2 * (B[3] + r * B[4] + r2 * B[5] in log() [all …]
|
D | log2.c | 56 double_t z, r, r2, r4, y, invc, logc, kd, hi, lo, t1, t2, t3, p; variable 74 r = x - 1.0; 76 hi = r * InvLn2hi; 77 lo = r * InvLn2lo + fma (r, InvLn2hi, -hi); 80 rhi = asfloat64 (asuint64 (r) & -1ULL << 32); 81 rlo = r - rhi; 83 lo = rlo * InvLn2hi + r * InvLn2lo; 85 r2 = r * r; /* rounding error: 0x1p-62. */ 89 p = r2 * (B[0] + r * B[1]); 92 lo += r4 * (B[2] + r * B[3] + r2 * (B[4] + r * B[5]) [all …]
|
/picolibc-latest/newlib/libm/machine/spu/headers/ |
D | expd2.h | 116 vec_double2 r; in _expd2() local 117 r = spu_nmsub(rx,ln2_hi,x); in _expd2() 118 r = spu_nmsub(rx,ln2_lo,r); in _expd2() 121 vec_double2 r2 = spu_mul(r,r); in _expd2() 131 p1 = spu_madd(f12, r, f11); in _expd2() 132 p2 = spu_madd(f05, r, f04); in _expd2() 134 p1 = spu_madd(p1, r, f10); in _expd2() 135 p2 = spu_madd(p2, r, f03); in _expd2() 136 p1 = spu_madd(p1, r, f09); in _expd2() 137 p2 = spu_madd(p2, r, f02); in _expd2() [all …]
|
D | expf4.h | 85 vec_float4 r; in _expf4() local 89 r = spu_nmsub(z,ln2_hi,x); in _expf4() 90 r = spu_nmsub(z,ln2_lo,r); in _expf4() 92 z = spu_mul(r,r); in _expf4() 95 q = spu_madd(r,f07,f06); in _expf4() 96 q = spu_madd(q,r,f05); in _expf4() 97 q = spu_madd(q,r,f04); in _expf4() 98 q = spu_madd(q,r,f03); in _expf4() 99 q = spu_madd(q,r,f02); in _expf4() 100 q = spu_madd(q,z,r); in _expf4() [all …]
|
/picolibc-latest/newlib/libm/test/ |
D | math2.c | 67 double r= randx(); in randy() local 68 r = frexp(r, &pow); in randy() 69 return ldexp(r, randi() & 0x1f); in randy() 76 double r; in test_frexp() local 98 r = frexp(x, &pow); in test_frexp() 99 if (r > 1.0 || r < -1.0) in test_frexp() 105 gives = ldexp(r ,pow); in test_frexp() 116 r = (double) frexpf(xf, &pow); in test_frexp() 117 if (r > 1.0 || r < -1.0) in test_frexp() 123 gives = (double) ldexpf(r ,pow); in test_frexp() [all …]
|
/picolibc-latest/picocrt/machine/riscv/ |
D | crt0.c | 65 unsigned long r[NUM_REG]; member 84 int r; in _ctrap() local 86 for (r = 0; r < NUM_REG; r++) in _ctrap() 87 printf("\tx%d %-5.5s%s 0x" FMT "\n", r, names[r], r < 10 ? " " : "", fault->r[r]); in _ctrap() 94 #define _PASTE(r) #r argument 95 #define PASTE(r) _PASTE(r) argument 119 "i" ((num) * sizeof(unsigned long) + offsetof(struct fault, r))) in _trap() 147 "i"(offsetof(struct fault, r[2]))); in _trap()
|
/picolibc-latest/newlib/libc/posix/ |
D | regerror.c | 119 const struct rerr *r; in regerror() local 128 for (r = rerrs; r->code != 0; r++) in regerror() 129 if (r->code == target) in regerror() 133 if (r->code != 0) in regerror() 134 (void) strcpy(convbuf, r->name); in regerror() 140 s = r->explain; in regerror() 163 const struct rerr *r; in regatoi() local 165 for (r = rerrs; r->code != 0; r++) in regatoi() 166 if (strcmp(r->name, preg->re_endp) == 0) in regatoi() 169 sprintf(localbuf, "%d", r->code); in regatoi()
|
/picolibc-latest/newlib/libc/search/ |
D | tdelete.c | 60 node_t *p, *q, *r; in tdelete() local 74 r = (*rootp)->rlink; /* D1: */ in tdelete() 76 q = r; in tdelete() 77 else if (r != NULL) { /* Right link is NULL? */ in tdelete() 78 if (r->llink == NULL) { /* D2: Find successor */ in tdelete() 79 r->llink = q; in tdelete() 80 q = r; in tdelete() 82 for (q = r->llink; q->llink != NULL; q = r->llink) in tdelete() 83 r = q; in tdelete() 84 r->llink = q->rlink; in tdelete()
|
/picolibc-latest/newlib/libm/ld/ld128/ |
D | e_rem_pio2l.h | 63 long double z,w,t,r,fn; in __ieee754_rem_pio2l() local 82 r = x-fn*pio2_1; in __ieee754_rem_pio2l() 88 y[0] = r-w; in __ieee754_rem_pio2l() 93 t = r; in __ieee754_rem_pio2l() 95 r = t-w; in __ieee754_rem_pio2l() 96 w = fn*pio2_2t-((t-r)-w); in __ieee754_rem_pio2l() 97 y[0] = r-w; in __ieee754_rem_pio2l() 102 t = r; /* will cover all possible cases */ in __ieee754_rem_pio2l() 104 r = t-w; in __ieee754_rem_pio2l() 105 w = fn*pio2_3t-((t-r)-w); in __ieee754_rem_pio2l() [all …]
|
/picolibc-latest/newlib/libm/ld/ld80/ |
D | e_rem_pio2l.h | 75 long double z,w,t,r,fn; in __ieee754_rem_pio2l() local 93 r = x-fn*(long double)pio2_1; in __ieee754_rem_pio2l() 99 y[0] = r-w; in __ieee754_rem_pio2l() 104 t = r; in __ieee754_rem_pio2l() 106 r = t-w; in __ieee754_rem_pio2l() 107 w = fn*pio2_2t-((t-r)-w); in __ieee754_rem_pio2l() 108 y[0] = r-w; in __ieee754_rem_pio2l() 113 t = r; /* will cover all possible cases */ in __ieee754_rem_pio2l() 115 r = t-w; in __ieee754_rem_pio2l() 116 w = fn*pio2_3t-((t-r)-w); in __ieee754_rem_pio2l() [all …]
|
/picolibc-latest/newlib/libm/math/ |
D | s_sqrt.c | 93 __uint32_t r, t1, s1, ix1, q1; in sqrt64() local 138 r = 0x00200000; /* r = moving bit from right to left */ in sqrt64() 140 while (r != 0) { in sqrt64() 141 t = s0 + r; in sqrt64() 143 s0 = t + r; in sqrt64() 145 q += r; in sqrt64() 149 r >>= 1; in sqrt64() 152 r = sign; in sqrt64() 153 while (r != 0) { in sqrt64() 154 t1 = s1 + r; in sqrt64() [all …]
|