diff options
author | Peter Maydell | 2020-07-08 22:38:47 +0200 |
---|---|---|
committer | Peter Maydell | 2020-07-08 22:38:47 +0200 |
commit | 48f22ad04ead83e61b4b35871ec6f6109779b791 (patch) | |
tree | 563731bcf53088a575beee890239b698aed6e65f /include | |
parent | Merge remote-tracking branch 'remotes/kraxel/tags/audio-20200706-pull-request... (diff) | |
parent | softfloat,m68k: disable floatx80_invalid_encoding() for m68k (diff) | |
download | qemu-48f22ad04ead83e61b4b35871ec6f6109779b791.tar.gz qemu-48f22ad04ead83e61b4b35871ec6f6109779b791.tar.xz qemu-48f22ad04ead83e61b4b35871ec6f6109779b791.zip |
Merge remote-tracking branch 'remotes/vivier/tags/m68k-next-pull-request' into staging
m68k pull-request 20200706
disable floatx80_invalid_encoding() for m68k
fix m68k_cpu_get_phys_page_debug()
# gpg: Signature made Mon 06 Jul 2020 21:05:33 BST
# gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg: issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* remotes/vivier/tags/m68k-next-pull-request:
softfloat,m68k: disable floatx80_invalid_encoding() for m68k
target/m68k: consolidate physical translation offset into get_physical_address()
target/m68k: fix physical address translation in m68k_cpu_get_phys_page_debug()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/fpu/softfloat.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index ff4e2605b1..f1a19df066 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -794,7 +794,31 @@ static inline bool floatx80_unordered_quiet(floatx80 a, floatx80 b, *----------------------------------------------------------------------------*/ static inline bool floatx80_invalid_encoding(floatx80 a) { +#if defined(TARGET_M68K) + /*------------------------------------------------------------------------- + | With m68k, the explicit integer bit can be zero in the case of: + | - zeros (exp == 0, mantissa == 0) + | - denormalized numbers (exp == 0, mantissa != 0) + | - unnormalized numbers (exp != 0, exp < 0x7FFF) + | - infinities (exp == 0x7FFF, mantissa == 0) + | - not-a-numbers (exp == 0x7FFF, mantissa != 0) + | + | For infinities and NaNs, the explicit integer bit can be either one or + | zero. + | + | The IEEE 754 standard does not define a zero integer bit. Such a number + | is an unnormalized number. Hardware does not directly support + | denormalized and unnormalized numbers, but implicitly supports them by + | trapping them as unimplemented data types, allowing efficient conversion + | in software. + | + | See "M68000 FAMILY PROGRAMMER’S REFERENCE MANUAL", + | "1.6 FLOATING-POINT DATA TYPES" + *------------------------------------------------------------------------*/ + return false; +#else return (a.low & (1ULL << 63)) == 0 && (a.high & 0x7FFF) != 0; +#endif } #define floatx80_zero make_floatx80(0x0000, 0x0000000000000000LL) |