================ @@ -337,13 +337,17 @@ std::string riscv::getRISCVArch(const llvm::opt::ArgList &Args, // - On `riscv{XLEN}-unknown-elf` we default to `rv{XLEN}imac` // - On all other OSs we use `rv{XLEN}imafdc` (equivalent to `rv{XLEN}gc`) if (Triple.isRISCV32()) { - if (Triple.getOS() == llvm::Triple::UnknownOS) + if (Triple.getOS() == llvm::Triple::UnknownOS && + Triple.getVendor() != llvm::Triple::MipsTechnologies) return "rv32imac"; return "rv32imafdc"; } - if (Triple.getOS() == llvm::Triple::UnknownOS) + if (Triple.getOS() == llvm::Triple::UnknownOS && + Triple.getVendor() != llvm::Triple::MipsTechnologies) return "rv64imac"; + if (Triple.getVendor() == llvm::Triple::MipsTechnologies) + return "rv64imafdc_zba_zbb_zicsr_zifencei"; ---------------- djtodoro wrote:
Well, by just moving the `if (Triple.getVendor() == llvm::Triple::MipsTechnologies)` above, we make it cleaner. https://github.com/llvm/llvm-project/pull/134065 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits