[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)
Djordje Todorovic via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 13 06:42:08 PST 2024
================
@@ -252,9 +252,17 @@ static const char *getLDMOption(const llvm::Triple &T, const ArgList &Args) {
case llvm::Triple::ppc64le:
return "elf64lppc";
case llvm::Triple::riscv32:
- return "elf32lriscv";
- case llvm::Triple::riscv64:
- return "elf64lriscv";
+ case llvm::Triple::riscv64: {
+ bool IsBigEndian = false;
+ if (Arg *A = Args.getLastArg(options::OPT_mlittle_endian,
+ options::OPT_mbig_endian))
+ IsBigEndian = A->getOption().matches(options::OPT_mbig_endian);
+
+ if (T.getArch() == llvm::Triple::riscv32)
+ return IsBigEndian ? "elf32briscv" : "elf32lriscv";
+ else
+ return IsBigEndian ? "elf64briscv" : "elf64lriscv";
+ }
----------------
djtodoro wrote:
I will drop this part for now, since it is dummy/unsed for now. I am planning to create/add support for `BE`, once we are done with these `p8700` patches.
This was a patch on Phabricator: https://reviews.llvm.org/D128612
https://github.com/llvm/llvm-project/pull/117865
More information about the llvm-commits
mailing list