LLVM: lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

53#include

54#include

55#include

56#include

57

58using namespace llvm;

59

62 "Invalid personality index");

63 return (Twine("__aeabi_unwind_cpp_pr") + Twine(Index)).str();

64}

65

66namespace {

67

68class ARMELFStreamer;

69

71 formatted_raw_ostream &OS;

72 MCInstPrinter &InstPrinter;

73 bool IsVerboseAsm;

74

75 void emitFnStart() override;

76 void emitFnEnd() override;

77 void emitCantUnwind() override;

78 void emitPersonality(const MCSymbol *Personality) override;

79 void emitPersonalityIndex(unsigned Index) override;

80 void emitHandlerData() override;

81 void emitSetFP(MCRegister FpReg, MCRegister SpReg,

82 int64_t Offset = 0) override;

83 void emitMovSP(MCRegister Reg, int64_t Offset = 0) override;

84 void emitPad(int64_t Offset) override;

85 void emitRegSave(const SmallVectorImpl &RegList,

86 bool isVector) override;

87 void emitUnwindRaw(int64_t Offset,

88 const SmallVectorImpl<uint8_t> &Opcodes) override;

89

90 void switchVendor(StringRef Vendor) override;

91 void emitAttribute(unsigned Attribute, unsigned Value) override;

92 void emitTextAttribute(unsigned Attribute, StringRef String) override;

93 void emitIntTextAttribute(unsigned Attribute, unsigned IntValue,

94 StringRef StringValue) override;

96 void emitArchExtension(uint64_t ArchExt) override;

99 void emitInst(uint32_t Inst, char Suffix = '\0') override;

100 void finishAttributeSection() override;

101

102 void annotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE) override;

103 void emitSyntaxUnified() override;

104 void emitCode16() override;

105 void emitCode32() override;

106 void emitThumbFunc(MCSymbol *Symbol) override;

107 void emitThumbSet(MCSymbol *Symbol, const MCExpr *Value) override;

108

109 void emitARMWinCFIAllocStack(unsigned Size, bool Wide) override;

110 void emitARMWinCFISaveRegMask(unsigned Mask, bool Wide) override;

111 void emitARMWinCFISaveSP(unsigned Reg) override;

112 void emitARMWinCFISaveFRegs(unsigned First, unsigned Last) override;

113 void emitARMWinCFISaveLR(unsigned Offset) override;

114 void emitARMWinCFIPrologEnd(bool Fragment) override;

115 void emitARMWinCFINop(bool Wide) override;

116 void emitARMWinCFIEpilogStart(unsigned Condition) override;

117 void emitARMWinCFIEpilogEnd() override;

118 void emitARMWinCFICustom(unsigned Opcode) override;

119

120public:

121 ARMTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS,

122 MCInstPrinter &InstPrinter);

123};

124

125ARMTargetAsmStreamer::ARMTargetAsmStreamer(MCStreamer &S,

129 IsVerboseAsm(S.isVerboseAsm()) {}

130

131void ARMTargetAsmStreamer::emitFnStart() { OS << "\t.fnstart\n"; }

132void ARMTargetAsmStreamer::emitFnEnd() { OS << "\t.fnend\n"; }

133void ARMTargetAsmStreamer::emitCantUnwind() { OS << "\t.cantunwind\n"; }

134

135void ARMTargetAsmStreamer::emitPersonality(const MCSymbol *Personality) {

136 OS << "\t.personality " << Personality->getName() << '\n';

137}

138

139void ARMTargetAsmStreamer::emitPersonalityIndex(unsigned Index) {

140 OS << "\t.personalityindex " << Index << '\n';

141}

142

143void ARMTargetAsmStreamer::emitHandlerData() { OS << "\t.handlerdata\n"; }

144

145void ARMTargetAsmStreamer::emitSetFP(MCRegister FpReg, MCRegister SpReg,

147 OS << "\t.setfp\t";

149 OS << ", ";

152 OS << ", #" << Offset;

153 OS << '\n';

154}

155

156void ARMTargetAsmStreamer::emitMovSP(MCRegister Reg, int64_t Offset) {

158 "the operand of .movsp cannot be either sp or pc");

159

160 OS << "\t.movsp\t";

163 OS << ", #" << Offset;

164 OS << '\n';

165}

166

167void ARMTargetAsmStreamer::emitPad(int64_t Offset) {

168 OS << "\t.pad\t#" << Offset << '\n';

169}

170

171void ARMTargetAsmStreamer::emitRegSave(

172 const SmallVectorImpl &RegList, bool isVector) {

173 assert(RegList.size() && "RegList should not be empty");

174 if (isVector)

175 OS << "\t.vsave\t{";

176 else

177 OS << "\t.save\t{";

178

180

181 for (unsigned i = 1, e = RegList.size(); i != e; ++i) {

182 OS << ", ";

184 }

185

186 OS << "}\n";

187}

188

189void ARMTargetAsmStreamer::switchVendor(StringRef Vendor) {}

190

191void ARMTargetAsmStreamer::emitAttribute(unsigned Attribute, unsigned Value) {

192 OS << "\t.eabi_attribute\t" << Attribute << ", " << Twine(Value);

193 if (IsVerboseAsm) {

196 if (Name.empty())

197 OS << "\t@ " << Name;

198 }

199 OS << "\n";

200}

201

202void ARMTargetAsmStreamer::emitTextAttribute(unsigned Attribute,

206 OS << "\t.cpu\t" << String.lower();

207 break;

208 default:

209 OS << "\t.eabi_attribute\t" << Attribute << ", \"";

212 else

214 OS << "\"";

215 if (IsVerboseAsm) {

218 if (Name.empty())

219 OS << "\t@ " << Name;

220 }

221 break;

222 }

223 OS << "\n";

224}

225

226void ARMTargetAsmStreamer::emitIntTextAttribute(unsigned Attribute,

227 unsigned IntValue,

228 StringRef StringValue) {

230 default: llvm_unreachable("unsupported multi-value attribute in asm mode");

232 OS << "\t.eabi_attribute\t" << Attribute << ", " << IntValue;

233 if (!StringValue.empty())

234 OS << ", \"" << StringValue << "\"";

235 if (IsVerboseAsm)

236 OS << "\t@ "

239 break;

240 }

241 OS << "\n";

242}

243

