|
LLVM 24.0.0git
|
#include "HexagonRelocationInfo.h"#include "llvm/ADT/STLExtras.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/MathExtras.h"#include "llvm/Target/Hexagon/HexagonRelocation.h"#include "HexagonDepMask.h"Go to the source code of this file.
Functions | |
| static uint32_t | findBitMaskHelper (uint32_t Insn, const HexagonInstruction *Encodings, size_t NumInsns) |
| static uint32_t | findMask (uint32_t I) |
| static uint32_t | applyMask (uint32_t Mask, uint32_t Data) |
| static uint32_t | getAppliedBits (uint32_t RelocType) |
| template<typename T> | |
| static uint32_t | doRelocHelper (uint32_t RelocType, uint32_t Instruction, T Value) |
| static const llvm::Hexagon::HexagonRelocationInfo * | getRelocInfo (uint32_t RelocType) |
| LLVM_ABI uint32_t | LLVMHexagonApplyRelocation (uint32_t RelocType, uint32_t Instruction, uint32_t Value) |
Apply the ELF relocation RelocType with value Value to Instruction. | |
| LLVM_ABI bool | LLVMHexagonGetRelocationInfo (uint32_t RelocType, LLVMHexagonRelocInfo *Info) |
Fill Info with the properties of RelocType. | |
| LLVM_ABI bool | LLVMHexagonVerifyRange (uint32_t RelocType, uint32_t Value) |
Return true if Value fits the range the ABI specifies for RelocType. | |
| LLVM_ABI bool | LLVMHexagonVerifyAlignment (uint32_t RelocType, uint32_t Value) |
Return true if Value satisfies the alignment required by RelocType. | |
| LLVM_ABI bool | LLVMHexagonIsTruncated (uint32_t RelocType, uint32_t Value) |
Return true if applying the unsigned relocation RelocType to Value would lose set bits. | |
Definition at line 65 of file HexagonFindMask.cpp.
Referenced by llvm::BitVector::clearBitsInMask(), llvm::BitVector::clearBitsNotInMask(), doRelocHelper(), llvm::BitVector::setBitsInMask(), and llvm::BitVector::setBitsNotInMask().
|
static |
Definition at line 101 of file HexagonFindMask.cpp.
References applyMask(), findMask(), getAppliedBits(), llvm::maskTrailingOnes(), llvm::Hexagon::Relocs, and T.
Referenced by LLVMHexagonApplyRelocation().
|
static |
Definition at line 43 of file HexagonFindMask.cpp.
References I, and llvm_unreachable.
Referenced by findMask().
Definition at line 58 of file HexagonFindMask.cpp.
References findBitMaskHelper(), I, and InstructionEncodings.
Referenced by doRelocHelper().
Definition at line 82 of file HexagonFindMask.cpp.
References llvm::Hexagon::Relocs.
Referenced by doRelocHelper().
|
static |
Definition at line 120 of file HexagonFindMask.cpp.
References llvm::Hexagon::Relocs.
Referenced by LLVMHexagonApplyRelocation(), LLVMHexagonGetRelocationInfo(), LLVMHexagonIsTruncated(), LLVMHexagonVerifyAlignment(), and LLVMHexagonVerifyRange().
| LLVM_ABI uint32_t LLVMHexagonApplyRelocation | ( | uint32_t | RelocType, |
| uint32_t | Instruction, | ||
| uint32_t | Value ) |
Apply the ELF relocation RelocType with value Value to Instruction.
Hexagon instruction operands may be stored in non-contiguous bit positions. This function locates the operand field for relocations whose mask depends on the instruction encoding, then inserts the relocated value into that field. Value is the raw, unshifted relocation value; the shift specified by LLVMHexagonRelocInfo::Shift is applied internally. The caller is responsible for validating the relocation value (see LLVMHexagonVerifyRange and friends; note VerifyRange and IsTruncated expect a shifted value) and for computing any PC-relative adjustment before calling this function. Instruction is returned unchanged if RelocType is unknown.
Definition at line 128 of file HexagonFindMask.cpp.
References doRelocHelper(), getRelocInfo(), and LLVM_ABI.
| LLVM_ABI bool LLVMHexagonGetRelocationInfo | ( | uint32_t | RelocType, |
| LLVMHexagonRelocInfo * | Info ) |
Fill Info with the properties of RelocType.
Returns false, leaving Info untouched, if RelocType is not a known Hexagon relocation.
Definition at line 139 of file HexagonFindMask.cpp.
References getRelocInfo(), and LLVM_ABI.
Referenced by llvm::RuntimeDyldELF::processRelocationRef().
Return true if applying the unsigned relocation RelocType to Value would lose set bits.
Value must already be shifted right by LLVMHexagonRelocInfo::Shift, as for LLVMHexagonVerifyRange. Returns false for signed or unknown relocations.
Definition at line 170 of file HexagonFindMask.cpp.
References getRelocInfo(), and LLVM_ABI.
Return true if Value satisfies the alignment required by RelocType.
Value is the raw, unshifted relocation value. Returns false for an unknown RelocType. The result is meaningful only for relocations whose LLVMHexagonRelocInfo::VerifyAlignment is set.
Definition at line 165 of file HexagonFindMask.cpp.
References getRelocInfo(), and LLVM_ABI.
Return true if Value fits the range the ABI specifies for RelocType.
Value must already be shifted right by LLVMHexagonRelocInfo::Shift. Returns false for an unknown RelocType. The result is meaningful only for relocations whose LLVMHexagonRelocInfo::VerifyRange is set.
Definition at line 156 of file HexagonFindMask.cpp.
References getRelocInfo(), llvm::isIntN(), llvm::isUIntN(), and LLVM_ABI.