|
IDA C++ SDK 9.2
|
IEEE floating point functions. More...
Go to the source code of this file.
Classes | |
| struct | fpvalue_t |
| Processor-independent representation of a floating point value. More... | |
Typedefs | |
| typedef uint16 | eNI[IEEE_NI] |
| There is one more internal format used by IDA to store intermediate values. | |
Enumerations | |
| enum | fpvalue_kind_t { FPV_BADARG , FPV_NORM , FPV_NAN , FPV_PINF , FPV_NINF } |
| Floating value kinds. More... | |
| enum | fpvalue_error_t { REAL_ERROR_OK = 1 , REAL_ERROR_FORMAT = -1 , REAL_ERROR_RANGE = -2 , REAL_ERROR_BADDATA = -3 , REAL_ERROR_FPOVER = 2 , REAL_ERROR_BADSTR = 3 , REAL_ERROR_ZERODIV = 4 , REAL_ERROR_INTOVER = 5 } |
Functions | |
| idaman THREAD_SAFE fpvalue_error_t ida_export | ieee_realcvt (void *m, fpvalue_t *out, uint16 swt) |
| Standard IEEE 754 floating point conversion function. | |
| idaman THREAD_SAFE void ida_export | realtoasc (char *buf, size_t bufsize, const fpvalue_t &x, uint mode) |
| idaman THREAD_SAFE fpvalue_error_t ida_export | asctoreal (const char **sss, fpvalue_t *out) |
| idaman THREAD_SAFE void ida_export | eltoe (sval_t l, fpvalue_t *vout) |
| idaman THREAD_SAFE void ida_export | eltoe64 (int64 l, fpvalue_t *vout) |
| idaman THREAD_SAFE void ida_export | eltoe64u (uint64 l, fpvalue_t *vout) |
| idaman THREAD_SAFE fpvalue_error_t ida_export | eetol (sval_t *out, const fpvalue_t &a, bool roundflg) |
| idaman THREAD_SAFE fpvalue_error_t ida_export | eetol64 (int64 *out, const fpvalue_t &a, bool roundflg) |
| idaman THREAD_SAFE fpvalue_error_t ida_export | eetol64u (uint64 *out, const fpvalue_t &a, bool roundflg) |
| idaman THREAD_SAFE fpvalue_error_t ida_export | eldexp (const fpvalue_t &a, int32 pwr2, fpvalue_t *zout) |
| idaman THREAD_SAFE fpvalue_error_t ida_export | eadd (const fpvalue_t &a, const fpvalue_t &b, fpvalue_t *zout, bool subflg) |
| idaman THREAD_SAFE fpvalue_error_t ida_export | emul (const fpvalue_t &a, const fpvalue_t &b, fpvalue_t *zout) |
| idaman THREAD_SAFE fpvalue_error_t ida_export | ediv (const fpvalue_t &a, const fpvalue_t &b, fpvalue_t *zout) |
| idaman THREAD_SAFE int ida_export | ecmp (const fpvalue_t &a, const fpvalue_t &b) |
| idaman THREAD_SAFE fpvalue_kind_t ida_export | get_fpvalue_kind (const fpvalue_t &a, uint16 reserved=0) |
| IEEE_DEPRECATED void | ecleaz (eNI x) |
| idaman IEEE_DEPRECATED THREAD_SAFE void ida_export | emovo (const eNI a, fpvalue_t *vout) |
| idaman IEEE_DEPRECATED THREAD_SAFE void ida_export | emovi (const fpvalue_t &a, eNI vout) |
| Move eNI => eNE. | |
| idaman IEEE_DEPRECATED THREAD_SAFE int ida_export | eshift (eNI x, int sc) |
| Move eNE => eNI. | |
| idaman IEEE_DEPRECATED THREAD_SAFE bool ida_export | emdnorm (eNI s, bool lost, bool subflg, int32 exp, int rndbase) |
| Shift NI format up (+) or down. | |
Variables | |
max_exp values | |
Common values for max_exp (for IEEE floating point values) | |
| const uint32 | MAXEXP_FLOAT = 0x80 |
| maximum exponent for 32-bit float | |
| const uint32 | MAXEXP_DOUBLE = 0x400 |
| maximum exponent for 64-bit double | |
| const uint32 | MAXEXP_LNGDBL = 0x4000 |
| maximum exponent for 80-bit long double | |
IEEE floating point functions.
| typedef uint16 eNI[IEEE_NI] |
There is one more internal format used by IDA to store intermediate values.
| enum fpvalue_kind_t |
| enum fpvalue_error_t |
| idaman THREAD_SAFE fpvalue_error_t ida_export ieee_realcvt | ( | void * | m, |
| fpvalue_t * | out, | ||
| uint16 | swt ) |
Standard IEEE 754 floating point conversion function.
| m | pointer to data |
| out | internal IEEE format data |
| swt | operation:
|
| idaman THREAD_SAFE void ida_export realtoasc | ( | char * | buf, |
| size_t | bufsize, | ||
| const fpvalue_t & | x, | ||
| uint | mode ) |
| idaman THREAD_SAFE fpvalue_error_t ida_export asctoreal | ( | const char ** | sss, |
| fpvalue_t * | out ) |
| idaman THREAD_SAFE fpvalue_error_t ida_export eetol | ( | sval_t * | out, |
| const fpvalue_t & | a, | ||
| bool | roundflg ) |
| idaman THREAD_SAFE fpvalue_error_t ida_export eetol64 | ( | int64 * | out, |
| const fpvalue_t & | a, | ||
| bool | roundflg ) |
| idaman THREAD_SAFE fpvalue_error_t ida_export eetol64u | ( | uint64 * | out, |
| const fpvalue_t & | a, | ||
| bool | roundflg ) |
| idaman THREAD_SAFE fpvalue_error_t ida_export eldexp | ( | const fpvalue_t & | a, |
| int32 | pwr2, | ||
| fpvalue_t * | zout ) |
| idaman THREAD_SAFE fpvalue_error_t ida_export eadd | ( | const fpvalue_t & | a, |
| const fpvalue_t & | b, | ||
| fpvalue_t * | zout, | ||
| bool | subflg ) |
| idaman THREAD_SAFE fpvalue_error_t ida_export emul | ( | const fpvalue_t & | a, |
| const fpvalue_t & | b, | ||
| fpvalue_t * | zout ) |
| idaman THREAD_SAFE fpvalue_error_t ida_export ediv | ( | const fpvalue_t & | a, |
| const fpvalue_t & | b, | ||
| fpvalue_t * | zout ) |
| idaman THREAD_SAFE fpvalue_kind_t ida_export get_fpvalue_kind | ( | const fpvalue_t & | a, |
| uint16 | reserved = 0 ) |
Move eNI => eNE.
| idaman IEEE_DEPRECATED THREAD_SAFE bool ida_export emdnorm | ( | eNI | s, |
| bool | lost, | ||
| bool | subflg, | ||
| int32 | exp, | ||
| int | rndbase ) |
Shift NI format up (+) or down.
Normalize and round off.
| s | the internal format number to be rounded |
| lost | indicates whether or not the number is exact. this is the so-called sticky bit. |
| subflg | indicates whether the number was obtained by a subtraction operation. In that case if lost is nonzero then the number is slightly smaller than indicated. |
| exp | the biased exponent, which may be negative. the exponent field of "s" is ignored but is replaced by "exp" as adjusted by normalization and rounding. |
| rndbase | if 0 => is the rounding control. else is processor defined base (rndprc) |
| const uint32 MAXEXP_FLOAT = 0x80 |
maximum exponent for 32-bit float
| const uint32 MAXEXP_DOUBLE = 0x400 |
maximum exponent for 64-bit double
| const uint32 MAXEXP_LNGDBL = 0x4000 |
maximum exponent for 80-bit long double