[lld] r232359 - [Mips] Group some cases in the switch statement
Simon Atanasyan
simon at atanasyan.com
Mon Mar 16 02:14:07 PDT 2015
Author: atanasyan
Date: Mon Mar 16 04:14:06 2015
New Revision: 232359
URL: http://llvm.org/viewvc/llvm-project?rev=232359&view=rev
Log:
[Mips] Group some cases in the switch statement
No functional changes.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp?rev=232359&r1=232358&r2=232359&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp Mon Mar 16 04:14:06 2015
@@ -318,7 +318,6 @@ static ErrorOr<uint64_t> calculateReloca
case R_MICROMIPS_26_S1:
return reloc26loc(relAddr, tgtAddr, ref.addend(), isCrossJump ? 2 : 1);
case R_MIPS_HI16:
- return relocHi16(relAddr, tgtAddr, ref.addend(), isGP);
case R_MICROMIPS_HI16:
return relocHi16(relAddr, tgtAddr, ref.addend(), isGP);
case R_MIPS_LO16:
@@ -327,9 +326,14 @@ static ErrorOr<uint64_t> calculateReloca
return relocLo16(relAddr, tgtAddr, ref.addend(), isGP, true);
case R_MIPS_GOT16:
case R_MIPS_CALL16:
- return relocGOT(tgtAddr, gpAddr);
case R_MICROMIPS_GOT16:
case R_MICROMIPS_CALL16:
+ case R_MIPS_TLS_GD:
+ case R_MIPS_TLS_LDM:
+ case R_MIPS_TLS_GOTTPREL:
+ case R_MICROMIPS_TLS_GD:
+ case R_MICROMIPS_TLS_LDM:
+ case R_MICROMIPS_TLS_GOTTPREL:
return relocGOT(tgtAddr, gpAddr);
case R_MICROMIPS_PC7_S1:
return relocPc7(relAddr, tgtAddr, ref.addend());
@@ -339,13 +343,6 @@ static ErrorOr<uint64_t> calculateReloca
return relocPc16(relAddr, tgtAddr, ref.addend());
case R_MICROMIPS_PC23_S2:
return relocPc23(relAddr, tgtAddr, ref.addend());
- case R_MIPS_TLS_GD:
- case R_MIPS_TLS_LDM:
- case R_MIPS_TLS_GOTTPREL:
- case R_MICROMIPS_TLS_GD:
- case R_MICROMIPS_TLS_LDM:
- case R_MICROMIPS_TLS_GOTTPREL:
- return relocGOT(tgtAddr, gpAddr);
case R_MIPS_TLS_DTPREL_HI16:
case R_MIPS_TLS_TPREL_HI16:
case R_MICROMIPS_TLS_DTPREL_HI16:
More information about the llvm-commits
mailing list