47#ifndef __ARCH_ARM_INSTS_FPLIB_HH__
48#define __ARCH_ARM_INSTS_FPLIB_HH__
73 return (
FPRounding)((uint32_t)fpscr >> 22 & 3);
98template <
class T1,
class T2>
167template <
class T1,
class T2>
190uint16_t
fplibAdd(uint16_t op1, uint16_t op2, FPSCR &fpscr);
192uint32_t
fplibAdd(uint32_t op1, uint32_t op2, FPSCR &fpscr);
194uint64_t
fplibAdd(uint64_t op1, uint64_t op2, FPSCR &fpscr);
196int fplibCompare(uint16_t op1, uint16_t op2,
bool signal_nans, FPSCR &fpscr);
198int fplibCompare(uint32_t op1, uint32_t op2,
bool signal_nans, FPSCR &fpscr);
200int fplibCompare(uint64_t op1, uint64_t op2,
bool signal_nans, FPSCR &fpscr);
238uint16_t
fplibDiv(uint16_t op1, uint16_t op2, FPSCR &fpscr);
240uint32_t
fplibDiv(uint32_t op1, uint32_t op2, FPSCR &fpscr);
242uint64_t
fplibDiv(uint64_t op1, uint64_t op2, FPSCR &fpscr);
250uint16_t
fplibMax(uint16_t op1, uint16_t op2, FPSCR &fpscr);
252uint32_t
fplibMax(uint32_t op1, uint32_t op2, FPSCR &fpscr);
254uint64_t
fplibMax(uint64_t op1, uint64_t op2, FPSCR &fpscr);
256uint16_t
fplibMaxNum(uint16_t op1, uint16_t op2, FPSCR &fpscr);
258uint32_t
fplibMaxNum(uint32_t op1, uint32_t op2, FPSCR &fpscr);
260uint64_t
fplibMaxNum(uint64_t op1, uint64_t op2, FPSCR &fpscr);
262uint16_t
fplibMin(uint16_t op1, uint16_t op2, FPSCR &fpscr);
264uint32_t
fplibMin(uint32_t op1, uint32_t op2, FPSCR &fpscr);
266uint64_t
fplibMin(uint64_t op1, uint64_t op2, FPSCR &fpscr);
268uint16_t
fplibMinNum(uint16_t op1, uint16_t op2, FPSCR &fpscr);
270uint32_t
fplibMinNum(uint32_t op1, uint32_t op2, FPSCR &fpscr);
272uint64_t
fplibMinNum(uint64_t op1, uint64_t op2, FPSCR &fpscr);
274uint16_t
fplibMul(uint16_t op1, uint16_t op2, FPSCR &fpscr);
276uint32_t
fplibMul(uint32_t op1, uint32_t op2, FPSCR &fpscr);
278uint64_t
fplibMul(uint64_t op1, uint64_t op2, FPSCR &fpscr);
280uint16_t
fplibMulAdd(uint16_t addend, uint16_t op1, uint16_t op2,
283uint32_t
fplibMulAdd(uint32_t addend, uint32_t op1, uint32_t op2,
286uint64_t
fplibMulAdd(uint64_t addend, uint64_t op1, uint64_t op2,
289uint16_t
fplibMulX(uint16_t op1, uint16_t op2, FPSCR &fpscr);
291uint32_t
fplibMulX(uint32_t op1, uint32_t op2, FPSCR &fpscr);
293uint64_t
fplibMulX(uint64_t op1, uint64_t op2, FPSCR &fpscr);
340uint16_t
fplibScale(uint16_t op1, uint16_t op2, FPSCR &fpscr);
342uint32_t
fplibScale(uint32_t op1, uint32_t op2, FPSCR &fpscr);
344uint64_t
fplibScale(uint64_t op1, uint64_t op2, FPSCR &fpscr);
352uint16_t
fplibSub(uint16_t op1, uint16_t op2, FPSCR &fpscr);
354uint32_t
fplibSub(uint32_t op1, uint32_t op2, FPSCR &fpscr);
356uint64_t
fplibSub(uint64_t op1, uint64_t op2, FPSCR &fpscr);
358uint16_t
fplibTrigMulAdd(uint8_t coeff_index, uint16_t op1, uint16_t op2,
361uint32_t
fplibTrigMulAdd(uint8_t coeff_index, uint32_t op1, uint32_t op2,
364uint64_t
fplibTrigMulAdd(uint8_t coeff_index, uint64_t op1, uint64_t op2,
367uint16_t
fplibTrigSMul(uint16_t op1, uint16_t op2, FPSCR &fpscr);
369uint32_t
fplibTrigSMul(uint32_t op1, uint32_t op2, FPSCR &fpscr);
371uint64_t
fplibTrigSMul(uint64_t op1, uint64_t op2, FPSCR &fpscr);
373uint16_t
fplibTrigSSel(uint16_t op1, uint16_t op2, FPSCR &fpscr);
375uint32_t
fplibTrigSSel(uint32_t op1, uint32_t op2, FPSCR &fpscr);
377uint64_t
fplibTrigSSel(uint64_t op1, uint64_t op2, FPSCR &fpscr);
uint16_t fplibMax(uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint32_t fplibFPToFixedJS(uint64_t op, FPSCR &fpscr, bool is64, uint8_t &nz)
Floating-point JS convert to a signed integer, with rounding to zero.
static FPRounding FPCRRounding(FPSCR &fpscr)
uint16_t fplibMinNum(uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint16_t fplibMaxNum(uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint16_t fplibDiv(uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint16_t fplibRSqrtEstimate(uint16_t op, FPSCR &fpscr)
uint16_t fplibNeg(uint16_t op)
bool fplibCompareGT(uint16_t a, uint16_t b, FPSCR &fpscr)
uint16_t fplibRecipEstimate(uint16_t op, FPSCR &fpscr)
uint16_t fplibConvert(uint32_t op, FPRounding rounding, FPSCR &fpscr)
uint16_t fplibExpA(uint16_t op)
uint16_t fplibTrigSSel(uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint16_t fplibFixedToFP(uint64_t op, int fbits, bool u, FPRounding rounding, FPSCR &fpscr)
uint16_t fplibSqrt(uint16_t op, FPSCR &fpscr)
bool fplibCompareEQ(uint16_t a, uint16_t b, FPSCR &fpscr)
uint16_t fplibAdd(uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint16_t fplibMulX(uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint16_t fplibAbs(uint16_t op)
bool fplibCompareGE(uint16_t a, uint16_t b, FPSCR &fpscr)
uint16_t fplibMul(uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint16_t fplibScale(uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint16_t fplibRecpX(uint16_t op, FPSCR &fpscr)
uint16_t fplibRecipStepFused(uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint16_t fplibTrigSMul(uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint16_t fplibTrigMulAdd(uint8_t coeff_index, uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint16_t fplibRSqrtStepFused(uint16_t op1, uint16_t op2, FPSCR &fpscr)
int fplibCompare(uint16_t op1, uint16_t op2, bool signal_nans, FPSCR &fpscr)
uint16_t fplibDefaultNaN()
uint16_t fplibFPToFixed(uint16_t op, int fbits, bool u, FPRounding rounding, FPSCR &fpscr)
uint16_t fplibSub(uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint16_t fplibMulAdd(uint16_t addend, uint16_t op1, uint16_t op2, FPSCR &fpscr)
uint16_t fplibInfinity(int sgn)
uint16_t fplibRoundInt(uint16_t op, FPRounding rounding, bool exact, FPSCR &fpscr)
uint16_t fplibMin(uint16_t op1, uint16_t op2, FPSCR &fpscr)
bool fplibCompareUN(uint16_t a, uint16_t b, FPSCR &fpscr)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.