@@ -106,7 +106,7 @@ struct DoubleTraits
106
106
template <typename TFp, typename TFpTraits>
107
107
TFp FpAdd (TFp value1, TFp value2)
108
108
{
109
- #if defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
109
+ #if defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
110
110
// If [value1] is negative infinity and [value2] is positive infinity
111
111
// the result is NaN.
112
112
// If [value1] is positive infinity and [value2] is negative infinity
@@ -124,7 +124,7 @@ TFp FpAdd(TFp value1, TFp value2)
124
124
return TFpTraits::NaN ();
125
125
}
126
126
}
127
- #endif // TARGET_ARMARCH || TARGET_LOONGARCH64
127
+ #endif // TARGET_ARMARCH || TARGET_LOONGARCH64 || TARGET_RISCV64
128
128
129
129
return value1 + value2;
130
130
}
@@ -142,7 +142,7 @@ TFp FpAdd(TFp value1, TFp value2)
142
142
template <typename TFp, typename TFpTraits>
143
143
TFp FpSub (TFp value1, TFp value2)
144
144
{
145
- #if defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
145
+ #if defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
146
146
// If [value1] is positive infinity and [value2] is positive infinity
147
147
// the result is NaN.
148
148
// If [value1] is negative infinity and [value2] is negative infinity
@@ -160,7 +160,7 @@ TFp FpSub(TFp value1, TFp value2)
160
160
return TFpTraits::NaN ();
161
161
}
162
162
}
163
- #endif // TARGET_ARMARCH || TARGET_LOONGARCH64
163
+ #endif // TARGET_ARMARCH || TARGET_LOONGARCH64 || TARGET_RISCV64
164
164
165
165
return value1 - value2;
166
166
}
@@ -178,7 +178,7 @@ TFp FpSub(TFp value1, TFp value2)
178
178
template <typename TFp, typename TFpTraits>
179
179
TFp FpMul (TFp value1, TFp value2)
180
180
{
181
- #if defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
181
+ #if defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
182
182
// From the ECMA standard:
183
183
//
184
184
// If [value1] is zero and [value2] is infinity
@@ -194,7 +194,7 @@ TFp FpMul(TFp value1, TFp value2)
194
194
{
195
195
return TFpTraits::NaN ();
196
196
}
197
- #endif // TARGET_ARMARCH || TARGET_LOONGARCH64
197
+ #endif // TARGET_ARMARCH || TARGET_LOONGARCH64 || TARGET_RISCV64
198
198
199
199
return value1 * value2;
200
200
}
@@ -212,7 +212,7 @@ TFp FpMul(TFp value1, TFp value2)
212
212
template <typename TFp, typename TFpTraits>
213
213
TFp FpDiv (TFp dividend, TFp divisor)
214
214
{
215
- #if defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64)
215
+ #if defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
216
216
// From the ECMA standard:
217
217
//
218
218
// If [dividend] is zero and [divisor] is zero
@@ -228,7 +228,7 @@ TFp FpDiv(TFp dividend, TFp divisor)
228
228
{
229
229
return TFpTraits::NaN ();
230
230
}
231
- #endif // TARGET_ARMARCH || TARGET_LOONGARCH64
231
+ #endif // TARGET_ARMARCH || TARGET_LOONGARCH64 || TARGET_RISCV64
232
232
233
233
return dividend / divisor;
234
234
}
0 commit comments