Home
last modified time | relevance | path

Searched refs:bit_width (Results 1 – 25 of 62) sorted by relevance

123

/llvm-project/libcxx/test/std/numerics/bit/bit.pow.two/
H A Dbit_width.pass.cpp12 // constexpr int bit_width(T x) noexcept;
34 ASSERT_SAME_TYPE(decltype(std::bit_width(T())), int); in test()
35 ASSERT_NOEXCEPT(std::bit_width(T())); in test()
38 assert(std::bit_width(T(0)) == 0); in test()
39 assert(std::bit_width(T(1)) == 1); in test()
40 assert(std::bit_width(T(2)) == 2); in test()
41 assert(std::bit_width(T(3)) == 2); in test()
42 assert(std::bit_width(T(4)) == 3); in test()
43 assert(std::bit_width(T(5)) == 3); in test()
44 assert(std::bit_width( in test()
[all...]
/llvm-project/llvm/unittests/ADT/
H A DBitTest.cpp209 EXPECT_EQ(0, llvm::bit_width(uint8_t(0))); in TEST()
210 EXPECT_EQ(0, llvm::bit_width(uint16_t(0))); in TEST()
211 EXPECT_EQ(0, llvm::bit_width(uint32_t(0))); in TEST()
212 EXPECT_EQ(0, llvm::bit_width(uint64_t(0))); in TEST()
214 EXPECT_EQ(1, llvm::bit_width(uint8_t(1))); in TEST()
215 EXPECT_EQ(1, llvm::bit_width(uint16_t(1))); in TEST()
216 EXPECT_EQ(1, llvm::bit_width(uint32_t(1))); in TEST()
217 EXPECT_EQ(1, llvm::bit_width(uint64_t(1))); in TEST()
219 EXPECT_EQ(2, llvm::bit_width(uint8_t(2))); in TEST()
220 EXPECT_EQ(2, llvm::bit_width(uint16_t(2))); in TEST()
[all …]
/llvm-project/libc/src/stdio/printf_core/
H A Dcore_structs.h31 size_t bit_width; member
54 size_t bit_width = 0; member
77 (bit_width == other.bit_width) &&
/llvm-project/lldb/source/Plugins/ABI/X86/
H A DABIWindows_x86_64.cpp206 static bool ReadIntegerArgument(Scalar &scalar, unsigned int bit_width, in ReadIntegerArgument() argument
211 if (bit_width > 64) in ReadIntegerArgument()
219 scalar.SignExtend(bit_width); in ReadIntegerArgument()
222 uint32_t byte_size = (bit_width + (CHAR_BIT - 1)) / CHAR_BIT; in ReadIntegerArgument()
349 std::optional<uint64_t> bit_width = in SetReturnValueObject()
351 if (!bit_width) { in SetReturnValueObject()
355 if (*bit_width <= 64) { in SetReturnValueObject()
617 std::optional<uint64_t> bit_width = return_compiler_type.GetBitSize(&thread); in GetReturnValueObjectImpl()
618 if (!bit_width) { in GetReturnValueObjectImpl()
639 bool is_memory = *bit_width > max_register_value_bit_widt in GetReturnValueObjectImpl()
348 std::optional<uint64_t> bit_width = SetReturnValueObject() local
615 std::optional<uint64_t> bit_width = return_compiler_type.GetBitSize(&thread); GetReturnValueObjectImpl() local
[all...]
H A DABISysV_x86_64.cpp191 static bool ReadIntegerArgument(Scalar &scalar, unsigned int bit_width, in ReadIntegerArgument()
196 if (bit_width > 64) in ReadIntegerArgument()
204 scalar.SignExtend(bit_width); in ReadIntegerArgument()
206 uint32_t byte_size = (bit_width + (8 - 1)) / 8; in ReadIntegerArgument()
343 std::optional<uint64_t> bit_width = in SetReturnValueObject()
345 if (!bit_width) { in SetReturnValueObject()
349 if (*bit_width <= 64) { in SetReturnValueObject()
637 std::optional<uint64_t> bit_width = return_compiler_type.GetBitSize(&thread); in GetReturnValueObjectImpl()
638 if (!bit_width) in GetReturnValueObjectImpl()
647 *bit_width < in GetReturnValueObjectImpl()
190 ReadIntegerArgument(Scalar & scalar,unsigned int bit_width,bool is_signed,Thread & thread,uint32_t * argument_register_ids,unsigned int & current_argument_register,addr_t & current_stack_argument) ReadIntegerArgument() argument
341 std::optional<uint64_t> bit_width = SetReturnValueObject() local
634 std::optional<uint64_t> bit_width = return_compiler_type.GetBitSize(&thread); GetReturnValueObjectImpl() local
[all...]
H A DABIMacOSX_i386.cpp125 static bool ReadIntegerArgument(Scalar &scalar, unsigned int bit_width, in ReadIntegerArgument() argument
129 uint32_t byte_size = (bit_width + (8 - 1)) / 8; in ReadIntegerArgument()
278 std::optional<uint64_t> bit_width = compiler_type.GetBitSize(&thread); in GetReturnValueObjectImpl()
279 if (!bit_width) in GetReturnValueObjectImpl()
286 switch (*bit_width) { in GetReturnValueObjectImpl()
277 std::optional<uint64_t> bit_width = compiler_type.GetBitSize(&thread); GetReturnValueObjectImpl() local
/llvm-project/lldb/source/Plugins/ABI/PowerPC/
H A DABISysV_ppc.cpp312 static bool ReadIntegerArgument(Scalar &scalar, unsigned int bit_width, in ReadIntegerArgument() argument
317 if (bit_width > 64) in ReadIntegerArgument()
325 scalar.SignExtend(bit_width); in ReadIntegerArgument()
327 uint32_t byte_size = (bit_width + (8 - 1)) / 8; in ReadIntegerArgument()
461 std::optional<uint64_t> bit_width = in SetReturnValueObject()
463 if (!bit_width) { in SetReturnValueObject()
467 if (*bit_width <= 64) { in SetReturnValueObject()
658 std::optional<uint64_t> bit_width = return_compiler_type.GetBitSize(&thread); in GetReturnValueObjectImpl()
659 if (!bit_width) in GetReturnValueObjectImpl()
664 if (*bit_width < in GetReturnValueObjectImpl()
466 std::optional<uint64_t> bit_width = SetReturnValueObject() local
662 std::optional<uint64_t> bit_width = return_compiler_type.GetBitSize(&thread); GetReturnValueObjectImpl() local
[all...]
H A DABISysV_ppc64.cpp200 static bool ReadIntegerArgument(Scalar &scalar, unsigned int bit_width, in ReadIntegerArgument() argument
205 if (bit_width > 64) in ReadIntegerArgument()
213 scalar.SignExtend(bit_width); in ReadIntegerArgument()
215 uint32_t byte_size = (bit_width + (8 - 1)) / 8; in ReadIntegerArgument()
346 std::optional<uint64_t> bit_width = in SetReturnValueObject()
348 if (!bit_width) { in SetReturnValueObject()
352 if (*bit_width <= 64) { in SetReturnValueObject()
345 std::optional<uint64_t> bit_width = SetReturnValueObject() local
/llvm-project/lldb/source/Plugins/ABI/SystemZ/
H A DABISysV_s390x.cpp281 static bool ReadIntegerArgument(Scalar &scalar, unsigned int bit_width, in ReadIntegerArgument() argument
286 if (bit_width > 64) in ReadIntegerArgument()
294 scalar.SignExtend(bit_width); in ReadIntegerArgument()
296 uint32_t byte_size = (bit_width + (8 - 1)) / 8; in ReadIntegerArgument()
430 std::optional<uint64_t> bit_width = in SetReturnValueObject()
432 if (!bit_width) { in SetReturnValueObject()
436 if (*bit_width <= 64) { in SetReturnValueObject()
429 std::optional<uint64_t> bit_width = SetReturnValueObject() local
/llvm-project/libc/test/UnitTest/
H A DPrintfMatcher.cpp75 CASE_LM_BIT_WIDTH(w, form.bit_width); in display()
76 CASE_LM_BIT_WIDTH(wf, form.bit_width); in display()
/llvm-project/lldb/source/Plugins/ABI/ARM/
H A DABISysV_arm.cpp1452 size_t bit_width = 0; in GetArgumentValues()
1456 bit_width = *size; in GetArgumentValues()
1462 if (bit_width <= (exe_ctx.GetProcessRef().GetAddressByteSize() * 8)) { in GetArgumentValues()
1473 reg_value.SignExtend(bit_width); in GetArgumentValues()
1489 const uint32_t arg_byte_size = (bit_width + (8 - 1)) / 8; in GetArgumentValues()
1562 std::optional<uint64_t> bit_width = compiler_type.GetBitSize(&thread); in GetReturnValueObjectImpl()
1564 if (!bit_width || !byte_size) in GetReturnValueObjectImpl()
1568 switch (*bit_width) { in GetReturnValueObjectImpl()
1636 switch (*bit_width) { in GetReturnValueObjectImpl()
1686 } else if (!GetReturnValuePassedInMemory(thread, reg_ctx, *bit_width / in GetReturnValueObjectImpl()
1459 size_t bit_width = 0; GetArgumentValues() local
1569 std::optional<uint64_t> bit_width = compiler_type.GetBitSize(&thread); GetReturnValueObjectImpl() local
[all...]
H A DABIMacOSX_arm.cpp1449 size_t bit_width = 0; in GetArgumentValues()
1454 bit_width = *bit_size; in GetArgumentValues()
1456 bit_width = *bit_size; in GetArgumentValues()
1461 if (bit_width <= (exe_ctx.GetProcessRef().GetAddressByteSize() * 8)) { in GetArgumentValues()
1492 reg_value.SignExtend(bit_width); in GetArgumentValues()
1508 const uint32_t arg_byte_size = (bit_width + (8 - 1)) / 8; in GetArgumentValues()
1556 std::optional<uint64_t> bit_width = compiler_type.GetBitSize(&thread); in GetReturnValueObjectImpl()
1557 if (!bit_width) in GetReturnValueObjectImpl()
1560 switch (*bit_width) { in GetReturnValueObjectImpl()
1455 size_t bit_width = 0; GetArgumentValues() local
1562 std::optional<uint64_t> bit_width = compiler_type.GetBitSize(&thread); GetReturnValueObjectImpl() local
/llvm-project/lldb/source/Plugins/ABI/AArch64/
H A DABISysV_arm64.cpp224 size_t bit_width = 0; in SetReturnValueObject()
229 bit_width = *bit_size; in SetReturnValueObject()
231 bit_width = *bit_size; in SetReturnValueObject()
237 if (bit_width <= (exe_ctx.GetProcessRef().GetAddressByteSize() * 8)) { in SetReturnValueObject()
249 reg_value.SignExtend(bit_width); in SetReturnValueObject()
266 const uint32_t arg_byte_size = (bit_width + (8 - 1)) / 8; in SetReturnValueObject()
149 size_t bit_width = 0; GetArgumentValues() local
H A DABIMacOSX_arm64.cpp150 size_t bit_width = 0; in GetArgumentValues() local
152 bit_width = *bit_size; in GetArgumentValues()
154 bit_width = *bit_size; in GetArgumentValues()
160 if (bit_width <= (exe_ctx.GetProcessRef().GetAddressByteSize() * 8)) { in GetArgumentValues()
203 reg_value.SignExtend(bit_width); in GetArgumentValues()
219 const uint32_t arg_byte_size = (bit_width + (8 - 1)) / 8; in GetArgumentValues()
/llvm-project/libc/src/__support/CPP/
H A Dbit.h184 /// Ex. bit_width(5) == 3.
187 bit_width(T value) { in bit_width()
200 return static_cast<T>(T(1) << (cpp::bit_width(value) - 1));
215 return static_cast<T>(T(1) << cpp::bit_width(value - 1U));
185 bit_width(T value) { bit_width() function
/llvm-project/libcxx/include/
H A Dbit33 constexpr int bit_width(T x) noexcept; // C++20
74 # include <__bit/bit_width.h>
/llvm-project/libc/src/stdbit/
H A Dstdc_bit_width_ul.cpp18 return static_cast<unsigned>(cpp::bit_width(value));
H A Dstdc_bit_width_uc.cpp18 return static_cast<unsigned>(cpp::bit_width(value));
H A Dstdc_bit_width_ull.cpp18 return static_cast<unsigned>(cpp::bit_width(value));
H A Dstdc_bit_width_us.cpp18 return static_cast<unsigned>(cpp::bit_width(value));
H A Dstdc_bit_width_ui.cpp18 return static_cast<unsigned>(cpp::bit_width(value));
/llvm-project/libcxx/include/__bit/
H A Dbit_width.h25 [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr int bit_width(_Tp __t) noexcept { in bit_width() function
/llvm-project/libcxx/test/libcxx/diagnostics/
H A Dbit.nodiscard.verify.cpp23 …std::bit_width(0u); // expected-warning {{ignoring return value of function declared with 'nodisca… in func()
/llvm-project/llvm/include/llvm/ADT/
H A Dbit.h317 template <typename T> [[nodiscard]] int bit_width(T Value) {
332 return T(1) << (llvm::bit_width(Value) - 1);
347 return T(1) << llvm::bit_width<T>(Value - 1u);
/llvm-project/lldb/source/Plugins/ABI/Mips/
H A DABISysV_mips.cpp804 std::optional<uint64_t> bit_width = return_compiler_type.GetBitSize(&thread); in GetReturnValueObjectImpl()
805 if (!bit_width) in GetReturnValueObjectImpl()
808 switch (*bit_width) { in GetReturnValueObjectImpl()
867 switch (*bit_width) { in GetReturnValueObjectImpl()
899 switch (*bit_width) { in GetReturnValueObjectImpl()
809 std::optional<uint64_t> bit_width = return_compiler_type.GetBitSize(&thread); GetReturnValueObjectImpl() local

123