Skip to content

Commit cc07185

Browse files
xen0nSixWeining
authored andcommitted
[BinaryFormat] Add LoongArch
Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D138018
1 parent db8a967 commit cc07185

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/BinaryFormat/ELF.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ uint16_t ELF::convertArchNameToEMachine(StringRef Arch) {
197197
.Case("bpf", EM_BPF)
198198
.Case("ve", EM_VE)
199199
.Case("csky", EM_CSKY)
200+
.Case("loongarch", EM_LOONGARCH)
200201
.Default(EM_NONE);
201202
}
202203

@@ -561,6 +562,8 @@ StringRef ELF::convertEMachineToArchName(uint16_t EMachine) {
561562
return "ve";
562563
case EM_CSKY:
563564
return "csky";
565+
case EM_LOONGARCH:
566+
return "loongarch";
564567
default:
565568
return "None";
566569
}

0 commit comments

Comments
 (0)