[PATCH] D71124: [RISCV] support clang driver to select cpu

Jessica Clarke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 30 11:52:43 PST 2020


jrtc27 added a comment.

In D71124#2423633 <https://reviews.llvm.org/D71124#2423633>, @oceanfish81 wrote:

> @khchen ,
> how should I obtain available (v)CPU features?
> Any sample code, that should work on RISC-V?

Probably `getauxval(AT_HWCAP)`; both Linux and FreeBSD put the ISA string in the low 26 bits in the same vein as `misa`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71124/new/

https://reviews.llvm.org/D71124



More information about the cfe-commits mailing list