[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/26] target/mips: Extract Multi-Threading helper definitions
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 08/26] target/mips: Extract Multi-Threading helper definitions |
Date: |
Fri, 20 Nov 2020 22:08:26 +0100 |
'MIPS MT' is defined as a Module by MIPS. Extract the helper
definitions to 'mod-mips-mt_helper.h.inc'.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/mips/helper.h | 24 +------------------
target/mips/mod-mips-mt_helper.h.inc | 36 ++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 23 deletions(-)
create mode 100644 target/mips/mod-mips-mt_helper.h.inc
diff --git a/target/mips/helper.h b/target/mips/helper.h
index bce869f3718..c15caed9fca 100644
--- a/target/mips/helper.h
+++ b/target/mips/helper.h
@@ -179,25 +179,6 @@ DEF_HELPER_2(dmtc0_entrylo0, void, env, i64)
DEF_HELPER_2(dmtc0_entrylo1, void, env, i64)
#endif
-/* MIPS MT functions */
-DEF_HELPER_2(mftgpr, tl, env, i32)
-DEF_HELPER_2(mftlo, tl, env, i32)
-DEF_HELPER_2(mfthi, tl, env, i32)
-DEF_HELPER_2(mftacx, tl, env, i32)
-DEF_HELPER_1(mftdsp, tl, env)
-DEF_HELPER_3(mttgpr, void, env, tl, i32)
-DEF_HELPER_3(mttlo, void, env, tl, i32)
-DEF_HELPER_3(mtthi, void, env, tl, i32)
-DEF_HELPER_3(mttacx, void, env, tl, i32)
-DEF_HELPER_2(mttdsp, void, env, tl)
-DEF_HELPER_0(dmt, tl)
-DEF_HELPER_0(emt, tl)
-DEF_HELPER_1(dvpe, tl, env)
-DEF_HELPER_1(evpe, tl, env)
-
-/* R6 Multi-threading */
-DEF_HELPER_1(dvp, tl, env)
-DEF_HELPER_1(evp, tl, env)
#endif /* !CONFIG_USER_ONLY */
/* microMIPS functions */
@@ -208,9 +189,6 @@ DEF_HELPER_4(ldm, void, env, tl, tl, i32)
DEF_HELPER_4(sdm, void, env, tl, tl, i32)
#endif
-DEF_HELPER_2(fork, void, tl, tl)
-DEF_HELPER_2(yield, tl, env, tl)
-
/* CP1 functions */
DEF_HELPER_2(cfc1, tl, env, i32)
DEF_HELPER_4(ctc1, void, env, tl, i32, i32)
@@ -451,4 +429,4 @@ DEF_HELPER_3(cache, void, env, tl, i32)
#include "mod-mips-dsp_helper.h.inc"
#include "mod-mips-msa_helper.h.inc"
-
+#include "mod-mips-mt_helper.h.inc"
diff --git a/target/mips/mod-mips-mt_helper.h.inc
b/target/mips/mod-mips-mt_helper.h.inc
new file mode 100644
index 00000000000..0db58e2a780
--- /dev/null
+++ b/target/mips/mod-mips-mt_helper.h.inc
@@ -0,0 +1,36 @@
+/*
+ * MIPS Multi-Threading helpers for QEMU.
+ *
+ * Copyright (c) 2004-2005 Jocelyn Mayer
+ * Copyright (c) 2006 Marius Groeger (FPU operations)
+ * Copyright (c) 2006 Thiemo Seufer (MIPS32R2 support)
+ * Copyright (c) 2009 CodeSourcery (MIPS16 and microMIPS support)
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#ifndef CONFIG_USER_ONLY
+DEF_HELPER_2(mftgpr, tl, env, i32)
+DEF_HELPER_2(mftlo, tl, env, i32)
+DEF_HELPER_2(mfthi, tl, env, i32)
+DEF_HELPER_2(mftacx, tl, env, i32)
+DEF_HELPER_1(mftdsp, tl, env)
+DEF_HELPER_3(mttgpr, void, env, tl, i32)
+DEF_HELPER_3(mttlo, void, env, tl, i32)
+DEF_HELPER_3(mtthi, void, env, tl, i32)
+DEF_HELPER_3(mttacx, void, env, tl, i32)
+DEF_HELPER_2(mttdsp, void, env, tl)
+
+DEF_HELPER_0(dmt, tl)
+DEF_HELPER_0(emt, tl)
+
+DEF_HELPER_1(dvpe, tl, env)
+DEF_HELPER_1(evpe, tl, env)
+
+/* R6 Multi-threading */
+DEF_HELPER_1(dvp, tl, env)
+DEF_HELPER_1(evp, tl, env)
+#endif /* !CONFIG_USER_ONLY */
+
+DEF_HELPER_2(fork, void, tl, tl)
+DEF_HELPER_2(yield, tl, env, tl)
--
2.26.2
- [PATCH 02/26] target/mips: Extract MSA helpers to mod-mips-msa_helper.c, (continued)
- [PATCH 02/26] target/mips: Extract MSA helpers to mod-mips-msa_helper.c, Philippe Mathieu-Daudé, 2020/11/20
- [PATCH 03/26] target/mips: Extract MSA helper definitions, Philippe Mathieu-Daudé, 2020/11/20
- [PATCH 04/26] target/mips: Extract MSA translation routines, Philippe Mathieu-Daudé, 2020/11/20
- [PATCH 05/26] target/mips: Rename dsp_helper.c as mod-mips-dsp_helper.c, Philippe Mathieu-Daudé, 2020/11/20
- [PATCH 06/26] target/mips: Extract DSP helper definitions, Philippe Mathieu-Daudé, 2020/11/20
- [PATCH 08/26] target/mips: Extract Multi-Threading helper definitions,
Philippe Mathieu-Daudé <=
- [PATCH 07/26] target/mips: Extract DSP translation routines, Philippe Mathieu-Daudé, 2020/11/20
- [PATCH 09/26] target/mips: Extract Code Compaction ASE translation routines, Philippe Mathieu-Daudé, 2020/11/20
- [PATCH 10/26] target/mips: Extract the microMIPS ISA helper definitions, Philippe Mathieu-Daudé, 2020/11/20
- [PATCH 11/26] target/mips: Extract the microMIPS ISA translation routines, Philippe Mathieu-Daudé, 2020/11/20
- [PATCH 13/26] target/mips: Extract NEC Vr54xx helpers to vendor-vr54xx_helper.c, Philippe Mathieu-Daudé, 2020/11/20