LLVM 22.0.0git
PPCMCTargetDesc.cpp
Go to the documentation of this file.
1//===-- PPCMCTargetDesc.cpp - PowerPC Target Descriptions -----------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file provides PowerPC specific target descriptions.
10//
11//===----------------------------------------------------------------------===//
12
16#include "PPCELFStreamer.h"
17#include "PPCMCAsmInfo.h"
18#include "PPCTargetStreamer.h"
19#include "PPCXCOFFStreamer.h"
22#include "llvm/ADT/StringRef.h"
25#include "llvm/MC/MCAssembler.h"
27#include "llvm/MC/MCContext.h"
28#include "llvm/MC/MCDwarf.h"
31#include "llvm/MC/MCExpr.h"
33#include "llvm/MC/MCInstrInfo.h"
36#include "llvm/MC/MCStreamer.h"
38#include "llvm/MC/MCSymbol.h"
39#include "llvm/MC/MCSymbolELF.h"
49
50using namespace llvm;
51
52#define GET_INSTRINFO_MC_DESC
53#define ENABLE_INSTR_PREDICATE_VERIFIER
54#include "PPCGenInstrInfo.inc"
55
56#define GET_SUBTARGETINFO_MC_DESC
57#include "PPCGenSubtargetInfo.inc"
58
59#define GET_REGINFO_MC_DESC
60#include "PPCGenRegisterInfo.inc"
61
62/// stripRegisterPrefix - This method strips the character prefix from a
63/// register name so that only the number is left. Used by for linux asm.
64const char *PPC::stripRegisterPrefix(const char *RegName) {
65 switch (RegName[0]) {
66 case 'a':
67 if (RegName[1] == 'c' && RegName[2] == 'c')
68 return RegName + 3;
69 break;
70 case 'f':
71 if (RegName[1] == 'p')
72 return RegName + 2;
73 [[fallthrough]];
74 case 'r':
75 case 'v':
76 if (RegName[1] == 's') {
77 if (RegName[2] == 'p')
78 return RegName + 3;
79 return RegName + 2;
80 }
81 return RegName + 1;
82 case 'c':
83 if (RegName[1] == 'r')
84 return RegName + 2;
85 break;
86 case 'w':
87 // For wacc and wacc_hi
88 if (RegName[1] == 'a' && RegName[2] == 'c' && RegName[3] == 'c') {
89 if (RegName[4] == '_')
90 return RegName + 7;
91 else
92 return RegName + 4;
93 }
94 break;
95 case 'd':
96 // For dmr, dmrp, dmrrow, dmrrowp
97 if (RegName[1] == 'm' && RegName[2] == 'r') {
98 if (RegName[3] == 'r' && RegName[4] == 'o' && RegName[5] == 'w' &&
99 RegName[6] == 'p')
100 return RegName + 7;
101 else if (RegName[3] == 'r' && RegName[4] == 'o' && RegName[5] == 'w')
102 return RegName + 6;
103 else if (RegName[3] == 'p')
104 return RegName + 4;
105 else
106 return RegName + 3;
107 }
108 break;
109 }
110
111 return RegName;
112}
113
114/// getRegNumForOperand - some operands use different numbering schemes
115/// for the same registers. For example, a VSX instruction may have any of
116/// vs0-vs63 allocated whereas an Altivec instruction could only have
117/// vs32-vs63 allocated (numbered as v0-v31). This function returns the actual
118/// register number needed for the opcode/operand number combination.
119/// The operand number argument will be useful when we need to extend this
120/// to instructions that use both Altivec and VSX numbering (for different
121/// operands).
123 unsigned OpNo) {
124 int16_t regClass = Desc.operands()[OpNo].RegClass;
125 switch (regClass) {
126 // We store F0-F31, VF0-VF31 in MCOperand and it should be F0-F31,
127 // VSX32-VSX63 during encoding/disassembling
128 case PPC::VSSRCRegClassID:
129 case PPC::VSFRCRegClassID:
130 if (PPC::isVFRegister(Reg))
131 return PPC::VSX32 + (Reg - PPC::VF0);
132 break;
133 // We store VSL0-VSL31, V0-V31 in MCOperand and it should be VSL0-VSL31,
134 // VSX32-VSX63 during encoding/disassembling
135 case PPC::VSRCRegClassID:
136 if (PPC::isVRRegister(Reg))
137 return PPC::VSX32 + (Reg - PPC::V0);
138 break;
139 // Other RegClass doesn't need mapping
140 default:
141 break;
142 }
143 return Reg;
144}
145
147
148// Pin the vtable to this file.
150
152 MCInstrInfo *X = new MCInstrInfo();
153 InitPPCMCInstrInfo(X);
154 return X;
155}
156
158 bool isPPC64 =
159 (TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le);
160 unsigned Flavour = isPPC64 ? 0 : 1;
161 unsigned RA = isPPC64 ? PPC::LR8 : PPC::LR;
162
164 InitPPCMCRegisterInfo(X, RA, Flavour, Flavour);
165 return X;
166}
167
169 StringRef CPU, StringRef FS) {
170 // Set some default feature to MC layer.
171 std::string FullFS = std::string(FS);
172
173 if (TT.isOSAIX()) {
174 if (!FullFS.empty())
175 FullFS = "+aix," + FullFS;
176 else
177 FullFS = "+aix";
178 }
179
180 return createPPCMCSubtargetInfoImpl(TT, CPU, /*TuneCPU*/ CPU, FullFS);
181}
182
184 const Triple &TheTriple,
185 const MCTargetOptions &Options) {
186 bool isPPC64 = (TheTriple.getArch() == Triple::ppc64 ||
187 TheTriple.getArch() == Triple::ppc64le);
188
189 MCAsmInfo *MAI;
190 if (TheTriple.isOSBinFormatXCOFF())
191 MAI = new PPCXCOFFMCAsmInfo(isPPC64, TheTriple);
192 else
193 MAI = new PPCELFMCAsmInfo(isPPC64, TheTriple);
194
195 // Initial state of the frame pointer is R1.
196 unsigned Reg = isPPC64 ? PPC::X1 : PPC::R1;
197 MCCFIInstruction Inst =
198 MCCFIInstruction::cfiDefCfa(nullptr, MRI.getDwarfRegNum(Reg, true), 0);
199 MAI->addInitialFrameState(Inst);
200
201 return MAI;
202}
203
204namespace {
205
206class PPCTargetAsmStreamer : public PPCTargetStreamer {
208
209public:
210 PPCTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
211 : PPCTargetStreamer(S), OS(OS) {}
212
213 void emitTCEntry(const MCSymbol &S, PPCMCExpr::Specifier Kind) override {
214 if (getContext().isXCOFF()) {
215 MCSymbolXCOFF *TCSym =
216 static_cast<const MCSectionXCOFF *>(Streamer.getCurrentSectionOnly())
217 ->getQualNameSymbol();
218 // On AIX, we have TLS variable offsets (symbol@({gd|ie|le|ld}) depending
219 // on the TLS access method (or model). For the general-dynamic access
220 // method, we also have region handle (symbol@m) for each variable. For
221 // local-dynamic, there is a module handle (_$TLSML[TC]@ml) for all
222 // variables. Finally for local-exec and initial-exec, we have a thread
223 // pointer, in r13 for 64-bit mode and returned by .__get_tpointer for
224 // 32-bit mode.
225 if (Kind == PPC::S_AIX_TLSGD || Kind == PPC::S_AIX_TLSGDM ||
226 Kind == PPC::S_AIX_TLSIE || Kind == PPC::S_AIX_TLSLE ||
227 Kind == PPC::S_AIX_TLSLD || Kind == PPC::S_AIX_TLSML)
228 OS << "\t.tc " << TCSym->getName() << "," << S.getName() << "@"
229 << getContext().getAsmInfo()->getSpecifierName(Kind) << '\n';
230 else
231 OS << "\t.tc " << TCSym->getName() << "," << S.getName() << '\n';
232
233 if (TCSym->hasRename())
234 Streamer.emitXCOFFRenameDirective(TCSym, TCSym->getSymbolTableName());
235 return;
236 }
237
238 OS << "\t.tc " << S.getName() << "[TC]," << S.getName() << '\n';
239 }
240
241 void emitMachine(StringRef CPU) override {
242 const Triple &TT = Streamer.getContext().getTargetTriple();
243 if (TT.isOSBinFormatXCOFF())
244 OS << "\t.machine\t" << '\"' << CPU << '\"' << '\n';
245 else
246 OS << "\t.machine " << CPU << '\n';
247 }
248
249 void emitAbiVersion(int AbiVersion) override {
250 OS << "\t.abiversion " << AbiVersion << '\n';
251 }
252
253 void emitLocalEntry(MCSymbolELF *S, const MCExpr *LocalOffset) override {
254 const MCAsmInfo *MAI = Streamer.getContext().getAsmInfo();
255
256 OS << "\t.localentry\t";
257 S->print(OS, MAI);
258 OS << ", ";
259 MAI->printExpr(OS, *LocalOffset);
260 OS << '\n';
261 }
262};
263
264class PPCTargetELFStreamer : public PPCTargetStreamer {
265public:
266 PPCTargetELFStreamer(MCStreamer &S) : PPCTargetStreamer(S) {}
267
268 MCELFStreamer &getStreamer() {
269 return static_cast<MCELFStreamer &>(Streamer);
270 }
271
272 void emitTCEntry(const MCSymbol &S, PPCMCExpr::Specifier Kind) override {
273 // Creates a R_PPC64_TOC relocation
274 Streamer.emitValueToAlignment(Align(8));
275 Streamer.emitSymbolValue(&S, 8);
276 }
277
278 void emitMachine(StringRef CPU) override {
279 // FIXME: Is there anything to do in here or does this directive only
280 // limit the parser?
281 }
282
283 void emitAbiVersion(int AbiVersion) override {
284 ELFObjectWriter &W = getStreamer().getWriter();
285 unsigned Flags = W.getELFHeaderEFlags();
286 Flags &= ~ELF::EF_PPC64_ABI;
287 Flags |= (AbiVersion & ELF::EF_PPC64_ABI);
288 W.setELFHeaderEFlags(Flags);
289 }
290
291 void emitLocalEntry(MCSymbolELF *S, const MCExpr *LocalOffset) override {
292
293 // encodePPC64LocalEntryOffset will report an error if it cannot
294 // encode LocalOffset.
295 unsigned Encoded = encodePPC64LocalEntryOffset(LocalOffset);
296
297 unsigned Other = S->getOther();
298 Other &= ~ELF::STO_PPC64_LOCAL_MASK;
299 Other |= Encoded;
300 S->setOther(Other);
301
302 // For GAS compatibility, unless we already saw a .abiversion directive,
303 // set e_flags to indicate ELFv2 ABI.
304 ELFObjectWriter &W = getStreamer().getWriter();
305 unsigned Flags = W.getELFHeaderEFlags();
306 if ((Flags & ELF::EF_PPC64_ABI) == 0)
307 W.setELFHeaderEFlags(Flags | 2);
308 }
309
310 void emitAssignment(MCSymbol *S, const MCExpr *Value) override {
311 auto *Symbol = static_cast<MCSymbolELF *>(S);
312
313 // When encoding an assignment to set symbol A to symbol B, also copy
314 // the st_other bits encoding the local entry point offset.
315 if (copyLocalEntry(Symbol, Value))
316 UpdateOther.insert(Symbol);
317 else
318 UpdateOther.erase(Symbol);
319 }
320
321 void finish() override {
322 for (auto *Sym : UpdateOther)
323 if (Sym->isVariable())
324 copyLocalEntry(Sym, Sym->getVariableValue());
325
326 // Clear the set of symbols that needs to be updated so the streamer can
327 // be reused without issues.
328 UpdateOther.clear();
329 }
330
331private:
333
334 bool copyLocalEntry(MCSymbolELF *D, const MCExpr *S) {
335 auto *Ref = dyn_cast<const MCSymbolRefExpr>(S);
336 if (!Ref)
337 return false;
338 auto &RhsSym = static_cast<const MCSymbolELF &>(Ref->getSymbol());
339 unsigned Other = D->getOther();
340 Other &= ~ELF::STO_PPC64_LOCAL_MASK;
341 Other |= RhsSym.getOther() & ELF::STO_PPC64_LOCAL_MASK;
342 D->setOther(Other);
343 return true;
344 }
345
346 unsigned encodePPC64LocalEntryOffset(const MCExpr *LocalOffset) {
347 MCAssembler &MCA = getStreamer().getAssembler();
348 int64_t Offset;
349 if (!LocalOffset->evaluateAsAbsolute(Offset, MCA))
350 MCA.getContext().reportError(LocalOffset->getLoc(),
351 ".localentry expression must be absolute");
352
353 switch (Offset) {
354 default:
356 LocalOffset->getLoc(), ".localentry expression must be a power of 2");
357 return 0;
358 case 0:
359 return 0;
360 case 1:
361 return 1 << ELF::STO_PPC64_LOCAL_BIT;
362 case 4:
363 case 8:
364 case 16:
365 case 32:
366 case 64:
368 }
369 }
370};
371
372class PPCTargetMachOStreamer : public PPCTargetStreamer {
373public:
374 PPCTargetMachOStreamer(MCStreamer &S) : PPCTargetStreamer(S) {}
375
376 void emitTCEntry(const MCSymbol &S, PPCMCExpr::Specifier Kind) override {
377 llvm_unreachable("Unknown pseudo-op: .tc");
378 }
379
380 void emitMachine(StringRef CPU) override {
381 // FIXME: We should update the CPUType, CPUSubType in the Object file if
382 // the new values are different from the defaults.
383 }
384
385 void emitAbiVersion(int AbiVersion) override {
386 llvm_unreachable("Unknown pseudo-op: .abiversion");
387 }
388
389 void emitLocalEntry(MCSymbolELF *S, const MCExpr *LocalOffset) override {
390 llvm_unreachable("Unknown pseudo-op: .localentry");
391 }
392};
393
394class PPCTargetXCOFFStreamer : public PPCTargetStreamer {
395public:
396 PPCTargetXCOFFStreamer(MCStreamer &S) : PPCTargetStreamer(S) {}
397
398 void emitTCEntry(const MCSymbol &S, PPCMCExpr::Specifier Kind) override {
399 const MCAsmInfo *MAI = Streamer.getContext().getAsmInfo();
400 const unsigned PointerSize = MAI->getCodePointerSize();
401 Streamer.emitValueToAlignment(Align(PointerSize));
402 Streamer.emitValue(MCSymbolRefExpr::create(&S, Kind, Streamer.getContext()),
403 PointerSize);
404 }
405
406 void emitMachine(StringRef CPU) override {
407 static_cast<XCOFFObjectWriter &>(Streamer.getAssemblerPtr()->getWriter())
408 .setCPU(CPU);
409 }
410
411 void emitAbiVersion(int AbiVersion) override {
412 llvm_unreachable("ABI-version pseudo-ops are invalid for XCOFF.");
413 }
414
415 void emitLocalEntry(MCSymbolELF *S, const MCExpr *LocalOffset) override {
416 llvm_unreachable("Local-entry pseudo-ops are invalid for XCOFF.");
417 }
418};
419
420} // end anonymous namespace
421
424 MCInstPrinter *InstPrint) {
425 return new PPCTargetAsmStreamer(S, OS);
426}
427
429 return new PPCTargetStreamer(S);
430}
431
432static MCTargetStreamer *
434 const Triple &TT = STI.getTargetTriple();
435 if (TT.isOSBinFormatELF())
436 return new PPCTargetELFStreamer(S);
437 if (TT.isOSBinFormatXCOFF())
438 return new PPCTargetXCOFFStreamer(S);
439 return new PPCTargetMachOStreamer(S);
440}
441
443 unsigned SyntaxVariant,
444 const MCAsmInfo &MAI,
445 const MCInstrInfo &MII,
446 const MCRegisterInfo &MRI) {
447 return new PPCInstPrinter(MAI, MII, MRI, T);
448}
449
450namespace {
451
452class PPCMCInstrAnalysis : public MCInstrAnalysis {
453public:
454 explicit PPCMCInstrAnalysis(const MCInstrInfo *Info)
456
457 bool evaluateBranch(const MCInst &Inst, uint64_t Addr, uint64_t Size,
458 uint64_t &Target) const override {
459 unsigned NumOps = Inst.getNumOperands();
460 if (NumOps == 0 ||
461 Info->get(Inst.getOpcode()).operands()[NumOps - 1].OperandType !=
463 return false;
464 Target = Addr + Inst.getOperand(NumOps - 1).getImm() * Size;
465 return true;
466 }
467};
468
469} // end anonymous namespace
470
472 return new PPCMCInstrAnalysis(Info);
473}
474
479 // Register the MC asm info.
481
482 // Register the MC instruction info.
484
485 // Register the MC register info.
487
488 // Register the MC subtarget info.
490
491 // Register the MC instruction analyzer.
493
494 // Register the MC Code Emitter
496
497 // Register the asm backend.
499
500 // Register the elf streamer.
502
503 // Register the XCOFF streamer.
505
506 // Register the object target streamer.
509
510 // Register the asm target streamer.
512
513 // Register the null target streamer.
515
516 // Register the MCInstPrinter.
518 }
519}
unsigned const MachineRegisterInfo * MRI
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
#define LLVM_ABI
Definition: Compiler.h:213
#define LLVM_EXTERNAL_VISIBILITY
Definition: Compiler.h:132
uint64_t Addr
uint64_t Size
std::optional< std::vector< StOtherPiece > > Other
Definition: ELFYAML.cpp:1328
Symbol * Sym
Definition: ELF_riscv.cpp:479
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
#define RegName(no)
static LVOptions Options
Definition: LVOptions.cpp:25
static MCTargetStreamer * createNullTargetStreamer(MCStreamer &S)
static MCTargetStreamer * createAsmTargetStreamer(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint)
static MCInstPrinter * createPPCMCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
static MCTargetStreamer * createObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCTargetMC()
static MCInstrAnalysis * createPPCMCInstrAnalysis(const MCInstrInfo *Info)
static MCAsmInfo * createPPCMCAsmInfo(const MCRegisterInfo &MRI, const Triple &TheTriple, const MCTargetOptions &Options)
static MCSubtargetInfo * createPPCMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
static MCRegisterInfo * createPPCMCRegisterInfo(const Triple &TT)
static MCInstrInfo * createPPCMCInstrInfo()
SI optimize exec mask operations pre RA
raw_pwrite_stream & OS
This file defines the SmallPtrSet class.
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:64
void addInitialFrameState(const MCCFIInstruction &Inst)
Definition: MCAsmInfo.cpp:74
void printExpr(raw_ostream &, const MCExpr &) const
Definition: MCAsmInfo.cpp:153
unsigned getCodePointerSize() const
Get the code pointer size in bytes.
Definition: MCAsmInfo.h:443
MCContext & getContext() const
Definition: MCAssembler.h:169
static MCCFIInstruction cfiDefCfa(MCSymbol *L, unsigned Register, int64_t Offset, SMLoc Loc={})
.cfi_def_cfa defines a rule for computing CFA as: take address from Register and add Offset to it.
Definition: MCDwarf.h:585
LLVM_ABI void reportError(SMLoc L, const Twine &Msg)
Definition: MCContext.cpp:1115
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:34
SMLoc getLoc() const
Definition: MCExpr.h:86
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Definition: MCInstPrinter.h:46
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:188
unsigned getNumOperands() const
Definition: MCInst.h:212
unsigned getOpcode() const
Definition: MCInst.h:202
const MCOperand & getOperand(unsigned i) const
Definition: MCInst.h:210
Describe properties that are true of each instruction in the target description file.
Definition: MCInstrDesc.h:199
Interface to description of machine instruction set.
Definition: MCInstrInfo.h:27
void emitValueToAlignment(Align Alignment, int64_t Fill=0, uint8_t FillLen=1, unsigned MaxBytesToEmit=0) override
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
int64_t getImm() const
Definition: MCInst.h:84
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Wrapper class representing physical registers. Should be passed by value.
Definition: MCRegister.h:33
Streaming machine code generation interface.
Definition: MCStreamer.h:220
Generic base class for all target subtargets.
const Triple & getTargetTriple() const
unsigned getOther() const
void setOther(unsigned Other)
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx, SMLoc Loc=SMLoc())
Definition: MCExpr.h:214
StringRef getSymbolTableName() const
Definition: MCSymbolXCOFF.h:68
bool hasRename() const
Definition: MCSymbolXCOFF.h:61
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:42
LLVM_ABI void print(raw_ostream &OS, const MCAsmInfo *MAI) const
print - Print the value to the stream OS.
Definition: MCSymbol.cpp:59
StringRef getName() const
getName - Get the symbol name.
Definition: MCSymbol.h:188
Target specific streamer interface.
Definition: MCStreamer.h:93
~PPCTargetStreamer() override
PPCTargetStreamer(MCStreamer &S)
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
Definition: SmallPtrSet.h:541
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:47
ArchType getArch() const
Get the parsed architecture type of this triple.
Definition: Triple.h:408
bool isOSBinFormatXCOFF() const
Tests whether the OS uses the XCOFF binary format.
Definition: Triple.h:789
LLVM Value Representation.
Definition: Value.h:75
formatted_raw_ostream - A raw_ostream that wraps another one and keeps track of line and column posit...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ C
The default llvm calling convention, compatible with C.
Definition: CallingConv.h:34
@ STO_PPC64_LOCAL_MASK
Definition: ELF.h:424
@ STO_PPC64_LOCAL_BIT
Definition: ELF.h:423
@ EF_PPC64_ABI
Definition: ELF.h:418
const char * stripRegisterPrefix(const char *RegName)
stripRegisterPrefix - This method strips the character prefix from a register name so that only the n...
static bool isVRRegister(unsigned Reg)
MCRegister getRegNumForOperand(const MCInstrDesc &Desc, MCRegister Reg, unsigned OpNo)
getRegNumForOperand - some operands use different numbering schemes for the same registers.
static bool isVFRegister(unsigned Reg)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Offset
Definition: DWP.cpp:477
Target & getThePPC64LETarget()
Target & getThePPC32Target()
MCAsmBackend * createPPCAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
unsigned Log2_32(uint32_t Value)
Return the floor log base 2 of the specified value, -1 if the value is zero.
Definition: MathExtras.h:336
MCStreamer * createPPCXCOFFStreamer(const Triple &, MCContext &, std::unique_ptr< MCAsmBackend > &&MAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&Emitter)
@ Ref
The access may reference the value stored in memory.
Target & getThePPC64Target()
MCCodeEmitter * createPPCMCCodeEmitter(const MCInstrInfo &MCII, MCContext &Ctx)
Target & getThePPC32LETarget()
MCStreamer * createPPCELFStreamer(const Triple &, MCContext &, std::unique_ptr< MCAsmBackend > &&MAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&Emitter)
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
Description of the encoding of one expression Op.
RegisterMCAsmInfoFn - Helper template for registering a target assembly info implementation.
static void RegisterMCRegInfo(Target &T, Target::MCRegInfoCtorFnTy Fn)
RegisterMCRegInfo - Register a MCRegisterInfo implementation for the given target.
static void RegisterMCAsmBackend(Target &T, Target::MCAsmBackendCtorTy Fn)
RegisterMCAsmBackend - Register a MCAsmBackend implementation for the given target.
static void RegisterXCOFFStreamer(Target &T, Target::XCOFFStreamerCtorTy Fn)
static void RegisterMCCodeEmitter(Target &T, Target::MCCodeEmitterCtorTy Fn)
RegisterMCCodeEmitter - Register a MCCodeEmitter implementation for the given target.
static void RegisterMCSubtargetInfo(Target &T, Target::MCSubtargetInfoCtorFnTy Fn)
RegisterMCSubtargetInfo - Register a MCSubtargetInfo implementation for the given target.
static void RegisterObjectTargetStreamer(Target &T, Target::ObjectTargetStreamerCtorTy Fn)
static void RegisterMCInstrAnalysis(Target &T, Target::MCInstrAnalysisCtorFnTy Fn)
RegisterMCInstrAnalysis - Register a MCInstrAnalysis implementation for the given target.
static void RegisterELFStreamer(Target &T, Target::ELFStreamerCtorTy Fn)
static void RegisterNullTargetStreamer(Target &T, Target::NullTargetStreamerCtorTy Fn)
static void RegisterMCInstPrinter(Target &T, Target::MCInstPrinterCtorTy Fn)
RegisterMCInstPrinter - Register a MCInstPrinter implementation for the given target.
static void RegisterMCInstrInfo(Target &T, Target::MCInstrInfoCtorFnTy Fn)
RegisterMCInstrInfo - Register a MCInstrInfo implementation for the given target.
static void RegisterAsmTargetStreamer(Target &T, Target::AsmTargetStreamerCtorTy Fn)