Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 73) sorted by relevance

123

/picolibc-latest/newlib/libc/iconv/ces/
Dutf-8.c50 register size_t bytes; in convert_from_ucs() local
58 bytes = 1; in convert_from_ucs()
60 bytes = 2; in convert_from_ucs()
62 bytes = 3; in convert_from_ucs()
64 bytes = 4; in convert_from_ucs()
66 bytes = 5; in convert_from_ucs()
68 bytes = 6; in convert_from_ucs()
70 if (*outbytesleft < bytes) in convert_from_ucs()
75 switch (bytes) in convert_from_ucs()
117 *outbytesleft -= bytes; in convert_from_ucs()
[all …]
Dutf-16.c93 register size_t bytes; in utf_16_convert_from_ucs() local
101 bytes = (*state == UTF16_SYSTEM_ENDIAN) ? sizeof (ucs2_t) * 2 in utf_16_convert_from_ucs()
105 bytes += sizeof (ucs2_t); in utf_16_convert_from_ucs()
107 if (*outbytesleft < bytes) in utf_16_convert_from_ucs()
159 *outbuf += bytes; in utf_16_convert_from_ucs()
160 *outbytesleft -= bytes; in utf_16_convert_from_ucs()
162 return bytes; in utf_16_convert_from_ucs()
196 size_t bytes = sizeof (ucs2_t); in utf_16_convert_to_ucs() local
199 if (*inbytesleft < bytes) in utf_16_convert_to_ucs()
215 if (*inbytesleft < (bytes += sizeof (ucs2_t))) in utf_16_convert_to_ucs()
[all …]
Deuc.c49 int bytes; member
202 if (((int)*outbytesleft - d->desc[i].prefixbytes - d->desc[i].bytes) < 0) in euc_convert_from_ucs()
228 if (res == d->desc[i].bytes) in euc_convert_from_ucs()
234 for (j = 0; j < d->desc[i].bytes; j++) in euc_convert_from_ucs()
244 return (size_t)(res + d->desc[i].bytes); in euc_convert_from_ucs()
358 if (((int)*inbytesleft - d->desc[i].prefixbytes - d->desc[i].bytes) < 0) in euc_convert_to_ucs()
362 for (j = 0; j < d->desc[i].bytes; j++) in euc_convert_to_ucs()
369 for (j = 0; j < d->desc[i].bytes; j++) in euc_convert_to_ucs()
372 inbytesleft1 = d->desc[i].bytes; in euc_convert_to_ucs()
380 *inbuf += d->desc[i].bytes + d->desc[i].prefixbytes; in euc_convert_to_ucs()
[all …]
/picolibc-latest/newlib/libc/tinystdio/
Dfwrite.c48 size_t bytes; in fwrite() local
53 !mul_overflow(size, nmemb, &bytes) && in fwrite()
54 bytes > 0) in fwrite()
59 if (bytes < (unsigned) bf->size) { in fwrite()
61 while (bytes) { in fwrite()
70 if ((unsigned) this_time > bytes) in fwrite()
71 this_time = bytes; in fwrite()
75 bytes -= this_time; in fwrite()
80 while (bytes) { in fwrite()
81 ssize_t len = bufio_write(bf, cp, bytes); in fwrite()
[all …]
Dfread.c52 size_t bytes; in fread() local
54 !mul_overflow(size, nmemb, &bytes) && bytes > 0) in fread()
67 bytes--; in fread()
70 while (bytes) { in fread()
75 if (bytes < (size_t) this_time) in fread()
76 this_time = bytes; in fread()
80 bytes -= this_time; in fread()
91 if (bytes < (size_t) bf->size) { in fread()
104 ssize_t len = bufio_read(bf, cp, bytes); in fread()
110 bytes -= len; in fread()
/picolibc-latest/newlib/libc/stdlib/
Dwcstombs.c63 int i, bytes, num_to_copy; in wcstombs() local
70 bytes = __WCTOMB (buff, *pwcs++, &state); in wcstombs()
71 if (bytes == -1) in wcstombs()
73 num_bytes += bytes; in wcstombs()
81 bytes = __WCTOMB (buff, *pwcs, &state); in wcstombs()
82 if (bytes == -1) in wcstombs()
84 num_to_copy = (n > (size_t) bytes ? bytes : (int)n); in wcstombs()
89 return ptr - s - (n >= (size_t) bytes); in wcstombs()
Dmbsnrtowcs.c76 int bytes; in mbsnrtowcs() local
98 bytes = mbrtowc (ptr, *src, nms, ps); in mbsnrtowcs()
99 if (bytes > 0) in mbsnrtowcs()
101 *src += bytes; in mbsnrtowcs()
102 nms -= bytes; in mbsnrtowcs()
107 else if (bytes == -2) in mbsnrtowcs()
112 else if (bytes == 0) in mbsnrtowcs()
Dmbstowcs.c61 int bytes; in mbstowcs() local
67 bytes = __MBTOWC (pwcs, t, MB_CUR_MAX, &state); in mbstowcs()
68 if (bytes < 0) in mbstowcs()
73 else if (bytes == 0) in mbstowcs()
75 t += bytes; in mbstowcs()
Dnano-calloc.c40 size_t bytes; in calloc() local
42 if (mul_overflow (n, elem, &bytes)) in calloc()
47 return malloc(bytes); in calloc()
Dreallocarray.c28 size_t bytes; in reallocarray() local
30 if (mul_overflow (nmemb, size, &bytes)) in reallocarray()
35 return realloc(optr, bytes); in reallocarray()
Dwcsnrtombs.c104 int bytes = loc->wctomb (buff, *pwcs, ps); in _wcsnrtombs_l() local
105 if (bytes == -1) in _wcsnrtombs_l()
111 if (n + bytes <= len) in _wcsnrtombs_l()
113 n += bytes; in _wcsnrtombs_l()
116 for (i = 0; i < bytes; ++i) in _wcsnrtombs_l()
Dchacha_private.h106 chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes) in chacha_encrypt_bytes() argument
114 if (!bytes) return; in chacha_encrypt_bytes()
134 if (bytes < 64) { in chacha_encrypt_bytes()
135 for (i = 0;i < bytes;++i) tmp[i] = m[i]; in chacha_encrypt_bytes()
225 if (bytes <= 64) { in chacha_encrypt_bytes()
226 if (bytes < 64) { in chacha_encrypt_bytes()
227 for (i = 0;i < bytes;++i) ctarget[i] = c[i]; in chacha_encrypt_bytes()
233 bytes -= 64; in chacha_encrypt_bytes()
/picolibc-latest/newlib/libc/machine/arc64/
Dmemcpy.S43 lsrl.f r12, r2, 6 ; Check size < 64bytes
57 ;; Handle anything between 15bytes < size < 64bytes
59 ;; - copy 16, 32, or 48 bytes of data using 128bit ops
60 ;; - copy the remaining 15 bytes of data using a single stdl/lddl pair
63 lsr.f r12, r2, 4 ; Check size < 16bytes
67 ;; copy: 3 -> 48bytes, 2 -> 32bytes, 1 -> 16bytes.
96 ;; We are still having 15 bytes top to transfer, exactly like in the
98 ;; at least 16bytes before, thus, we can create a new 16byte load which
100 ;; 15 bytes of data still to be transfered.
102 ;; complement of the number of remaining bytes.
[all …]
/picolibc-latest/newlib/libc/machine/rx/
Dstrncpy.S18 2: mov.b [r2+], r5 ; Copy bytes until...
25 4: mov.b r5, [r4+] ; Continue to write further NUL bytes
34 smovu ; Copy the bytes
35 cmp #0, r3 ; If we have copied the number of bytes requested
38 sub r3, r1 ; Subtract the number of bytes left to be written.
39 mov #0, r2 ; Fill the remaining bytes with NULs,
Dstrncat.S14 ;; r3 => Max number of bytes to copy
27 3: mov.b [r2+], r5 ; Copy bytes from the source into the destination ...
32 bne 3b ; ... or we have copied N bytes.
45 mov r14, r3 ; Restore the limit on the number of bytes copied.
50 …add #0, r14, r3 ; Restore the number of bytes to copy (again), but this time set the Z flag as wel…
51 …beq 1f ; If we copied 0 bytes then we already know that the dest string is NUL terminated, so w…
53 mov r5, r1 ; was included in the bytes that were copied.
56 add r14, r5 ; Point at byte after end of copied bytes.
Dstrcat.S23 2: mov.b [r2+], r5 ; Copy bytes from R2 to R4 until we reach a NUL byte.
34 mov #-1, r3 ; Limit on the number of bytes examined.
38 mov #-1, r3 ; Set a limit on the number of bytes copied.
/picolibc-latest/newlib/libc/machine/i960/
Dstrncpy_ca.S115 cmpibge.f 0,g2,Lexit_code # Lexit if number of bytes to move is <= zero.
130 cmpi g2,4 # check for fewer than four bytes to move
133 bl.f Lcase_1_cloop.a # branch if fewer than four bytes to copy
136 subi 4,g2,g2 # decrease max_byte count by the 4 bytes moved
180 andnot g5,g1,g1 # last bytes to copy, and null pad rest of word
182 subo 1,LSW,g5 # mask to get last bytes to copy, and null pad
183 and g5,g1,g1 # last bytes to copy, and null pad rest of word
188 cmpi g2,4 # check for fewer than four bytes to move
190 bl.f Lcase_1_cloop.b # branch if fewer than four bytes to copy
191 subo 4,g2,g2 # decrease max_byte count by the 4 bytes moved
[all …]
Dmemccpy_ca.S96 cmpibge.f 0,g3,Lexit_char_not_found # Lexit if # of bytes to move is <= 0
146 cmpi g3,4 # less than four bytes to move?
148 mov LSW,g1 # extract 4 bytes of src
149 bl.f Lcase_13_cloop_setup # branch if < four bytes left to move
154 subi 4,g3,g3 # decrease max_byte count by the 4 bytes moved
155 st g1,(g0) # store 4 bytes to dest
161 cmpi g3,4 # less than four bytes to move?
163 eshro g14,g6,g1 # extract 4 bytes of src
164 bl.f Lcase_13_cloop_setup # branch if < four bytes left to move
169 subi 4,g3,g3 # decrease max_byte count by the 4 bytes moved
[all …]
Dmemcpy_ca.S117 cmpibge.f 0,g2,Lquick_exit # Lexit if number of bytes to move is <= zero.
162 cmpi g2,4 # less than four bytes to move?
164 eshro g14,g6,g1 # extract 4 bytes of src
165 bl.f Lcase_3_cloop # branch if < four bytes left to move
168 subi 4,g2,g2 # decrease max_byte count by the 4 bytes moved
169 st g1,(g4) # store 4 bytes to dest
174 subi 4,g2,g2 # decrease max_byte count by the 4 bytes moved
179 cmpi g2,4 # check for fewer than four bytes to move
182 bge.t Lcase_1_wloop # branch if at least four bytes to copy
216 cmpo g0,g1 # < indicates first word of dest has more bytes
[all …]
Dmemcpy.S110 cmpibge 0,g2,Lexit # exit if number of bytes to move is <= zero.
130 bge Lwloop_a # loop if more than 3 bytes to move
131 cmpobe g6, g5, Lexit # quit if no more bytes to move
137 cmpobne g6, g5, Lcloop_a # quit if no more bytes to move
152 ble Lwloop.a # loop if more than 3 bytes to move
153 cmpobe g6, g0, Lexit # quit if no more bytes to move
159 cmpobne g6, g0, Lcloop.a # quit if no more bytes to move
Dstrncat_ca.S115 cmpibge.f 0,g2,Lexit_code # Lexit if number of bytes to move is <= zero.
121 shro g14,LSW,LSW # get mask for bytes needed from first word
123 shlo g14,LSW,LSW # get mask for bytes needed from first word
125 notor MSW,LSW,MSW # set unneeded bytes to all ones
151 cmpi g2,4 # check for fewer than four bytes to move
153 bl.f Lcase_1_cloop # branch if fewer than four bytes to copy
158 subi 4,g2,g2 # decrease max_byte count by the 4 bytes moved
206 cmpo MSW,g1 # < indicates first word of dest has more bytes
212 eshro g14,g6,g5 # extract four bytes
260 cmpi g2,4 # less than four bytes to move?
[all …]
Dstrchr_ca.S94 shlo 8,g1,g2 # broadcast the char to four bytes
108 shro g6,g5,g5 # get mask for bytes needed from first word
110 shlo g6,g5,g5 # get mask for bytes needed from first word
112 notor g4,g5,g4 # set unneeded bytes to all ones
150 and g4,g2,g4 # make unimportant bytes of first word 0x0f
Dmemchr_ca.S101 shlo 8,g1,g3 # broadcast the char to four bytes
110 shro g6,g5,g5 # get mask for bytes needed from first word
112 shlo g6,g5,g5 # get mask for bytes needed from first word
114 notor g4,g5,g4 # set unneeded bytes to all ones
152 and g4,g6,g4 # make unimportant bytes of first word 0x0f
/picolibc-latest/newlib/libc/iconv/ccs/
Dmktbl.pl546 my $bytes;
552 $bytes = \$ToSpeedBytes;
558 $bytes = \$FromSpeedBytes;
578 $$bytes = 0;
582 $$bytes += 256;
588 $$bytes *= 2 if $Bits == 16;
589 $$bytes += $Hdr8bitFromUCS if $Bits == 8;
590 $$bytes += 512;
623 my $bytes;
629 $bytes = \$ToSizeBytes;
[all …]
/picolibc-latest/newlib/libc/iconv/lib/
Ducsconv.c158 register size_t bytes; in ucs_based_conversion_convert() local
190 bytes = uc->from_ucs.handlers->convert_from_ucs (uc->from_ucs.data, ch, in ucs_based_conversion_convert()
193 if (bytes == (size_t)ICONV_CES_NOSPACE) in ucs_based_conversion_convert()
200 else if (bytes == (size_t)ICONV_CES_INVALID_CHARACTER) in ucs_based_conversion_convert()
215 bytes = uc->from_ucs.handlers->convert_from_ucs ( in ucs_based_conversion_convert()
220 if ((ssize_t)bytes < 0) in ucs_based_conversion_convert()

123