Landing: 15862c97e1f9

Project / Subsystem

gcc / risc-v

Date

2026-05-17

Author

Christoph Müllner

Commit

15862c97e1f919694324403ced3e5b9100fb35a0

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
risc-v
patch_id
commit_hash
15862c97e1f919694324403ced3e5b9100fb35a0
source_type
github
headline
RISC-V: Map existing extensions to Linux hwprobe constants.
tldr
Adds mappings between existing RISC-V extensions and their corresponding Linux hwprobe bits, enabling runtime feature detection.
author
Christoph Müllner
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • risc-v
  • hwprobe
  • feature detection
discussion_id_link
bugzilla_pr
date
2026-05-17T00:00:00.000Z

This commit adds mappings between existing RISC-V extensions (supm, zicntr, zihpm, zfbfmin, zvfbfmin, zvfbfwma, zicbom, zaamo, zalrsc, zabha, zalasr, zicbop, zilsd, zclsd, and zicfilp) and their corresponding Linux hwprobe bits in RISCV_HWPROBE_KEY_IMA_EXT_0. By copying the upstream Linux bit assignments and mapping them directly to the matching feature bits, GCC can now detect these extensions at runtime, making it easier to utilize these features when available.