29#ifndef __ARCH_POWER_INSTS_FLOATING_HH__
30#define __ARCH_POWER_INSTS_FLOATING_HH__
62 return ((
bits(val_bits, 30, 23) == 0xFF) &&
bits(val_bits, 22, 0));
68 return ((
bits(val_bits, 62, 52) == 0x7FF) &&
bits(val_bits, 51, 0));
75 uint32_t val_bits = *(uint32_t *) val_ptr;
76 return isNan(val_bits);
83 uint64_t val_bits = *(uint64_t *) val_ptr;
84 return isNan(val_bits);
91 return ((
bits(val_bits, 30, 22) == 0x1FE) &&
bits(val_bits, 22, 0));
98 return (
bits(val_bits, 30, 22) == 0x1FF);
105 return ((
bits(val_bits, 30, 23) == 0xFF) && !
bits(val_bits, 22, 0));
112 return ((
bits(val_bits, 30, 23) != 0xFF) &&
bits(val_bits, 22, 0));
120 return (!
bits(val_bits, 30, 23) &&
bits(val_bits, 22, 0));
127 return (!
bits(val_bits, 30, 23) && !
bits(val_bits, 22, 0));
134 return (
bits(val_bits, 31));
143 else if (
a <
b) {
c = 0x8; }
144 else if (
a >
b) {
c = 0x4; }
Base class for floating point operations.
bool isNan(double val) const
bool isDenormalized(uint32_t val_bits) const
bool isNan(float val) const
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
bool isZero(uint32_t val_bits) const
FloatOp(const char *mnem, MachInst _machInst, OpClass __opClass)
Constructor.
bool isNegative(uint32_t val_bits) const
bool isNan(uint32_t val_bits) const
bool isNormalized(uint32_t val_bits) const
bool isInfinity(uint32_t val_bits) const
bool isNan(uint64_t val_bits) const
bool isQnan(uint32_t val_bits) const
bool isSnan(uint32_t val_bits) const
uint32_t makeCRField(double a, double b) const
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.