On 8/3/23 07:42, Daniel Henrique Barboza wrote:


On 8/3/23 10:14, Nathan Egge wrote:
From: "Nathan Egge" <ne...@xiph.org>

Set V bit for hwcap if misa is set.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1793
Signed-off-by: Nathan Egge <ne...@xiph.org>
---

Tested with the example program described in the bug:

===========
#include <sys/auxv.h>
#include <stdio.h>

#define ISA_V_HWCAP (1 << ('v' - 'a'))

void main() {
   unsigned long hw_cap = getauxval(AT_HWCAP);
   printf("RVV %s\n", hw_cap & ISA_V_HWCAP ? "detected" : "not found");
}
===========

$ ./qemu-riscv64 -cpu rv64,vext_spec=v1.0,v=true,vlen=128 -B 0x100000 ./a.out
RVV detected
$ ./qemu-riscv64 -cpu rv64,vext_spec=v1.0,vlen=128 -B 0x100000 ./a.out
RVV not found


Reviewed-by: Daniel Henrique Barboza <dbarb...@ventanamicro.com>
Tested-by: Daniel Henrique Barboza <dbarb...@ventanamicro.com>


Looks like 8.1 material to me. Thanks,

Queued to tcg-next.


r~

Reply via email to