/external/libchrome/base/ |
D | safe_numerics_unittest.cc | 46 template <typename Dst, typename Src> 47 Dst GetMaxConvertibleToFloat() { in GetMaxConvertibleToFloat() 48 using DstLimits = numeric_limits<Dst>; in GetMaxConvertibleToFloat() 55 MaxExponent<Src>::value <= MaxExponent<Dst>::value) in GetMaxConvertibleToFloat() 58 while (max != static_cast<Src>(static_cast<Dst>(max))) { in GetMaxConvertibleToFloat() 61 return static_cast<Dst>(max); in GetMaxConvertibleToFloat() 170 EXPECT_EQ(expected, (actual).template Cast<Dst>().IsValid()) \ 184 template <typename Dst> 186 Dst dummy_value = 0; in TestStrictPointerMath() 187 Dst* dummy_ptr = &dummy_value; in TestStrictPointerMath() [all …]
|
/external/angle/src/common/third_party/base/anglebase/numerics/ |
D | safe_numerics_unittest.cc | 46 template <typename Dst, typename Src> 47 Dst GetMaxConvertibleToFloat() in GetMaxConvertibleToFloat() 49 typedef numeric_limits<Dst> DstLimits; in GetMaxConvertibleToFloat() 56 MaxExponent<Src>::value <= MaxExponent<Dst>::value) in GetMaxConvertibleToFloat() 59 while (max != static_cast<Src>(static_cast<Dst>(max))) in GetMaxConvertibleToFloat() 63 return static_cast<Dst>(max); in GetMaxConvertibleToFloat() 68 EXPECT_EQ(expected, CheckedNumeric<Dst>(actual).IsValid()) \ 76 EXPECT_EQ(static_cast<Dst>(expected), CheckedNumeric<Dst>(actual).ValueUnsafe()) \ 81 template <typename Dst> 85 typename std::enable_if<numeric_limits<Dst>::is_integer && numeric_limits<Dst>::is_signed, in TestSpecializedArithmetic() [all …]
|
D | safe_conversions_impl.h | 55 template <typename Dst, 57 IntegerRepresentation DstSign = std::numeric_limits<Dst>::is_signed 67 template <typename Dst, typename Src, IntegerRepresentation Sign> 68 struct StaticDstRangeRelationToSrcRange<Dst, Src, Sign, Sign> 71 MaxExponent<Dst>::value >= MaxExponent<Src>::value ? NUMERIC_RANGE_CONTAINED 77 template <typename Dst, typename Src> 78 struct StaticDstRangeRelationToSrcRange<Dst, 84 MaxExponent<Dst>::value > MaxExponent<Src>::value ? NUMERIC_RANGE_CONTAINED 89 template <typename Dst, typename Src> 90 struct StaticDstRangeRelationToSrcRange<Dst, [all …]
|
D | safe_conversions.h | 24 template <typename Dst, typename Src> 27 return internal::DstRangeRelationToSrcRange<Dst>(value) == internal::RANGE_VALID; in IsValueInRangeForNumericType() 50 template <typename Dst, typename Src> 51 inline Dst checked_cast(Src value) in checked_cast() 53 CHECK(IsValueInRangeForNumericType<Dst>(value)); in checked_cast() 54 return static_cast<Dst>(value); in checked_cast() 82 template <typename Dst, class NaNHandler, typename Src> 83 constexpr Dst saturated_cast_impl(const Src value, const RangeConstraint constraint) in saturated_cast_impl() 86 ? static_cast<Dst>(value) in saturated_cast_impl() 88 ? std::numeric_limits<Dst>::min() in saturated_cast_impl() [all …]
|
/external/pdfium/third_party/base/numerics/ |
D | safe_conversions.h | 28 template <typename Dst, typename Src> 31 static constexpr Dst Do(Src) { in Do() 33 return CheckOnFailure::template HandleFailure<Dst>(); in Do() 41 template <typename Dst, typename Src, typename Enable = void> 51 template <typename Dst, typename Src> 53 Dst, 56 std::is_integral<Dst>::value && std::is_integral<Src>::value && 57 std::is_signed<Dst>::value && std::is_signed<Src>::value && 58 !IsTypeInRangeForNumericType<Dst, Src>::value>::type> { 64 return value == static_cast<Dst>(value); [all …]
|
D | safe_conversions_arm_impl.h | 19 template <typename Dst, typename Src> 22 std::is_signed<Src>::value && std::is_integral<Dst>::value && 25 IntegerBitsPlusSign<Dst>::value <= IntegerBitsPlusSign<int32_t>::value && 26 !IsTypeInRangeForNumericType<Dst, Src>::value; 28 __attribute__((always_inline)) static Dst Do(Src value) { in Do() 30 typename std::conditional<std::is_signed<Dst>::value, int32_t, in Do() 32 if (std::is_signed<Dst>::value) { in Do() 35 : [src] "r"(src), [shift] "n"(IntegerBitsPlusSign<Dst>::value <= 32 in Do() 36 ? IntegerBitsPlusSign<Dst>::value in Do() 41 : [src] "r"(src), [shift] "n"(IntegerBitsPlusSign<Dst>::value < 32 in Do() [all …]
|
D | safe_conversions_impl.h | 148 template <typename Dst, 150 IntegerRepresentation DstSign = std::is_signed<Dst>::value 160 template <typename Dst, typename Src, IntegerRepresentation Sign> 161 struct StaticDstRangeRelationToSrcRange<Dst, Src, Sign, Sign> { 163 MaxExponent<Dst>::value >= MaxExponent<Src>::value 170 template <typename Dst, typename Src> 171 struct StaticDstRangeRelationToSrcRange<Dst, 176 MaxExponent<Dst>::value > MaxExponent<Src>::value 182 template <typename Dst, typename Src> 183 struct StaticDstRangeRelationToSrcRange<Dst, [all …]
|
/external/libchrome/base/numerics/ |
D | safe_conversions.h | 27 template <typename Dst, typename Src> 30 static constexpr Dst Do(Src) { in Do() 32 return CheckOnFailure::template HandleFailure<Dst>(); in Do() 40 template <typename Dst, typename Src, typename Enable = void> 50 template <typename Dst, typename Src> 52 Dst, 55 std::is_integral<Dst>::value && std::is_integral<Src>::value && 56 std::is_signed<Dst>::value && std::is_signed<Src>::value && 57 !IsTypeInRangeForNumericType<Dst, Src>::value>::type> { 63 return value == static_cast<Dst>(value); [all …]
|
D | safe_conversions_arm_impl.h | 18 template <typename Dst, typename Src> 21 std::is_signed<Src>::value && std::is_integral<Dst>::value && 24 IntegerBitsPlusSign<Dst>::value <= IntegerBitsPlusSign<int32_t>::value && 25 !IsTypeInRangeForNumericType<Dst, Src>::value; 27 __attribute__((always_inline)) static Dst Do(Src value) { in Do() 29 typename std::conditional<std::is_signed<Dst>::value, int32_t, in Do() 31 if (std::is_signed<Dst>::value) { in Do() 34 : [src] "r"(src), [shift] "n"(IntegerBitsPlusSign<Dst>::value <= 32 in Do() 35 ? IntegerBitsPlusSign<Dst>::value in Do() 40 : [src] "r"(src), [shift] "n"(IntegerBitsPlusSign<Dst>::value < 32 in Do() [all …]
|
D | safe_conversions_impl.h | 147 template <typename Dst, 149 IntegerRepresentation DstSign = std::is_signed<Dst>::value 159 template <typename Dst, typename Src, IntegerRepresentation Sign> 160 struct StaticDstRangeRelationToSrcRange<Dst, Src, Sign, Sign> { 162 MaxExponent<Dst>::value >= MaxExponent<Src>::value 169 template <typename Dst, typename Src> 170 struct StaticDstRangeRelationToSrcRange<Dst, 175 MaxExponent<Dst>::value > MaxExponent<Src>::value 181 template <typename Dst, typename Src> 182 struct StaticDstRangeRelationToSrcRange<Dst, [all …]
|
/external/swiftshader/third_party/subzero/unittest/AssemblerX8664/ |
D | XmmArith.cpp | 17 #define TestArithSSXmmXmm(FloatSize, Src, Value0, Dst, Value1, Inst, Op) \ in TEST_F() argument 22 "(" #FloatSize ", " #Src ", " #Value0 ", " #Dst ", " #Value1 \ in TEST_F() 31 __ movss(IceType_f##FloatSize, Encoded_Xmm_##Dst(), dwordAddress(T0)); \ in TEST_F() 33 __ Inst(IceType_f##FloatSize, Encoded_Xmm_##Dst(), Encoded_Xmm_##Src()); \ in TEST_F() 46 ASSERT_DOUBLE_EQ(V0 Op V1, test.Dst<Type>()) << TestString; \ in TEST_F() 50 #define TestArithSSXmmAddr(FloatSize, Value0, Dst, Value1, Inst, Op) \ in TEST_F() argument 55 "(" #FloatSize ", Addr, " #Value0 ", " #Dst ", " #Value1 ", " #Inst \ in TEST_F() 64 __ movss(IceType_f##FloatSize, Encoded_Xmm_##Dst(), dwordAddress(T0)); \ in TEST_F() 65 __ Inst(IceType_f##FloatSize, Encoded_Xmm_##Dst(), dwordAddress(T1)); \ in TEST_F() 78 ASSERT_DOUBLE_EQ(V0 Op V1, test.Dst<Type>()) << TestString; \ in TEST_F() [all …]
|
D | ControlFlow.cpp | 39 #define TestImpl(Dst, Src0, Src1) \ in TEST_F() argument 41 TestJ(o, Near, Dst, Src0, 0x80000000ul, Src1, 0x1ul); \ in TEST_F() 42 TestJ(o, Far, Dst, Src0, 0x80000000ul, Src1, 0x1ul); \ in TEST_F() 43 TestJ(no, Near, Dst, Src0, 0x1ul, Src1, 0x1ul); \ in TEST_F() 44 TestJ(no, Far, Dst, Src0, 0x1ul, Src1, 0x1ul); \ in TEST_F() 45 TestJ(b, Near, Dst, Src0, 0x1ul, Src1, 0x80000000ul); \ in TEST_F() 46 TestJ(b, Far, Dst, Src0, 0x1ul, Src1, 0x80000000ul); \ in TEST_F() 47 TestJ(ae, Near, Dst, Src0, 0x80000000ul, Src1, 0x1ul); \ in TEST_F() 48 TestJ(ae, Far, Dst, Src0, 0x80000000ul, Src1, 0x1ul); \ in TEST_F() 49 TestJ(e, Near, Dst, Src0, 0x80000000ul, Src1, 0x80000000ul); \ in TEST_F() [all …]
|
D | DataMov.cpp | 156 #define TestRegReg(Dst, Src, Suffix, Size) \ in TEST_F() argument 159 "(" #Dst ", " #Src ", " #Suffix ", " #Size ")"; \ in TEST_F() 166 __ mov(IceType_i64, Encoded_GPR_##Dst(), dwordAddress(T1)); \ in TEST_F() 167 __ mov(IceType_i##Size, Encoded_GPR_##Dst(), Encoded_GPR_##Src()); \ in TEST_F() 174 ASSERT_EQ((Marker & ~MaskResult##Size) | Value, test.Dst()) << TestString; \ in TEST_F() 175 ASSERT_EQ(Value, test.Dst##Suffix()) << TestString; \ in TEST_F() 179 #define TestImpl(Dst, Src) \ in TEST_F() argument 181 TestRegReg(Dst, Src, l, 8); \ in TEST_F() 182 TestRegReg(Dst, Src, w, 16); \ in TEST_F() 183 TestRegReg(Dst, Src, d, 32); \ in TEST_F() [all …]
|
D | GPRArith.cpp | 112 #define TestLeaBaseDisp(Base, BaseValue, Disp, Dst) \ in TEST_F() argument 115 "(" #Base ", " #BaseValue ", " #Dst ")"; \ in TEST_F() 120 __ lea(IceType_i32, Encoded_GPR_##Dst(), \ in TEST_F() 124 ASSERT_EQ(test.Base##d() + (Disp), test.Dst##d()) \ in TEST_F() 327 #define TestLeaAbsolute(Dst, Value) \ in TEST_F() argument 329 static constexpr char TestString[] = "(" #Dst ", " #Value ")"; \ in TEST_F() 330 __ lea(IceType_i32, GPRRegister::Encoded_Reg_##Dst, \ in TEST_F() 336 /*mod*/ 0x00 | /*reg*/ (GPRRegister::Encoded_Reg_##Dst << 3) | \ in TEST_F() 362 #define TestImplRegReg(Dst, Value0, Src, Value1, Size) \ in TEST_F() argument 366 "(" #Dst ", " #Value0 ", " #Src ", " #Value1 ", " #Size ")"; \ in TEST_F() [all …]
|
/external/swiftshader/third_party/subzero/unittest/AssemblerX8632/ |
D | XmmArith.cpp | 17 #define TestArithSSXmmXmm(FloatSize, Src, Value0, Dst, Value1, Inst, Op) \ in TEST_F() argument 22 "(" #FloatSize ", " #Src ", " #Value0 ", " #Dst ", " #Value1 \ in TEST_F() 31 __ movss(IceType_f##FloatSize, XmmRegister::Encoded_Reg_##Dst, \ in TEST_F() 35 __ Inst(IceType_f##FloatSize, XmmRegister::Encoded_Reg_##Dst, \ in TEST_F() 49 ASSERT_DOUBLE_EQ(V0 Op V1, test.Dst<Type>()) << TestString; \ in TEST_F() 53 #define TestArithSSXmmAddr(FloatSize, Value0, Dst, Value1, Inst, Op) \ in TEST_F() argument 58 "(" #FloatSize ", Addr, " #Value0 ", " #Dst ", " #Value1 ", " #Inst \ in TEST_F() 67 __ movss(IceType_f##FloatSize, XmmRegister::Encoded_Reg_##Dst, \ in TEST_F() 69 __ Inst(IceType_f##FloatSize, XmmRegister::Encoded_Reg_##Dst, \ in TEST_F() 83 ASSERT_DOUBLE_EQ(V0 Op V1, test.Dst<Type>()) << TestString; \ in TEST_F() [all …]
|
D | DataMov.cpp | 177 #define TestMovzx8bitWithRegDest(Src, Dst, Imm) \ in TEST_F() argument 181 __ movzx(IceType_i8, GPRRegister::Encoded_Reg_##Dst, \ in TEST_F() 185 ASSERT_EQ(Imm, test.Dst()) << "(" #Src ", " #Dst ", " #Imm ")"; \ in TEST_F() 189 #define TestMovzx16bitWithRegDest(Src, Dst, Imm) \ in TEST_F() argument 193 __ movzx(IceType_i16, GPRRegister::Encoded_Reg_##Dst, \ in TEST_F() 197 ASSERT_EQ(Imm, test.Dst()) << "(" #Src ", " #Dst ", " #Imm ")"; \ in TEST_F() 201 #define TestMovzx8bitWithAddrSrc(Dst, Imm) \ in TEST_F() argument 206 __ movzx(IceType_i8, GPRRegister::Encoded_Reg_##Dst, dwordAddress(T0)); \ in TEST_F() 210 ASSERT_EQ(Imm, test.Dst()) << "(Addr, " #Dst ", " #Imm ")"; \ in TEST_F() 214 #define TestMovzx16bitWithAddrSrc(Dst, Imm) \ in TEST_F() argument [all …]
|
D | GPRArith.cpp | 124 #define TestLeaBaseDisp(Base, BaseValue, Disp, Dst) \ in TEST_F() argument 127 "(" #Base ", " #BaseValue ", " #Dst ")"; \ in TEST_F() 133 __ lea(IceType_i32, GPRRegister::Encoded_Reg_##Dst, \ in TEST_F() 138 ASSERT_EQ(test.Base() + (Disp), test.Dst()) \ in TEST_F() 294 #define TestLeaAbsolute(Dst, Value) \ in TEST_F() argument 296 static constexpr char TestString[] = "(" #Dst ", " #Value ")"; \ in TEST_F() 297 __ lea(IceType_i32, GPRRegister::Encoded_Reg_##Dst, \ in TEST_F() 303 /*mod=*/0x00 | /*reg*/ (GPRRegister::Encoded_Reg_##Dst << 3) | \ in TEST_F() 326 #define TestImplRegReg(Dst, Value0, Src, Value1, Size) \ in TEST_F() argument 330 "(" #Dst ", " #Value0 ", " #Src ", " #Value1 ", " #Size ")"; \ in TEST_F() [all …]
|
/external/webrtc/rtc_base/numerics/ |
D | safe_conversions_impl.h | 30 template <typename Dst, 33 std::numeric_limits<Dst>::is_signed ? DST_SIGNED : DST_UNSIGNED, 38 template <typename Dst, typename Src> 39 struct StaticRangeCheck<Dst, Src, DST_SIGNED, SRC_SIGNED> { 40 typedef std::numeric_limits<Dst> DstLimits; 44 DstLimits::is_iec559 ? DstLimits::max_exponent : (sizeof(Dst) * 8 - 1); 51 template <typename Dst, typename Src> 52 struct StaticRangeCheck<Dst, Src, DST_UNSIGNED, SRC_UNSIGNED> { 54 sizeof(Dst) >= sizeof(Src) ? CONTAINS_RANGE : OVERLAPS_RANGE; 57 template <typename Dst, typename Src> [all …]
|
D | safe_conversions.h | 25 template <typename Dst, typename Src> 27 return internal::RangeCheck<Dst>(value) == internal::TYPE_VALID; in IsValueInRangeForNumericType() 34 template <typename Dst, typename Src> 35 inline constexpr Dst checked_cast(Src value) { in checked_cast() 36 RTC_CHECK(IsValueInRangeForNumericType<Dst>(value)); in checked_cast() 37 return static_cast<Dst>(value); in checked_cast() 39 template <typename Dst, typename Src> 40 inline constexpr Dst dchecked_cast(Src value) { in dchecked_cast() 41 RTC_DCHECK(IsValueInRangeForNumericType<Dst>(value)); in dchecked_cast() 42 return static_cast<Dst>(value); in dchecked_cast() [all …]
|
/external/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/ |
D | MachineIRBuilder.h | 225 void validateTruncExt(const LLT Dst, const LLT Src, bool IsExtend); 626 MachineInstrBuilder buildPtrToInt(const DstOp &Dst, const SrcOp &Src) { in buildPtrToInt() argument 627 return buildInstr(TargetOpcode::G_PTRTOINT, {Dst}, {Src}); in buildPtrToInt() 631 MachineInstrBuilder buildIntToPtr(const DstOp &Dst, const SrcOp &Src) { in buildIntToPtr() argument 632 return buildInstr(TargetOpcode::G_INTTOPTR, {Dst}, {Src}); in buildIntToPtr() 636 MachineInstrBuilder buildBitcast(const DstOp &Dst, const SrcOp &Src) { in buildBitcast() argument 637 return buildInstr(TargetOpcode::G_BITCAST, {Dst}, {Src}); in buildBitcast() 641 MachineInstrBuilder buildAddrSpaceCast(const DstOp &Dst, const SrcOp &Src) { in buildAddrSpaceCast() argument 642 return buildInstr(TargetOpcode::G_ADDRSPACE_CAST, {Dst}, {Src}); in buildAddrSpaceCast() 711 MachineInstrBuilder buildCast(const DstOp &Dst, const SrcOp &Src); [all …]
|
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
D | ExprEngine.h | 118 ExplodedNodeSet &Dst) { in ExecuteWorkListWithInitialState() argument 119 return Engine.ExecuteWorkListWithInitialState(L, Steps, InitState, Dst); in ExecuteWorkListWithInitialState() 206 ExplodedNode *Pred, ExplodedNodeSet &Dst); 208 ExplodedNode *Pred, ExplodedNodeSet &Dst); 210 ExplodedNode *Pred, ExplodedNodeSet &Dst); 212 ExplodedNode *Pred, ExplodedNodeSet &Dst); 214 ExplodedNode *Pred, ExplodedNodeSet &Dst); 226 ExplodedNodeSet &Dst, 235 ExplodedNode *Pred, ExplodedNodeSet &Dst, 244 ExplodedNodeSet &Dst, [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/GlobalISel/ |
D | MachineIRBuilder.h | 226 void validateTruncExt(const LLT &Dst, const LLT &Src, bool IsExtend); 529 MachineInstrBuilder buildPtrToInt(const DstOp &Dst, const SrcOp &Src) { in buildPtrToInt() argument 530 return buildInstr(TargetOpcode::G_PTRTOINT, {Dst}, {Src}); in buildPtrToInt() 534 MachineInstrBuilder buildIntToPtr(const DstOp &Dst, const SrcOp &Src) { in buildIntToPtr() argument 535 return buildInstr(TargetOpcode::G_INTTOPTR, {Dst}, {Src}); in buildIntToPtr() 539 MachineInstrBuilder buildBitcast(const DstOp &Dst, const SrcOp &Src) { in buildBitcast() argument 540 return buildInstr(TargetOpcode::G_BITCAST, {Dst}, {Src}); in buildBitcast() 544 MachineInstrBuilder buildAddrSpaceCast(const DstOp &Dst, const SrcOp &Src) { in buildAddrSpaceCast() argument 545 return buildInstr(TargetOpcode::G_ADDRSPACE_CAST, {Dst}, {Src}); in buildAddrSpaceCast() 614 MachineInstrBuilder buildCast(const DstOp &Dst, const SrcOp &Src); [all …]
|
/external/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
D | ExprEngine.h | 201 ExplodedNodeSet &Dst) { in ExecuteWorkListWithInitialState() argument 202 return Engine.ExecuteWorkListWithInitialState(L, Steps, InitState, Dst); in ExecuteWorkListWithInitialState() 310 ExplodedNode *Pred, ExplodedNodeSet &Dst); 312 ExplodedNode *Pred, ExplodedNodeSet &Dst); 314 ExplodedNode *Pred, ExplodedNodeSet &Dst); 316 ExplodedNode *Pred, ExplodedNodeSet &Dst); 318 ExplodedNode *Pred, ExplodedNodeSet &Dst); 330 ExplodedNodeSet &Dst, 339 ExplodedNode *Pred, ExplodedNodeSet &Dst, 348 ExplodedNodeSet &Dst, [all …]
|
/external/llvm/tools/llvm-c-test/ |
D | echo.cpp | 157 static ValueMap clone_params(LLVMValueRef Src, LLVMValueRef Dst) { in clone_params() argument 159 if (Count != LLVMCountParams(Dst)) in clone_params() 167 LLVMValueRef DstFirst = LLVMGetFirstParam(Dst); in clone_params() 169 LLVMValueRef DstLast = LLVMGetLastParam(Dst); in clone_params() 239 LLVMValueRef Dst = LLVMGetNamedFunction(M, Name); in clone_constant_impl() local 240 if (Dst) in clone_constant_impl() 241 return Dst; in clone_constant_impl() 248 LLVMValueRef Dst = LLVMGetNamedGlobal(M, Name); in clone_constant_impl() local 249 if (Dst) in clone_constant_impl() 250 return Dst; in clone_constant_impl() [all …]
|
/external/llvm-project/llvm/tools/llvm-c-test/ |
D | echo.cpp | 163 static ValueMap clone_params(LLVMValueRef Src, LLVMValueRef Dst) { in clone_params() argument 165 if (Count != LLVMCountParams(Dst)) in clone_params() 173 LLVMValueRef DstFirst = LLVMGetFirstParam(Dst); in clone_params() 175 LLVMValueRef DstLast = LLVMGetLastParam(Dst); in clone_params() 248 LLVMValueRef Dst = nullptr; in clone_constant_impl() local 252 Dst = LLVMGetIntrinsicDeclaration(M, ID, nullptr, 0); in clone_constant_impl() 255 Dst = LLVMGetNamedFunction(M, Name); in clone_constant_impl() 258 if (Dst) in clone_constant_impl() 259 return Dst; in clone_constant_impl() 266 LLVMValueRef Dst = LLVMGetNamedGlobal(M, Name); in clone_constant_impl() local [all …]
|