[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 08/10] target/mips: Make mxu_translate_init() / decode_ase_mxu
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 08/10] target/mips: Make mxu_translate_init() / decode_ase_mxu() proto public |
Date: |
Mon, 22 Feb 2021 23:38:59 +0100 |
To be able to move these functions out of the big translate.c,
make their prototype public.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/mips/translate.h | 6 ++++++
target/mips/translate.c | 9 +++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/target/mips/translate.h b/target/mips/translate.h
index 468e29d7578..1801e7f819e 100644
--- a/target/mips/translate.h
+++ b/target/mips/translate.h
@@ -178,6 +178,12 @@ extern TCGv bcond;
/* MSA */
void msa_translate_init(void);
+/* MXU */
+#if !defined(TARGET_MIPS64)
+void mxu_translate_init(void);
+bool decode_ase_mxu(DisasContext *ctx, uint32_t insn);
+#endif /* !TARGET_MIPS64 */
+
/* decodetree generated */
bool decode_isa_rel6(DisasContext *ctx, uint32_t insn);
bool decode_ase_msa(DisasContext *ctx, uint32_t insn);
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 52a7005e18f..609798a0bee 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -2046,7 +2046,7 @@ static const char * const mxuregnames[] = {
"XR9", "XR10", "XR11", "XR12", "XR13", "XR14", "XR15", "MXU_CR",
};
-static void mxu_translate_init(void)
+void mxu_translate_init(void)
{
for (unsigned i = 0; i < NUMBER_OF_MXU_REGISTERS - 1; i++) {
mxu_gpr[i] = tcg_global_mem_new(cpu_env,
@@ -2058,6 +2058,11 @@ static void mxu_translate_init(void)
offsetof(CPUMIPSState, active_tc.mxu_cr),
mxuregnames[NUMBER_OF_MXU_REGISTERS - 1]);
}
+#else /* !defined(TARGET_MIPS64) */
+void mxu_translate_init(void)
+{
+ g_assert_not_reached();
+}
#endif /* defined(TARGET_MIPS64) */
/* General purpose registers moves. */
@@ -25789,7 +25794,7 @@ static void decode_opc_mxu__pool19(DisasContext *ctx)
}
}
-static bool decode_ase_mxu(DisasContext *ctx, uint32_t insn)
+bool decode_ase_mxu(DisasContext *ctx, uint32_t insn)
{
uint32_t opcode = extract32(insn, 0, 6);
--
2.26.2
- [PATCH v3 03/10] target/mips: Remove unused CPUMIPSState* from MXU functions, (continued)
- [PATCH v3 03/10] target/mips: Remove unused CPUMIPSState* from MXU functions, Philippe Mathieu-Daudé, 2021/02/22
- [PATCH v3 04/10] target/mips: Pass instruction opcode to decode_opc_mxu(), Philippe Mathieu-Daudé, 2021/02/22
- [PATCH v3 05/10] target/mips: Extract decode_ase_mxu() from decode_opc_mxu(), Philippe Mathieu-Daudé, 2021/02/22
- [PATCH v3 06/10] target/mips: Use OPC_MUL instead of OPC__MXU_MUL, Philippe Mathieu-Daudé, 2021/02/22
- [PATCH v3 07/10] target/mips: Introduce mxu_translate_init() helper, Philippe Mathieu-Daudé, 2021/02/22
- [PATCH v3 08/10] target/mips: Make mxu_translate_init() / decode_ase_mxu() proto public,
Philippe Mathieu-Daudé <=
- [PATCH v3 09/10] target/mips: Simplify 64-bit ifdef'ry of MXU code, Philippe Mathieu-Daudé, 2021/02/22
- [PATCH v3 10/10] target/mips: Extract MXU code to new mxu_translate.c file, Philippe Mathieu-Daudé, 2021/02/22