28 #ifndef V8_ARM64_UTILS_ARM64_H_
29 #define V8_ARM64_UTILS_ARM64_H_
35 #define REGISTER_CODE_LIST(R) \
36 R(0) R(1) R(2) R(3) R(4) R(5) R(6) R(7) \
37 R(8) R(9) R(10) R(11) R(12) R(13) R(14) R(15) \
38 R(16) R(17) R(18) R(19) R(20) R(21) R(22) R(23) \
39 R(24) R(25) R(26) R(27) R(28) R(29) R(30) R(31)
46 STATIC_ASSERT((static_cast<uint32_t>(-1) >> 1) == 0x7FFFFFFF);
49 static inline uint32_t float_to_rawbits(
float value) {
51 memcpy(&bits, &value, 4);
56 static inline uint64_t double_to_rawbits(
double value) {
58 memcpy(&bits, &value, 8);
63 static inline float rawbits_to_float(uint32_t bits) {
65 memcpy(&value, &bits, 4);
70 static inline double rawbits_to_double(uint64_t bits) {
72 memcpy(&value, &bits, 8);
87 uint64_t raw = double_to_rawbits(num);
96 uint32_t raw = float_to_rawbits(num);
104 template <
typename T>
113 return rawbits_to_double(double_to_rawbits(num) |
kDQuietNanMask);
125 return fma(op1, op2, a);
130 return fmaf(op1, op2, a);
135 #endif // V8_ARM64_UTILS_ARM64_H_
const int64_t kDQuietNanMask
int CountLeadingZeros(uint64_t value, int width)
const int64_t kSQuietNanMask
int CountLeadingSignBits(int64_t value, int width)
int MaskToBit(uint64_t mask)
#define ASSERT(condition)
int CountSetBits(uint64_t value, int width)
bool IsSignallingNaN(double num)
STATIC_ASSERT(sizeof(CPURegister)==sizeof(Register))
double FusedMultiplyAdd(double op1, double op2, double a)
#define T(name, string, precedence)
double ToQuietNaN(double num)
int CountTrailingZeros(uint64_t value, int width)