[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 13/17] target/mips: fpu: Demacro RINT.<D|S>
From: |
Aleksandar Markovic |
Subject: |
[PATCH v2 13/17] target/mips: fpu: Demacro RINT.<D|S> |
Date: |
Thu, 14 May 2020 21:20:43 +0200 |
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Signed-off-by: Aleksandar Markovic <address@hidden>
---
target/mips/fpu_helper.c | 20 ++++++++++++++++++--
1 file 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
--
2.20.1
- [PATCH v2 03/17] target/mips: fpu: Demacro MUL.<D|S|PS>, (continued)
- [PATCH v2 03/17] target/mips: fpu: Demacro MUL.<D|S|PS>, Aleksandar Markovic, 2020/05/14
- [PATCH v2 02/17] target/mips: fpu: Demacro SUB.<D|S|PS>, Aleksandar Markovic, 2020/05/14
- [PATCH v2 04/17] target/mips: fpu: Demacro DIV.<D|S|PS>, Aleksandar Markovic, 2020/05/14
- [PATCH v2 05/17] target/mips: fpu: Remove now unused macro FLOAT_BINOP, Aleksandar Markovic, 2020/05/14
- [PATCH v2 07/17] target/mips: fpu: Demacro MSUB.<D|S|PS>, Aleksandar Markovic, 2020/05/14
- [PATCH v2 09/17] target/mips: fpu: Demacro NMSUB.<D|S|PS>, Aleksandar Markovic, 2020/05/14
- [PATCH v2 06/17] target/mips: fpu: Demacro MADD.<D|S|PS>, Aleksandar Markovic, 2020/05/14
- [PATCH v2 10/17] target/mips: fpu: Remove now unused UNFUSED_FMA and FLOAT_FMA macros, Aleksandar Markovic, 2020/05/14
- [PATCH v2 15/17] target/mips: fpu: Name better paired-single variables, Aleksandar Markovic, 2020/05/14
- [PATCH v2 11/17] target/mips: fpu: Demacro CLASS.<D|S>, Aleksandar Markovic, 2020/05/14
- [PATCH v2 13/17] target/mips: fpu: Demacro RINT.<D|S>,
Aleksandar Markovic <=
- [PATCH v2 16/17] target/mips: fpu: Refactor conversion from ieee to mips exception flags, Aleksandar Markovic, 2020/05/14
- [PATCH v2 17/17] hw/mips: Convert Malta "ifdef 0"-ed code to comments, Aleksandar Markovic, 2020/05/14
[PATCH v2 12/17] target/mips: fpu: Remove now unused FLOAT_CLASS macro, Aleksandar Markovic, 2020/05/14
[PATCH v2 08/17] target/mips: fpu: Demacro NMADD.<D|S|PS>, Aleksandar Markovic, 2020/05/14
[PATCH v2 14/17] target/mips: fpu: Remove now unused FLOAT_RINT macro, Aleksandar Markovic, 2020/05/14