[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 36/57] tcg/loongarch64: Assert the host supports unaligned acc
From: |
Richard Henderson |
Subject: |
[PATCH v3 36/57] tcg/loongarch64: Assert the host supports unaligned accesses |
Date: |
Tue, 25 Apr 2023 20:31:25 +0100 |
This should be true of all server class loongarch64.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/loongarch64/tcg-target.c.inc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc
index e651ec5c71..ccc13ffdb4 100644
--- a/tcg/loongarch64/tcg-target.c.inc
+++ b/tcg/loongarch64/tcg-target.c.inc
@@ -30,6 +30,7 @@
*/
#include "../tcg-ldst.c.inc"
+#include <asm/hwcap.h>
#ifdef CONFIG_DEBUG_TCG
static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
@@ -1674,6 +1675,11 @@ static void tcg_target_qemu_prologue(TCGContext *s)
static void tcg_target_init(TCGContext *s)
{
+ unsigned long hwcap = qemu_getauxval(AT_HWCAP);
+
+ /* All server class loongarch have UAL; only embedded do not. */
+ assert(hwcap & HWCAP_LOONGARCH_UAL);
+
tcg_target_available_regs[TCG_TYPE_I32] = ALL_GENERAL_REGS;
tcg_target_available_regs[TCG_TYPE_I64] = ALL_GENERAL_REGS;
--
2.34.1
- [PATCH v3 25/57] tcg/riscv: Use full load/store helpers in user-only mode, (continued)
- [PATCH v3 25/57] tcg/riscv: Use full load/store helpers in user-only mode, Richard Henderson, 2023/04/25
- [PATCH v3 22/57] tcg/aarch64: Use full load/store helpers in user-only mode, Richard Henderson, 2023/04/25
- [PATCH v3 26/57] tcg/arm: Adjust constraints on qemu_ld/st, Richard Henderson, 2023/04/25
- [PATCH v3 27/57] tcg/arm: Use full load/store helpers in user-only mode, Richard Henderson, 2023/04/25
- [PATCH v3 28/57] tcg/mips: Use full load/store helpers in user-only mode, Richard Henderson, 2023/04/25
- [PATCH v3 31/57] tcg/sparc64: Rename tcg_out_movi_imm13 to tcg_out_movi_s13, Richard Henderson, 2023/04/25
- [PATCH v3 32/57] tcg/sparc64: Rename tcg_out_movi_imm32 to tcg_out_movi_u32, Richard Henderson, 2023/04/25
- [PATCH v3 29/57] tcg/s390x: Use full load/store helpers in user-only mode, Richard Henderson, 2023/04/25
- [PATCH v3 30/57] tcg/sparc64: Allocate %g2 as a third temporary, Richard Henderson, 2023/04/25
- [PATCH v3 35/57] accel/tcg: Remove helper_unaligned_{ld,st}, Richard Henderson, 2023/04/25
- [PATCH v3 36/57] tcg/loongarch64: Assert the host supports unaligned accesses,
Richard Henderson <=
- [PATCH v3 34/57] tcg/sparc64: Use standard slow path for softmmu, Richard Henderson, 2023/04/25
- [PATCH v3 33/57] tcg/sparc64: Split out tcg_out_movi_s32, Richard Henderson, 2023/04/25
- [PATCH v3 37/57] tcg/loongarch64: Support softmmu unaligned accesses, Richard Henderson, 2023/04/25
- [PATCH v3 38/57] tcg/riscv: Support softmmu unaligned accesses, Richard Henderson, 2023/04/25
- [PATCH v3 39/57] tcg: Introduce tcg_target_has_memory_bswap, Richard Henderson, 2023/04/25
- [PATCH v3 40/57] tcg: Add INDEX_op_qemu_{ld,st}_i128, Richard Henderson, 2023/04/25
- [PATCH v3 41/57] tcg: Support TCG_TYPE_I128 in tcg_out_{ld, st}_helper_{args, ret}, Richard Henderson, 2023/04/25
- [PATCH v3 42/57] tcg: Introduce atom_and_align_for_opc, Richard Henderson, 2023/04/25
- [PATCH v3 43/57] tcg/i386: Use atom_and_align_for_opc, Richard Henderson, 2023/04/25
- [PATCH v3 44/57] tcg/aarch64: Use atom_and_align_for_opc, Richard Henderson, 2023/04/25