/frameworks/libs/binary_translation/intrinsics/common_to_x86/ |
D | intrinsics_float_test.cc | 92 uint32_t fabs_result = bit_cast<uint32_t, float>(NonInlineWrapper<float(float)>::Call<std::fabs>( in TEST() 93 bit_cast<float, uint32_t>(kBadNegativeNan32))); in TEST() 98 uint32_t fabsf_result = bit_cast<uint32_t, float>( in TEST() 99 NonInlineWrapper<float(float)>::Call<::fabsf>(bit_cast<float, uint32_t>(kBadNegativeNan32))); in TEST() 105 bit_cast<uint64_t, double>(NonInlineWrapper<double(double)>::Call<std::fabs>( in TEST() 106 bit_cast<double, uint64_t>(kBadNegativeNan64))); in TEST() 111 uint64_t fabs_result = bit_cast<uint64_t, double>(NonInlineWrapper<double(double)>::Call<::fabs>( in TEST() 112 bit_cast<double, uint64_t>(kBadNegativeNan64))); in TEST() 120 bit_cast<uint32_t, Float32>(NonInlineWrapper<Float32(const Float32&)>::Call<Absolute>( in TEST() 121 bit_cast<Float32, uint32_t>(kBadNegativeNan32))); in TEST() [all …]
|
/frameworks/libs/binary_translation/kernel_api/ |
D | runtime_bridge.cc | 40 const Guest_sigaction* act = bit_cast<const Guest_sigaction*>(act_arg); in RunGuestSyscall___NR_rt_sigaction() 41 Guest_sigaction* old_act = bit_cast<Guest_sigaction*>(old_act_arg); in RunGuestSyscall___NR_rt_sigaction() 42 size_t sigset_size = bit_cast<size_t>(sigset_size_arg); in RunGuestSyscall___NR_rt_sigaction() 60 bit_cast<const stack_t*>(stack), bit_cast<stack_t*>(old_stack), &error)) { in RunGuestSyscall___NR_sigaltstack() 71 ConvertGuestSigeventToHost(bit_cast<struct sigevent*>(arg_2), &host_sigevent), in RunGuestSyscall___NR_timer_create() 92 return bit_cast<long>(MmapForGuest(bit_cast<void*>(arg_1), // addr in RunGuestSyscall___NR_mmap() 93 bit_cast<size_t>(arg_2), // length in RunGuestSyscall___NR_mmap() 106 return bit_cast<long>( in RunGuestSyscall___NR_mmap2() 107 MmapForGuest(bit_cast<void*>(arg_1), // addr in RunGuestSyscall___NR_mmap2() 108 bit_cast<size_t>(arg_2), // length in RunGuestSyscall___NR_mmap2() [all …]
|
/frameworks/libs/binary_translation/tests/inline_asm_tests/ |
D | precise_fp_arm64.cc | 67 __uint128_t arg2 = bit_cast<uint32_t>(1.0f); in TEST() 76 __uint128_t arg2 = bit_cast<uint64_t>(1.0); in TEST() 84 __uint128_t arg1 = MakeUInt128(bit_cast<uint64_t>(2.0), kDefaultNaN64 | (1ULL << 63)); in TEST() 87 ASSERT_EQ(res, MakeUInt128(bit_cast<uint64_t>(2.0), kDefaultNaN64)); in TEST() 92 uint32_t fp_arg_two = bit_cast<uint32_t>(2.0f); in TEST() 93 uint32_t fp_arg_minus_two = bit_cast<uint32_t>(-2.0f); in TEST() 106 uint64_t fp_arg_two = bit_cast<uint64_t>(2.0); in TEST() 107 uint64_t fp_arg_minus_two = bit_cast<uint64_t>(-2.0); in TEST() 120 uint32_t fp_arg_two = bit_cast<uint32_t>(2.0f); in TEST() 121 uint64_t fp_arg_minus_two = bit_cast<uint64_t>(-2.0); in TEST() [all …]
|
D | main_arm64.cc | 749 ASSERT_EQ(bit_cast<uint32_t>(-7.50f), 0xc0f00000U); in TEST() 750 ASSERT_EQ(bit_cast<uint32_t>(-6.75f), 0xc0d80000U); in TEST() 751 ASSERT_EQ(bit_cast<uint32_t>(-6.50f), 0xc0d00000U); in TEST() 752 ASSERT_EQ(bit_cast<uint32_t>(-6.25f), 0xc0c80000U); in TEST() 753 ASSERT_EQ(bit_cast<uint32_t>(6.25f), 0x40c80000U); in TEST() 754 ASSERT_EQ(bit_cast<uint32_t>(6.50f), 0x40d00000U); in TEST() 755 ASSERT_EQ(bit_cast<uint32_t>(6.75f), 0x40d80000U); in TEST() 756 ASSERT_EQ(bit_cast<uint32_t>(7.50f), 0x40f00000U); in TEST() 758 ASSERT_EQ(bit_cast<uint64_t>(-7.50), 0xc01e000000000000ULL); in TEST() 759 ASSERT_EQ(bit_cast<uint64_t>(-6.75), 0xc01b000000000000ULL); in TEST() [all …]
|
/frameworks/libs/binary_translation/kernel_api/include/berberis/kernel_api/ |
D | syscall_emulation_common.h | 55 return static_cast<long>(ExecveForGuest(bit_cast<const char*>(arg_1), // filename in RunGuestSyscall___NR_execve() 56 bit_cast<char* const*>(arg_2), // argv in RunGuestSyscall___NR_execve() 57 bit_cast<char* const*>(arg_3))); // envp in RunGuestSyscall___NR_execve() 81 ConvertHostStatToGuestArch(host_stat, bit_cast<GuestAddr>(arg_2)); in RunGuestSyscall___NR_fstat() 103 bit_cast<const char*>(arg_2), // path in RunGuestSyscall___NR_openat() 115 bit_cast<void*>(arg_3), // addr in RunGuestSyscall___NR_ptrace() 116 bit_cast<void*>(arg_4))); // data in RunGuestSyscall___NR_ptrace() 121 bit_cast<const char*>(arg_2), // path in RunGuestSyscall___NR_readlinkat() 122 bit_cast<char*>(arg_3), // buf in RunGuestSyscall___NR_readlinkat() 123 bit_cast<size_t>(arg_4))); // buf_size in RunGuestSyscall___NR_readlinkat()
|
/frameworks/libs/binary_translation/jni/ |
D | guest_jni_trampolines.cc | 63 call.AddArgInt32(bit_cast<uint32_t>(tag)); in GuestCall_uloc_setDefault() 64 call.AddArgInt32(bit_cast<uint32_t>(&err)); in GuestCall_uloc_setDefault() 66 call.AddArgInt64(bit_cast<uint64_t>(tag)); in GuestCall_uloc_setDefault() 67 call.AddArgInt64(bit_cast<uint64_t>(&err)); in GuestCall_uloc_setDefault() 82 call.AddArgInt32(bit_cast<uint32_t>(version_info)); in GuestCall_u_getVersion() 84 call.AddArgInt64(bit_cast<uint64_t>(version_info)); in GuestCall_u_getVersion() 99 call.AddArgInt32(bit_cast<uint32_t>(tag)); in GuestCall_uloc_canonicalize() 100 call.AddArgInt32(bit_cast<uint32_t>(canonical_tag)); in GuestCall_uloc_canonicalize() 102 call.AddArgInt32(bit_cast<uint32_t>(&err)); in GuestCall_uloc_canonicalize() 104 call.AddArgInt64(bit_cast<uint64_t>(tag)); in GuestCall_uloc_canonicalize() [all …]
|
/frameworks/libs/binary_translation/guest_abi/arm/ |
D | guest_params_test.cc | 84 state.cpu.r[0] = bit_cast<uint32_t>(&x); in TEST() 85 state.cpu.r[1] = bit_cast<uint32_t>(1.0f); in TEST() 86 state.cpu.r[2] = bit_cast<uint32_t>(-.75f); in TEST() 115 state.cpu.r[0] = bit_cast<uint32_t>(&x); in TEST() 116 state.cpu.r[1] = bit_cast<uint32_t>(42.0f); in TEST() 153 state.cpu.r[13] = bit_cast<uint32_t>(&stack[0]); in TEST() 158 state.cpu.r[0] = bit_cast<uint32_t>(&x); in TEST() 159 state.cpu.r[1] = bit_cast<uint32_t>(123); in TEST() 160 state.cpu.r[2] = bit_cast<uint32_t>(&x); in TEST() 199 state.cpu.r[0] = bit_cast<uint32_t>(&result); in TEST() [all …]
|
D | guest_function_wrapper_test.cc | 35 EXPECT_EQ(nullptr, berberis::WrapGuestFunction(bit_cast<GuestType<FooPtr>>(0L), "foo")); in TEST_F() 37 EXPECT_EQ(nullptr, berberis::WrapGuestFunction(bit_cast<GuestType<BarPtr>>(0L), "bar")); in TEST_F() 50 TwoArgFunction sub = WrapGuestFunction(bit_cast<GuestType<TwoArgFunction>>(pc), "sub"); in TEST_F() 67 TwoArgFunction sub = WrapGuestFunction(bit_cast<GuestType<TwoArgFunction>>(pc), "sub_long"); in TEST_F() 86 TwoArgFunction sub = WrapGuestFunction(bit_cast<GuestType<TwoArgFunction>>(pc), "sub_float"); in TEST_F() 105 TwoArgFunction sub = WrapGuestFunction(bit_cast<GuestType<TwoArgFunction>>(pc), "sub_double"); in TEST_F()
|
D | trampoline_func_generator_test_arm.cc | 56 state.cpu.r[1] = bit_cast<uint32_t>(0.5f); in TEST() 57 state.cpu.r[2] = bit_cast<uint32_t>(0.75f); in TEST()
|
/frameworks/libs/binary_translation/guest_abi/riscv64/ |
D | guest_function_wrapper_test.cc | 33 EXPECT_EQ(WrapGuestFunction(bit_cast<GuestType<FooPtr>>(0L), "foo"), nullptr); in TEST_F() 36 EXPECT_EQ(WrapGuestFunction(bit_cast<GuestType<BarPtr>>(0L), "bar"), nullptr); in TEST_F() 49 TwoArgFunction sub = WrapGuestFunction(bit_cast<GuestType<TwoArgFunction>>(pc), "sub"); in TEST_F() 65 TwoArgFunction sub = WrapGuestFunction(bit_cast<GuestType<TwoArgFunction>>(pc), "sub_long"); in TEST_F() 81 TwoArgFunction sub = WrapGuestFunction(bit_cast<GuestType<TwoArgFunction>>(pc), "sub_float"); in TEST_F() 97 TwoArgFunction sub = WrapGuestFunction(bit_cast<GuestType<TwoArgFunction>>(pc), "sub_double"); in TEST_F()
|
D | guest_params_test.cc | 151 SetFReg<FA0>(state.cpu, bit_cast<uint32_t>(2.71f)); in TEST() 152 SetFReg<FA1>(state.cpu, bit_cast<uint64_t>(3.14)); in TEST() 193 EXPECT_DOUBLE_EQ(bit_cast<double>(GetFReg<FA0>(state.cpu)), 3.14); in TEST() 196 EXPECT_DOUBLE_EQ(bit_cast<double>(GetFReg<FA0>(state.cpu)), 3.15); in TEST() 199 EXPECT_DOUBLE_EQ(bit_cast<double>(GetFReg<FA0>(state.cpu)), 3.15); in TEST() 202 EXPECT_DOUBLE_EQ(bit_cast<double>(GetFReg<FA0>(state.cpu)), 3.16); in TEST() 221 SetFReg<FA0>(state.cpu, bit_cast<uint64_t>(0.0)); in TEST() 222 SetFReg<FA1>(state.cpu, bit_cast<uint64_t>(1.1)); in TEST() 223 SetFReg<FA2>(state.cpu, bit_cast<uint64_t>(2.2)); in TEST() 224 SetFReg<FA3>(state.cpu, bit_cast<uint64_t>(3.3)); in TEST() [all …]
|
D | trampoline_func_generator_test.cc | 55 SetXReg<A1>(state.cpu, bit_cast<uint32_t>(0.5f)); in TEST() 56 SetXReg<A2>(state.cpu, bit_cast<uint32_t>(0.75f)); in TEST() 75 SetFReg<FA0>(state.cpu, bit_cast<uint32_t>(0.5f)); in TEST() 76 SetFReg<FA1>(state.cpu, bit_cast<uint32_t>(0.75f)); in TEST()
|
/frameworks/libs/binary_translation/guest_abi/arm64/ |
D | guest_function_wrapper_test.cc | 34 EXPECT_EQ(nullptr, berberis::WrapGuestFunction(bit_cast<GuestType<FooPtr>>(0L), "foo")); in TEST_F() 36 EXPECT_EQ(nullptr, berberis::WrapGuestFunction(bit_cast<GuestType<BarPtr>>(0L), "bar")); in TEST_F() 49 TwoArgFunction sub = WrapGuestFunction(bit_cast<GuestType<TwoArgFunction>>(pc), "sub"); in TEST_F() 65 TwoArgFunction sub = WrapGuestFunction(bit_cast<GuestType<TwoArgFunction>>(pc), "sub_long"); in TEST_F() 81 TwoArgFunction sub = WrapGuestFunction(bit_cast<GuestType<TwoArgFunction>>(pc), "sub_float"); in TEST_F() 97 TwoArgFunction sub = WrapGuestFunction(bit_cast<GuestType<TwoArgFunction>>(pc), "sub_double"); in TEST_F()
|
/frameworks/libs/binary_translation/intrinsics/riscv64_to_x86_64/include/berberis/intrinsics/ |
D | vector_intrinsics.h | 34 return *bit_cast<const std::tuple<SIMD128Register>*>(static_cast<uintptr_t>( in VectorBroadcast() 40 bit_cast<const uint8_t*>(static_cast<uintptr_t>(constants_pool::kBitMaskTable)) + in MakeBitmaskFromVl() 48 uint64_t low_mask = bit_cast<const uint64_t*>( in BitMaskToSimdMask() 50 uint64_t high_mask = bit_cast<const uint64_t*>( in BitMaskToSimdMask() 57 uint64_t half_size_mask = bit_cast<const uint64_t*>( in BitMaskToSimdMask() 62 uint64_t half_size_mask = bit_cast<const uint64_t*>( in BitMaskToSimdMask() 67 uint64_t half_size_mask = bit_cast<const uint64_t*>( in BitMaskToSimdMask() 89 return {(*bit_cast<const SIMD128Register*>( in VectorMaskedElementTo() 106 const __m128i kPMovmskXToPMovmskb = *bit_cast<const __m128i*>(static_cast<uintptr_t>( in SimdMaskToBitMask() 126 bit_cast<const SIMD128Register*>(static_cast<uintptr_t>(kVid)); in Vidv()
|
/frameworks/libs/binary_translation/kernel_api/riscv64/ |
D | syscall_emulation.cc | 104 bit_cast<const char*>(arg_2), // path in RunGuestSyscall___NR_newfstatat() 108 ConvertHostStatToGuestArch(host_stat, bit_cast<GuestAddr>(arg_3)); in RunGuestSyscall___NR_newfstatat() 123 auto pairs = bit_cast<Guest_riscv_hwprobe*>(arg_1); in RunGuestSyscall___NR_riscv_hwprobe() 124 auto pair_count = bit_cast<size_t>(arg_2); in RunGuestSyscall___NR_riscv_hwprobe() 125 auto flags = static_cast<unsigned int>(bit_cast<unsigned long>(arg_5)); in RunGuestSyscall___NR_riscv_hwprobe() 141 auto start = bit_cast<GuestAddr>(arg_1); in RunGuestSyscall___NR_riscv_flush_icache() 142 auto end = bit_cast<GuestAddr>(arg_2); in RunGuestSyscall___NR_riscv_flush_icache() 143 auto flags = bit_cast<uint64_t>(arg_3); in RunGuestSyscall___NR_riscv_flush_icache()
|
D | epoll_emulation.cc | 65 Guest_epoll_event* guest_event = bit_cast<Guest_epoll_event*>(arg_4); in RunGuestSyscall___NR_epoll_ctl() 80 ConvertHostEPollEventArrayToGuestInPlace(bit_cast<Guest_epoll_event*>(arg_2), arg_3); in RunGuestSyscall___NR_epoll_pwait()
|
/frameworks/libs/binary_translation/code_gen_lib/ |
D | code_gen_lib_riscv64_test.cc | 335 ASSERT_FLOAT_EQ(0.0f, bit_cast<float>(static_cast<uint32_t>(buf->fp_argv[0]))); in Run18Fp() 337 ASSERT_FLOAT_EQ(1.1f, bit_cast<float>(static_cast<uint32_t>(buf->fp_argv[1]))); in Run18Fp() 339 ASSERT_FLOAT_EQ(2.2f, bit_cast<float>(static_cast<uint32_t>(buf->fp_argv[2]))); in Run18Fp() 341 ASSERT_FLOAT_EQ(3.3f, bit_cast<float>(static_cast<uint32_t>(buf->fp_argv[3]))); in Run18Fp() 343 ASSERT_FLOAT_EQ(4.4f, bit_cast<float>(static_cast<uint32_t>(buf->fp_argv[4]))); in Run18Fp() 345 ASSERT_FLOAT_EQ(5.5f, bit_cast<float>(static_cast<uint32_t>(buf->fp_argv[5]))); in Run18Fp() 347 ASSERT_FLOAT_EQ(6.6f, bit_cast<float>(static_cast<uint32_t>(buf->fp_argv[6]))); in Run18Fp() 349 ASSERT_FLOAT_EQ(7.7f, bit_cast<float>(static_cast<uint32_t>(buf->fp_argv[7]))); in Run18Fp() 350 ASSERT_FLOAT_EQ(8.8f, bit_cast<float>(static_cast<uint32_t>(buf->argv[0]))); in Run18Fp() 351 ASSERT_FLOAT_EQ(9.9f, bit_cast<float>(static_cast<uint32_t>(buf->argv[1]))); in Run18Fp() [all …]
|
/frameworks/libs/binary_translation/guest_abi/riscv64/include/berberis/guest_abi/ |
D | guest_abi_arch.h | 152 return bit_cast<uint64_t>(value); in Box() 154 return static_cast<uint64_t>(bit_cast<uint32_t>(value)); in Box() 162 return bit_cast<FloatingPointType>(value); in Unbox() 164 return bit_cast<FloatingPointType>(static_cast<uint32_t>(value)); in Unbox() 197 return bit_cast<uint64_t>(value); in Box() 199 return bit_cast<uint32_t>(value) | kNanBoxFloat32; in Box() 207 return bit_cast<Type>(value); in Unbox() 210 return bit_cast<Type>(static_cast<uint32_t>(value)); in Unbox()
|
/frameworks/libs/binary_translation/interpreter/riscv64/ |
D | regs.h | 42 return bit_cast<uint64_t>(arg); 58 return bit_cast<intrinsics::Float64>(arg); 67 return bit_cast<uint32_t>(arg); 72 return bit_cast<uint64_t>(arg);
|
/frameworks/libs/binary_translation/intrinsics/include/berberis/intrinsics/ |
D | intrinsics_floating_point_impl.h | 56 const IntType raw_bits = bit_cast<IntType>(arg); in FClass() 300 uint32_t op_32 = bit_cast<uint32_t>(op); in RSqrtEstimate() 303 Float32 fp32 = bit_cast<Float32>(op_32); in RSqrtEstimate() 305 op_32 = bit_cast<uint32_t>(fp32); in RSqrtEstimate() 308 return bit_cast<Float32>(op_32); in RSqrtEstimate() 311 uint64_t op_64 = bit_cast<uint64_t>(op); in RSqrtEstimate() 314 Float64 fp64 = bit_cast<Float64>(op_64); in RSqrtEstimate() 316 op_64 = bit_cast<uint64_t>(fp64); in RSqrtEstimate() 319 return bit_cast<Float64>(op_64); in RSqrtEstimate() 335 return {bit_cast<FloatType>((bit_cast<UInt>(x) & non_sign_bit) | (bit_cast<UInt>(y) & sign_bit))}; in FSgnj() [all …]
|
/frameworks/libs/binary_translation/base/include/berberis/base/ |
D | fd.h | 44 int fd = static_cast<int>(RawSyscall(__NR_memfd_create, bit_cast<long>(name), MFD_CLOEXEC)); in CreateMemfdOrDie() 59 auto written = RawSyscall(__NR_write, fd, bit_cast<long>(curr), end - curr); in WriteFullyOrDie()
|
/frameworks/libs/binary_translation/tools/nogrod/ |
D | string_offset_table_tests.cc | 30 using berberis::bit_cast; in RunSmokeTest() 37 StringOffsetTable table(Buffer{bit_cast<const uint8_t*>(data.data()), data.size() * sizeof(T)}); in RunSmokeTest()
|
D | string_offset_table.h | 30 using berberis::bit_cast; 68 uint32_t size32 = *bit_cast<const uint32_t*>(table);
|
/frameworks/libs/binary_translation/intrinsics/riscv64/ |
D | intrinsics_test.cc | 146 bit_cast<Float64>(uint64_t(0x3F96E00000000000))); in TEST() 147 ASSERT_EQ(RSqrtEstimate<Float32>(Float32{2000.123}), bit_cast<Float32>(uint32_t(0x3CB70000))); in TEST() 155 ASSERT_EQ(bit_cast<uint64_t>(RSqrtEstimate<Float64>(Float64{-2.1})), in TEST() 156 bit_cast<uint64_t>(std::numeric_limits<Float64>::quiet_NaN())); in TEST() 157 ASSERT_EQ(bit_cast<uint32_t>(RSqrtEstimate<Float32>(Float32{-2.1})), in TEST() 158 bit_cast<uint32_t>(std::numeric_limits<Float32>::quiet_NaN())); in TEST()
|
/frameworks/libs/binary_translation/base/ |
D | exec_region_elf_backed.cc | 50 auto region_start_addr = bit_cast<uintptr_t>(region_start); in Create() 55 auto region_end_addr = bit_cast<uintptr_t>(region_end); in Create()
|