diff options
author | Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> | 2020-05-18 22:09:12 +0200 |
---|---|---|
committer | Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> | 2020-06-09 17:32:45 +0200 |
commit | 728e424690c64787722bbfb3cc5d9a4088a58d8b (patch) | |
tree | 1ce1292a9b71181e93a9d3aa758e218f78a13172 /target/mips | |
parent | 6971a1b970cb9663cc067a61f0db3e95400f3e38 (diff) |
target/mips: fpu: Demacro RINT.<D|S>
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
Message-Id: <20200518200920.17344-14-aleksandar.qemu.devel@gmail.com>
Diffstat (limited to 'target/mips')
-rw-r--r-- | target/mips/fpu_helper.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index e227e53f70..dae1331f23 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1113,10 +1113,26 @@ uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ return fdret; \ } -FLOAT_RINT(rint_s, 32) -FLOAT_RINT(rint_d, 64) #undef FLOAT_RINT +uint64_t helper_float_rint_d(CPUMIPSState *env, uint64_t fs) +{ + uint64_t fdret; + + fdret = float64_round_to_int(fs, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return fdret; +} + +uint32_t helper_float_rint_s(CPUMIPSState *env, uint32_t fs) +{ + uint32_t fdret; + + fdret = float32_round_to_int(fs, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return fdret; +} + #define FLOAT_CLASS_SIGNALING_NAN 0x001 #define FLOAT_CLASS_QUIET_NAN 0x002 #define FLOAT_CLASS_NEGATIVE_INFINITY 0x004 |