47 #ifndef __ARCH_ARM_INSTS_FPLIB_HH__
48 #define __ARCH_ARM_INSTS_FPLIB_HH__
69 return (
FPRounding)((uint32_t)fpscr >> 22 & 3);
77 T
fplibAdd(T op1, T op2, FPSCR &fpscr);
80 int fplibCompare(T op1, T op2,
bool signal_nans, FPSCR &fpscr);
94 template <
class T1,
class T2>
98 T
fplibDiv(T op1, T op2, FPSCR &fpscr);
104 T
fplibMax(T op1, T op2, FPSCR &fpscr);
110 T
fplibMin(T op1, T op2, FPSCR &fpscr);
116 T
fplibMul(T op1, T op2, FPSCR &fpscr);
119 T
fplibMulAdd(T addend, T op1, T op2, FPSCR &fpscr);
152 T
fplibSub(T op1, T op2, FPSCR &fpscr);
163 template <
class T1,
class T2>
186 uint16_t
fplibAdd(uint16_t op1, uint16_t op2, FPSCR &fpscr);
188 uint32_t
fplibAdd(uint32_t op1, uint32_t op2, FPSCR &fpscr);
190 uint64_t
fplibAdd(uint64_t op1, uint64_t op2, FPSCR &fpscr);
192 int fplibCompare(uint16_t op1, uint16_t op2,
bool signal_nans, FPSCR &fpscr);
194 int fplibCompare(uint32_t op1, uint32_t op2,
bool signal_nans, FPSCR &fpscr);
196 int fplibCompare(uint64_t op1, uint64_t op2,
bool signal_nans, FPSCR &fpscr);
234 uint16_t
fplibDiv(uint16_t op1, uint16_t op2, FPSCR &fpscr);
236 uint32_t
fplibDiv(uint32_t op1, uint32_t op2, FPSCR &fpscr);
238 uint64_t
fplibDiv(uint64_t op1, uint64_t op2, FPSCR &fpscr);
246 uint16_t
fplibMax(uint16_t op1, uint16_t op2, FPSCR &fpscr);
248 uint32_t
fplibMax(uint32_t op1, uint32_t op2, FPSCR &fpscr);
250 uint64_t
fplibMax(uint64_t op1, uint64_t op2, FPSCR &fpscr);
252 uint16_t
fplibMaxNum(uint16_t op1, uint16_t op2, FPSCR &fpscr);
254 uint32_t
fplibMaxNum(uint32_t op1, uint32_t op2, FPSCR &fpscr);
256 uint64_t
fplibMaxNum(uint64_t op1, uint64_t op2, FPSCR &fpscr);
258 uint16_t
fplibMin(uint16_t op1, uint16_t op2, FPSCR &fpscr);
260 uint32_t
fplibMin(uint32_t op1, uint32_t op2, FPSCR &fpscr);
262 uint64_t
fplibMin(uint64_t op1, uint64_t op2, FPSCR &fpscr);
264 uint16_t
fplibMinNum(uint16_t op1, uint16_t op2, FPSCR &fpscr);
266 uint32_t
fplibMinNum(uint32_t op1, uint32_t op2, FPSCR &fpscr);
268 uint64_t
fplibMinNum(uint64_t op1, uint64_t op2, FPSCR &fpscr);
270 uint16_t
fplibMul(uint16_t op1, uint16_t op2, FPSCR &fpscr);
272 uint32_t
fplibMul(uint32_t op1, uint32_t op2, FPSCR &fpscr);
274 uint64_t
fplibMul(uint64_t op1, uint64_t op2, FPSCR &fpscr);
276 uint16_t
fplibMulAdd(uint16_t addend, uint16_t op1, uint16_t op2,
279 uint32_t
fplibMulAdd(uint32_t addend, uint32_t op1, uint32_t op2,
282 uint64_t
fplibMulAdd(uint64_t addend, uint64_t op1, uint64_t op2,
285 uint16_t
fplibMulX(uint16_t op1, uint16_t op2, FPSCR &fpscr);
287 uint32_t
fplibMulX(uint32_t op1, uint32_t op2, FPSCR &fpscr);
289 uint64_t
fplibMulX(uint64_t op1, uint64_t op2, FPSCR &fpscr);
336 uint16_t
fplibScale(uint16_t op1, uint16_t op2, FPSCR &fpscr);
338 uint32_t
fplibScale(uint32_t op1, uint32_t op2, FPSCR &fpscr);
340 uint64_t
fplibScale(uint64_t op1, uint64_t op2, FPSCR &fpscr);
348 uint16_t
fplibSub(uint16_t op1, uint16_t op2, FPSCR &fpscr);
350 uint32_t
fplibSub(uint32_t op1, uint32_t op2, FPSCR &fpscr);
352 uint64_t
fplibSub(uint64_t op1, uint64_t op2, FPSCR &fpscr);
354 uint16_t
fplibTrigMulAdd(uint8_t coeff_index, uint16_t op1, uint16_t op2,
357 uint32_t
fplibTrigMulAdd(uint8_t coeff_index, uint32_t op1, uint32_t op2,
360 uint64_t
fplibTrigMulAdd(uint8_t coeff_index, uint64_t op1, uint64_t op2,
363 uint16_t
fplibTrigSMul(uint16_t op1, uint16_t op2, FPSCR &fpscr);
365 uint32_t
fplibTrigSMul(uint32_t op1, uint32_t op2, FPSCR &fpscr);
367 uint64_t
fplibTrigSMul(uint64_t op1, uint64_t op2, FPSCR &fpscr);
369 uint16_t
fplibTrigSSel(uint16_t op1, uint16_t op2, FPSCR &fpscr);
371 uint32_t
fplibTrigSSel(uint32_t op1, uint32_t op2, FPSCR &fpscr);
373 uint64_t
fplibTrigSSel(uint64_t op1, uint64_t op2, FPSCR &fpscr);