diff --git a/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp b/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp --- a/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp +++ b/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp @@ -22,6 +22,7 @@ #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/MC/MCTargetOptions.h" #include "llvm/MC/TargetRegistry.h" +#include "llvm/Support/AArch64TargetParser.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/ScopedPrinter.h" #include "llvm/Support/TargetSelect.h" @@ -41,6 +42,8 @@ #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/Stream.h" +#include + using namespace lldb; using namespace lldb_private; @@ -1177,12 +1180,17 @@ features_str += "+dspr2,"; } - // If any AArch64 variant, enable latest ISA with any optional - // extensions like MTE. + // If any AArch64 variant, enable latest ISA with all extensions. if (triple.isAArch64()) { - features_str += "+v9.3a,+mte,+sm4,+sha2,+sha3,+aes,+fp16fml,+sve2-aes,+" - "sve2-sm4,+sve2-sha3,+sve2-bitperm,+f32mm,+f64mm,+tme,+" - "ls64,+sme,+sme-f64,+sme-i64,+spe,+rand,+brbe"; + features_str += "+v9.3a,"; + std::vector features; + // Get all possible features + llvm::AArch64::getExtensionFeatures(-1, features); + features_str += + std::accumulate(features.begin(), features.end(), features_str, + [](std::string features, llvm::StringRef feature) { + return features + feature.str() + ","; + }); if (triple.getVendor() == llvm::Triple::Apple) cpu = "apple-latest";