diff --git a/bochs/cpu/softfloat3e/include/primitiveTypes.h b/bochs/cpu/softfloat3e/include/primitiveTypes.h index 42a61ebd6..04e72e675 100644 --- a/bochs/cpu/softfloat3e/include/primitiveTypes.h +++ b/bochs/cpu/softfloat3e/include/primitiveTypes.h @@ -36,19 +36,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef primitiveTypes_h #define primitiveTypes_h 1 -#include #include "config.h" -#ifdef BX_LITTLE_ENDIAN -struct uint128 { uint64_t v0, v64; }; -struct uint64_extra { uint64_t extra, v; }; -struct uint128_extra { uint64_t extra; struct uint128 v; }; -#else -struct uint128 { uint64_t v64, v0; }; -struct uint64_extra { uint64_t v, extra; }; -struct uint128_extra { struct uint128 v; uint64_t extra; }; -#endif - /*---------------------------------------------------------------------------- | These macros are used to isolate the differences in word order between big- | endian and little-endian platforms. diff --git a/bochs/cpu/softfloat3e/include/primitives.h b/bochs/cpu/softfloat3e/include/primitives.h index b7ba02cc3..f10d16453 100644 --- a/bochs/cpu/softfloat3e/include/primitives.h +++ b/bochs/cpu/softfloat3e/include/primitives.h @@ -39,7 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include "config.h" -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_shortShiftRightJam64 /*---------------------------------------------------------------------------- diff --git a/bochs/cpu/softfloat3e/include/softfloat_types.h b/bochs/cpu/softfloat3e/include/softfloat_types.h index 5c10d9f1a..ed819c740 100644 --- a/bochs/cpu/softfloat3e/include/softfloat_types.h +++ b/bochs/cpu/softfloat3e/include/softfloat_types.h @@ -39,13 +39,20 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include "config.h" +#ifdef BX_LITTLE_ENDIAN +struct uint128 { uint64_t v0, v64; }; +struct uint64_extra { uint64_t extra, v; }; +struct uint128_extra { uint64_t extra; struct uint128 v; }; +#else +struct uint128 { uint64_t v64, v0; }; +struct uint64_extra { uint64_t v, extra; }; +struct uint128_extra { struct uint128 v; uint64_t extra; }; +#endif + /*---------------------------------------------------------------------------- | Types used to pass 16-bit, 32-bit, 64-bit, and 128-bit floating-point | arguments and results to/from functions. These types must be exactly -| 16 bits, 32 bits, 64 bits, and 128 bits in size, respectively. Where a -| platform has "native" support for IEEE-Standard floating-point formats, -| the types below may, if desired, be defined as aliases for the native types -| (typically 'float' and 'double', and possibly 'long double'). +| 16 bits, 32 bits, 64 bits, and 128 bits in size, respectively. *----------------------------------------------------------------------------*/ typedef struct f16_t { uint16_t v; @@ -65,8 +72,6 @@ typedef struct f64_t { operator uint64_t() const { return v; } } float64_t; -#include "primitiveTypes.h" - typedef uint128 float128_t; /*---------------------------------------------------------------------------- diff --git a/bochs/cpu/softfloat3e/s_add128.c b/bochs/cpu/softfloat3e/s_add128.c index 2c234fbd0..8efabb850 100644 --- a/bochs/cpu/softfloat3e/s_add128.c +++ b/bochs/cpu/softfloat3e/s_add128.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =============================================================================*/ #include -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_add128 diff --git a/bochs/cpu/softfloat3e/s_mul128By32.c b/bochs/cpu/softfloat3e/s_mul128By32.c index 3c0b69588..920ad5733 100644 --- a/bochs/cpu/softfloat3e/s_mul128By32.c +++ b/bochs/cpu/softfloat3e/s_mul128By32.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =============================================================================*/ #include -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_mul128By32 diff --git a/bochs/cpu/softfloat3e/s_mul128To256M.c b/bochs/cpu/softfloat3e/s_mul128To256M.c index 2d8fa02e6..25ae9fb79 100644 --- a/bochs/cpu/softfloat3e/s_mul128To256M.c +++ b/bochs/cpu/softfloat3e/s_mul128To256M.c @@ -39,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define softfloat_mul128To256M softfloat_mul128To256M #include "primitives.h" +#include "primitiveTypes.h" void softfloat_mul128To256M(uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0, uint64_t *zPtr) diff --git a/bochs/cpu/softfloat3e/s_mul64ByShifted32To128.c b/bochs/cpu/softfloat3e/s_mul64ByShifted32To128.c index fe5ea67e5..90938ac79 100644 --- a/bochs/cpu/softfloat3e/s_mul64ByShifted32To128.c +++ b/bochs/cpu/softfloat3e/s_mul64ByShifted32To128.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =============================================================================*/ #include -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_mul64ByShifted32To128 diff --git a/bochs/cpu/softfloat3e/s_mul64To128.c b/bochs/cpu/softfloat3e/s_mul64To128.c index f1a723bb8..aa0b57a12 100644 --- a/bochs/cpu/softfloat3e/s_mul64To128.c +++ b/bochs/cpu/softfloat3e/s_mul64To128.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =============================================================================*/ #include -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_mul64To128 diff --git a/bochs/cpu/softfloat3e/s_shiftRightJam128.c b/bochs/cpu/softfloat3e/s_shiftRightJam128.c index 30c395f4c..11fb26abf 100644 --- a/bochs/cpu/softfloat3e/s_shiftRightJam128.c +++ b/bochs/cpu/softfloat3e/s_shiftRightJam128.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =============================================================================*/ #include -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_shiftRightJam128 diff --git a/bochs/cpu/softfloat3e/s_shiftRightJam128Extra.c b/bochs/cpu/softfloat3e/s_shiftRightJam128Extra.c index 571c7dc4d..7f4b3fa82 100644 --- a/bochs/cpu/softfloat3e/s_shiftRightJam128Extra.c +++ b/bochs/cpu/softfloat3e/s_shiftRightJam128Extra.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =============================================================================*/ #include -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_shiftRightJam128Extra diff --git a/bochs/cpu/softfloat3e/s_shiftRightJam64Extra.c b/bochs/cpu/softfloat3e/s_shiftRightJam64Extra.c index b7f588d4b..a80bafb35 100644 --- a/bochs/cpu/softfloat3e/s_shiftRightJam64Extra.c +++ b/bochs/cpu/softfloat3e/s_shiftRightJam64Extra.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =============================================================================*/ #include -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_shiftRightJam64Extra diff --git a/bochs/cpu/softfloat3e/s_shortShiftLeft128.c b/bochs/cpu/softfloat3e/s_shortShiftLeft128.c index bf9d2c7f6..dc24172cd 100644 --- a/bochs/cpu/softfloat3e/s_shortShiftLeft128.c +++ b/bochs/cpu/softfloat3e/s_shortShiftLeft128.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =============================================================================*/ #include -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_shortShiftLeft128 diff --git a/bochs/cpu/softfloat3e/s_shortShiftRight128.c b/bochs/cpu/softfloat3e/s_shortShiftRight128.c index 23407ce4f..8b48b1486 100644 --- a/bochs/cpu/softfloat3e/s_shortShiftRight128.c +++ b/bochs/cpu/softfloat3e/s_shortShiftRight128.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =============================================================================*/ #include -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_shortShiftRight128 diff --git a/bochs/cpu/softfloat3e/s_shortShiftRightJam128.c b/bochs/cpu/softfloat3e/s_shortShiftRightJam128.c index 4c015c4bc..fbda27b70 100644 --- a/bochs/cpu/softfloat3e/s_shortShiftRightJam128.c +++ b/bochs/cpu/softfloat3e/s_shortShiftRightJam128.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =============================================================================*/ #include -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_shortShiftRightJam128 diff --git a/bochs/cpu/softfloat3e/s_shortShiftRightJam128Extra.c b/bochs/cpu/softfloat3e/s_shortShiftRightJam128Extra.c index a8a42dd6f..8c6ddacf8 100644 --- a/bochs/cpu/softfloat3e/s_shortShiftRightJam128Extra.c +++ b/bochs/cpu/softfloat3e/s_shortShiftRightJam128Extra.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =============================================================================*/ #include -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_shortShiftRightJam128Extra diff --git a/bochs/cpu/softfloat3e/s_shortShiftRightJam64Extra.c b/bochs/cpu/softfloat3e/s_shortShiftRightJam64Extra.c index 2c05d2baa..0bf9afde3 100644 --- a/bochs/cpu/softfloat3e/s_shortShiftRightJam64Extra.c +++ b/bochs/cpu/softfloat3e/s_shortShiftRightJam64Extra.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =============================================================================*/ #include -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_shortShiftRightJam64Extra diff --git a/bochs/cpu/softfloat3e/s_sub128.c b/bochs/cpu/softfloat3e/s_sub128.c index dc85d3b67..d5d5f941b 100644 --- a/bochs/cpu/softfloat3e/s_sub128.c +++ b/bochs/cpu/softfloat3e/s_sub128.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =============================================================================*/ #include -#include "primitiveTypes.h" +#include "softfloat_types.h" #ifndef softfloat_sub128