8#ifndef V8_BASE_NUMERICS_SAFE_MATH_ARM_IMPL_H_
9#define V8_BASE_NUMERICS_SAFE_MATH_ARM_IMPL_H_
21template <
typename T,
typename U>
22struct CheckedMulFastAsmOp {
43 presult =
static_cast<Promotion
>(
x) *
static_cast<Promotion
>(
y);
44 if (!IsValueInRangeForNumericType<V>(presult)) {
47 *
result =
static_cast<V>(presult);
52template <
typename T,
typename U>
53struct ClampedAddFastAsmOp {
56 kIsTypeInRangeForNumericType<int32_t, BigEnoughPromotion<T, U>>;
69 asm(
"qadd %[result], %[first], %[second]"
71 : [first]
"r"(x_i32), [
second]
"r"(y_i32));
77template <
typename T,
typename U>
78struct ClampedSubFastAsmOp {
81 kIsTypeInRangeForNumericType<int32_t, BigEnoughPromotion<T, U>>;
94 asm(
"qsub %[result], %[first], %[second]"
96 : [first]
"r"(x_i32), [
second]
"r"(y_i32));
102template <
typename T,
typename U>
103struct ClampedMulFastAsmOp {
107 template <
typename V>
121 static_cast<Promotion
>(
y));
ZoneVector< RpoNumber > & result
constexpr bool IsValueNegative(T value)
constexpr bool kEnableAsmCode
constexpr bool kIsBigEnoughPromotionContained
constexpr Dst checked_cast(Src value)
constexpr bool kIsIntegerArithmeticSafe
constexpr bool kIsFastIntegerArithmeticPromotionContained
constexpr Dst CommonMaxOrMin(bool is_min)
FastIntegerArithmeticPromotionImpl< Lhs, Rhs >::type FastIntegerArithmeticPromotion
constexpr Dst saturated_cast(Src value)
static constexpr bool is_supported
static constexpr bool Do(T x, U y, V *result)
static constexpr V Do(T, U)
__attribute__((always_inline)) static V Do(T x
static constexpr bool is_supported
__attribute__((always_inline)) static V Do(T x
static constexpr V Do(T, U)
static constexpr bool is_supported
static constexpr bool is_supported
__attribute__((always_inline)) static V Do(T x
static constexpr V Do(T, U)