Home
last modified time | relevance | path

Searched refs:b (Results 1 – 25 of 270) sorted by relevance

1234567891011

/picolibc-latest/test/libc-testsuite/
Dstring.c57 char b[32] = {0}; in test_string() local
64 TEST(s, strcpy(b, c), b, "wrong return %p != %p"); in test_string()
66 TEST(s, strcpy(b+1, c), b+1, "wrong return %p != %p"); in test_string()
68 TEST(s, strcpy(b+2, c), b+2, "wrong return %p != %p"); in test_string()
70 TEST(s, strcpy(b+3, c), b+3, "wrong return %p != %p"); in test_string()
73 TEST(s, strcpy(b+1, c+1), b+1, "wrong return %p != %p"); in test_string()
75 TEST(s, strcpy(b+2, c+2), b+2, "wrong return %p != %p"); in test_string()
77 TEST(s, strcpy(b+3, c+3), b+3, "wrong return %p != %p"); in test_string()
80 TEST(s, memset(b, 'x', sizeof b), b, "wrong return %p != %p"); in test_string()
81 TEST(s, strncpy(b, "abc", sizeof b - 1), b, "wrong return %p != %p"); in test_string()
[all …]
Dsnprintf.c171 char b[2000]; in test_snprintf() local
175 TEST(i, snprintf(b, 0, "%.0s", "goodbye"), 0, "length returned %d != %d"); in test_snprintf()
177 strcpy(b, "xxxxxxxx"); in test_snprintf()
178 TEST(i, snprintf(b, 4, "%ld", 123456l), 6, "length returned %d != %d"); in test_snprintf()
179 TEST_S(b, "123", "incorrect output"); in test_snprintf()
180 TEST(i, b[5], 'x', "buffer overrun"); in test_snprintf()
185 TEST(i, snprintf(b, sizeof b, "%.1022f", 0x1p-1021), 1024, "%d != %d"); in test_snprintf()
186 b[1] = '0'; in test_snprintf()
189 if (b[j]<'5') b[j]+=b[j]-'0'+k, k=0; in test_snprintf()
190 else b[j]+=b[j]-'0'-10+k, k=1; in test_snprintf()
[all …]
/picolibc-latest/newlib/libc/machine/aarch64/
Dstrchr.S87 dup vrepchr.16b, chrin
92 b.eq L(loop)
98 ld1 {vdata1.16b, vdata2.16b}, [src], #32
100 cmeq vhas_nul1.16b, vdata1.16b, #0
101 cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b
102 cmeq vhas_nul2.16b, vdata2.16b, #0
103 cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b
104 bif vhas_nul1.16b, vhas_chr1.16b, vrepmask_0.16b
105 bif vhas_nul2.16b, vhas_chr2.16b, vrepmask_0.16b
106 and vend1.16b, vhas_nul1.16b, vrepmask_c.16b
[all …]
Dstrchrnul.S82 dup vrepchr.16b, chrin
86 b.eq L(loop)
92 ld1 {vdata1.16b, vdata2.16b}, [src], #32
94 cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b
95 cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b
96 cmhs vhas_nul1.16b, vhas_chr1.16b, vdata1.16b
97 cmhs vhas_nul2.16b, vhas_chr2.16b, vdata2.16b
98 and vhas_chr1.16b, vhas_nul1.16b, vrepmask.16b
99 and vhas_chr2.16b, vhas_nul2.16b, vrepmask.16b
101 addp vend1.16b, vhas_chr1.16b, vhas_chr2.16b // 256->128
[all …]
Dstrrchr.S92 dup vrepchr.16b, chrin
98 b.eq L(aligned)
104 ld1 {vdata1.16b, vdata2.16b}, [src], #32
106 cmeq vhas_nul1.16b, vdata1.16b, #0
107 cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b
108 cmeq vhas_nul2.16b, vdata2.16b, #0
109 cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b
110 and vhas_nul1.16b, vhas_nul1.16b, vrepmask_0.16b
111 and vhas_chr1.16b, vhas_chr1.16b, vrepmask_c.16b
112 and vhas_nul2.16b, vhas_nul2.16b, vrepmask_0.16b
[all …]
Dmemchr.S65 dup vrepchr.16b, chrin
71 b.eq L(loop)
79 ld1 {vdata1.16b, vdata2.16b}, [src], #32
82 cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b
83 cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b
84 and vhas_chr1.16b, vhas_chr1.16b, vrepmask.16b
85 and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b
86 addp vend.16b, vhas_chr1.16b, vhas_chr2.16b /* 256->128 */
87 addp vend.16b, vend.16b, vend.16b /* 128->64 */
94 b.ls L(masklast)
[all …]
Dstrlen.S105 b.hi L(page_cross)
126 b.eq L(bytes16_31)
152 b.eq L(loop_entry)
172 uminp maskv.16b, datav1.16b, datav2.16b
173 uminp maskv.16b, maskv.16b, maskv.16b
174 cmeq maskv.8b, maskv.8b, 0
179 cmeq maskv.16b, datav1.16b, 0
182 cmeq maskv.16b, datav2.16b, 0
186 shrn maskv.8b, maskv.8h, 4
199 ld1 {datav1.16b, datav2.16b}, [src]
[all …]
Dmemcmp.S44 b.lo L(less16)
49 b.ne L(return2)
54 b.ls L(last_bytes)
56 b.hs L(loop_align)
65 b.ne L(return2)
67 b.ls L(last_bytes)
73 b.ne L(return2)
78 b.hi L(loop32)
109 b L(return2)
118 b L(return2)
[all …]
Dmemrchr.S55 ld1 {vdata.16b}, [src]
56 dup vrepchr.16b, chrin
57 cmeq vhas_chr.16b, vdata.16b, vrepchr.16b
59 shrn vend.8b, vhas_chr.8h, 4 /* 128->64 */
73 b.ls L(nomatch)
83 cmeq vhas_chr.16b, vdata.16b, vrepchr.16b
84 umaxp vend.16b, vhas_chr.16b, vhas_chr.16b /* 128->64 */
91 cmeq vhas_chr.16b, vdata.16b, vrepchr.16b
92 b.lo L(end_2)
93 umaxp vend.16b, vhas_chr.16b, vhas_chr.16b /* 128->64 */
[all …]
/picolibc-latest/newlib/libm/complex/
Dcsqrtl.c51 long double a, b; in csqrtl() local
56 b = cimagl(z); in csqrtl()
60 return (cpackl((long double) 0.0L, b)); in csqrtl()
61 if (isinf(b)) in csqrtl()
62 return (cpackl((long double) INFINITY, b)); in csqrtl()
64 t = (b - b) / (b - b); /* raise invalid if b is not a NaN */ in csqrtl()
75 return (cpackl(fabsl(b - b), copysignl(a, b))); in csqrtl()
77 return (cpackl(a, copysignl(b - b, b))); in csqrtl()
85 if (fabsl(a) >= THRESH || fabsl(b) >= THRESH) { in csqrtl()
87 b *= 0.25L; in csqrtl()
[all …]
/picolibc-latest/newlib/libc/machine/h8500/
Dshifts.c21 int __ashrhi3(int a,int b) in __ashrhi3() argument
23 return a>>b; in __ashrhi3()
26 int __ashlhi3(int a,int b) in __ashlhi3() argument
28 return a<<b; in __ashlhi3()
31 unsigned __lshlhi3(unsigned int a,int b) in __lshlhi3() argument
33 return a<<b; in __lshlhi3()
36 unsigned __lshrhi3(unsigned int a,int b) in __lshrhi3() argument
38 return a>>b; in __lshrhi3()
44 long __ashrsi3(long a, int b) in __ashrsi3() argument
46 return a>>b; in __ashrsi3()
[all …]
Dmulsi3.c28 long __mulsi3(u a, u b) in __mulsi3() argument
36 b.s.msw == 0) in __mulsi3()
38 return (long)a.s.lsw * b.s.lsw; in __mulsi3()
47 if (b.v < 0) in __mulsi3()
50 b.v = - b.v; in __mulsi3()
53 pp1 = (long)a.s.lsw * b.s.lsw ; in __mulsi3()
54 pp2 = (long)a.s.lsw * b.s.msw + (long)a.s.msw * b.s.lsw; in __mulsi3()
64 long __mulpsi3(long a, long b) in __mulpsi3() argument
66 return a*b; in __mulpsi3()
71 __mulhi3(short a, short b) in __mulhi3() argument
[all …]
/picolibc-latest/newlib/libm/math/
Dsf_jn.c27 float a, b, temp, di; in jnf() local
50 b = zero; in jnf()
54 b = j1f(x); in jnf()
56 temp = b; in jnf()
57 b = b * ((float)(i + i) / x) - a; /* avoid underflow */ in jnf()
66 b = zero; in jnf()
69 b = temp; in jnf()
72 b *= temp; /* b = (x/2)^n */ in jnf()
74 b = b / a; in jnf()
126 b = one; in jnf()
[all …]
Ds_jn.c54 __float64 a, b, temp, di; in jn64() local
81 b = zero; in jn64()
113 b = invsqrtpi * temp / sqrt64(x); in jn64()
116 b = j164(x); in jn64()
118 temp = b; in jn64()
119 b = b * ((__float64)(i + i) / x) - a; /* avoid underflow */ in jn64()
129 b = zero; in jn64()
132 b = temp; in jn64()
135 b *= temp; /* b = (x/2)^n */ in jn64()
137 b = b / a; in jn64()
[all …]
Ds_hypot.c53 __float64 a = x, b = y, t1, t2, y1, y2, w; in hypot64() local
62 b = x; in hypot64()
68 b = y; in hypot64()
71 SET_HIGH_WORD(b, hb); /* b <- |b| */ in hypot64()
73 return a + b; in hypot64()
79 w = a + b; /* for sNaN */ in hypot64()
81 if (((ha & 0xfffff) | low) == 0 && !issignaling(b)) in hypot64()
83 GET_LOW_WORD(low, b); in hypot64()
85 w = b; in hypot64()
93 SET_HIGH_WORD(b, hb); in hypot64()
[all …]
Dsf_hypot.c21 float a = x, b = y, t1, t2, y1, y2, w; in hypotf() local
34 SET_FLOAT_WORD(b, hb); /* b <- |b| */ in hypotf()
36 return a + b; in hypotf()
41 w = a + b; /* for sNaN */ in hypotf()
42 if (FLT_UWORD_IS_INFINITE(ha) && !issignaling(b)) in hypotf()
45 w = b; in hypotf()
53 SET_FLOAT_WORD(b, hb); in hypotf()
60 b *= t1; in hypotf()
68 SET_FLOAT_WORD(b, hb); in hypotf()
72 w = a - b; in hypotf()
[all …]
/picolibc-latest/test/
Drounding-mode-sub.c42 div(double a, double b) in div() argument
44 return a/b; in div()
48 mul(double a, double b) in mul() argument
50 return a * b; in mul()
54 sub(double a, double b) in sub() argument
56 return a - b; in sub()
60 div_f(float a, float b) { in div_f() argument
61 return a/b; in div_f()
65 mul_f(float a, float b) { in mul_f() argument
66 return a * b; in mul_f()
[all …]
/picolibc-latest/newlib/libc/stdlib/
Dgdtoa-gethex.c70 rshift (_Bigint *b, in rshift() argument
76 x = x1 = b->_x; in rshift()
78 if (n < b->_wds) { in rshift()
79 xe = x + b->_wds; in rshift()
95 if ((b->_wds = x1 - b->_x) == 0) in rshift()
96 b->_x[0] = 0; in rshift()
101 _Bigint *b) in increment() argument
109 if (!b) in increment()
112 x = b->_x; in increment()
113 xe = x + b->_wds; in increment()
[all …]
Dmprec.c175 _Bigint * b, in multadd() argument
186 if (!b) in multadd()
189 wds = b->_wds; in multadd()
190 x = b->_x; in multadd()
209 if (wds >= b->_maxwds) in multadd()
211 b1 = Balloc (b->_k + 1); in multadd()
213 Bfree(b); in multadd()
216 Bcopy (b1, b); in multadd()
217 Bfree (b); in multadd()
218 b = b1; in multadd()
[all …]
/picolibc-latest/newlib/libm/ld/ld128/
De_hypotl.c50 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()
59 SET_LDOUBLE_MSW64(b,hb); /* b <- |b| */ in hypotl()
60 if((ha-hb)>0x78000000000000LL) {return a+b;} /* x/y > 2**120 */ in hypotl()
65 w = a+b; /* for sNaN */ in hypotl()
67 if(((ha&0xffffffffffffLL)|low)==0 && !issignalingl_inline(b)) in hypotl()
69 GET_LDOUBLE_LSW64(low,b); in hypotl()
71 w = b; in hypotl()
78 SET_LDOUBLE_MSW64(b,hb); in hypotl()
83 GET_LDOUBLE_LSW64(low,b); in hypotl()
[all …]
/picolibc-latest/newlib/libm/ld/ld80/
De_hypotl.c50 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()
59 SET_LDOUBLE_EXP(b,eb); /* b <- |b| */ in hypotl()
60 if((ea-eb)>0x46) {return a+b;} /* x/y > 2**70 */ in hypotl()
65 w = a+b; /* for sNaN */ in hypotl()
68 if(((high&0x7fffffff)|low)==0 && !issignalingl_inline(b)) in hypotl()
70 GET_LDOUBLE_WORDS(es,high,low,b); in hypotl()
72 w = b; in hypotl()
78 SET_LDOUBLE_EXP(b,eb); in hypotl()
83 GET_LDOUBLE_WORDS(es,high,low,b); in hypotl()
[all …]
/picolibc-latest/newlib/libc/tinystdio/
Dstdio_private.h282 #define _u128_plus_64(a,b) ((a) + (b)) argument
283 #define _u128_plus(a,b) ((a) + (b)) argument
284 #define _u128_minus(a,b) ((a) - (b)) argument
285 #define _u128_minus_64(a,b) ((a) - (b)) argument
287 #define _u128_times_base(a,b) ((a) * (b)) argument
291 #define _u128_lshift(a,b) ((_u128) (a) << (b)) argument
292 #define _u128_lshift_64(a,b) ((_u128) (a) << (b)) argument
293 #define _u128_rshift(a,b) ((a) >> (b)) argument
294 #define _i128_rshift(a,b) ((_i128) (a) >> (b)) argument
295 #define _u128_or_64(a,b) ((a) | (_u128) (b)) argument
[all …]
/picolibc-latest/newlib/libc/machine/hppa/
Dstrcpy.S55 b case_analysis
67 b,n nullfound
71 b,n nullfound
75 b,n nullfound
86 b,n nullfound
90 b loop
124 b neg_aligned_copy /* 00 01 */
126 b neg_aligned_copy /* 00 10 */
128 b neg_aligned_copy /* 00 11 */
130 b pos_aligned_copy0 /* 01 00 */
[all …]
Dstrncpy.S56 b skip_mask /* don't reload tmp1*/
64 b,n null1
66 stbys,b,m tmp1,4(0,d_addr) /* store word (delay slot)*/
78 b,n null2
98 b skip_mask2
107 b,n null3
108 stbys,b,m tmp3,4(0,d_addr) /* store ! */
113 b,n null4
116 stbys,b,m tmp3,4(0,d_addr) /* store !*/
134 b,n null4
[all …]
/picolibc-latest/newlib/libm/test/
Dtest.c149 __ieee_double_shape_type *b) in bigger() argument
152 if (a->parts.msw > b->parts.msw) in bigger()
157 else if (a->parts.msw == b->parts.msw) in bigger()
159 if (a->parts.lsw > b->parts.lsw) in bigger()
169 __ieee_float_shape_type *b) in fbigger() argument
172 if (a->p1 > b->p1) in fbigger()
186 __ieee_double_shape_type a,b; in mag_of_error() local
194 b.value = shouldbe; in mag_of_error()
196 if (a.parts.msw == b.parts.msw in mag_of_error()
197 && a.parts.lsw== b.parts.lsw) return 64; in mag_of_error()
[all …]

1234567891011