[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 23/73] tcg/mips: Expand bswap unconditionally
From: |
Richard Henderson |
Subject: |
[PATCH 23/73] tcg/mips: Expand bswap unconditionally |
Date: |
Thu, 2 Jan 2025 10:06:03 -0800 |
While only mips32r2 has explicit instructions for bswap,
we have built subroutines for bswap for use by qemu_ld/st.
There's no reason not to expose those subroutines for
general purpose use.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/mips/tcg-target-has.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tcg/mips/tcg-target-has.h b/tcg/mips/tcg-target-has.h
index a934f86e30..1a8b6d571a 100644
--- a/tcg/mips/tcg-target-has.h
+++ b/tcg/mips/tcg-target-has.h
@@ -54,6 +54,7 @@ extern bool use_mips32r2_instructions;
#define TCG_TARGET_HAS_muls2_i32 (!use_mips32r6_instructions)
#define TCG_TARGET_HAS_muluh_i32 1
#define TCG_TARGET_HAS_mulsh_i32 1
+#define TCG_TARGET_HAS_bswap16_i32 1
#define TCG_TARGET_HAS_bswap32_i32 1
#define TCG_TARGET_HAS_negsetcond_i32 0
@@ -73,7 +74,6 @@ extern bool use_mips32r2_instructions;
#endif
/* optional instructions detected at runtime */
-#define TCG_TARGET_HAS_bswap16_i32 use_mips32r2_instructions
#define TCG_TARGET_HAS_deposit_i32 use_mips32r2_instructions
#define TCG_TARGET_HAS_extract_i32 use_mips32r2_instructions
#define TCG_TARGET_HAS_sextract_i32 0
@@ -87,9 +87,9 @@ extern bool use_mips32r2_instructions;
#define TCG_TARGET_HAS_qemu_st8_i32 0
#if TCG_TARGET_REG_BITS == 64
-#define TCG_TARGET_HAS_bswap16_i64 use_mips32r2_instructions
-#define TCG_TARGET_HAS_bswap32_i64 use_mips32r2_instructions
-#define TCG_TARGET_HAS_bswap64_i64 use_mips32r2_instructions
+#define TCG_TARGET_HAS_bswap16_i64 1
+#define TCG_TARGET_HAS_bswap32_i64 1
+#define TCG_TARGET_HAS_bswap64_i64 1
#define TCG_TARGET_HAS_deposit_i64 use_mips32r2_instructions
#define TCG_TARGET_HAS_extract_i64 use_mips32r2_instructions
#define TCG_TARGET_HAS_sextract_i64 0
--
2.43.0
- [PATCH 11/73] tcg: Add tcg_op_deposit_valid, (continued)
- [PATCH 11/73] tcg: Add tcg_op_deposit_valid, Richard Henderson, 2025/01/02
- [PATCH 15/73] tcg: Remove TCG_TARGET_NEED_LDST_LABELS and TCG_TARGET_NEED_POOL_LABELS, Richard Henderson, 2025/01/02
- [PATCH 22/73] tcg: Merge TCG_TARGET_HAS_{andc,orc,nand,nor,eqv,not}, Richard Henderson, 2025/01/02
- [PATCH 17/73] tcg/tci: Move TCI specific opcodes to tcg-target-opc.h.inc, Richard Henderson, 2025/01/02
- [PATCH 07/73] tcg: Add TCGType argument to tcg_op_supported, Richard Henderson, 2025/01/02
- [PATCH 18/73] tcg: Move fallback tcg_can_emit_vec_op out of line, Richard Henderson, 2025/01/02
- [PATCH 23/73] tcg/mips: Expand bswap unconditionally,
Richard Henderson <=
- [PATCH 13/73] target/i386: Use tcg_op_deposit_valid, Richard Henderson, 2025/01/02
- [PATCH 14/73] target/i386: Use tcg_op_supported, Richard Henderson, 2025/01/02
- [PATCH 32/73] tcg/aarch64: Provide TCG_TARGET_{s}extract_valid, Richard Henderson, 2025/01/02
- [PATCH 33/73] tcg/aarch64: Expand extract with offset 0 with andi, Richard Henderson, 2025/01/02
- [PATCH 28/73] tcg: Merge TCG_TARGET_HAS_{add2,sub2}, Richard Henderson, 2025/01/02
- [PATCH 06/73] tcg: Move call abi parameters from tcg-target.h to tcg-target.c.inc, Richard Henderson, 2025/01/02
- [PATCH 09/73] target/arm: Use tcg_op_supported, Richard Henderson, 2025/01/02