Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
0173ef7
nMIPS: Refactor ArithLoginR32 to ArithLogicR32
Aug 23, 2022
2979580
nMIPS: re-organize instruction encodings by pools
Sep 6, 2022
bb6774b
Fix FeatureRelax for nanoMIPS subtarget
Sep 15, 2022
f44277a
Add encodings for register-register arithmetic & logic instructions
Sep 17, 2022
a438038
Inhibit expansion of DIVU as a macro with zero-check for nanoMIPS
Sep 17, 2022
699e41b
Add encodings for arith/logic instructions with immediate operand
Sep 17, 2022
894af01
Add interface to decode nanoMIPS general purpose registers for disass…
Sep 19, 2022
baa6d1d
Add encodings from trap (TEQ/TNE) instructions
Sep 19, 2022
d800c70
Add 16-bit logic instructions, POOL16C_00
Sep 20, 2022
4c0ec73
48-bit instructions
Oct 9, 2022
c18d819
Add 16-bit and 4x4 ADDU variants
Oct 9, 2022
f9da54b
Add ADDIU with positive and negative immediate operands
Oct 9, 2022
4e16efc
Basic decoding logic for 16, 32 & 48-bit nanoMIPS instructions
Oct 9, 2022
c4c842f
Split encodings and descriptor classes
Oct 11, 2022
d2d284d
Fix immediate operand name in encoding classes
Oct 11, 2022
f46fad0
Add encodings for load/store instructions
Oct 13, 2022
a29f884
Split encoding of 48-bit instructions from descriptors
Oct 22, 2022
555fede
Add load/store variations
Oct 27, 2022
f0aa634
TableGen hack to prefer smaller instructions
Oct 27, 2022
b1c471e
Add GP and SP relative loads & stores
Nov 1, 2022
1f67ee2
Add nanoMIPS relocations
Nov 3, 2022
9216bd1
Add encodings with relocations for all branch/call instructions
Nov 13, 2022
debec1b
Fix processor e_flag and instruction byte order for nanoMIPS
Nov 18, 2022
e61acd5
Add correct register names for nanoMIPS P32 ABI
Nov 18, 2022
7cb560e
NanoMips: Use "useIPRA" in TargetMachine to enable IPRA
Aug 31, 2022
5bd1cdf
MIPS: add debug location to stack adjustment
Sep 6, 2022
d329af1
NanoMips: Fix IPRA issue #57482
Sep 1, 2022
4a74048
NanoMips: Fix immZExt7Plus1 conditions
Sep 26, 2022
365a9ad
Add LUI and fix %hi/%lo operators
Nov 25, 2022
fbdece5
Fix ALUIPC encoding and fix %pcrel_hi operator
Nov 26, 2022
79d1d8f
Fix encoding and decoding for 48-bit instructions
Nov 27, 2022
e11f640
Switch to RELA relocations and fix generic data relocations for nanoMIPS
Nov 27, 2022
5a536bd
Update parsing for 48-bit instructions (LI/ADDIU)
Dec 19, 2022
0de3cd7
Refactor AsmParser and improve check of memory addressing with $gp
Dec 19, 2022
7a58aed
Add a nanoMIPS parser variant to allow brackets in mnemonics
Dec 19, 2022
319f5b4
Revert "TableGen hack to prefer smaller instructions"
Dec 19, 2022
b303eb9
Clean-up extra instruction suffixes for 16-bit arithmetic
Dec 20, 2022
c6ef6c9
Add more load/store instructions to nanoMIPS load/store optimizer
Dec 20, 2022
885d256
Fix descriptor calls for scaled loads & stores
Dec 20, 2022
d805060
Add register constraints on 16-bit logic and arithmetic
Dec 20, 2022
9dade0a
Refactor register class names for consistency
Dec 21, 2022
76ce475
Add 32-bit non-zero register class for ADDIU[32]
Dec 22, 2022
73d58ef
Fix 4x4 register decoding classes and methods
Dec 27, 2022
c240ff4
Fix encoding collisions
Dec 27, 2022
075e779
Add 3-bit nanoMIPS register set including zero
Dec 28, 2022
dbb0e2a
Fix load/store operands - base registers and offset ranges
Dec 30, 2022
19915a6
Add encoding for MOVE_NM and refactor to MOVE16_NM
Dec 30, 2022
ed2143f
Clean-up redundant TODO comments
Dec 30, 2022
8faff24
Add MOVEP[/REV] and 2R register encodings, fix 4x4Z encoding
Jan 1, 2023
f962dab
Add LW/SW[4x4] and 4x4 base register encoding/decoding logic
Jan 1, 2023
68d5668
Add LI[16] instruction and encoding
Jan 2, 2023
0c00a3b
Add ANDI[16] encoding and decoding
Jan 2, 2023
256158f
Add BRSC and BALRSC encoding and decoding
Jan 2, 2023
6075402
Add encodings for MOVN/MOVZ
Jan 2, 2023
c4e5aa3
Add encodings for BEQC[16] and BNEC[16]
Jan 2, 2023
425e903
Add encoding/decoding for SLL[16] and SRL[16]
Jan 3, 2023
090d6a8
Add encodings for CLO, CLZ, SEB, SEH, LSA
Jan 3, 2023
ca4d991
Add encodings for DI/EI/ERET/ERETNC/DERET/NOP32/PAUSE/EHB/SYNC
Jan 3, 2023
ebda43d
Add SDBBP, SIGRIE, BREAK & SYSCALL
Jan 3, 2023
38c8121
Fix SYSCALL[32] code encoding
farazs-github Jan 4, 2023
a3a6cf2
Add BREAK[16], SDBBP[16] & SYSCALL[16]
farazs-github Jan 4, 2023
de3b2d2
Add WRPGPR, RDPGPR and encoding for RDHWR
farazs-github Jan 5, 2023
190b43c
Add ROTX, EXTW and SOV
farazs-github Jan 6, 2023
00f6a0b
Add JALRC[16] & JALRC.HB
farazs-github Jan 6, 2023
7f7ed54
Fix operands for LWM/SWM
farazs-github Jan 6, 2023
71bff7a
Fix encodings for UALWM, UASWM and rewrite UALW/UASW as aliases
farazs-github Jan 7, 2023
0f807c4
Add encodings for 16/32 bit SAVE/RESTORE variants
farazs-github Jan 14, 2023
acbe858
Handle SAVE/RESTORE variants with empty register lists
farazs-github Jan 17, 2023
138c0b3
Change NOT_NM to NOT16_NM and add 32-bit NOT encoding
farazs-github Jan 15, 2023
e11b645
Check pos+size<=32 for EXT/INS
farazs-github Jan 15, 2023
aa706ff
Fix incorrect SOV encoding
farazs-github Jan 15, 2023
6a33017
Remove source-destination matching constraint
farazs-github Jan 15, 2023
36ebd6f
Add missing space after comma in instruction assembly
farazs-github Jan 17, 2023
affad62
Fix shiftx operand format for ROTX
farazs-github Jan 17, 2023
4bfd391
Re-factor P16.MV pool encoding
farazs-github Jan 17, 2023
caca28e
Refactor Li_NM to LI48_NM
farazs-github Jan 17, 2023
a48e6ad
Fix order of operands in TEQ/TNE description
farazs-github Jan 17, 2023
311b489
Fix immediate operand type for ANDI[32]
farazs-github Jan 17, 2023
a2fdcba
Refactor and re-order register class heirarchies
farazs-github Jan 21, 2023
4f2a26c
Fix encoding/decoding for ADDIU variants
farazs-github Jan 22, 2023
beada52
More fixes for ADDIU variants
farazs-github Jan 28, 2023
de2dc4b
Fix BGEC encoding
farazs-github Jan 27, 2023
45da781
Add MOVE.BALC, 1-bit register types
farazs-github Jan 27, 2023
1feed67
Retain symbolic relocations in code for nanoMIPS
farazs-github Jan 29, 2023
3b6974a
Generate relocation at 2-byte offset within 48-bit instructions
farazs-github Jan 29, 2023
8d4e699
Re-factor LA_NM and LAGPB_NM to ADDIU variants
farazs-github Jan 29, 2023
014554a
Add p32 ABI flag to ELF header
farazs-github Jan 30, 2023
25e76d2
Temp fix for no save/restore register list
farazs-github Feb 5, 2023
72c66a0
Temp fix - relax register constraints on $gp operand
farazs-github Feb 5, 2023
21a2d38
FIXME: show relocation encoding in nanoMIPS instruction byte order
farazs-github Feb 9, 2023
8ad9928
Fix module pcrel and linkrelax assembler directives
farazs-github Feb 11, 2023
51b470d
Reorder memory operand class heirarchies
farazs-github Feb 11, 2023
e8efd20
Change ADDIUPC mnemonic to LAPC to match binutils assembler
farazs-github Feb 11, 2023
c3ed074
Add missing encoding for LEA
farazs-github Feb 11, 2023
99cefc7
Move base register constraint for $gp/$sp to parser back-end
farazs-github Feb 11, 2023
734a2f1
Assembly parser error-handling for PC-relative/GP-relative symbols
farazs-github Feb 12, 2023
d27cc5d
Re-write PC/GP relative address patterns as single operands
farazs-github Feb 13, 2023
d0c715f
Fix optimizer to match correct PC and GP-relative addiu syntax
farazs-github Feb 13, 2023
66eaf2e
Temp commit: disable GP-relative target global address
farazs-github Feb 13, 2023
5664966
Fix LWPC/SWPC encodings
farazs-github Feb 13, 2023
56f909e
Restrict address parsing with relocations to valid cases
farazs-github Feb 13, 2023
c6ce080
Fix 16Zero source operand register range
farazs-github Feb 17, 2023
6ab1066
Fix offset for [4x4] loads/stores and change suffix from 2s2 to 4s2
farazs-github Feb 18, 2023
05fad9e
Specify decode methods for LH[16] and SH[16] offsets
farazs-github Feb 18, 2023
f50b92e
Accept non-immediate GP-relative offsets in isSym32GPRel
farazs-github Feb 18, 2023
5e542aa
Add ComplexPattern definition for GP-relative address calculations
farazs-github Feb 18, 2023
92cd4db
Refactor ADDiu_NM to ADDIU_NM
farazs-github Feb 21, 2023
56e5527
Change NOT_NM to NOT16_NM in test case (merge with 8ad10e8208c08c)
farazs-github Feb 21, 2023
a42d21b
Fix crash in MOVEP[REV] optimization pass
farazs-github Feb 21, 2023
6b34fdd
Add DAG pattern and instruction alias for LI as ADDIU with $zero
farazs-github Feb 21, 2023
c45c55e
Reorder 16-bit instruction patterns above 32-bit ones
farazs-github Feb 21, 2023
4c5d182
Mark NOT16 as not commutable
farazs-github Feb 21, 2023
4a15253
Various codegen test updates after adding assembler support
farazs-github Feb 21, 2023
5ed4567
Fix GPRNM4Z register class - add missing zero
farazs-github Feb 23, 2023
0a30058
Uncomment tail-call match patterns
farazs-github Feb 24, 2023
b313a74
Codegen test updates (merge with 4a152533149dad83117c5c4eadd47f9e4b46…
farazs-github Feb 26, 2023
bc826ab
Fix immediate value predicate for ADDIU[NEG]
farazs-github Feb 26, 2023
50ce854
Add 16-bit load & store word instructions to optimizer
farazs-github Feb 26, 2023
ba5ab89
Fix assembly parsing and disassembly for indexed memory operations
farazs-github Feb 26, 2023
72b884a
Add UALW/UASW as independent instructions instead of aliases
farazs-github Feb 26, 2023
a4d6697
Codegen test updates (unaligned-memops, storezero)
farazs-github Feb 26, 2023
4807db2
Change ADDIU_NM to ADDIUNEG_NM for SP adjustment
farazs-github Feb 26, 2023
872420c
Add assembler encoding tests (WIP)
farazs-github Mar 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1990,9 +1990,6 @@ void Clang::AddMIPSTargetArgs(const ArgList &Args,

// Enable interprocedural register allocation by default on NanoMips
if (Triple.isNanoMips()) {
CmdArgs.push_back("-mllvm");
CmdArgs.push_back("-enable-ipra");

// Change inlining thresholds.
if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
if (A->getOption().matches(options::OPT_O)) {
Expand Down
33 changes: 33 additions & 0 deletions llvm/include/llvm/BinaryFormat/ELF.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ enum {
EM_RISCV = 243, // RISC-V
EM_LANAI = 244, // Lanai 32-bit processor
EM_BPF = 247, // Linux kernel bpf virtual machine
EM_NANOMIPS = 249, // MIPS Tech nanoMIPS architecture
EM_VE = 251, // NEC SX-Aurora VE
EM_CSKY = 252, // C-SKY 32-bit processor
};
Expand Down Expand Up @@ -593,6 +594,38 @@ enum {
ODK_PAGESIZE = 11 // Page size information
};

// ELF Relocation types for Mips
enum {
#include "ELFRelocs/NanoMips.def"
};

// NanoMips specific e_flags
enum : unsigned {
// File may be relaxed by the linker.
EF_NANOMIPS_LINKRELAX = 0x00000001,
// File contains position independent code.
EF_NANOMIPS_PIC = 0x00000002,
// Indicates code compiled for a 64-bit machine in 32-bit mode
// (regs are 32-bits wide).
EF_NANOMIPS_32BITMODE = 0x00000004,
// Indicate that all data access in this object is GP-relative
EF_NANOMIPS_PID = 0x00000008,
// Indicate that this object does not use absolute addressing.
EF_NANOMIPS_PCREL = 0x00000010,
// Four bit nanoMIPS architecture field.
EF_NANOMIPS_ARCH = 0xf0000000,
// -march=32r6 code.
E_NANOMIPS_ARCH_32R6 = 0x00000000,
// -march=64r6 code.
E_NANOMIPS_ARCH_64R6 = 0x10000000,
// The ABI of the file.
EF_NANOMIPS_ABI = 0x0000f000,
// nanoMIPS ABI in 32 bit mode.
E_NANOMIPS_ABI_P32 = 0x00001000,
// nanoMIPS ABI in 64 bit mode.
E_NANOMIPS_ABI_P64 = 0x00002000
};

// Hexagon-specific e_flags
enum {
// Object processor version flags, bits[11:0]
Expand Down
81 changes: 81 additions & 0 deletions llvm/include/llvm/BinaryFormat/ELFRelocs/NanoMips.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#ifndef ELF_RELOC
#error "ELF_RELOC must be defined"
#endif

ELF_RELOC(R_NANOMIPS_NONE, 0)
ELF_RELOC(R_NANOMIPS_32, 1)
ELF_RELOC(R_NANOMIPS_64, 2)
ELF_RELOC(R_NANOMIPS_NEG, 3)
ELF_RELOC(R_NANOMIPS_ASHIFTR_1, 4)
ELF_RELOC(R_NANOMIPS_UNSIGNED_8, 5)
ELF_RELOC(R_NANOMIPS_SIGNED_8, 6)
ELF_RELOC(R_NANOMIPS_UNSIGNED_16, 7)
ELF_RELOC(R_NANOMIPS_SIGNED_16, 8)
ELF_RELOC(R_NANOMIPS_RELATIVE, 9)
ELF_RELOC(R_NANOMIPS_GLOBAL, 10)
ELF_RELOC(R_NANOMIPS_JUMP_SLOT, 11)
ELF_RELOC(R_NANOMIPS_IRELATIVE, 12)
ELF_RELOC(R_NANOMIPS_PC25_S1, 13)
ELF_RELOC(R_NANOMIPS_PC21_S1, 14)
ELF_RELOC(R_NANOMIPS_PC14_S1, 15)
ELF_RELOC(R_NANOMIPS_PC11_S1, 16)
ELF_RELOC(R_NANOMIPS_PC10_S1, 17)
ELF_RELOC(R_NANOMIPS_PC7_S1, 18)
ELF_RELOC(R_NANOMIPS_PC4_S1, 19)
ELF_RELOC(R_NANOMIPS_GPREL19_S2, 20)
ELF_RELOC(R_NANOMIPS_GPREL18_S3, 21)
ELF_RELOC(R_NANOMIPS_GPREL18, 22)
ELF_RELOC(R_NANOMIPS_GPREL17_S1, 23)
ELF_RELOC(R_NANOMIPS_GPREL16_S2, 24)
ELF_RELOC(R_NANOMIPS_GPREL7_S2, 25)
ELF_RELOC(R_NANOMIPS_GPREL_HI20, 26)
ELF_RELOC(R_NANOMIPS_PCHI20, 27)
ELF_RELOC(R_NANOMIPS_HI20, 28)
ELF_RELOC(R_NANOMIPS_LO12, 29)
ELF_RELOC(R_NANOMIPS_GPREL_I32, 30)
ELF_RELOC(R_NANOMIPS_PC_I32, 31)
ELF_RELOC(R_NANOMIPS_I32, 32)
ELF_RELOC(R_NANOMIPS_GOT_DISP, 33)
ELF_RELOC(R_NANOMIPS_GOTPC_I32, 34)
ELF_RELOC(R_NANOMIPS_GOTPC_HI20, 35)
ELF_RELOC(R_NANOMIPS_GOT_LO12, 36)
ELF_RELOC(R_NANOMIPS_GOT_CALL, 37)
ELF_RELOC(R_NANOMIPS_GOT_PAGE, 38)
ELF_RELOC(R_NANOMIPS_GOT_OFST, 39)
ELF_RELOC(R_NANOMIPS_LO4_S2, 40)
ELF_RELOC(R_NANOMIPS_RESERVED1, 41)
ELF_RELOC(R_NANOMIPS_GPREL_LO12, 42)
ELF_RELOC(R_NANOMIPS_SCN_DISP, 43)
ELF_RELOC(R_NANOMIPS_COPY, 44)
ELF_RELOC(R_NANOMIPS_ALIGN, 64)
ELF_RELOC(R_NANOMIPS_FILL, 65)
ELF_RELOC(R_NANOMIPS_MAX, 66)
ELF_RELOC(R_NANOMIPS_INSN32, 67)
ELF_RELOC(R_NANOMIPS_FIXED, 68)
ELF_RELOC(R_NANOMIPS_NORELAX, 69)
ELF_RELOC(R_NANOMIPS_RELAX, 70)
ELF_RELOC(R_NANOMIPS_SAVERESTORE, 71)
ELF_RELOC(R_NANOMIPS_INSN16, 72)
ELF_RELOC(R_NANOMIPS_JALR32, 73)
ELF_RELOC(R_NANOMIPS_JALR16, 74)
ELF_RELOC(R_NANOMIPS_JUMPTABLE_LOAD, 75)
ELF_RELOC(R_NANOMIPS_FRAME_REG, 76)
ELF_RELOC(R_NANOMIPS_TLS_DTPMOD, 80)
ELF_RELOC(R_NANOMIPS_TLS_DTPREL, 81)
ELF_RELOC(R_NANOMIPS_TLS_TPREL, 82)
ELF_RELOC(R_NANOMIPS_TLS_GD, 83)
ELF_RELOC(R_NANOMIPS_TLS_GD_I32, 84)
ELF_RELOC(R_NANOMIPS_TLS_LD, 85)
ELF_RELOC(R_NANOMIPS_TLS_LD_I32, 86)
ELF_RELOC(R_NANOMIPS_TLS_DTPREL12, 87)
ELF_RELOC(R_NANOMIPS_TLS_DTPREL16, 88)
ELF_RELOC(R_NANOMIPS_TLS_DTPREL_I32, 89)
ELF_RELOC(R_NANOMIPS_TLS_GOTTPREL, 90)
ELF_RELOC(R_NANOMIPS_TLS_GOTTPREL_PC_I32, 91)
ELF_RELOC(R_NANOMIPS_TLS_TPREL12, 92)
ELF_RELOC(R_NANOMIPS_TLS_TPREL16, 93)
ELF_RELOC(R_NANOMIPS_TLS_TPREL_I32, 94)
ELF_RELOC(R_NANOMIPS_PC32, 248)
ELF_RELOC(R_NANOMIPS_EH, 249)
ELF_RELOC(R_NANOMIPS_GNU_VTINHERIT, 253)
ELF_RELOC(R_NANOMIPS_GNU_VTENTRY, 254)
7 changes: 7 additions & 0 deletions llvm/include/llvm/CodeGen/TargetRegisterInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,13 @@ class TargetRegisterInfo : public MCRegisterInfo {
virtual bool isCalleeSavedPhysReg(MCRegister PhysReg,
const MachineFunction &MF) const;

// Return true if the register is needed for returning from the
// function and so must be preserved in the callee even if preserved
// by the caller
virtual bool isNeededForReturn(MCRegister PhysReg, const MachineFunction &MF) const {
return false;
}

/// Prior to adding the live-out mask to a stackmap or patchpoint
/// instruction, provide the target the opportunity to adjust it (mainly to
/// remove pseudo-registers that should be ignored).
Expand Down
1 change: 1 addition & 0 deletions llvm/include/llvm/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ module LLVM_BinaryFormat {
textual header "BinaryFormat/ELFRelocs/Lanai.def"
textual header "BinaryFormat/ELFRelocs/M68k.def"
textual header "BinaryFormat/ELFRelocs/Mips.def"
textual header "BinaryFormat/ELFRelocs/NanoMips.def"
textual header "BinaryFormat/ELFRelocs/MSP430.def"
textual header "BinaryFormat/ELFRelocs/PowerPC64.def"
textual header "BinaryFormat/ELFRelocs/PowerPC.def"
Expand Down
11 changes: 6 additions & 5 deletions llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,9 @@ void TargetFrameLowering::determineCalleeSaves(MachineFunction &MF,

// When interprocedural register allocation is enabled caller saved registers
// are preferred over callee saved registers.
if (MF.getTarget().Options.EnableIPRA &&
isSafeForNoCSROpt(MF.getFunction()) &&
isProfitableForNoCSROpt(MF.getFunction()))
return;
bool NoCSR = (MF.getTarget().Options.EnableIPRA &&
isSafeForNoCSROpt(MF.getFunction()) &&
isProfitableForNoCSROpt(MF.getFunction()));

// Get the callee saved register list...
const MCPhysReg *CSRegs = MF.getRegInfo().getCalleeSavedRegs();
Expand Down Expand Up @@ -119,10 +118,12 @@ void TargetFrameLowering::determineCalleeSaves(MachineFunction &MF,
// Functions which call __builtin_unwind_init get all their registers saved.
bool CallsUnwindInit = MF.callsUnwindInit();
const MachineRegisterInfo &MRI = MF.getRegInfo();
const TargetRegisterInfo *RI = MF.getSubtarget().getRegisterInfo();
for (unsigned i = 0; CSRegs[i]; ++i) {
unsigned Reg = CSRegs[i];
if (CallsUnwindInit || MRI.isPhysRegModified(Reg))
SavedRegs.set(Reg);
if (!NoCSR || !MRI.isAllocatable(Reg) || RI->isNeededForReturn(Reg, MF))
SavedRegs.set(Reg);
}
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/MC/MCAsmStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2166,7 +2166,7 @@ void MCAsmStreamer::AddEncodingComment(const MCInst &Inst,
for (unsigned j = 0; j != Info.TargetSize; ++j) {
unsigned Index = F.getOffset() * 8 + Info.TargetOffset + j;
assert(Index < Code.size() * 8 && "Invalid offset in fixup!");
FixupMap[Index] = 1 + i;
FixupMap[(Index + 16) % (Code.size() * 8)] = 1 + i;
}
}

Expand Down
10 changes: 9 additions & 1 deletion llvm/lib/Object/ELF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,15 @@ StringRef llvm::object::getELFRelocationTypeName(uint32_t Machine,
break;
}
break;
case ELF::EM_NANOMIPS:
switch (Type) {
#include "llvm/BinaryFormat/ELFRelocs/NanoMips.def"
default:
break;
}
break;
case ELF::EM_AARCH64:
switch (Type) {
switch (Type) {
#include "llvm/BinaryFormat/ELFRelocs/AArch64.def"
default:
break;
Expand Down Expand Up @@ -182,6 +189,7 @@ uint32_t llvm::object::getELFRelativeRelocationType(uint32_t Machine) {
case ELF::EM_IAMCU:
return ELF::R_386_RELATIVE;
case ELF::EM_MIPS:
case ELF::EM_NANOMIPS:
break;
case ELF::EM_AARCH64:
return ELF::R_AARCH64_RELATIVE;
Expand Down
3 changes: 3 additions & 0 deletions llvm/lib/ObjectYAML/ELFYAML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,9 @@ void ScalarEnumerationTraits<ELFYAML::ELF_REL>::enumeration(
case ELF::EM_MIPS:
#include "llvm/BinaryFormat/ELFRelocs/Mips.def"
break;
case ELF::EM_NANOMIPS:
#include "llvm/BinaryFormat/ELFRelocs/NanoMips.def"
break;
case ELF::EM_HEXAGON:
#include "llvm/BinaryFormat/ELFRelocs/Hexagon.def"
break;
Expand Down
Loading