|
From: | LIU Zhiwei |
Subject: | Re: [PATCH v6 39/61] target/riscv: vector floating-point compare instructions |
Date: | Sat, 28 Mar 2020 23:44:58 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 2020/3/28 10:01, Richard Henderson wrote:
On 3/17/20 8:06 AM, LIU Zhiwei wrote:+static uint8_t vmfne16(uint16_t a, uint16_t b, float_status *s) +{ + int compare = float16_compare_quiet(a, b, s); + return compare != float_relation_equal && + compare != float_relation_unordered; +} + +static uint8_t vmfne32(uint32_t a, uint32_t b, float_status *s) +{ + int compare = float32_compare_quiet(a, b, s); + return compare != float_relation_equal && + compare != float_relation_unordered; +} + +static uint8_t vmfne64(uint64_t a, uint64_t b, float_status *s) +{ + int compare = float64_compare_quiet(a, b, s); + return compare != float_relation_equal && + compare != float_relation_unordered; +}This is incorrect -- the result should be true for unordered. The text for 0.7.1 does not specify, but this is the normal interpretation of NE. The text for 0.8 explicitly says that the result is 1 for NaN.
Agree! Thanks for pointing that. IEEE-754 has not defined the NE. An opposite setting with EQ is reasonable. Zhiwei
r~
[Prev in Thread] | Current Thread | [Next in Thread] |