diff options
author | Simon Atanasyan <simon@atanasyan.com> | 2016-05-06 15:02:54 +0000 |
---|---|---|
committer | Simon Atanasyan <simon@atanasyan.com> | 2016-05-06 15:02:54 +0000 |
commit | 5b9ac41c13e3be74090af467ee3f5842daa3970e (patch) | |
tree | 9e795b2587f4864375bb2410830725e13fd869db | |
parent | 9ac819860fc894a8ec252baef005c57040e34465 (diff) | |
download | bcm5719-llvm-5b9ac41c13e3be74090af467ee3f5842daa3970e.tar.gz bcm5719-llvm-5b9ac41c13e3be74090af467ee3f5842daa3970e.zip |
[ELF][MIPS] Reduce code duplication. NFC
llvm-svn: 268743
-rw-r--r-- | lld/ELF/Target.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index 42fc2ffe29d..9ca290e912b 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -1472,17 +1472,17 @@ void MipsTargetInfo<ELFT>::relocateOne(uint8_t *Loc, uint32_t Type, // fallthrough case R_MIPS_CALL16: case R_MIPS_GOT_OFST: + case R_MIPS_LO16: + case R_MIPS_PCLO16: writeMipsLo16<E>(Loc, Val); break; case R_MIPS_HI16: + case R_MIPS_PCHI16: writeMipsHi16<E>(Loc, Val); break; case R_MIPS_JALR: // Ignore this optimization relocation for now break; - case R_MIPS_LO16: - writeMipsLo16<E>(Loc, Val); - break; case R_MIPS_PC16: applyMipsPcReloc<E, 16, 2>(Loc, Type, Val); break; @@ -1498,12 +1498,6 @@ void MipsTargetInfo<ELFT>::relocateOne(uint8_t *Loc, uint32_t Type, case R_MIPS_PC32: applyMipsPcReloc<E, 32, 0>(Loc, Type, Val); break; - case R_MIPS_PCHI16: - writeMipsHi16<E>(Loc, Val); - break; - case R_MIPS_PCLO16: - writeMipsLo16<E>(Loc, Val); - break; case R_MIPS_TLS_DTPREL_HI16: writeMipsHi16<E>(Loc, Val - DTPOffset); break; |