Lines Matching +full:double +full:- +full:input +full:- +full:range
4 * SPDX-License-Identifier: Apache-2.0
61 * Procedure Call Standard for the ARM 64-bit Architecture
161 u.__ap.__va_stk = (char *)buf - 32; in cbprintf_via_va_list()
171 * 32-bit ARM and Intel.
211 /* Move beyond read-only string indexes array. */ in get_package_len()
220 return (size_t)(uintptr_t)(buf - start); in get_package_len()
238 * package. MSB bit is set if string is read-only so effectively 7 bits are in cbvprintf_package()
245 #define BUF_OFFSET (buf - (uintptr_t)buf0) in cbvprintf_package()
256 int arg_idx = -1; /* Argument index. Preincremented thus starting from -1.*/ in cbvprintf_package()
274 return -EFAULT; in cbvprintf_package()
280 return -EFAULT; in cbvprintf_package()
287 * read-only strings. They both occupy 1 byte each. in cbvprintf_package()
320 len = CBPRINTF_PACKAGE_ALIGNMENT - (len % CBPRINTF_PACKAGE_ALIGNMENT); in cbvprintf_package()
328 return -ENOSPC; in cbvprintf_package()
335 * reason for the post-decrement on fmt as it will be incremented in cbvprintf_package()
339 --fmt; in cbvprintf_package()
362 return -ENOSPC; in cbvprintf_package()
420 union { double d; long double ld; } v; in cbvprintf_package()
423 v.ld = va_arg(ap, long double); in cbvprintf_package()
424 align = VA_STACK_ALIGN(long double); in cbvprintf_package()
425 size = sizeof(long double); in cbvprintf_package()
427 v.d = va_arg(ap, double); in cbvprintf_package()
428 align = VA_STACK_ALIGN(double); in cbvprintf_package()
429 size = sizeof(double); in cbvprintf_package()
437 return -ENOSPC; in cbvprintf_package()
441 } else if (fmt[-1] == 'L') { in cbvprintf_package()
442 *(long double *)buf = v.ld; in cbvprintf_package()
444 *(double *)buf = v.d; in cbvprintf_package()
462 return -EINVAL; in cbvprintf_package()
485 arg_idx--; in cbvprintf_package()
489 case '-': in cbvprintf_package()
533 if (fmt[-1] == 'l') { in cbvprintf_package()
534 if (fmt[-2] == 'l') { in cbvprintf_package()
568 union { double d; long double ld; } v; in cbvprintf_package()
570 if (fmt[-1] == 'L') { in cbvprintf_package()
571 v.ld = va_arg(ap, long double); in cbvprintf_package()
572 align = VA_STACK_ALIGN(long double); in cbvprintf_package()
573 size = sizeof(long double); in cbvprintf_package()
575 v.d = va_arg(ap, double); in cbvprintf_package()
576 align = VA_STACK_ALIGN(double); in cbvprintf_package()
577 size = sizeof(double); in cbvprintf_package()
584 return -ENOSPC; in cbvprintf_package()
588 } else if (fmt[-1] == 'L') { in cbvprintf_package()
589 *(long double *)buf = v.ld; in cbvprintf_package()
591 *(double *)buf = v.d; in cbvprintf_package()
610 return -ENOSPC; in cbvprintf_package()
621 bool is_ro = (fros_cnt-- > 0) ? true : ptr_in_rodata(s); in cbvprintf_package()
632 * Otherwise the index range is 8 bits in cbvprintf_package()
637 return -EINVAL; in cbvprintf_package()
642 return -EINVAL; in cbvprintf_package()
648 * We will append non-ro strings later. in cbvprintf_package()
653 /* flag read-only string. */ in cbvprintf_package()
711 return -EINVAL; in cbvprintf_package()
717 * sizeof(int) and limit it to a 8-bit field. That means 1020 bytes in cbvprintf_package()
718 * worth of va_list, or about 127 arguments on a 64-bit system in cbvprintf_package()
719 * (twice that on 32-bit systems). That ought to be good enough. in cbvprintf_package()
723 return -EINVAL; in cbvprintf_package()
731 return BUF_OFFSET + len - CBPRINTF_PACKAGE_ALIGNMENT; in cbvprintf_package()
738 pkg_hdr->desc.len = BUF_OFFSET / sizeof(int); in cbvprintf_package()
742 pkg_hdr->desc.str_cnt = 0; in cbvprintf_package()
743 pkg_hdr->desc.rw_str_cnt = s_rw_cnt; in cbvprintf_package()
746 pkg_hdr->desc.str_cnt = s_rw_cnt; in cbvprintf_package()
747 pkg_hdr->desc.rw_str_cnt = 0; in cbvprintf_package()
750 pkg_hdr->desc.ro_str_cnt = s_ro_cnt; in cbvprintf_package()
753 pkg_hdr->desc.pkg_flags = flags; in cbvprintf_package()
767 return -ENOSPC; in cbvprintf_package()
789 /* clear the in-buffer pointer (less entropy if compressed) */ in cbvprintf_package()
797 return -ENOSPC; in cbvprintf_package()
841 return -EINVAL; in cbpprintf_external()
845 args_size = hdr->hdr.desc.len * sizeof(int); in cbpprintf_external()
846 s_nbr = hdr->hdr.desc.str_cnt; in cbpprintf_external()
847 ros_nbr = hdr->hdr.desc.ro_str_cnt; in cbpprintf_external()
848 rws_nbr = hdr->hdr.desc.rw_str_cnt; in cbpprintf_external()
871 return cbprintf_via_va_list(out, formatter, ctx, hdr->fmt, buf); in cbpprintf_external()
936 ros_nbr = in_desc->ro_str_cnt; in cbprintf_package_convert()
943 rws_nbr = in_desc->rw_str_cnt; in cbprintf_package_convert()
963 args_size = in_desc->len * sizeof(int); in cbprintf_package_convert()
967 /* Pointer to array with string locations. Array starts with read-only in cbprintf_package_convert()
1014 out_len -= 2; in cbprintf_package_convert()
1022 out_len -= drop_ro_str_pos ? 2 : 1; in cbprintf_package_convert()
1035 out_len += (len - 1); in cbprintf_package_convert()
1052 /* If read-only strings shall be appended to the output package copy in cbprintf_package_convert()
1074 /* Go through read-write strings and identify which shall be appended. in cbprintf_package_convert()
1075 * Note that there may be read-only strings there. Use address evaluation in cbprintf_package_convert()
1076 * to determine if strings is read-only. in cbprintf_package_convert()
1112 out_desc.len = in_desc->len; in cbprintf_package_convert()
1113 out_desc.str_cnt = in_desc->str_cnt + scpy_cnt; in cbprintf_package_convert()
1118 /* Temporary overwrite input descriptor to allow bulk transfer */ in cbprintf_package_convert()
1128 /* Restore input descriptor. */ in cbprintf_package_convert()
1139 size_t strs_len = in_len - (args_size + ros_nbr + 2 * rws_nbr); in cbprintf_package_convert()