diff options
author | Matheus Ferst <matheus.ferst@eldorado.org.br> | 2022-03-30 14:59:30 -0300 |
---|---|---|
committer | Daniel Henrique Barboza <danielhb413@gmail.com> | 2022-04-20 18:00:30 -0300 |
commit | bea592300b387fa62fda59878886eb84fe373374 (patch) | |
tree | 95ac324a019eff6a28ecea7b80f99436f475fdc2 /include | |
parent | 4de49ddfacd8154eba5f2de897c732175d80af5f (diff) |
softfloat: add float128_to_int128
Implements float128_to_int128 based on parts_float_to_int logic.
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220330175932.6995-7-matheus.ferst@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/fpu/softfloat.h | 2 | ||||
-rw-r--r-- | include/qemu/int128.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index 6cfe9ee474..3dcf20e3a2 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -1204,7 +1204,9 @@ floatx80 floatx80_default_nan(float_status *status); int32_t float128_to_int32(float128, float_status *status); int32_t float128_to_int32_round_to_zero(float128, float_status *status); int64_t float128_to_int64(float128, float_status *status); +Int128 float128_to_int128(float128, float_status *status); int64_t float128_to_int64_round_to_zero(float128, float_status *status); +Int128 float128_to_int128_round_to_zero(float128, float_status *status); uint64_t float128_to_uint64(float128, float_status *status); Int128 float128_to_uint128(float128, float_status *status); uint64_t float128_to_uint64_round_to_zero(float128, float_status *status); diff --git a/include/qemu/int128.h b/include/qemu/int128.h index 1f82918c73..ef71f56e3f 100644 --- a/include/qemu/int128.h +++ b/include/qemu/int128.h @@ -431,5 +431,7 @@ static inline void bswap128s(Int128 *s) } #define UINT128_MAX int128_make128(~0LL, ~0LL) +#define INT128_MAX int128_make128(UINT64_MAX, INT64_MAX) +#define INT128_MIN int128_make128(0, INT64_MIN) #endif /* INT128_H */ |