/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/v8/src/base/ |
D | safe_conversions.h | 40 template <typename Dst, typename Src> 43 static constexpr Dst Do(Src) { in Do() 45 return CheckOnFailure::template HandleFailure<Dst>(); in Do() 53 template <typename Dst, typename Src, typename Enable = void> 63 template <typename Dst, typename Src> 65 Dst, Src, 67 std::is_integral<Dst>::value && std::is_integral<Src>::value && 68 std::is_signed<Dst>::value && std::is_signed<Src>::value && 69 !IsTypeInRangeForNumericType<Dst, Src>::value>::type> { 75 return value == static_cast<Dst>(value); [all …]
|
D | safe_conversions_impl.h | 151 template <typename Dst, typename Src, 152 IntegerRepresentation DstSign = std::is_signed<Dst>::value 162 template <typename Dst, typename Src, IntegerRepresentation Sign> 163 struct StaticDstRangeRelationToSrcRange<Dst, Src, Sign, Sign> { 165 MaxExponent<Dst>::value >= MaxExponent<Src>::value 172 template <typename Dst, typename Src> 173 struct StaticDstRangeRelationToSrcRange<Dst, 178 MaxExponent<Dst>::value > MaxExponent<Src>::value 184 template <typename Dst, typename Src> 185 struct StaticDstRangeRelationToSrcRange<Dst, [all …]
|
D | safe_conversions_arm_impl.h | 26 template <typename Dst, typename Src> 29 std::is_signed<Src>::value && std::is_integral<Dst>::value && 32 IntegerBitsPlusSign<Dst>::value <= IntegerBitsPlusSign<int32_t>::value && 33 !IsTypeInRangeForNumericType<Dst, Src>::value; 35 __attribute__((always_inline)) static Dst Do(Src value) { in Do() 37 typename std::conditional<std::is_signed<Dst>::value, int32_t, in Do() 39 if (std::is_signed<Dst>::value) { in Do() 42 : [src] "r"(src), [shift] "n"(IntegerBitsPlusSign<Dst>::value <= 32 in Do() 43 ? IntegerBitsPlusSign<Dst>::value in Do() 48 : [src] "r"(src), [shift] "n"(IntegerBitsPlusSign<Dst>::value < 32 in Do() [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_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 …]
|
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 …]
|
/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_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 …]
|
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 …]
|
/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()) << TestString << " with Disp " \ 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/webrtc/base/ |
D | safe_conversions_impl.h | 39 template <typename Dst, typename Src, 40 DstSign IsDstSigned = std::numeric_limits<Dst>::is_signed ? 46 template <typename Dst, typename Src> 47 struct StaticRangeCheck<Dst, Src, DST_SIGNED, SRC_SIGNED> { 48 typedef std::numeric_limits<Dst> DstLimits; 53 (sizeof(Dst) * 8 - 1); 61 template <typename Dst, typename Src> 62 struct StaticRangeCheck<Dst, Src, DST_UNSIGNED, SRC_UNSIGNED> { 63 static const DstRange value = sizeof(Dst) >= sizeof(Src) ? 67 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() 33 template <typename Dst, typename Src> 34 inline Dst checked_cast(Src value) { in checked_cast() 35 RTC_CHECK(IsValueInRangeForNumericType<Dst>(value)); in checked_cast() 36 return static_cast<Dst>(value); in checked_cast() 42 template <typename Dst, typename Src> 43 inline Dst saturated_cast(Src value) { in saturated_cast() 45 if (std::numeric_limits<Dst>::is_iec559) in saturated_cast() 46 return static_cast<Dst>(value); in saturated_cast() [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-7.0/llvm/tools/llvm-c-test/ |
D | echo.cpp | 158 static ValueMap clone_params(LLVMValueRef Src, LLVMValueRef Dst) { in clone_params() argument 160 if (Count != LLVMCountParams(Dst)) in clone_params() 168 LLVMValueRef DstFirst = LLVMGetFirstParam(Dst); in clone_params() 170 LLVMValueRef DstLast = LLVMGetLastParam(Dst); in clone_params() 242 LLVMValueRef Dst = LLVMGetNamedFunction(M, Name); in clone_constant_impl() local 243 if (Dst) in clone_constant_impl() 244 return Dst; in clone_constant_impl() 251 LLVMValueRef Dst = LLVMGetNamedGlobal(M, Name); in clone_constant_impl() local 252 if (Dst) in clone_constant_impl() 253 return Dst; in clone_constant_impl() [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/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/ |
D | MachineBranchProbabilityInfo.cpp | 45 MachineBasicBlock::const_succ_iterator Dst) const { in getEdgeProbability() 46 return Src->getSuccProbability(Dst); in getEdgeProbability() 50 const MachineBasicBlock *Src, const MachineBasicBlock *Dst) const { in getEdgeProbability() 53 return getEdgeProbability(Src, find(Src->successors(), Dst)); in getEdgeProbability() 57 const MachineBasicBlock *Src, const MachineBasicBlock *Dst) const { in isEdgeHot() 59 return getEdgeProbability(Src, Dst) > HotProb; in isEdgeHot() 84 const MachineBasicBlock *Dst) const { in printEdgeProbability() 86 const BranchProbability Prob = getEdgeProbability(Src, Dst); in printEdgeProbability() 87 OS << "edge " << printMBBReference(*Src) << " -> " << printMBBReference(*Dst) in printEdgeProbability() 89 << (isEdgeHot(Src, Dst) ? " [HOT edge]\n" : "\n"); in printEdgeProbability()
|