244void ARMTargetAsmStreamer::emitArch(ARM::ArchKind Arch) {

246}

247

248void ARMTargetAsmStreamer::emitArchExtension(uint64_t ArchExt) {

250}

251

252void ARMTargetAsmStreamer::emitObjectArch(ARM::ArchKind Arch) {

254}

255

256void ARMTargetAsmStreamer::emitFPU(ARM::FPUKind FPU) {

258}

259

260void ARMTargetAsmStreamer::finishAttributeSection() {}

261

262void ARMTargetAsmStreamer::annotateTLSDescriptorSequence(

263 const MCSymbolRefExpr *S) {

265}

266

267void ARMTargetAsmStreamer::emitSyntaxUnified() { OS << "\t.syntax\tunified\n"; }

268

269void ARMTargetAsmStreamer::emitCode16() { OS << "\t.code\t16\n"; }

270

271void ARMTargetAsmStreamer::emitCode32() { OS << "\t.code\t32\n"; }

272

273void ARMTargetAsmStreamer::emitThumbFunc(MCSymbol *Symbol) {

274 const MCAsmInfo *MAI = Streamer.getContext().getAsmInfo();

275 OS << "\t.thumb_func";

276

278 OS << '\t';

279 Symbol->print(OS, MAI);

280 }

281 OS << '\n';

282}

283

284void ARMTargetAsmStreamer::emitThumbSet(MCSymbol *Symbol, const MCExpr *Value) {

285 const MCAsmInfo *MAI = Streamer.getContext().getAsmInfo();

286

287 OS << "\t.thumb_set\t";

288 Symbol->print(OS, MAI);

289 OS << ", ";

291 OS << '\n';

292}

293

294void ARMTargetAsmStreamer::emitInst(uint32_t Inst, char Suffix) {

295 OS << "\t.inst";

296 if (Suffix)

297 OS << "." << Suffix;

299}

300

301void ARMTargetAsmStreamer::emitUnwindRaw(int64_t Offset,

302 const SmallVectorImpl<uint8_t> &Opcodes) {

303 OS << "\t.unwind_raw " << Offset;

304 for (uint8_t Opcode : Opcodes)

306 OS << '\n';

307}

308

309void ARMTargetAsmStreamer::emitARMWinCFIAllocStack(unsigned Size, bool Wide) {

310 if (Wide)

311 OS << "\t.seh_stackalloc_w\t" << Size << "\n";

312 else

313 OS << "\t.seh_stackalloc\t" << Size << "\n";

314}

315

316static void printRegs(formatted_raw_ostream &OS, ListSeparator &LS, int First,

319 OS << LS << "r" << First << "-r" << Last;

320 else

321 OS << LS << "r" << First;

322}

323

324void ARMTargetAsmStreamer::emitARMWinCFISaveRegMask(unsigned Mask, bool Wide) {

325 if (Wide)

326 OS << "\t.seh_save_regs_w\t";

327 else

328 OS << "\t.seh_save_regs\t";

329 ListSeparator LS;

331 OS << "{";

332 for (int I = 0; I <= 12; I++) {

333 if (Mask & (1 << I)) {

336 } else {

337 if (First >= 0) {

338 printRegs(OS, LS, First, I - 1);

340 }

341 }

342 }

344 printRegs(OS, LS, First, 12);

345 if (Mask & (1 << 14))

346 OS << LS << "lr";

347 OS << "}\n";

348}

349

350void ARMTargetAsmStreamer::emitARMWinCFISaveSP(unsigned Reg) {

351 OS << "\t.seh_save_sp\tr" << Reg << "\n";

352}

353

354void ARMTargetAsmStreamer::emitARMWinCFISaveFRegs(unsigned First,

355 unsigned Last) {

357 OS << "\t.seh_save_fregs\t{d" << First << "-d" << Last << "}\n";

358 else

359 OS << "\t.seh_save_fregs\t{d" << First << "}\n";

360}

361

362void ARMTargetAsmStreamer::emitARMWinCFISaveLR(unsigned Offset) {

363 OS << "\t.seh_save_lr\t" << Offset << "\n";

364}

365

366void ARMTargetAsmStreamer::emitARMWinCFIPrologEnd(bool Fragment) {

367 if (Fragment)

368 OS << "\t.seh_endprologue_fragment\n";

369 else

370 OS << "\t.seh_endprologue\n";

371}

372

373void ARMTargetAsmStreamer::emitARMWinCFINop(bool Wide) {

374 if (Wide)

375 OS << "\t.seh_nop_w\n";

376 else

377 OS << "\t.seh_nop\n";

378}

379

380void ARMTargetAsmStreamer::emitARMWinCFIEpilogStart(unsigned Condition) {

382 OS << "\t.seh_startepilogue\n";

383 else

384 OS << "\t.seh_startepilogue_cond\t"

386}

387

388void ARMTargetAsmStreamer::emitARMWinCFIEpilogEnd() {

389 OS << "\t.seh_endepilogue\n";

390}

391

392void ARMTargetAsmStreamer::emitARMWinCFICustom(unsigned Opcode) {

393 int I;

394 for (I = 3; I > 0; I--)

395 if (Opcode & (0xffu << (8 * I)))

396 break;

397 ListSeparator LS;

398 OS << "\t.seh_custom\t";

399 for (; I >= 0; I--)

400 OS << LS << ((Opcode >> (8 * I)) & 0xff);

401 OS << "\n";

402}

403

404class ARMTargetELFStreamer : public ARMTargetStreamer {

405private:

406 StringRef CurrentVendor;

409 ARM::ArchKind EmittedArch = ARM::ArchKind::INVALID;

410

411 MCSection *AttributeSection = nullptr;

412

413 void emitArchDefaultAttributes();

414 void emitFPUDefaultAttributes();

415

416 ARMELFStreamer &getStreamer();

417

418 void emitFnStart() override;

419 void emitFnEnd() override;

420 void emitCantUnwind() override;

421 void emitPersonality(const MCSymbol *Personality) override;

422 void emitPersonalityIndex(unsigned Index) override;

423 void emitHandlerData() override;

424 void emitSetFP(MCRegister FpReg, MCRegister SpReg,

425 int64_t Offset = 0) override;

426 void emitMovSP(MCRegister Reg, int64_t Offset = 0) override;

427 void emitPad(int64_t Offset) override;

428 void emitRegSave(const SmallVectorImpl &RegList,

429 bool isVector) override;

430 void emitUnwindRaw(int64_t Offset,

431 const SmallVectorImpl<uint8_t> &Opcodes) override;

432

433 void switchVendor(StringRef Vendor) override;

434 void emitAttribute(unsigned Attribute, unsigned Value) override;

435 void emitTextAttribute(unsigned Attribute, StringRef String) override;

436 void emitIntTextAttribute(unsigned Attribute, unsigned IntValue,

437 StringRef StringValue) override;

439 void emitObjectArch(ARM::ArchKind Arch) override;

441 void emitInst(uint32_t Inst, char Suffix = '\0') override;

442 void finishAttributeSection() override;

443 void emitLabel(MCSymbol *Symbol) override;

444

445 void annotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE) override;

