LLVM  13.0.0git
SparcMCExpr.cpp
Go to the documentation of this file.
1 //===-- SparcMCExpr.cpp - Sparc specific MC expression classes --------===//
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 contains the implementation of the assembly expression modifiers
10 // accepted by the Sparc architecture (e.g. "%hi", "%lo", ...).
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "SparcMCExpr.h"
15 #include "llvm/BinaryFormat/ELF.h"
16 #include "llvm/MC/MCAssembler.h"
17 #include "llvm/MC/MCContext.h"
19 #include "llvm/MC/MCSymbolELF.h"
20 
21 using namespace llvm;
22 
23 #define DEBUG_TYPE "sparcmcexpr"
24 
25 const SparcMCExpr*
27  MCContext &Ctx) {
28  return new (Ctx) SparcMCExpr(Kind, Expr);
29 }
30 
31 void SparcMCExpr::printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const {
32 
33  bool closeParen = printVariantKind(OS, Kind);
34 
35  const MCExpr *Expr = getSubExpr();
36  Expr->print(OS, MAI);
37 
38  if (closeParen)
39  OS << ')';
40 }
41 
43 {
44  switch (Kind) {
45  case VK_Sparc_None: return false;
46  case VK_Sparc_LO: OS << "%lo("; return true;
47  case VK_Sparc_HI: OS << "%hi("; return true;
48  case VK_Sparc_H44: OS << "%h44("; return true;
49  case VK_Sparc_M44: OS << "%m44("; return true;
50  case VK_Sparc_L44: OS << "%l44("; return true;
51  case VK_Sparc_HH: OS << "%hh("; return true;
52  case VK_Sparc_HM: OS << "%hm("; return true;
53  case VK_Sparc_LM: OS << "%lm("; return true;
54  // FIXME: use %pc22/%pc10, if system assembler supports them.
55  case VK_Sparc_PC22: OS << "%hi("; return true;
56  case VK_Sparc_PC10: OS << "%lo("; return true;
57  // FIXME: use %got22/%got10, if system assembler supports them.
58  case VK_Sparc_GOT22: OS << "%hi("; return true;
59  case VK_Sparc_GOT10: OS << "%lo("; return true;
60  case VK_Sparc_GOT13: return false;
61  case VK_Sparc_13: return false;
62  case VK_Sparc_WDISP30: return false;
63  case VK_Sparc_WPLT30: return false;
64  case VK_Sparc_R_DISP32: OS << "%r_disp32("; return true;
65  case VK_Sparc_TLS_GD_HI22: OS << "%tgd_hi22("; return true;
66  case VK_Sparc_TLS_GD_LO10: OS << "%tgd_lo10("; return true;
67  case VK_Sparc_TLS_GD_ADD: OS << "%tgd_add("; return true;
68  case VK_Sparc_TLS_GD_CALL: OS << "%tgd_call("; return true;
69  case VK_Sparc_TLS_LDM_HI22: OS << "%tldm_hi22("; return true;
70  case VK_Sparc_TLS_LDM_LO10: OS << "%tldm_lo10("; return true;
71  case VK_Sparc_TLS_LDM_ADD: OS << "%tldm_add("; return true;
72  case VK_Sparc_TLS_LDM_CALL: OS << "%tldm_call("; return true;
73  case VK_Sparc_TLS_LDO_HIX22: OS << "%tldo_hix22("; return true;
74  case VK_Sparc_TLS_LDO_LOX10: OS << "%tldo_lox10("; return true;
75  case VK_Sparc_TLS_LDO_ADD: OS << "%tldo_add("; return true;
76  case VK_Sparc_TLS_IE_HI22: OS << "%tie_hi22("; return true;
77  case VK_Sparc_TLS_IE_LO10: OS << "%tie_lo10("; return true;
78  case VK_Sparc_TLS_IE_LD: OS << "%tie_ld("; return true;
79  case VK_Sparc_TLS_IE_LDX: OS << "%tie_ldx("; return true;
80  case VK_Sparc_TLS_IE_ADD: OS << "%tie_add("; return true;
81  case VK_Sparc_TLS_LE_HIX22: OS << "%tle_hix22("; return true;
82  case VK_Sparc_TLS_LE_LOX10: OS << "%tle_lox10("; return true;
83  }
84  llvm_unreachable("Unhandled SparcMCExpr::VariantKind");
85 }
86 
88 {
90  .Case("lo", VK_Sparc_LO)
91  .Case("hi", VK_Sparc_HI)
92  .Case("h44", VK_Sparc_H44)
93  .Case("m44", VK_Sparc_M44)
94  .Case("l44", VK_Sparc_L44)
95  .Case("hh", VK_Sparc_HH)
96  .Case("hm", VK_Sparc_HM)
97  .Case("lm", VK_Sparc_LM)
98  .Case("pc22", VK_Sparc_PC22)
99  .Case("pc10", VK_Sparc_PC10)
100  .Case("got22", VK_Sparc_GOT22)
101  .Case("got10", VK_Sparc_GOT10)
102  .Case("got13", VK_Sparc_GOT13)
103  .Case("r_disp32", VK_Sparc_R_DISP32)
104  .Case("tgd_hi22", VK_Sparc_TLS_GD_HI22)
105  .Case("tgd_lo10", VK_Sparc_TLS_GD_LO10)
106  .Case("tgd_add", VK_Sparc_TLS_GD_ADD)
107  .Case("tgd_call", VK_Sparc_TLS_GD_CALL)
108  .Case("tldm_hi22", VK_Sparc_TLS_LDM_HI22)
109  .Case("tldm_lo10", VK_Sparc_TLS_LDM_LO10)
110  .Case("tldm_add", VK_Sparc_TLS_LDM_ADD)
111  .Case("tldm_call", VK_Sparc_TLS_LDM_CALL)
112  .Case("tldo_hix22", VK_Sparc_TLS_LDO_HIX22)
113  .Case("tldo_lox10", VK_Sparc_TLS_LDO_LOX10)
114  .Case("tldo_add", VK_Sparc_TLS_LDO_ADD)
115  .Case("tie_hi22", VK_Sparc_TLS_IE_HI22)
116  .Case("tie_lo10", VK_Sparc_TLS_IE_LO10)
117  .Case("tie_ld", VK_Sparc_TLS_IE_LD)
118  .Case("tie_ldx", VK_Sparc_TLS_IE_LDX)
119  .Case("tie_add", VK_Sparc_TLS_IE_ADD)
120  .Case("tle_hix22", VK_Sparc_TLS_LE_HIX22)
121  .Case("tle_lox10", VK_Sparc_TLS_LE_LOX10)
123 }
124 
126  switch (Kind) {
127  default: llvm_unreachable("Unhandled SparcMCExpr::VariantKind");
133  case VK_Sparc_HH: return Sparc::fixup_sparc_hh;
134  case VK_Sparc_HM: return Sparc::fixup_sparc_hm;
135  case VK_Sparc_LM: return Sparc::fixup_sparc_lm;
141  case VK_Sparc_13: return Sparc::fixup_sparc_13;
162  }
163 }
164 
165 bool
167  const MCAsmLayout *Layout,
168  const MCFixup *Fixup) const {
169  return getSubExpr()->evaluateAsRelocatable(Res, Layout, Fixup);
170 }
171 
173  switch (Expr->getKind()) {
174  case MCExpr::Target:
175  llvm_unreachable("Can't handle nested target expr!");
176  break;
177 
178  case MCExpr::Constant:
179  break;
180 
181  case MCExpr::Binary: {
182  const MCBinaryExpr *BE = cast<MCBinaryExpr>(Expr);
185  break;
186  }
187 
188  case MCExpr::SymbolRef: {
189  const MCSymbolRefExpr &SymRef = *cast<MCSymbolRefExpr>(Expr);
190  cast<MCSymbolELF>(SymRef.getSymbol()).setType(ELF::STT_TLS);
191  break;
192  }
193 
194  case MCExpr::Unary:
195  fixELFSymbolsInTLSFixupsImpl(cast<MCUnaryExpr>(Expr)->getSubExpr(), Asm);
196  break;
197  }
198 
199 }
200 
202  switch(getKind()) {
203  default: return;
205  case VK_Sparc_TLS_LDM_CALL: {
206  // The corresponding relocations reference __tls_get_addr, as they call it,
207  // but this is only implicit; we must explicitly add it to our symbol table
208  // to bind it for these uses.
209  MCSymbol *Symbol = Asm.getContext().getOrCreateSymbol("__tls_get_addr");
210  Asm.registerSymbol(*Symbol);
211  auto ELFSymbol = cast<MCSymbolELF>(Symbol);
212  if (!ELFSymbol->isBindingSet())
213  ELFSymbol->setBinding(ELF::STB_GLOBAL);
215  }
218  case VK_Sparc_TLS_GD_ADD:
227  case VK_Sparc_TLS_IE_LD:
228  case VK_Sparc_TLS_IE_LDX:
229  case VK_Sparc_TLS_IE_ADD:
231  case VK_Sparc_TLS_LE_LOX10: break;
232  }
234 }
235 
236 void SparcMCExpr::visitUsedExpr(MCStreamer &Streamer) const {
237  Streamer.visitUsedExpr(*getSubExpr());
238 }
llvm::StringSwitch::Case
StringSwitch & Case(StringLiteral S, T Value)
Definition: StringSwitch.h:67
llvm::SparcMCExpr::VK_Sparc_TLS_IE_LO10
@ VK_Sparc_TLS_IE_LO10
Definition: SparcMCExpr.h:56
llvm::SparcMCExpr::VK_Sparc_TLS_IE_ADD
@ VK_Sparc_TLS_IE_ADD
Definition: SparcMCExpr.h:59
llvm::MCStreamer::visitUsedExpr
void visitUsedExpr(const MCExpr &Expr)
Definition: MCStreamer.cpp:1046
llvm
Definition: AllocatorList.h:23
llvm::SparcMCExpr::VK_Sparc_L44
@ VK_Sparc_L44
Definition: SparcMCExpr.h:31
llvm::SparcMCExpr::fixELFSymbolsInTLSFixups
void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override
Definition: SparcMCExpr.cpp:201
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
llvm::SparcMCExpr::VK_Sparc_HM
@ VK_Sparc_HM
Definition: SparcMCExpr.h:33
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:71
llvm::StringSwitch::Default
LLVM_NODISCARD R Default(T Value)
Definition: StringSwitch.h:181
llvm::Sparc::fixup_sparc_wplt30
@ fixup_sparc_wplt30
fixup_sparc_wplt30
Definition: SparcFixupKinds.h:76
llvm::MCAsmInfo
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:56
llvm::SparcMCExpr::VK_Sparc_None
@ VK_Sparc_None
Definition: SparcMCExpr.h:26
llvm::SparcMCExpr::VK_Sparc_TLS_LE_LOX10
@ VK_Sparc_TLS_LE_LOX10
Definition: SparcMCExpr.h:61
fixELFSymbolsInTLSFixupsImpl
static void fixELFSymbolsInTLSFixupsImpl(const MCExpr *Expr, MCAssembler &Asm)
Definition: SparcMCExpr.cpp:172
llvm::Sparc::fixup_sparc_tls_ie_add
@ fixup_sparc_tls_ie_add
Definition: SparcFixupKinds.h:94
llvm::SparcMCExpr::VK_Sparc_TLS_LDO_ADD
@ VK_Sparc_TLS_LDO_ADD
Definition: SparcMCExpr.h:54
llvm::Sparc::fixup_sparc_tls_gd_add
@ fixup_sparc_tls_gd_add
Definition: SparcFixupKinds.h:81
MCAssembler.h
llvm::Sparc::fixup_sparc_tls_gd_hi22
@ fixup_sparc_tls_gd_hi22
fixups for Thread Local Storage
Definition: SparcFixupKinds.h:79
llvm::ELF::STB_GLOBAL
@ STB_GLOBAL
Definition: ELF.h:1133
llvm::SparcMCExpr::VK_Sparc_TLS_LDM_ADD
@ VK_Sparc_TLS_LDM_ADD
Definition: SparcMCExpr.h:50
llvm::SparcMCExpr
Definition: SparcMCExpr.h:23
llvm::MCBinaryExpr
Binary assembler expressions.
Definition: MCExpr.h:479
llvm::SparcMCExpr::VK_Sparc_TLS_LDM_HI22
@ VK_Sparc_TLS_LDM_HI22
Definition: SparcMCExpr.h:48
llvm::Sparc::fixup_sparc_tls_ie_hi22
@ fixup_sparc_tls_ie_hi22
Definition: SparcFixupKinds.h:90
llvm::SparcMCExpr::VK_Sparc_M44
@ VK_Sparc_M44
Definition: SparcMCExpr.h:30
llvm::SparcMCExpr::parseVariantKind
static VariantKind parseVariantKind(StringRef name)
Definition: SparcMCExpr.cpp:87
llvm::Sparc::fixup_sparc_hi22
@ fixup_sparc_hi22
fixup_sparc_hi22 - 22-bit fixup corresponding to hi(foo) for sethi
Definition: SparcFixupKinds.h:37
llvm::MCExpr::evaluateAsRelocatable
bool evaluateAsRelocatable(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const
Try to evaluate the expression to a relocatable value, i.e.
Definition: MCExpr.cpp:766
llvm::SparcMCExpr::VK_Sparc_TLS_GD_CALL
@ VK_Sparc_TLS_GD_CALL
Definition: SparcMCExpr.h:47
MCObjectStreamer.h
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:197
llvm::SparcMCExpr::VK_Sparc_TLS_LE_HIX22
@ VK_Sparc_TLS_LE_HIX22
Definition: SparcMCExpr.h:60
llvm::SparcMCExpr::VK_Sparc_R_DISP32
@ VK_Sparc_R_DISP32
Definition: SparcMCExpr.h:43
ELF.h
llvm::SparcMCExpr::VK_Sparc_TLS_LDM_CALL
@ VK_Sparc_TLS_LDM_CALL
Definition: SparcMCExpr.h:51
llvm::MCExpr::Target
@ Target
Target specific expression.
Definition: MCExpr.h:42
llvm::SparcMCExpr::VK_Sparc_H44
@ VK_Sparc_H44
Definition: SparcMCExpr.h:29
llvm::SparcMCExpr::create
static const SparcMCExpr * create(VariantKind Kind, const MCExpr *Expr, MCContext &Ctx)
Definition: SparcMCExpr.cpp:26
MCSymbolELF.h
MCContext.h
llvm::Sparc::fixup_sparc_h44
@ fixup_sparc_h44
fixup_sparc_h44 - 22-bit fixup corresponding to h44(foo)
Definition: SparcFixupKinds.h:43
SparcMCExpr.h
llvm::Sparc::fixup_sparc_pc22
@ fixup_sparc_pc22
fixup_sparc_pc22 - 22-bit fixup corresponding to pc22(foo)
Definition: SparcFixupKinds.h:61
llvm::MCBinaryExpr::getRHS
const MCExpr * getRHS() const
Get the right-hand side expression of the binary operator.
Definition: MCExpr.h:629
llvm::SparcMCExpr::VK_Sparc_LM
@ VK_Sparc_LM
Definition: SparcMCExpr.h:34
llvm::SparcMCExpr::visitUsedExpr
void visitUsedExpr(MCStreamer &Streamer) const override
Definition: SparcMCExpr.cpp:236
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:50
llvm::Sparc::fixup_sparc_tls_ldo_lox10
@ fixup_sparc_tls_ldo_lox10
Definition: SparcFixupKinds.h:88
llvm::Sparc::fixup_sparc_tls_ie_ldx
@ fixup_sparc_tls_ie_ldx
Definition: SparcFixupKinds.h:93
llvm::MCSymbolRefExpr::getSymbol
const MCSymbol & getSymbol() const
Definition: MCExpr.h:397
llvm::Sparc::fixup_sparc_tls_ie_ld
@ fixup_sparc_tls_ie_ld
Definition: SparcFixupKinds.h:92
llvm::Sparc::fixup_sparc_tls_ie_lo10
@ fixup_sparc_tls_ie_lo10
Definition: SparcFixupKinds.h:91
llvm::MCExpr::getKind
ExprKind getKind() const
Definition: MCExpr.h:81
llvm::ELF::STT_TLS
@ STT_TLS
Definition: ELF.h:1150
llvm::SparcMCExpr::VK_Sparc_TLS_LDM_LO10
@ VK_Sparc_TLS_LDM_LO10
Definition: SparcMCExpr.h:49
llvm::Sparc::fixup_sparc_13
@ fixup_sparc_13
fixup_sparc_13 - 13-bit fixup
Definition: SparcFixupKinds.h:33
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::MCExpr::Binary
@ Binary
Binary expressions.
Definition: MCExpr.h:38
llvm::SparcMCExpr::VK_Sparc_TLS_LDO_HIX22
@ VK_Sparc_TLS_LDO_HIX22
Definition: SparcMCExpr.h:52
llvm::SparcMCExpr::VK_Sparc_GOT13
@ VK_Sparc_GOT13
Definition: SparcMCExpr.h:39
llvm::SparcMCExpr::VK_Sparc_TLS_IE_LDX
@ VK_Sparc_TLS_IE_LDX
Definition: SparcMCExpr.h:58
llvm::SparcMCExpr::VK_Sparc_PC22
@ VK_Sparc_PC22
Definition: SparcMCExpr.h:35
llvm::MCAssembler
Definition: MCAssembler.h:60
llvm::SparcMCExpr::printImpl
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
Definition: SparcMCExpr.cpp:31
llvm::SparcMCExpr::VK_Sparc_GOT22
@ VK_Sparc_GOT22
Definition: SparcMCExpr.h:37
llvm::Sparc::fixup_sparc_tls_ldm_call
@ fixup_sparc_tls_ldm_call
Definition: SparcFixupKinds.h:86
llvm::SparcMCExpr::VK_Sparc_TLS_IE_LD
@ VK_Sparc_TLS_IE_LD
Definition: SparcMCExpr.h:57
llvm::SparcMCExpr::VK_Sparc_TLS_GD_LO10
@ VK_Sparc_TLS_GD_LO10
Definition: SparcMCExpr.h:45
llvm::SparcMCExpr::VK_Sparc_TLS_IE_HI22
@ VK_Sparc_TLS_IE_HI22
Definition: SparcMCExpr.h:55
llvm::SparcMCExpr::VariantKind
VariantKind
Definition: SparcMCExpr.h:25
llvm::Sparc::fixup_sparc_tls_ldo_add
@ fixup_sparc_tls_ldo_add
Definition: SparcFixupKinds.h:89
llvm::SparcMCExpr::VK_Sparc_PC10
@ VK_Sparc_PC10
Definition: SparcMCExpr.h:36
llvm::Sparc::fixup_sparc_tls_gd_call
@ fixup_sparc_tls_gd_call
Definition: SparcFixupKinds.h:82
llvm::Sparc::fixup_sparc_tls_ldm_lo10
@ fixup_sparc_tls_ldm_lo10
Definition: SparcFixupKinds.h:84
llvm::SparcMCExpr::VK_Sparc_13
@ VK_Sparc_13
Definition: SparcMCExpr.h:40
llvm::SparcMCExpr::VK_Sparc_WDISP30
@ VK_Sparc_WDISP30
Definition: SparcMCExpr.h:42
llvm::SparcMCExpr::VK_Sparc_GOT10
@ VK_Sparc_GOT10
Definition: SparcMCExpr.h:38
llvm::MCSymbolRefExpr
Represent a reference to a symbol from inside an expression.
Definition: MCExpr.h:192
llvm::SparcMCExpr::VK_Sparc_HH
@ VK_Sparc_HH
Definition: SparcMCExpr.h:32
llvm::Sparc::fixup_sparc_tls_le_lox10
@ fixup_sparc_tls_le_lox10
Definition: SparcFixupKinds.h:96
llvm::Sparc::fixup_sparc_got13
@ fixup_sparc_got13
fixup_sparc_got13 - 13-bit fixup corresponding to got13(foo)
Definition: SparcFixupKinds.h:73
Fixup
PowerPC TLS Dynamic Call Fixup
Definition: PPCTLSDynamicCall.cpp:235
llvm::Sparc::fixup_sparc_pc10
@ fixup_sparc_pc10
fixup_sparc_pc10 - 10-bit fixup corresponding to pc10(foo)
Definition: SparcFixupKinds.h:64
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::SparcMCExpr::printVariantKind
static bool printVariantKind(raw_ostream &OS, VariantKind Kind)
Definition: SparcMCExpr.cpp:42
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:136
llvm::Sparc::fixup_sparc_tls_gd_lo10
@ fixup_sparc_tls_gd_lo10
Definition: SparcFixupKinds.h:80
llvm::SparcMCExpr::getSubExpr
const MCExpr * getSubExpr() const
getSubExpr - Get the child of this expression.
Definition: SparcMCExpr.h:85
llvm::SparcMCExpr::VK_Sparc_WPLT30
@ VK_Sparc_WPLT30
Definition: SparcMCExpr.h:41
llvm::Sparc::fixup_sparc_l44
@ fixup_sparc_l44
fixup_sparc_l44 - 12-bit fixup corresponding to l44(foo)
Definition: SparcFixupKinds.h:49
llvm::Sparc::Fixups
Fixups
Definition: SparcFixupKinds.h:16
llvm::SparcMCExpr::VK_Sparc_HI
@ VK_Sparc_HI
Definition: SparcMCExpr.h:28
LLVM_FALLTHROUGH
#define LLVM_FALLTHROUGH
LLVM_FALLTHROUGH - Mark fallthrough cases in switch statements.
Definition: Compiler.h:281
llvm::SparcMCExpr::VK_Sparc_TLS_GD_HI22
@ VK_Sparc_TLS_GD_HI22
Definition: SparcMCExpr.h:44
llvm::SparcMCExpr::getFixupKind
Sparc::Fixups getFixupKind() const
getFixupKind - Get the fixup kind of this expression.
Definition: SparcMCExpr.h:88
llvm::Sparc::fixup_sparc_tls_le_hix22
@ fixup_sparc_tls_le_hix22
Definition: SparcFixupKinds.h:95
llvm::SparcMCExpr::VK_Sparc_TLS_GD_ADD
@ VK_Sparc_TLS_GD_ADD
Definition: SparcMCExpr.h:46
name
static const char * name
Definition: SVEIntrinsicOpts.cpp:84
llvm::SparcMCExpr::VK_Sparc_TLS_LDO_LOX10
@ VK_Sparc_TLS_LDO_LOX10
Definition: SparcMCExpr.h:53
llvm::MCAsmLayout
Encapsulates the layout of an assembly file at a particular point in time.
Definition: MCAsmLayout.h:28
llvm::Sparc::fixup_sparc_m44
@ fixup_sparc_m44
fixup_sparc_m44 - 10-bit fixup corresponding to m44(foo)
Definition: SparcFixupKinds.h:46
llvm::Sparc::fixup_sparc_tls_ldo_hix22
@ fixup_sparc_tls_ldo_hix22
Definition: SparcFixupKinds.h:87
llvm::Sparc::fixup_sparc_call30
@ fixup_sparc_call30
Definition: SparcFixupKinds.h:18
llvm::Sparc::fixup_sparc_lo10
@ fixup_sparc_lo10
fixup_sparc_lo10 - 10-bit fixup corresponding to lo(foo)
Definition: SparcFixupKinds.h:40
llvm::Sparc::fixup_sparc_hh
@ fixup_sparc_hh
fixup_sparc_hh - 22-bit fixup corresponding to hh(foo)
Definition: SparcFixupKinds.h:52
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:79
llvm::Sparc::fixup_sparc_got22
@ fixup_sparc_got22
fixup_sparc_got22 - 22-bit fixup corresponding to got22(foo)
Definition: SparcFixupKinds.h:67
llvm::MCExpr::print
void print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const
Definition: MCExpr.cpp:42
llvm::MCExpr::SymbolRef
@ SymbolRef
References to labels and assigned expressions.
Definition: MCExpr.h:40
llvm::MCExpr::Unary
@ Unary
Unary expressions.
Definition: MCExpr.h:41
llvm::MCExpr::Constant
@ Constant
Constant expressions.
Definition: MCExpr.h:39
llvm::StringSwitch
A switch()-like statement whose cases are string literals.
Definition: StringSwitch.h:42
llvm::HexStyle::Asm
@ Asm
0ffh
Definition: MCInstPrinter.h:34
llvm::SparcMCExpr::evaluateAsRelocatableImpl
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override
Definition: SparcMCExpr.cpp:166
llvm::MCValue
This represents an "assembler immediate".
Definition: MCValue.h:37
llvm::SparcMCExpr::VK_Sparc_LO
@ VK_Sparc_LO
Definition: SparcMCExpr.h:27
llvm::Sparc::fixup_sparc_tls_ldm_hi22
@ fixup_sparc_tls_ldm_hi22
Definition: SparcFixupKinds.h:83
llvm::SparcMCExpr::getKind
VariantKind getKind() const
getOpcode - Get the kind of this expression.
Definition: SparcMCExpr.h:82
llvm::Sparc::fixup_sparc_got10
@ fixup_sparc_got10
fixup_sparc_got10 - 10-bit fixup corresponding to got10(foo)
Definition: SparcFixupKinds.h:70
llvm::MCFixup
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Definition: MCFixup.h:81
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
llvm::Sparc::fixup_sparc_lm
@ fixup_sparc_lm
fixup_sparc_lm - 22-bit fixup corresponding to lm(foo)
Definition: SparcFixupKinds.h:58
llvm::Sparc::fixup_sparc_tls_ldm_add
@ fixup_sparc_tls_ldm_add
Definition: SparcFixupKinds.h:85
llvm::Sparc::fixup_sparc_hm
@ fixup_sparc_hm
fixup_sparc_hm - 10-bit fixup corresponding to hm(foo)
Definition: SparcFixupKinds.h:55
llvm::MCBinaryExpr::getLHS
const MCExpr * getLHS() const
Get the left-hand side expression of the binary operator.
Definition: MCExpr.h:626