Re: [PATCH v2] linux-user/elfload: Implement ELF_HWCAP for RISC-V

2021-07-05 Thread Richard Henderson
On 7/4/21 11:43 PM, Kito Cheng wrote: +static uint32_t get_elf_hwcap(void) +{ +RISCVCPU *cpu = RISCV_CPU(thread_cpu); +uint32_t hwcap = 0; + +#define MISA_BIT(EXT) (1 << (EXT - 'A')) +#define GET_EXT(EXT) \ +do { \ +

[PATCH v2] linux-user/elfload: Implement ELF_HWCAP for RISC-V

2021-07-05 Thread Kito Cheng
Set I, M, A, F, D and C bit for hwcap if misa is set. V2 Changes: - Only set imafdc bits, sync with upstream linux kernel. Signed-off-by: Kito Cheng --- linux-user/elfload.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/linux-user/elfload.c