diff options
author | Nathan Egge <negge@xiph.org> | 2023-08-03 09:14:24 -0400 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2023-09-11 10:53:50 +0300 |
commit | a568abcf17bf6f5a66f065b6d4db8042b3fdbd07 (patch) | |
tree | 07216e44abb32e562c2d1d5e94e5788ca682d101 /linux-user | |
parent | 04535fb7b5cad162cb766e2b10bf54da0f9d737d (diff) |
linux-user/elfload: Set V in ELF_HWCAP for RISC-V
Set V bit for hwcap if misa is set.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1793
Signed-off-by: Nathan Egge <negge@xiph.org>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Tested-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-Id: <20230803131424.40744-1-negge@xiph.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit 4333f0924c2f2ca8efaebaed8c24f55f77d8b013)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/elfload.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 20894b633f..c2c095d383 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1664,7 +1664,8 @@ static uint32_t get_elf_hwcap(void) #define MISA_BIT(EXT) (1 << (EXT - 'A')) RISCVCPU *cpu = RISCV_CPU(thread_cpu); uint32_t mask = MISA_BIT('I') | MISA_BIT('M') | MISA_BIT('A') - | MISA_BIT('F') | MISA_BIT('D') | MISA_BIT('C'); + | MISA_BIT('F') | MISA_BIT('D') | MISA_BIT('C') + | MISA_BIT('V'); return cpu->env.misa_ext & mask; #undef MISA_BIT |