All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH v2 01/28] target/mips: Use FloatRoundMode enum for FCR31 modes conversion
Date: Mon, 23 Nov 2020 21:44:21 +0100	[thread overview]
Message-ID: <20201123204448.3260804-2-f4bug@amsat.org> (raw)
In-Reply-To: <20201123204448.3260804-1-f4bug@amsat.org>

Use the FloatRoundMode enum type introduced in commit 3dede407cc6
("softfloat: Name rounding mode enum") instead of 'unsigned int'.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/mips/internal.h   | 3 ++-
 target/mips/fpu_helper.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/mips/internal.h b/target/mips/internal.h
index dd8a7809b64..bbd10e9d45f 100644
--- a/target/mips/internal.h
+++ b/target/mips/internal.h
@@ -225,7 +225,8 @@ bool mips_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
 uint32_t float_class_s(uint32_t arg, float_status *fst);
 uint64_t float_class_d(uint64_t arg, float_status *fst);
 
-extern unsigned int ieee_rm[];
+extern const FloatRoundMode ieee_rm[4];
+
 void update_pagemask(CPUMIPSState *env, target_ulong arg1, int32_t *pagemask);
 
 static inline void restore_rounding_mode(CPUMIPSState *env)
diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c
index 020b768e87b..501bd401a16 100644
--- a/target/mips/fpu_helper.c
+++ b/target/mips/fpu_helper.c
@@ -42,7 +42,7 @@
 #define FP_TO_INT64_OVERFLOW 0x7fffffffffffffffULL
 
 /* convert MIPS rounding mode in FCR31 to IEEE library */
-unsigned int ieee_rm[] = {
+const FloatRoundMode ieee_rm[4] = {
     float_round_nearest_even,
     float_round_to_zero,
     float_round_up,
-- 
2.26.2



  reply	other threads:[~2020-11-23 21:05 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 20:44 [PATCH v2 00/28] target/mips: Explode 60% of the 32K-lines translate.c Philippe Mathieu-Daudé
2020-11-23 20:44 ` Philippe Mathieu-Daudé [this message]
2020-11-26  0:12   ` [PATCH v2 01/28] target/mips: Use FloatRoundMode enum for FCR31 modes conversion Richard Henderson
2020-11-23 20:44 ` [PATCH v2 02/28] target/mips: Extract FPU helpers to 'fpu_helper.h' Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 03/28] target/mips: Rename msa_helper.c as mod-msa_helper.c Philippe Mathieu-Daudé
2020-11-26  0:13   ` Richard Henderson
2020-11-23 20:44 ` [PATCH v2 04/28] target/mips: Extract MSA helpers from op_helper.c Philippe Mathieu-Daudé
2020-11-26  0:15   ` Richard Henderson
2020-11-23 20:44 ` [PATCH v2 05/28] target/mips: Extract MSA helper definitions Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 06/28] target/mips: Extract MSA translation routines Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 07/28] target/mips: Rename dsp_helper.c as mod-dsp_helper.c Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 08/28] target/mips: Extract DSP helper definitions Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 09/28] target/mips: Extract DSP translation routines Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 10/28] target/mips: Extract Multi-Threading helper definitions Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 11/28] target/mips: Extract Code Compaction ASE translation routines Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 12/28] target/mips: Extract the microMIPS ISA helper definitions Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 13/28] target/mips: Extract the microMIPS ISA translation routines Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 14/28] target/mips: Extract nanoMIPS " Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 15/28] target/mips: Extract NEC Vr54xx helpers to vendor-vr54xx_helper.c Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 16/28] target/mips: Extract NEC Vr54xx helper definitions Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 17/28] target/mips: Extract NEC Vr54xx translation routines Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 18/28] target/mips: Rename lmmi_helper.c as loong-simd_helper.c Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 19/28] target/mips: Extract Loongson SIMD helper definitions Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 20/28] target/mips: Extract Loongson SIMD translation routines Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 21/28] target/mips: Extract Loongson EXTensions " Philippe Mathieu-Daudé
2020-11-26  0:25   ` Richard Henderson
2020-11-23 20:44 ` [PATCH v2 22/28] target/mips: Extract XBurst Media eXtension Unit " Philippe Mathieu-Daudé
2020-11-26  0:29   ` Richard Henderson
2020-11-23 20:44 ` [PATCH v2 23/28] target/mips: Make pipeline 1 multiply opcodes generic Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 24/28] target/mips: Extract Toshiba TXx9 translation routines Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 25/28] target/mips: Extract Toshiba TX79 multimedia " Philippe Mathieu-Daudé
2020-11-29 15:09   ` Richard Henderson
2020-11-23 20:44 ` [PATCH v2 26/28] MAINTAINERS: Add entry for MIPS Loongson TCG Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 27/28] MAINTAINERS: Add entry for MIPS Ingenic Xburst TCG Philippe Mathieu-Daudé
2020-11-23 20:48   ` Philippe Mathieu-Daudé
2020-11-23 20:44 ` [PATCH v2 28/28] MAINTAINERS: Add entry for MIPS Toshiba TCG Philippe Mathieu-Daudé
2020-12-07 23:08 ` [PATCH v2 00/28] target/mips: Explode 60% of the 32K-lines translate.c Philippe Mathieu-Daudé
2021-06-29  5:40   ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201123204448.3260804-2-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.