|
From: | Richard Henderson |
Subject: | Re: [PATCH v2 15/22] target/loongarch: Add floating point conversion instruction translation |
Date: | Thu, 22 Jul 2021 20:16:40 -1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 7/20/21 11:53 PM, Song Gao wrote:
+uint64_t helper_fp_tintrm_l_d(CPULoongArchState *env, uint64_t src) +{ + uint64_t dest; + + set_float_rounding_mode(float_round_down, &env->active_fpu.fp_status); + dest = float64_to_int64(src, &env->active_fpu.fp_status); + restore_rounding_mode(env);
Better off to save the current rounding mode with get_float_rounding_mode, and restore it afterward.
See 63d06e90e65d5f119039044e986a81007954a466. r~
[Prev in Thread] | Current Thread | [Next in Thread] |