[lld] r233783 - [ELF][Hexagon] Add comments related to hexagon relocations.
Shankar Easwaran
shankare at codeaurora.org
Tue Mar 31 20:07:01 PDT 2015
Author: shankare
Date: Tue Mar 31 22:07:01 2015
New Revision: 233783
URL: http://llvm.org/viewvc/llvm-project?rev=233783&view=rev
Log:
[ELF][Hexagon] Add comments related to hexagon relocations.
No functional changes.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonEncodings.h
lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationFunctions.h
Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonEncodings.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonEncodings.h?rev=233783&r1=233782&r2=233783&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonEncodings.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonEncodings.h Tue Mar 31 22:07:01 2015
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
Instruction insn_encodings[] = {
+ // InsnMask CompareMask BitMask IsDuplexInstruction
{ 0xffe00004, 0x40000000, 0x20f8, 0x0 },
{ 0xffe03080, 0x9ca03080, 0xf60, 0x0 },
{ 0xf9e00000, 0x48c00000, 0x61f20ff, 0x0 },
Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationFunctions.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationFunctions.h?rev=233783&r1=233782&r2=233783&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationFunctions.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationFunctions.h Tue Mar 31 22:07:01 2015
@@ -16,12 +16,15 @@
namespace lld {
namespace elf {
-/// \brief HexagonInstruction which is used to store various values
+/// \brief Applying fixup on Hexagon requires the relocator to fetch the fixup
+/// mask from the instruction. To fetch the fixup encoding, the linker uses a
+/// static array that contains the instruction mask, the compare mask and the
+/// relocation mask.
typedef struct {
- uint32_t insnMask;
- uint32_t insnCmpMask;
- uint32_t insnBitMask;
- bool isDuplex;
+ uint32_t insnMask; // Instruction mask.
+ uint32_t insnCmpMask; // Compare mask.
+ uint32_t insnBitMask; // Relocation mask.
+ bool isDuplex; // Indicates if the instruction is a duplex instruction.
} Instruction;
#include "HexagonEncodings.h"
@@ -37,7 +40,7 @@ inline uint32_t findv4bitmask(uint8_t *l
if (((insn_encodings[i].insnMask) & insn) == insn_encodings[i].insnCmpMask)
return insn_encodings[i].insnBitMask;
}
- llvm_unreachable("found unknown instruction");
+ llvm_unreachable("found unknown Hexagon instruction");
}
} // elf
More information about the llvm-commits
mailing list