446 void emitCode16() override;

447 void emitCode32() override;

448 void emitThumbFunc(MCSymbol *Symbol) override;

449 void emitThumbSet(MCSymbol *Symbol, const MCExpr *Value) override;

450

451

452 void reset() override;

453

454 void finish() override;

455

456public:

457 ARMTargetELFStreamer(MCStreamer &S)

458 : ARMTargetStreamer(S), CurrentVendor("aeabi") {}

459};

460

461

462

463

464

465

466

467

468

469

470

471

472

473class ARMELFStreamer : public MCELFStreamer {

474public:

475 friend class ARMTargetELFStreamer;

476

477 ARMELFStreamer(MCContext &Context, std::unique_ptr TAB,

478 std::unique_ptr OW,

479 std::unique_ptr Emitter, bool IsThumb,

480 bool IsAndroid)

483 IsThumb(IsThumb), IsAndroid(IsAndroid) {

484 EHReset();

485 }

486

487 ~ARMELFStreamer() override = default;

488

489

490 void emitFnStart();

491 void emitFnEnd();

492 void emitCantUnwind();

493 void emitPersonality(const MCSymbol *Per);

494 void emitPersonalityIndex(unsigned index);

495 void emitHandlerData();

496 void emitSetFP(MCRegister NewFpReg, MCRegister NewSpReg, int64_t Offset = 0);

497 void emitMovSP(MCRegister Reg, int64_t Offset = 0);

498 void emitPad(int64_t Offset);

499 void emitRegSave(const SmallVectorImpl &RegList, bool isVector);

500 void emitUnwindRaw(int64_t Offset, const SmallVectorImpl<uint8_t> &Opcodes);

501 void emitFill(const MCExpr &NumBytes, uint64_t FillValue,

502 SMLoc Loc) override {

503 emitDataMappingSymbol();

505 }

506

507 void changeSection(MCSection *Section, uint32_t Subsection) override {

508 LastMappingSymbols[getCurrentSection().first] = std::move(LastEMSInfo);

510 auto LastMappingSymbol = LastMappingSymbols.find(Section);

511 if (LastMappingSymbol != LastMappingSymbols.end()) {

512 LastEMSInfo = std::move(LastMappingSymbol->second);

513 return;

514 }

515 LastEMSInfo.reset(new ElfMappingSymbolInfo);

516 }

517

518

519

520

522 const MCSubtargetInfo &STI) override {

523 if (IsThumb)

524 EmitThumbMappingSymbol();

525 else

526 EmitARMMappingSymbol();

527

528 MCELFStreamer::emitInstruction(Inst, STI);

529 }

530

531 void emitInst(uint32_t Inst, char Suffix) {

532 unsigned Size;

533 char Buffer[4];

534 const bool LittleEndian = getContext().getAsmInfo()->isLittleEndian();

535

536 switch (Suffix) {

537 case '\0':

539

541 EmitARMMappingSymbol();

542 for (unsigned II = 0, IE = Size; II != IE; II++) {

543 const unsigned I = LittleEndian ? (Size - II - 1) : II;

544 Buffer[Size - II - 1] = uint8_t(Inst >> I * CHAR_BIT);

545 }

546

547 break;

548 case 'n':

549 case 'w':

550 Size = (Suffix == 'n' ? 2 : 4);

551

553 EmitThumbMappingSymbol();

554

555

556 for (unsigned II = 0, IE = Size; II != IE; II = II + 2) {

557 const unsigned I0 = LittleEndian ? II + 0 : II + 1;

558 const unsigned I1 = LittleEndian ? II + 1 : II + 0;

559 Buffer[Size - II - 2] = uint8_t(Inst >> I0 * CHAR_BIT);

560 Buffer[Size - II - 1] = uint8_t(Inst >> I1 * CHAR_BIT);

561 }

562

563 break;

564 default:

566 }

567

568 MCELFStreamer::emitBytes(StringRef(Buffer, Size));

569 }

570

571

572

573

574 void emitBytes(StringRef Data) override {

575 emitDataMappingSymbol();

576 MCELFStreamer::emitBytes(Data);

577 }

578

579 void FlushPendingMappingSymbol() {

580 if (!LastEMSInfo->hasInfo())

581 return;

582 ElfMappingSymbolInfo *EMS = LastEMSInfo.get();

583 emitMappingSymbol("$d", *EMS->F, EMS->Offset);

584 EMS->resetInfo();

585 }

586

587

588

589

590 void emitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc) override {

593 getContext().reportError(Loc, "relocated expression must be 32-bit");

594 return;

595 }

596 getCurrentFragment();

597 }

598

599 emitDataMappingSymbol();

600 MCELFStreamer::emitValueImpl(Value, Size, Loc);

601 }

602

603

604

605

606

607

608

609

610

613

614 if (!IsThumb)

615 return Val;

616

620 getAssembler().setIsThumbFunc(Symbol);

621

622 return Val;

623 };

624

625 void setIsThumb(bool Val) { IsThumb = Val; }

626

627private:

628 enum ElfMappingSymbol {

629 EMS_None,

630 EMS_ARM,

631 EMS_Thumb,

632 EMS_Data

633 };

634

635 struct ElfMappingSymbolInfo {

636 void resetInfo() {

637 F = nullptr;

639 }

640 bool hasInfo() { return F != nullptr; }

641 MCFragment *F = nullptr;

643 ElfMappingSymbol State = EMS_None;

644 };

645

