47 #ifndef __ARCH_ARM_INSTS_FPLIB_HH__
48 #define __ARCH_ARM_INSTS_FPLIB_HH__
73 return (
FPRounding)((uint32_t)fpscr >> 22 & 3);
81 T
fplibAdd(T op1, T op2, FPSCR &fpscr);
84 int fplibCompare(T op1, T op2,
bool signal_nans, FPSCR &fpscr);
98 template <
class T1,
class T2>
102 T
fplibDiv(T op1, T op2, FPSCR &fpscr);
108 T
fplibMax(T op1, T op2, FPSCR &fpscr);
114 T
fplibMin(T op1, T op2, FPSCR &fpscr);
120 T
fplibMul(T op1, T op2, FPSCR &fpscr);
123 T
fplibMulAdd(T addend, T op1, T op2, FPSCR &fpscr);
156 T
fplibSub(T op1, T op2, FPSCR &fpscr);
167 template <
class T1,
class T2>
190 uint16_t
fplibAdd(uint16_t op1, uint16_t op2, FPSCR &fpscr);
192 uint32_t
fplibAdd(uint32_t op1, uint32_t op2, FPSCR &fpscr);
194 uint64_t
fplibAdd(uint64_t op1, uint64_t op2, FPSCR &fpscr);
196 int fplibCompare(uint16_t op1, uint16_t op2,
bool signal_nans, FPSCR &fpscr);
198 int fplibCompare(uint32_t op1, uint32_t op2,
bool signal_nans, FPSCR &fpscr);
200 int fplibCompare(uint64_t op1, uint64_t op2,
bool signal_nans, FPSCR &fpscr);
238 uint16_t
fplibDiv(uint16_t op1, uint16_t op2, FPSCR &fpscr);
240 uint32_t
fplibDiv(uint32_t op1, uint32_t op2, FPSCR &fpscr);
242 uint64_t
fplibDiv(uint64_t op1, uint64_t op2, FPSCR &fpscr);
250 uint16_t
fplibMax(uint16_t op1, uint16_t op2, FPSCR &fpscr);
252 uint32_t
fplibMax(uint32_t op1, uint32_t op2, FPSCR &fpscr);
254 uint64_t
fplibMax(uint64_t op1, uint64_t op2, FPSCR &fpscr);
256 uint16_t
fplibMaxNum(uint16_t op1, uint16_t op2, FPSCR &fpscr);
258 uint32_t
fplibMaxNum(uint32_t op1, uint32_t op2, FPSCR &fpscr);
260 uint64_t
fplibMaxNum(uint64_t op1, uint64_t op2, FPSCR &fpscr);
262 uint16_t
fplibMin(uint16_t op1, uint16_t op2, FPSCR &fpscr);
264 uint32_t
fplibMin(uint32_t op1, uint32_t op2, FPSCR &fpscr);
266 uint64_t
fplibMin(uint64_t op1, uint64_t op2, FPSCR &fpscr);
268 uint16_t
fplibMinNum(uint16_t op1, uint16_t op2, FPSCR &fpscr);
270 uint32_t
fplibMinNum(uint32_t op1, uint32_t op2, FPSCR &fpscr);
272 uint64_t
fplibMinNum(uint64_t op1, uint64_t op2, FPSCR &fpscr);
274 uint16_t
fplibMul(uint16_t op1, uint16_t op2, FPSCR &fpscr);
276 uint32_t
fplibMul(uint32_t op1, uint32_t op2, FPSCR &fpscr);
278 uint64_t
fplibMul(uint64_t op1, uint64_t op2, FPSCR &fpscr);
280 uint16_t
fplibMulAdd(uint16_t addend, uint16_t op1, uint16_t op2,
283 uint32_t
fplibMulAdd(uint32_t addend, uint32_t op1, uint32_t op2,
286 uint64_t
fplibMulAdd(uint64_t addend, uint64_t op1, uint64_t op2,
289 uint16_t
fplibMulX(uint16_t op1, uint16_t op2, FPSCR &fpscr);
291 uint32_t
fplibMulX(uint32_t op1, uint32_t op2, FPSCR &fpscr);
293 uint64_t
fplibMulX(uint64_t op1, uint64_t op2, FPSCR &fpscr);
340 uint16_t
fplibScale(uint16_t op1, uint16_t op2, FPSCR &fpscr);
342 uint32_t
fplibScale(uint32_t op1, uint32_t op2, FPSCR &fpscr);
344 uint64_t
fplibScale(uint64_t op1, uint64_t op2, FPSCR &fpscr);
352 uint16_t
fplibSub(uint16_t op1, uint16_t op2, FPSCR &fpscr);
354 uint32_t
fplibSub(uint32_t op1, uint32_t op2, FPSCR &fpscr);
356 uint64_t
fplibSub(uint64_t op1, uint64_t op2, FPSCR &fpscr);
358 uint16_t
fplibTrigMulAdd(uint8_t coeff_index, uint16_t op1, uint16_t op2,
361 uint32_t
fplibTrigMulAdd(uint8_t coeff_index, uint32_t op1, uint32_t op2,
364 uint64_t
fplibTrigMulAdd(uint8_t coeff_index, uint64_t op1, uint64_t op2,
367 uint16_t
fplibTrigSMul(uint16_t op1, uint16_t op2, FPSCR &fpscr);
369 uint32_t
fplibTrigSMul(uint32_t op1, uint32_t op2, FPSCR &fpscr);
371 uint64_t
fplibTrigSMul(uint64_t op1, uint64_t op2, FPSCR &fpscr);
373 uint16_t
fplibTrigSSel(uint16_t op1, uint16_t op2, FPSCR &fpscr);
375 uint32_t
fplibTrigSSel(uint32_t op1, uint32_t op2, FPSCR &fpscr);
377 uint64_t
fplibTrigSSel(uint64_t op1, uint64_t op2, FPSCR &fpscr);