15 #ifndef LLVM_CODEGEN_MACHORELOCATION_H
16 #define LLVM_CODEGEN_MACHORELOCATION_H
18 #include "llvm/Support/DataTypes.h"
38 return (1 << 31) | (r_pcrel << 30) | ((r_length & 3) << 28) |
39 ((r_type & 15) << 24) | (r_address & 0x00FFFFFF);
41 return (r_symbolnum << 8) | (r_pcrel << 7) | ((r_length & 3) << 5) |
42 (r_extern << 4) | (r_type & 15);
44 uint32_t
getAddress()
const {
return r_scattered ? r_value : r_address; }
48 bool ext, uint8_t type,
bool scattered =
false,
50 r_address(addr), r_symbolnum(index), r_pcrel(pcrel), r_length(len),
51 r_extern(ext), r_type(type), r_scattered(scattered), r_value(value) {}
56 #endif // LLVM_CODEGEN_MACHORELOCATION_H
uint32_t getRawAddress() const
uint32_t getAddress() const
MachORelocation(uint32_t addr, uint32_t index, bool pcrel, uint8_t len, bool ext, uint8_t type, bool scattered=false, int32_t value=0)
uint32_t getPackedFields() const