646 void emitDataMappingSymbol() {

647 if (LastEMSInfo->State == EMS_Data)

648 return;

649 else if (LastEMSInfo->State == EMS_None) {

650

651

652 ElfMappingSymbolInfo *EMS = LastEMSInfo.get();

653 auto *DF = getCurrentFragment();

655 return;

656 EMS->F = DF;

657 EMS->Offset = DF->getFixedSize();

658 LastEMSInfo->State = EMS_Data;

659 return;

660 }

661 EmitMappingSymbol("$d");

662 LastEMSInfo->State = EMS_Data;

663 }

664

665 void EmitThumbMappingSymbol() {

666 if (LastEMSInfo->State == EMS_Thumb)

667 return;

668 FlushPendingMappingSymbol();

669 EmitMappingSymbol("$t");

670 LastEMSInfo->State = EMS_Thumb;

671 }

672

673 void EmitARMMappingSymbol() {

674 if (LastEMSInfo->State == EMS_ARM)

675 return;

676 FlushPendingMappingSymbol();

677 EmitMappingSymbol("$a");

678 LastEMSInfo->State = EMS_ARM;

679 }

680

681 void EmitMappingSymbol(StringRef Name) {

683 static_cast<MCSymbolELF *>(getContext().createLocalSymbol(Name));

684 emitLabel(Symbol);

685

688 }

689

690 void emitMappingSymbol(StringRef Name, MCFragment &F, uint64_t Offset) {

692 static_cast<MCSymbolELF *>(getContext().createLocalSymbol(Name));

693 emitLabelAtPos(Symbol, SMLoc(), F, Offset);

696 }

697

698

699 void EHReset();

700

701

702 void reset() override;

703

704 void EmitPersonalityFixup(StringRef Name);

705 void FlushPendingOffset();

706 void FlushUnwindOpcodes(bool NoHandlerData);

707

708 void SwitchToEHSection(StringRef Prefix, unsigned Type, unsigned Flags,

709 SectionKind Kind, const MCSymbol &Fn);

710 void SwitchToExTabSection(const MCSymbol &FnStart);

711 void SwitchToExIdxSection(const MCSymbol &FnStart);

712

713 bool IsThumb;

714 bool IsAndroid;

715

716 DenseMap<const MCSection *, std::unique_ptr>

717 LastMappingSymbols;

718

719 std::unique_ptr LastEMSInfo;

720

721

725 unsigned PersonalityIndex;

726 MCRegister FPReg;

727 int64_t FPOffset;

728 int64_t SPOffset;

729 int64_t PendingOffset;

730 bool UsedFP;

731 bool CantUnwind;

733 UnwindOpcodeAssembler UnwindOpAsm;

734};

735

736}

737

738ARMELFStreamer &ARMTargetELFStreamer::getStreamer() {

739 return static_cast<ARMELFStreamer &>(Streamer);

740}

741

742void ARMTargetELFStreamer::emitFnStart() { getStreamer().emitFnStart(); }

743void ARMTargetELFStreamer::emitFnEnd() { getStreamer().emitFnEnd(); }

744void ARMTargetELFStreamer::emitCantUnwind() { getStreamer().emitCantUnwind(); }

745

746void ARMTargetELFStreamer::emitPersonality(const MCSymbol *Personality) {

747 getStreamer().emitPersonality(Personality);

748}

749

750void ARMTargetELFStreamer::emitPersonalityIndex(unsigned Index) {

751 getStreamer().emitPersonalityIndex(Index);

752}

753

754void ARMTargetELFStreamer::emitHandlerData() {

755 getStreamer().emitHandlerData();

756}

757

758void ARMTargetELFStreamer::emitSetFP(MCRegister FpReg, MCRegister SpReg,

760 getStreamer().emitSetFP(FpReg, SpReg, Offset);

761}

762

763void ARMTargetELFStreamer::emitMovSP(MCRegister Reg, int64_t Offset) {

764 getStreamer().emitMovSP(Reg, Offset);

765}

766

767void ARMTargetELFStreamer::emitPad(int64_t Offset) {

768 getStreamer().emitPad(Offset);

769}

770

771void ARMTargetELFStreamer::emitRegSave(

772 const SmallVectorImpl &RegList, bool isVector) {

773 getStreamer().emitRegSave(RegList, isVector);

774}

775

776void ARMTargetELFStreamer::emitUnwindRaw(int64_t Offset,

777 const SmallVectorImpl<uint8_t> &Opcodes) {

778 getStreamer().emitUnwindRaw(Offset, Opcodes);

779}

780

781void ARMTargetELFStreamer::switchVendor(StringRef Vendor) {

782 assert(!Vendor.empty() && "Vendor cannot be empty.");

783

784 if (CurrentVendor == Vendor)

785 return;

786

787 if (!CurrentVendor.empty())

788 finishAttributeSection();

789

790 assert(getStreamer().Contents.empty() &&

791 ".ARM.attributes should be flushed before changing vendor");

792 CurrentVendor = Vendor;

793

794}

795

796void ARMTargetELFStreamer::emitAttribute(unsigned Attribute, unsigned Value) {

798 true);

799}

800

801void ARMTargetELFStreamer::emitTextAttribute(unsigned Attribute,

802 StringRef Value) {

804 true);

805}

806

807void ARMTargetELFStreamer::emitIntTextAttribute(unsigned Attribute,

808 unsigned IntValue,

809 StringRef StringValue) {

810 getStreamer().setAttributeItems(Attribute, IntValue, StringValue,

811 true);

812}

813

816}

817

819 EmittedArch = Value;

820}

821

