mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target/openrisc: Implement unordered fp comparisons
These were added to the 1.3 spec. For OF32S, validate AVR. But OF64A32 is itself new to 1.3 so no extra check needed. Reviewed-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
62f2b0389f
commit
2b13b4b93d
5 changed files with 145 additions and 0 deletions
|
@ -135,4 +135,24 @@ target_ulong helper_float_ ## name ## _s(CPUOpenRISCState *env, \
|
|||
FLOAT_CMP(le, le)
|
||||
FLOAT_CMP(lt, lt)
|
||||
FLOAT_CMP(eq, eq_quiet)
|
||||
FLOAT_CMP(un, unordered_quiet)
|
||||
#undef FLOAT_CMP
|
||||
|
||||
#define FLOAT_UCMP(name, expr) \
|
||||
target_ulong helper_float_ ## name ## _d(CPUOpenRISCState *env, \
|
||||
uint64_t fdt0, uint64_t fdt1) \
|
||||
{ \
|
||||
int r = float64_compare_quiet(fdt0, fdt1, &env->fp_status); \
|
||||
return expr; \
|
||||
} \
|
||||
target_ulong helper_float_ ## name ## _s(CPUOpenRISCState *env, \
|
||||
uint32_t fdt0, uint32_t fdt1) \
|
||||
{ \
|
||||
int r = float32_compare_quiet(fdt0, fdt1, &env->fp_status); \
|
||||
return expr; \
|
||||
}
|
||||
|
||||
FLOAT_UCMP(ueq, r == float_relation_equal || r == float_relation_unordered)
|
||||
FLOAT_UCMP(ult, r == float_relation_less || r == float_relation_unordered)
|
||||
FLOAT_UCMP(ule, r != float_relation_greater)
|
||||
#undef FLOAT_UCMP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue