[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

Yeting Kuo via cfe-commits cfe-commits at lists.llvm.org
Fri May 10 01:30:45 PDT 2024


================
@@ -954,9 +954,18 @@ void readGnuProperty(const InputSection &sec, ObjFile<ELFT> &f) {
       continue;
     }
 
-    uint32_t featureAndType = config->emachine == EM_AARCH64
-                                  ? GNU_PROPERTY_AARCH64_FEATURE_1_AND
-                                  : GNU_PROPERTY_X86_FEATURE_1_AND;
+    uint32_t featureAndType = 0;
+    switch (config->emachine) {
+    default:
----------------
yetingk wrote:

Is it better to add case `EM_CASE_X86` and set unreachable for default case?

https://github.com/llvm/llvm-project/pull/77414


More information about the cfe-commits mailing list