822void ARMTargetELFStreamer::emitArchDefaultAttributes() {

823 using namespace ARMBuildAttrs;

824 ARMELFStreamer &S = getStreamer();

825

826 S.setAttributeItem(CPU_name, ARM::getCPUAttr(Arch), false);

827

828 if (EmittedArch == ARM::ArchKind::INVALID)

830 else

831 S.setAttributeItem(CPU_arch, ARM::getArchAttr(EmittedArch), false);

832

833 switch (Arch) {

834 case ARM::ArchKind::ARMV4:

835 S.setAttributeItem(ARM_ISA_use, Allowed, false);

836 break;

837

838 case ARM::ArchKind::ARMV4T:

839 case ARM::ArchKind::ARMV5T:

840 case ARM::ArchKind::XSCALE:

841 case ARM::ArchKind::ARMV5TE:

842 case ARM::ArchKind::ARMV6:

843 S.setAttributeItem(ARM_ISA_use, Allowed, false);

844 S.setAttributeItem(THUMB_ISA_use, Allowed, false);

845 break;

846

847 case ARM::ArchKind::ARMV6T2:

848 S.setAttributeItem(ARM_ISA_use, Allowed, false);

849 S.setAttributeItem(THUMB_ISA_use, AllowThumb32, false);

850 break;

851

852 case ARM::ArchKind::ARMV6K:

853 case ARM::ArchKind::ARMV6KZ:

854 S.setAttributeItem(ARM_ISA_use, Allowed, false);

855 S.setAttributeItem(THUMB_ISA_use, Allowed, false);

856 S.setAttributeItem(Virtualization_use, AllowTZ, false);

857 break;

858

859 case ARM::ArchKind::ARMV6M:

860 S.setAttributeItem(THUMB_ISA_use, Allowed, false);

861 break;

862

863 case ARM::ArchKind::ARMV7A:

864 S.setAttributeItem(CPU_arch_profile, ApplicationProfile, false);

865 S.setAttributeItem(ARM_ISA_use, Allowed, false);

866 S.setAttributeItem(THUMB_ISA_use, AllowThumb32, false);

867 break;

868

869 case ARM::ArchKind::ARMV7R:

870 S.setAttributeItem(CPU_arch_profile, RealTimeProfile, false);

871 S.setAttributeItem(ARM_ISA_use, Allowed, false);

872 S.setAttributeItem(THUMB_ISA_use, AllowThumb32, false);

873 break;

874

875 case ARM::ArchKind::ARMV7EM:

876 case ARM::ArchKind::ARMV7M:

877 S.setAttributeItem(CPU_arch_profile, MicroControllerProfile, false);

878 S.setAttributeItem(THUMB_ISA_use, AllowThumb32, false);

879 break;

880

881 case ARM::ArchKind::ARMV8A:

882 case ARM::ArchKind::ARMV8_1A:

883 case ARM::ArchKind::ARMV8_2A:

884 case ARM::ArchKind::ARMV8_3A:

885 case ARM::ArchKind::ARMV8_4A:

886 case ARM::ArchKind::ARMV8_5A:

887 case ARM::ArchKind::ARMV8_6A:

888 case ARM::ArchKind::ARMV8_7A:

889 case ARM::ArchKind::ARMV8_8A:

890 case ARM::ArchKind::ARMV8_9A:

891 case ARM::ArchKind::ARMV9A:

892 case ARM::ArchKind::ARMV9_1A:

893 case ARM::ArchKind::ARMV9_2A:

894 case ARM::ArchKind::ARMV9_3A:

895 case ARM::ArchKind::ARMV9_4A:

896 case ARM::ArchKind::ARMV9_5A:

897 case ARM::ArchKind::ARMV9_6A:

898 case ARM::ArchKind::ARMV9_7A:

899 S.setAttributeItem(CPU_arch_profile, ApplicationProfile, false);

900 S.setAttributeItem(ARM_ISA_use, Allowed, false);

901 S.setAttributeItem(THUMB_ISA_use, AllowThumb32, false);

902 S.setAttributeItem(MPextension_use, Allowed, false);

903 S.setAttributeItem(Virtualization_use, AllowTZVirtualization, false);

904 break;

905

906 case ARM::ArchKind::ARMV8MBaseline:

907 case ARM::ArchKind::ARMV8MMainline:

908 case ARM::ArchKind::ARMV8_1MMainline:

909 S.setAttributeItem(THUMB_ISA_use, AllowThumbDerived, false);

910 S.setAttributeItem(CPU_arch_profile, MicroControllerProfile, false);

911 break;

912

913 case ARM::ArchKind::IWMMXT:

914 S.setAttributeItem(ARM_ISA_use, Allowed, false);

915 S.setAttributeItem(THUMB_ISA_use, Allowed, false);

916 S.setAttributeItem(WMMX_arch, AllowWMMXv1, false);

917 break;

918

919 case ARM::ArchKind::IWMMXT2:

920 S.setAttributeItem(ARM_ISA_use, Allowed, false);

921 S.setAttributeItem(THUMB_ISA_use, Allowed, false);

922 S.setAttributeItem(WMMX_arch, AllowWMMXv2, false);

923 break;

924

925 default:

927 break;

928 }

929}

930

932

933void ARMTargetELFStreamer::emitFPUDefaultAttributes() {

934 ARMELFStreamer &S = getStreamer();

935

936 switch (FPU) {

937 case ARM::FK_VFP:

938 case ARM::FK_VFPV2:

940 false);

941 break;

942

943 case ARM::FK_VFPV3:

945 false);

946 break;

947

948 case ARM::FK_VFPV3_FP16:

950 false);

952 false);

953 break;

954

955 case ARM::FK_VFPV3_D16:

957 false);

958 break;

959

960 case ARM::FK_VFPV3_D16_FP16:

962 false);

964 false);

965 break;

966

967 case ARM::FK_VFPV3XD:

969 false);

970 break;

971 case ARM::FK_VFPV3XD_FP16:

973 false);

975 false);

976 break;

977

978 case ARM::FK_VFPV4:

980 false);

981 break;

982

983

984

985 case ARM::FK_FPV4_SP_D16:

986 case ARM::FK_VFPV4_D16:

988 false);

989 break;

990

991 case ARM::FK_FP_ARMV8:

993 false);

994 break;

995

996

997

998 case ARM::FK_FPV5_SP_D16:

999 case ARM::FK_FPV5_D16:

1000

1001

1002 case ARM::FK_FP_ARMV8_FULLFP16_SP_D16:

1003 case ARM::FK_FP_ARMV8_FULLFP16_D16:

1005 false);

1006 break;

1007

1008 case ARM::FK_NEON:

1010 false);

1013 false);

1014 break;

1015

1016 case ARM::FK_NEON_FP16:

1018 false);

1021 false);

1023 false);

1024 break;

1025

1026 case ARM::FK_NEON_VFPV4:

1028 false);

1031 false);

1032 break;

1033

1034 case ARM::FK_NEON_FP_ARMV8:

1035 case ARM::FK_CRYPTO_NEON_FP_ARMV8:

1037 false);

1038

1039

1040 break;

1041

1042 case ARM::FK_SOFTVFP:

1043 case ARM::FK_NONE:

1044 break;

1045

