mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
target/openrisc: Add support for ORFPX64A32
This is hardware support for double-precision floating-point using pairs of 32-bit registers. Fix latent bugs in the heretofore unused helper_itofd and helper_ftoid. Include the bit for cpu "any". Change the default cpu for linux-user to "any". Reviewed-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
fe636d3722
commit
62f2b0389f
7 changed files with 333 additions and 4 deletions
|
@ -63,7 +63,7 @@ void HELPER(update_fpcsr)(CPUOpenRISCState *env)
|
|||
|
||||
uint64_t HELPER(itofd)(CPUOpenRISCState *env, uint64_t val)
|
||||
{
|
||||
return int32_to_float64(val, &env->fp_status);
|
||||
return int64_to_float64(val, &env->fp_status);
|
||||
}
|
||||
|
||||
uint32_t HELPER(itofs)(CPUOpenRISCState *env, uint32_t val)
|
||||
|
@ -73,7 +73,7 @@ uint32_t HELPER(itofs)(CPUOpenRISCState *env, uint32_t val)
|
|||
|
||||
uint64_t HELPER(ftoid)(CPUOpenRISCState *env, uint64_t val)
|
||||
{
|
||||
return float32_to_int64(val, &env->fp_status);
|
||||
return float64_to_int64_round_to_zero(val, &env->fp_status);
|
||||
}
|
||||
|
||||
uint32_t HELPER(ftois)(CPUOpenRISCState *env, uint32_t val)
|
||||
|
@ -81,6 +81,16 @@ uint32_t HELPER(ftois)(CPUOpenRISCState *env, uint32_t val)
|
|||
return float32_to_int32_round_to_zero(val, &env->fp_status);
|
||||
}
|
||||
|
||||
uint64_t HELPER(stod)(CPUOpenRISCState *env, uint32_t val)
|
||||
{
|
||||
return float32_to_float64(val, &env->fp_status);
|
||||
}
|
||||
|
||||
uint32_t HELPER(dtos)(CPUOpenRISCState *env, uint64_t val)
|
||||
{
|
||||
return float64_to_float32(val, &env->fp_status);
|
||||
}
|
||||
|
||||
#define FLOAT_CALC(name) \
|
||||
uint64_t helper_float_ ## name ## _d(CPUOpenRISCState *env, \
|
||||
uint64_t fdt0, uint64_t fdt1) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue