Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move CPU softfloat unions to cpu-float.h
The types are no longer used in bswap.h since commit f930224 ("bswap.h: Remove unused float-access functions"), there isn't much sense in keeping it there and having a dependency on fpu/. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220323155743.1585078-29-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
- Loading branch information
Showing
18 changed files
with
80 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#ifndef QEMU_CPU_FLOAT_H_ | ||
#define QEMU_CPU_FLOAT_H_ | ||
|
||
#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; | ||
|
||
#endif /* QEMU_CPU_FLOAT_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters