2022-05-06 15:49:09 +02:00
|
|
|
#ifndef QEMU_CPU_FLOAT_H
|
|
|
|
#define QEMU_CPU_FLOAT_H
|
2022-03-23 16:57:39 +01:00
|
|
|
|
|
|
|
#include "fpu/softfloat-types.h"
|
|
|
|
|
|
|
|
/* Unions for reinterpreting between floats and integers. */
|
|
|
|
|
|
|
|
typedef union {
|
|
|
|
float32 f;
|
|
|
|
uint32_t l;
|
|
|
|
} CPU_FloatU;
|
|
|
|
|
|
|
|
typedef union {
|
|
|
|
float64 d;
|
|
|
|
#if HOST_BIG_ENDIAN
|
|
|
|
struct {
|
|
|
|
uint32_t upper;
|
|
|
|
uint32_t lower;
|
|
|
|
} l;
|
|
|
|
#else
|
|
|
|
struct {
|
|
|
|
uint32_t lower;
|
|
|
|
uint32_t upper;
|
|
|
|
} l;
|
|
|
|
#endif
|
|
|
|
uint64_t ll;
|
|
|
|
} CPU_DoubleU;
|
|
|
|
|
|
|
|
typedef union {
|
|
|
|
floatx80 d;
|
|
|
|
struct {
|
|
|
|
uint64_t lower;
|
|
|
|
uint16_t upper;
|
|
|
|
} l;
|
|
|
|
} CPU_LDoubleU;
|
|
|
|
|
|
|
|
typedef union {
|
|
|
|
float128 q;
|
|
|
|
#if HOST_BIG_ENDIAN
|
|
|
|
struct {
|
|
|
|
uint32_t upmost;
|
|
|
|
uint32_t upper;
|
|
|
|
uint32_t lower;
|
|
|
|
uint32_t lowest;
|
|
|
|
} l;
|
|
|
|
struct {
|
|
|
|
uint64_t upper;
|
|
|
|
uint64_t lower;
|
|
|
|
} ll;
|
|
|
|
#else
|
|
|
|
struct {
|
|
|
|
uint32_t lowest;
|
|
|
|
uint32_t lower;
|
|
|
|
uint32_t upper;
|
|
|
|
uint32_t upmost;
|
|
|
|
} l;
|
|
|
|
struct {
|
|
|
|
uint64_t lower;
|
|
|
|
uint64_t upper;
|
|
|
|
} ll;
|
|
|
|
#endif
|
|
|
|
} CPU_QuadU;
|
|
|
|
|
2022-05-06 15:49:09 +02:00
|
|
|
#endif /* QEMU_CPU_FLOAT_H */
|