diff options
author | David Hildenbrand <david@redhat.com> | 2019-02-18 13:26:58 +0100 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2019-03-04 11:49:31 +0100 |
commit | 4b70fc54975b3b09eeec30be33419bd03456fe45 (patch) | |
tree | 0c2dd361fd72d4ae7c7b3957f010d7c5f3ba5a25 /target/s390x/internal.h | |
parent | 3af471f9152b8e84534f8b0ff303b5f0a5ced819 (diff) |
s390x/tcg: Factor out conversion of softfloat exceptions
We want to reuse that function in vector instruction context. While at it,
cleanup the code, using defines for magic values and avoiding the
handcrafted bit conversion.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20190218122710.23639-4-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/internal.h')
-rw-r--r-- | target/s390x/internal.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/target/s390x/internal.h b/target/s390x/internal.h index 9d0a45d1fe..4db736b6ac 100644 --- a/target/s390x/internal.h +++ b/target/s390x/internal.h @@ -311,6 +311,13 @@ void s390x_cpu_do_unaligned_access(CPUState *cs, vaddr addr, uint32_t set_cc_nz_f32(float32 v); uint32_t set_cc_nz_f64(float64 v); uint32_t set_cc_nz_f128(float128 v); +#define S390_IEEE_MASK_INVALID 0x80 +#define S390_IEEE_MASK_DIVBYZERO 0x40 +#define S390_IEEE_MASK_OVERFLOW 0x20 +#define S390_IEEE_MASK_UNDERFLOW 0x10 +#define S390_IEEE_MASK_INEXACT 0x08 +#define S390_IEEE_MASK_QUANTUM 0x04 +uint8_t s390_softfloat_exc_to_ieee(unsigned int exc); /* gdbstub.c */ |