1046 default:

1048 break;

1049 }

1050}

1051

1052void ARMTargetELFStreamer::finishAttributeSection() {

1053 ARMELFStreamer &S = getStreamer();

1054

1055 if (FPU != ARM::FK_INVALID)

1056 emitFPUDefaultAttributes();

1057

1058 if (Arch != ARM::ArchKind::INVALID)

1059 emitArchDefaultAttributes();

1060

1061 if (S.Contents.empty())

1062 return;

1063

1064 auto LessTag = [](const MCELFStreamer::AttributeItem &LHS,

1065 const MCELFStreamer::AttributeItem &RHS) -> bool {

1066

1067

1068

1069

1070

1071

1072

1073

1074

1075

1076

1079 };

1081

1082 S.emitAttributesSection(CurrentVendor, ".ARM.attributes",

1084

1085 FPU = ARM::FK_INVALID;

1086}

1087

1088void ARMTargetELFStreamer::emitLabel(MCSymbol *Symbol) {

1089 ARMELFStreamer &Streamer = getStreamer();

1090 if (!Streamer.IsThumb)

1091 return;

1092

1093 Streamer.getAssembler().registerSymbol(*Symbol);

1096 emitThumbFunc(Symbol);

1097}

1098

1099void ARMTargetELFStreamer::annotateTLSDescriptorSequence(

1100 const MCSymbolRefExpr *Expr) {

1101 getStreamer().addFixup(Expr, FK_Data_4);

1102}

1103

1104void ARMTargetELFStreamer::emitCode16() { getStreamer().setIsThumb(true); }

1105

1106void ARMTargetELFStreamer::emitCode32() { getStreamer().setIsThumb(false); }

1107

1108void ARMTargetELFStreamer::emitThumbFunc(MCSymbol *Symbol) {

1109 getStreamer().getAssembler().setIsThumbFunc(Symbol);

1111}

1112

1113void ARMTargetELFStreamer::emitThumbSet(MCSymbol *Symbol, const MCExpr *Value) {

1115 const MCSymbol &Sym = SRE->getSymbol();

1117 getStreamer().emitAssignment(Symbol, Value);

1118 return;

1119 }

1120 }

1121

1122 emitThumbFunc(Symbol);

1123 getStreamer().emitAssignment(Symbol, Value);

1124}

1125

1126void ARMTargetELFStreamer::emitInst(uint32_t Inst, char Suffix) {

1127 getStreamer().emitInst(Inst, Suffix);

1128}

1129

1130void ARMTargetELFStreamer::reset() { AttributeSection = nullptr; }

1131

1132void ARMTargetELFStreamer::finish() {

1133 ARMTargetStreamer::finish();

1134 finishAttributeSection();

1135

1136

1137

1138

1139

1140

1142 auto &Asm = getStreamer().getAssembler();

1143 if (any_of(Asm, [](const MCSection &Sec) {

1144 return static_cast<const MCSectionELF &>(Sec).getFlags() &

1146 })) {

1147 auto *Text =

1148 static_cast<MCSectionELF *>(Ctx.getObjectFileInfo()->getTextSection());

1149 for (auto &F : *Text)

1150 if (F.getSize())

1151 return;

1153 }

1154}

1155

1156void ARMELFStreamer::reset() {

1157 MCTargetStreamer &TS = *getTargetStreamer();

1158 ARMTargetStreamer &ATS = static_cast<ARMTargetStreamer &>(TS);

1161 LastMappingSymbols.clear();

1162 LastEMSInfo.reset();

1163

1164

1165

1167}

1168

1169inline void ARMELFStreamer::SwitchToEHSection(StringRef Prefix,

1170 unsigned Type,

1171 unsigned Flags,

1172 SectionKind Kind,

1173 const MCSymbol &Fn) {

1174 const MCSectionELF &FnSection =

1175 static_cast<const MCSectionELF &>(Fn.getSection());

1176

1177

1178 StringRef FnSecName(FnSection.getName());

1179 SmallString<128> EHSecName(Prefix);

1180 if (FnSecName != ".text") {

1181 EHSecName += FnSecName;

1182 }

1183

1184

1185 const MCSymbolELF *Group = FnSection.getGroup();

1186 if (Group)

1188 MCSectionELF *EHSection = getContext().getELFSection(

1189 EHSecName, Type, Flags, 0, Group, true,

1191 static_cast<const MCSymbolELF *>(FnSection.getBeginSymbol()));

1192

1193 assert(EHSection && "Failed to get the required EH section");

1194

1195

1196 switchSection(EHSection);

1197 emitValueToAlignment(Align(4), 0, 1, 0);

1198}

1199

1200inline void ARMELFStreamer::SwitchToExTabSection(const MCSymbol &FnStart) {

1203}

1204

1205inline void ARMELFStreamer::SwitchToExIdxSection(const MCSymbol &FnStart) {

1209}

1210

1211void ARMELFStreamer::EHReset() {

1212 ExTab = nullptr;

1213 FnStart = nullptr;

1214 Personality = nullptr;

1216 FPReg = ARM::SP;

1217 FPOffset = 0;

1218 SPOffset = 0;

1219 PendingOffset = 0;

1220 UsedFP = false;

1221 CantUnwind = false;

1222

1223 Opcodes.clear();

1224 UnwindOpAsm.Reset();

1225}

1226

1227void ARMELFStreamer::emitFnStart() {

1228 assert(FnStart == nullptr);

1229 FnStart = getContext().createTempSymbol();

1230 emitLabel(FnStart);

1231}

1232

1233void ARMELFStreamer::emitFnEnd() {

1234 assert(FnStart && ".fnstart must precedes .fnend");

1235

1236

1237 if (!ExTab && !CantUnwind)

1238 FlushUnwindOpcodes(true);

1239

1240

1241 SwitchToExIdxSection(*FnStart);

1242

1243

1244

1245

1246

1247

1250

1251 const MCSymbolRefExpr *FnStartRef =

1253

1254 emitValue(FnStartRef, 4);

1255

1256 if (CantUnwind) {

1258 } else if (ExTab) {

1259

1260 const MCSymbolRefExpr *ExTabEntryRef =

1262 emitValue(ExTabEntryRef, 4);

1263 } else {

1264

1265

1266

1268 "Compact model must use __aeabi_unwind_cpp_pr0 as personality");

1270 "Unwind opcode size for __aeabi_unwind_cpp_pr0 must be equal to 4");

1271 uint64_t Intval = Opcodes[0] |

1272 Opcodes[1] << 8 |

1273 Opcodes[2] << 16 |

1274 Opcodes[3] << 24;

1275 emitIntValue(Intval, Opcodes.size());

1276 }

1277

1278

1279 switchSection(&FnStart->getSection());

1280

1281

1282 EHReset();

1283}

1284

1285void ARMELFStreamer::emitCantUnwind() { CantUnwind = true; }

1286

1287

1288void ARMELFStreamer::EmitPersonalityFixup(StringRef Name) {

1289 const MCSymbol *PersonalitySym = getContext().getOrCreateSymbol(Name);

1290 visitUsedSymbol(*PersonalitySym);

1291

1292 const MCSymbolRefExpr *PersonalityRef =

1295}

1296

1297void ARMELFStreamer::FlushPendingOffset() {

1298 if (PendingOffset != 0) {

1300 PendingOffset = 0;

1301 }

1302}

1303

1304void ARMELFStreamer::FlushUnwindOpcodes(bool NoHandlerData) {

1305

1306 if (UsedFP) {

1307 const MCRegisterInfo *MRI = getContext().getRegisterInfo();

1308 int64_t LastRegSaveSPOffset = SPOffset - PendingOffset;

1309 UnwindOpAsm.EmitSPOffset(LastRegSaveSPOffset - FPOffset);

1311 } else {

1312 FlushPendingOffset();

1313 }

1314

1315

1316 UnwindOpAsm.Finalize(PersonalityIndex, Opcodes);

1317

1318

1319

1320

1322 return;

1323

1324

1325 SwitchToExTabSection(*FnStart);

1326

1327

1329 ExTab = getContext().createTempSymbol();

1330 emitLabel(ExTab);

1331

1332

1333 if (Personality) {

1336

1337 emitValue(PersonalityRef, 4);

1338 }

1339

1340

1342 "Unwind opcode size for __aeabi_cpp_unwind_pr0 must be multiple of 4");

1343 for (unsigned I = 0; I != Opcodes.size(); I += 4) {

1344 uint64_t Intval = Opcodes[I] |

1345 Opcodes[I + 1] << 8 |

1346 Opcodes[I + 2] << 16 |

1347 Opcodes[I + 3] << 24;

1348 emitInt32(Intval);

1349 }

1350

1351

1352

1353

1354

1355

1356

1357

1358 if (NoHandlerData && !Personality)

1359 emitInt32(0);

1360}

1361

1362void ARMELFStreamer::emitHandlerData() { FlushUnwindOpcodes(false); }

1363

1364void ARMELFStreamer::emitPersonality(const MCSymbol *Per) {

1365 Personality = Per;

1367}

1368

1369void ARMELFStreamer::emitPersonalityIndex(unsigned Index) {

1371 PersonalityIndex = Index;

1372}

1373

1374void ARMELFStreamer::emitSetFP(MCRegister NewFPReg, MCRegister NewSPReg,

1376 assert((NewSPReg == ARM::SP || NewSPReg == FPReg) &&

1377 "the operand of .setfp directive should be either sporsp or sporfp");

1378

1379 UsedFP = true;

1380 FPReg = NewFPReg;

1381

1382 if (NewSPReg == ARM::SP)

1383 FPOffset = SPOffset + Offset;

1384 else

1386}

1387

1388void ARMELFStreamer::emitMovSP(MCRegister Reg, int64_t Offset) {

1389 assert((Reg != ARM::SP && Reg != ARM::PC) &&

1390 "the operand of .movsp cannot be either sp or pc");

1391 assert(FPReg == ARM::SP && "current FP must be SP");

1392

1393 FlushPendingOffset();

1394

1396 FPOffset = SPOffset + Offset;

1397

1398 const MCRegisterInfo *MRI = getContext().getRegisterInfo();

1400}

1401

1402void ARMELFStreamer::emitPad(int64_t Offset) {

1403

1405

1406

1407

1408 PendingOffset -= Offset;

1409}

1410

1411static std::pair<unsigned, unsigned>

1416 unsigned Count = 0;

1417 while (Idx > 0) {

1419 if (Reg == ARM::RA_AUTH_CODE)

1420 break;

1421 unsigned RegEnc = MRI.getEncodingValue(Reg);

1422 assert(RegEnc < (IsVector ? 32U : 16U) && "Register out of range");

1423 unsigned Bit = (1u << RegEnc);

1424 if ((Mask & Bit) == 0) {

1425 Mask |= Bit;

1427 }

1428 --Idx;

1429 }

1430

1431 Mask_ = Mask;

1432 return {Idx, Count};

1433}

1434

1435void ARMELFStreamer::emitRegSave(const SmallVectorImpl &RegList,

1436 bool IsVector) {

1437 uint32_t Mask;

1438 unsigned Idx, Count;

1439 const MCRegisterInfo &MRI = *getContext().getRegisterInfo();

1440

1441

1442

1443

1444

1445

1446

1447 Idx = RegList.size();

1448 while (Idx > 0) {

1451

1452

1453

1454

1455 SPOffset -= Count * (IsVector ? 8 : 4);

1456

1457

1458 FlushPendingOffset();

1459 if (IsVector)

1461 else

1463 } else if (Idx > 0 && RegList[Idx - 1] == ARM::RA_AUTH_CODE) {

1464 --Idx;

1465 SPOffset -= 4;

1466 FlushPendingOffset();

1468 }

1469 }

1470}

1471

1472void ARMELFStreamer::emitUnwindRaw(int64_t Offset,

1473 const SmallVectorImpl<uint8_t> &Opcodes) {

1474 FlushPendingOffset();

1475 SPOffset = SPOffset - Offset;

1476 UnwindOpAsm.EmitRaw(Opcodes);

1477}

1478

1479namespace llvm {

1480

1484 return new ARMTargetAsmStreamer(S, OS, *InstPrint);

1485}

1486

1490

1492 return new ARMTargetELFStreamer(S);

1493}

1494

1496 std::unique_ptr TAB,

1497 std::unique_ptr OW,

1498 std::unique_ptr Emitter,

