[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 07/26] target/arm/tcg: Expose some iwmmxt methods in 'translat
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 07/26] target/arm/tcg: Expose some iwmmxt methods in 'translate.h' |
Date: |
Sun, 11 Jun 2023 10:58:27 +0200 |
Expose a few methods and variables before extracting iwmmxt
code from translate.c.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/tcg/translate.h | 6 ++++++
target/arm/tcg/translate.c | 8 ++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/target/arm/tcg/translate.h b/target/arm/tcg/translate.h
index d1cacff0b2..3d7c55d3b6 100644
--- a/target/arm/tcg/translate.h
+++ b/target/arm/tcg/translate.h
@@ -165,6 +165,7 @@ typedef struct DisasCompare {
} DisasCompare;
/* Share the TCG temporaries common between 32 and 64 bit modes. */
+extern TCGv_i32 cpu_R[16];
extern TCGv_i32 cpu_NF, cpu_ZF, cpu_CF, cpu_VF;
extern TCGv_i64 cpu_exclusive_addr;
extern TCGv_i64 cpu_exclusive_val;
@@ -298,6 +299,11 @@ static inline int curr_insn_len(DisasContext *s)
/* CPU state was modified dynamically; no need to exit, but do not chain. */
#define DISAS_UPDATE_NOCHAIN DISAS_TARGET_10
+/* These are TCG temporaries used only by the legacy iwMMXt decoder */
+extern TCGv_i64 cpu_V0, cpu_V1, cpu_M0;
+int disas_iwmmxt_insn(DisasContext *s, uint32_t insn);
+int disas_dsp_insn(DisasContext *s, uint32_t insn);
+
#ifdef TARGET_AARCH64
void a64_translate_init(void);
void gen_a64_update_pc(DisasContext *s, target_long diff);
diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c
index 3238463f13..aaa479521e 100644
--- a/target/arm/tcg/translate.c
+++ b/target/arm/tcg/translate.c
@@ -45,9 +45,9 @@
#define ENABLE_ARCH_8 arm_dc_feature(s, ARM_FEATURE_V8)
/* These are TCG temporaries used only by the legacy iwMMXt decoder */
-static TCGv_i64 cpu_V0, cpu_V1, cpu_M0;
+TCGv_i64 cpu_V0, cpu_V1, cpu_M0;
/* These are TCG globals which alias CPUARMState fields */
-static TCGv_i32 cpu_R[16];
+TCGv_i32 cpu_R[16];
TCGv_i32 cpu_CF, cpu_NF, cpu_VF, cpu_ZF;
TCGv_i64 cpu_exclusive_addr;
TCGv_i64 cpu_exclusive_val;
@@ -1490,7 +1490,7 @@ static inline int gen_iwmmxt_shift(uint32_t insn,
uint32_t mask, TCGv_i32 dest)
* Disassemble an iwMMXt instruction.
* Returns nonzero if an error occurred (ie. an undefined instruction).
*/
-static int disas_iwmmxt_insn(DisasContext *s, uint32_t insn)
+int disas_iwmmxt_insn(DisasContext *s, uint32_t insn)
{
int rd, wrd;
int rdhi, rdlo, rd0, rd1, i;
@@ -2509,7 +2509,7 @@ static int disas_iwmmxt_insn(DisasContext *s, uint32_t
insn)
* Disassemble an XScale DSP instruction.
* Returns nonzero if an error occurred (ie. an undefined instruction).
*/
-static int disas_dsp_insn(DisasContext *s, uint32_t insn)
+int disas_dsp_insn(DisasContext *s, uint32_t insn)
{
int acc, rd0, rd1, rdhi, rdlo;
TCGv_i32 tmp, tmp2;
--
2.38.1
- [PATCH v2 00/26] target/arm/tcg: Remove inclusions of 'exec/helper-[proto/gen].h', Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 01/26] plugins: Remove unused 'exec/helper-proto.h' header, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 02/26] accel/tcg/cpu-exec: Use generic 'helper-proto-common.h' header, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 03/26] target/arm/tcg: Remove CONFIG_TCG #ifdef'ry check, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 04/26] target/arm/tcg: Rename helper template headers as '.h.inc', Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 05/26] target/arm/tcg: Extract iwMMXt helpers from the generic 'helper.h', Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 06/26] target/arm/tcg: Fix iwmmxt-related code style, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 07/26] target/arm/tcg: Expose some iwmmxt methods in 'translate.h',
Philippe Mathieu-Daudé <=
- [PATCH v2 08/26] target/arm/tcg: Extract iwmmxt code to translate-iwmmxt.c, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 09/26] target/arm/tcg: Reduce 'helper-iwmmxt.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 10/26] target/arm/tcg: Extract VFP definitions to 'helper-vfp.h.inc', Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 11/26] target/arm/tcg: Reduce 'helper-vfp.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 12/26] target/arm/tcg: Move neon_tbl() from op_helper.c to neon_helper.c, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 13/26] target/arm/tcg: Extract NEON definitions to 'helper-neon.h.inc', Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 14/26] target/arm/tcg: Reduce 'helper-neon.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/11