[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/14] linux-user/elfload: Enable LSX/LASX in HWCAP for LoongArch
|
From: |
Richard Henderson |
|
Subject: |
[PULL 04/14] linux-user/elfload: Enable LSX/LASX in HWCAP for LoongArch |
|
Date: |
Wed, 18 Oct 2023 16:31:24 -0700 |
From: Jiajie Chen <c@jia.je>
Since support for LSX and LASX is landed in QEMU recently, we can update
HWCAPS accordingly.
Signed-off-by: Jiajie Chen <c@jia.je>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231001085315.1692667-1-c@jia.je>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/elfload.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 213fd3e584..2e3809f03c 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1237,6 +1237,14 @@ static uint32_t get_elf_hwcap(void)
hwcaps |= HWCAP_LOONGARCH_LAM;
}
+ if (FIELD_EX32(cpu->env.cpucfg[2], CPUCFG2, LSX)) {
+ hwcaps |= HWCAP_LOONGARCH_LSX;
+ }
+
+ if (FIELD_EX32(cpu->env.cpucfg[2], CPUCFG2, LASX)) {
+ hwcaps |= HWCAP_LOONGARCH_LASX;
+ }
+
return hwcaps;
}
--
2.34.1
- [PULL 00/14] linux-user patch queue, Richard Henderson, 2023/10/18
- [PULL 01/14] linux-user: Fixes for zero_bss, Richard Henderson, 2023/10/18
- [PULL 02/14] linux-user/mips: fix abort on integer overflow, Richard Henderson, 2023/10/18
- [PULL 03/14] linux-user/sh4: Fix crashes on signal delivery, Richard Henderson, 2023/10/18
- [PULL 04/14] linux-user/elfload: Enable LSX/LASX in HWCAP for LoongArch,
Richard Henderson <=
- [PULL 07/14] linux-user: Exit not abort in die_with_backtrace, Richard Henderson, 2023/10/18
- [PULL 08/14] linux-user: Detect and report host crashes, Richard Henderson, 2023/10/18
- [PULL 09/14] linux-user: Only register handlers for core_dump_signal by default, Richard Henderson, 2023/10/18
- [PULL 05/14] linux-user: Propagate failure in mmap_reserve_or_unmap back to target_munmap, Richard Henderson, 2023/10/18
- [PULL 06/14] linux-user: Split out die_with_signal, Richard Henderson, 2023/10/18
- [PULL 10/14] linux-user: Map unsupported signals to an out-of-bounds value, Richard Henderson, 2023/10/18
- [PULL 11/14] linux-user: Simplify signal_init, Richard Henderson, 2023/10/18
- [PULL 13/14] linux-user: Detect and report host SIGILL, SIGFPE, SIGTRAP, Richard Henderson, 2023/10/18
- [PULL 14/14] linux-user: Remap guest SIGABRT, Richard Henderson, 2023/10/18
- [PULL 12/14] linux-user: Split out host_sig{segv,bus}_handler, Richard Henderson, 2023/10/18