1499 bool IsThumb, bool IsAndroid) {

1500 ARMELFStreamer *S =

1501 new ARMELFStreamer(Context, std::move(TAB), std::move(OW),

1502 std::move(Emitter), IsThumb, IsAndroid);

1503

1504

1505

1507

1508 return S;

1509}

1510

1511}

unsigned const MachineRegisterInfo * MRI

static void addFixup(SmallVectorImpl< MCFixup > &Fixups, uint32_t Offset, const MCExpr *Value, uint16_t Kind, bool PCRel=false)

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

static std::pair< unsigned, unsigned > collectHWRegs(const MCRegisterInfo &MRI, unsigned Idx, const SmallVectorImpl< MCRegister > &RegList, bool IsVector, uint32_t &Mask_)

Definition ARMELFStreamer.cpp:1412

static std::string GetAEABIUnwindPersonalityName(unsigned Index)

Definition ARMELFStreamer.cpp:60

dxil DXContainer Global Emitter

static RegisterPass< DebugifyFunctionPass > DF("debugify-function", "Attach debug info to a function")

This file defines the DenseMap class.

uint64_t IntrinsicInst * II

static constexpr MCPhysReg FPReg

This file defines the SmallString class.

This file defines the SmallVector class.

static uint32_t getFlags(const Symbol *Sym)

static SymbolRef::Type getType(const Symbol *Sym)

virtual void reset()

Reset any state between object emissions, i.e.

void printExpr(raw_ostream &, const MCExpr &) const

bool hasSubsectionsViaSymbols() const

Context object for machine code objects.

const MCObjectFileInfo * getObjectFileInfo() const

void changeSection(MCSection *Section, uint32_t Subsection=0) override

This is called by popSection and switchSection, if the current section changes.

void reset() override

state management

bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override

Add the given Attribute to Symbol.

This is an instance of a target assembly language printer that converts an MCInst to valid target ass...

virtual void printRegName(raw_ostream &OS, MCRegister Reg)

Print the assembler register name.

void emitFill(const MCExpr &NumBytes, uint64_t FillValue, SMLoc Loc=SMLoc()) override

Emit Size bytes worth of the value specified by FillValue.

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.

unsigned getUniqueID() const

const MCSymbolELF * getGroup() const

StringRef getName() const

MCSymbol * getBeginSymbol()

Streaming machine code generation interface.

const MCSymbol & getSymbol() const

static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx, SMLoc Loc=SMLoc())

bool isDefined() const

isDefined - Check if this symbol is defined (i.e., it has an address).

StringRef getName() const

getName - Get the symbol name.

MCSection & getSection() const

Get the section associated with a defined, non-absolute symbol.

Target specific streamer interface.

static SectionKind getData()

This class consists of common code factored out of the SmallVector class to reduce code duplication b...

constexpr bool empty() const

empty - Check if the string is empty.

Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...

static Twine utohexstr(uint64_t Val)

void EmitSetSP(uint16_t Reg)

Emit unwind opcodes to copy address from source register to $sp.

void EmitVFPRegSave(uint32_t VFPRegSave)

Emit unwind opcodes for .vsave directives.

void EmitRegSave(uint32_t RegSave)

Emit unwind opcodes for .save directives.

void setPersonality(const MCSymbol *Per)

Set the personality.

void EmitSPOffset(int64_t Offset)

Emit unwind opcodes to add $sp with an offset.

void Reset()

Reset the unwind opcode assembler.

void EmitRaw(const SmallVectorImpl< uint8_t > &Opcodes)

Emit unwind raw opcodes.

void Finalize(unsigned &PersonalityIndex, SmallVectorImpl< uint8_t > &Result)

Finalize the unwind opcode sequence for emitBytes()

formatted_raw_ostream - A raw_ostream that wraps another one and keeps track of line and column posit...

raw_ostream & write_escaped(StringRef Str, bool UseHexEscapes=false)

Output Str, turning '\', '\t', ' ', '"', and anything that doesn't satisfy llvm::isPrint into an esca...

#define llvm_unreachable(msg)

Marks that the current location is not supposed to be reachable.

constexpr char Align[]

Key for Kernel::Arg::Metadata::mAlign.

LLVM_ABI const TagNameMap & getARMAttributeTags()

@ EXIDX_CANTUNWIND

Special entry for the function never unwind.

LLVM_ABI StringRef getArchExtName(uint64_t ArchExtKind)

LLVM_ABI StringRef getCPUAttr(ArchKind AK)

LLVM_ABI StringRef getArchName(ArchKind AK)

LLVM_ABI unsigned getArchAttr(ArchKind AK)

LLVM_ABI StringRef getFPUName(FPUKind FPUKind)

constexpr std::underlying_type_t< E > Mask()

Get a bitmask with 1s in all places up to the high-order bit of E's largest value.

LLVM_ABI StringRef attrTypeAsString(unsigned attr, TagNameMap tagNameMap, bool hasTagPrefix=true)

void emitInstruction(MCObjectStreamer &, const MCInst &Inst, const MCSubtargetInfo &STI)

Context & getContext() const

This is an optimization pass for GlobalISel generic memory operations.

FunctionAddr VTableAddr Value

MCELFStreamer * createARMELFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > TAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter, bool IsThumb, bool IsAndroid)

Definition ARMELFStreamer.cpp:1495

decltype(auto) dyn_cast(const From &Val)

dyn_cast - Return the argument parameter cast to the specified type.

MCTargetStreamer * createARMObjectTargetELFStreamer(MCStreamer &S)

Definition ARMELFStreamer.cpp:1491

auto dyn_cast_or_null(const Y &Val)

bool any_of(R &&range, UnaryPredicate P)

Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.

void sort(IteratorTy Start, IteratorTy End)

LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)

FunctionAddr VTableAddr Count

class LLVM_GSL_OWNER SmallVector

Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...

@ First

Helpers to iterate all locations in the MemoryEffectsBase class.

@ FK_Data_4

A four-byte fixup.

FunctionAddr VTableAddr uintptr_t uintptr_t Data

OutputIt move(R &&Range, OutputIt Out)

Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.

static const char * ARMCondCodeToString(ARMCC::CondCodes CC)

MCTargetStreamer * createARMNullTargetStreamer(MCStreamer &S)

Definition ARMELFStreamer.cpp:1487

MCTargetStreamer * createARMTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint)

Definition ARMELFStreamer.cpp:1481

@ MCSA_ELF_TypeFunction

.type _foo, STT_FUNC # aka @function