Message ID | 20190827000745.19645-8-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | target/openrisc updates | expand |
On Mon, Aug 26, 2019 at 05:07:39PM -0700, Richard Henderson wrote: > The specification of this insn is round-to-zero. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Stafford Horne <shorne@gmail.com> > --- > target/openrisc/fpu_helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/openrisc/fpu_helper.c b/target/openrisc/fpu_helper.c > index b9d2ebbb8c..4cc5b297c5 100644 > --- a/target/openrisc/fpu_helper.c > +++ b/target/openrisc/fpu_helper.c > @@ -78,7 +78,7 @@ uint64_t HELPER(ftoid)(CPUOpenRISCState *env, uint64_t val) > > uint32_t HELPER(ftois)(CPUOpenRISCState *env, uint32_t val) > { > - return float32_to_int32(val, &env->fp_status); > + return float32_to_int32_round_to_zero(val, &env->fp_status); > } > > #define FLOAT_CALC(name) \ > -- > 2.17.1 >
diff --git a/target/openrisc/fpu_helper.c b/target/openrisc/fpu_helper.c index b9d2ebbb8c..4cc5b297c5 100644 --- a/target/openrisc/fpu_helper.c +++ b/target/openrisc/fpu_helper.c @@ -78,7 +78,7 @@ uint64_t HELPER(ftoid)(CPUOpenRISCState *env, uint64_t val) uint32_t HELPER(ftois)(CPUOpenRISCState *env, uint32_t val) { - return float32_to_int32(val, &env->fp_status); + return float32_to_int32_round_to_zero(val, &env->fp_status); } #define FLOAT_CALC(name) \
The specification of this insn is round-to-zero. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/openrisc/fpu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1