LLVM  15.0.0git
ARMWinCOFFStreamer.cpp
Go to the documentation of this file.
1 //===-- ARMWinCOFFStreamer.cpp - ARM Target WinCOFF Streamer ----*- C++ -*-===//
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 #include "ARMMCTargetDesc.h"
10 #include "llvm/MC/MCAsmBackend.h"
11 #include "llvm/MC/MCAssembler.h"
12 #include "llvm/MC/MCCodeEmitter.h"
13 #include "llvm/MC/MCObjectWriter.h"
15 
16 using namespace llvm;
17 
18 namespace {
19 class ARMWinCOFFStreamer : public MCWinCOFFStreamer {
20 public:
21  ARMWinCOFFStreamer(MCContext &C, std::unique_ptr<MCAsmBackend> AB,
22  std::unique_ptr<MCCodeEmitter> CE,
23  std::unique_ptr<MCObjectWriter> OW)
24  : MCWinCOFFStreamer(C, std::move(AB), std::move(CE), std::move(OW)) {}
25 
26  void emitThumbFunc(MCSymbol *Symbol) override;
27  void finishImpl() override;
28 };
29 
30 void ARMWinCOFFStreamer::emitThumbFunc(MCSymbol *Symbol) {
31  getAssembler().setIsThumbFunc(Symbol);
32 }
33 
34 void ARMWinCOFFStreamer::finishImpl() {
35  emitFrames(nullptr);
36 
38 }
39 }
40 
42  MCContext &Context, std::unique_ptr<MCAsmBackend> &&MAB,
43  std::unique_ptr<MCObjectWriter> &&OW,
44  std::unique_ptr<MCCodeEmitter> &&Emitter, bool RelaxAll,
45  bool IncrementalLinkerCompatible) {
46  auto *S = new ARMWinCOFFStreamer(Context, std::move(MAB), std::move(Emitter),
47  std::move(OW));
48  S->getAssembler().setIncrementalLinkerCompatible(IncrementalLinkerCompatible);
49  return S;
50 }
51 
llvm::MCWinCOFFStreamer
Definition: MCWinCOFFStreamer.h:27
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
ARMMCTargetDesc.h
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:74
MCCodeEmitter.h
llvm::X86::SecondMacroFusionInstKind::AB
@ AB
MCAssembler.h
Context
LLVMContext & Context
Definition: NVVMIntrRange.cpp:66
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:201
MCAsmBackend.h
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
move
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Definition: README.txt:546
llvm::move
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition: STLExtras.h:1665
llvm::WinEH::EncodingType::CE
@ CE
Windows NT (Windows on ARM)
llvm::MCWinCOFFStreamer::finishImpl
void finishImpl() override
Streamer specific finalization.
Definition: MCWinCOFFStreamer.cpp:363
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
MCWinCOFFStreamer.h
llvm::createARMWinCOFFStreamer
MCStreamer * createARMWinCOFFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > &&MAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&Emitter, bool RelaxAll, bool IncrementalLinkerCompatible)
Definition: ARMWinCOFFStreamer.cpp:41
MCObjectWriter.h
std
Definition: BitVector.h:851
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:83