riscv: Recognise B extension for AT_HWCAP

This was ratified earlier this year as an alias for Zba_Zbb_Zbs. Whilst
we don't currently export multi-letter extensions, we can still export
this alias in AT_HWCAP.

Reviewed by:	mhorne
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D46277
This commit is contained in:
Jessica Clarke 2024-08-22 20:36:44 +01:00
parent 33658afd4e
commit 228a3e73e1
2 changed files with 2 additions and 0 deletions

View File

@ -82,5 +82,6 @@ __ElfType(Auxinfo);
#define HWCAP_ISA_C HWCAP_ISA_BIT('c')
#define HWCAP_ISA_G \
(HWCAP_ISA_I | HWCAP_ISA_M | HWCAP_ISA_A | HWCAP_ISA_F | HWCAP_ISA_D)
#define HWCAP_ISA_B HWCAP_ISA_BIT('b')
#endif /* !_MACHINE_ELF_H_ */

View File

@ -245,6 +245,7 @@ parse_riscv_isa(struct cpu_desc *desc, char *isa, int len)
while (i < len) {
switch(isa[i]) {
case 'a':
case 'b':
case 'c':
case 'd':
case 'f':