27 switch (
unsigned(Kind)) {
32 return (int64_t)Value / 2;
45 SystemZMCAsmBackend(uint8_t osABI)
49 unsigned getNumFixupKinds()
const override {
55 uint64_t
Value,
bool IsResolved)
const override;
56 bool mayNeedRelaxation(
const MCInst &Inst)
const override {
59 bool fixupNeedsRelaxation(
const MCFixup &Fixup, uint64_t
Value,
65 MCInst &Res)
const override {
68 bool writeNopData(uint64_t Count,
MCObjectWriter *OW)
const override;
82 {
"FK_390_TLS_CALL", 0, 0, 0 }
97 bool IsResolved)
const {
100 unsigned BitSize = getFixupKindInfo(Kind).TargetSize;
101 unsigned Size = (BitSize + 7) / 8;
103 assert(Offset + Size <= Data.
size() &&
"Invalid fixup offset!");
108 Value &= ((uint64_t)1 << BitSize) - 1;
109 unsigned ShiftValue = (Size * 8) - 8;
110 for (
unsigned I = 0;
I !=
Size; ++
I) {
111 Data[Offset +
I] |= uint8_t(Value >> ShiftValue);
116 bool SystemZMCAsmBackend::writeNopData(uint64_t Count,
118 for (uint64_t
I = 0;
I != Count; ++
I)
128 return new SystemZMCAsmBackend(OSABI);
OSType getOS() const
getOS - Get the parsed operating system type of this triple.
This represents an "assembler immediate".
MCAsmBackend * createSystemZMCAsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT, StringRef CPU, const MCTargetOptions &Options)
Defines the object file and target independent interfaces used by the assembler backend to write nati...
void write8(uint8_t Value)
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Is this fixup kind PCrelative? This is used by the assembler backend to evaluate fixup values in a ta...
Encapsulates the layout of an assembly file at a particular point in time.
uint32_t getOffset() const
size_t size() const
size - Get the array size.
Instances of this class represent a single low-level machine instruction.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
A relaxable fragment holds on to its MCInst, since it may need to be relaxed during the assembler lay...
unsigned const MachineRegisterInfo * MRI
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
MCFixupKind
Extensible enumeration to represent the type of a fixup.
MCObjectWriter * createSystemZObjectWriter(raw_pwrite_stream &OS, uint8_t OSABI)
MCFixupKind getKind() const
Triple - Helper class for working with autoconf configuration names.
Target - Wrapper for Target specific information.
static uint64_t extractBitsForFixup(MCFixupKind Kind, uint64_t Value)
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
llvm_unreachable("Unknown RegBank!")
MCSubtargetInfo - Generic base class for all target subtargets.
Target independent information on a fixup kind.
An abstract base class for streams implementations that also support a pwrite operation.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
Generic interface to target specific assembler backends.
StringRef - Represent a constant reference to a string, i.e.
virtual const MCFixupKindInfo & getFixupKindInfo(MCFixupKind Kind) const
Get information on a fixup kind.