LLVM 22.0.0git
ARMMCAsmInfo.h
Go to the documentation of this file.
1//===-- ARMMCAsmInfo.h - ARM asm properties --------------------*- 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// This file contains the declaration of the ARMMCAsmInfo class.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_ARM_MCTARGETDESC_ARMMCASMINFO_H
14#define LLVM_LIB_TARGET_ARM_MCTARGETDESC_ARMMCASMINFO_H
15
19#include "llvm/MC/MCExpr.h"
20
21namespace llvm {
22class Triple;
23
24namespace ARM {
25void printSpecifierExpr(const MCAsmInfo &MAI, raw_ostream &OS,
26 const MCSpecifierExpr &Expr);
27}
28
30 virtual void anchor();
31
32public:
33 explicit ARMMCAsmInfoDarwin(const Triple &TheTriple);
35 const MCSpecifierExpr &Expr) const override {
36 ARM::printSpecifierExpr(*this, OS, Expr);
37 }
39 const MCAssembler *) const override {
40 return false;
41 }
42};
43
45 void anchor() override;
46
47public:
48 explicit ARMELFMCAsmInfo(const Triple &TT);
49
50 void setUseIntegratedAssembler(bool Value) override;
52 const MCSpecifierExpr &Expr) const override {
53 ARM::printSpecifierExpr(*this, OS, Expr);
54 }
56 const MCAssembler *) const override {
57 return false;
58 }
59};
60
62 void anchor() override;
63
64public:
67 const MCSpecifierExpr &Expr) const override {
68 ARM::printSpecifierExpr(*this, OS, Expr);
69 }
71 const MCAssembler *) const override {
72 return false;
73 }
74};
75
77 void anchor() override;
78
79public:
80 explicit ARMCOFFMCAsmInfoGNU();
82 const MCSpecifierExpr &Expr) const override {
83 ARM::printSpecifierExpr(*this, OS, Expr);
84 }
86 const MCAssembler *) const override {
87 return false;
88 }
89};
90
91namespace ARM {
93enum {
96
97 S_HI16 =
98 MCSymbolRefExpr::FirstTargetSpecifier, // The R_ARM_MOVT_ABS relocation
99 // (:upper16: in the .s file)
100 S_LO16, // The R_ARM_MOVW_ABS_NC relocation (:lower16: in the .s file)
101
102 S_HI_8_15, // The R_ARM_THM_ALU_ABS_G3 relocation (:upper8_15: in
103 // the .s file)
104 S_HI_0_7, // The R_ARM_THM_ALU_ABS_G2_NC relocation (:upper0_8: in the
105 // .s file)
106 S_LO_8_15, // The R_ARM_THM_ALU_ABS_G1_NC relocation (:lower8_15: in
107 // the .s file)
108 S_LO_0_7, // The R_ARM_THM_ALU_ABS_G0_NC relocation (:lower0_7: in the
109 // .s file)
110
134};
135
136const MCSpecifierExpr *createUpper16(const MCExpr *Expr, MCContext &Ctx);
137const MCSpecifierExpr *createLower16(const MCExpr *Expr, MCContext &Ctx);
138const MCSpecifierExpr *createUpper8_15(const MCExpr *Expr, MCContext &Ctx);
139const MCSpecifierExpr *createUpper0_7(const MCExpr *Expr, MCContext &Ctx);
140const MCSpecifierExpr *createLower8_15(const MCExpr *Expr, MCContext &Ctx);
141const MCSpecifierExpr *createLower0_7(const MCExpr *Expr, MCContext &Ctx);
142}
143
144} // namespace llvm
145
146#endif
raw_pwrite_stream & OS
bool evaluateAsRelocatableImpl(const MCSpecifierExpr &, MCValue &, const MCAssembler *) const override
Definition: ARMMCAsmInfo.h:85
void printSpecifierExpr(raw_ostream &OS, const MCSpecifierExpr &Expr) const override
Definition: ARMMCAsmInfo.h:81
void printSpecifierExpr(raw_ostream &OS, const MCSpecifierExpr &Expr) const override
Definition: ARMMCAsmInfo.h:66
bool evaluateAsRelocatableImpl(const MCSpecifierExpr &, MCValue &, const MCAssembler *) const override
Definition: ARMMCAsmInfo.h:70
void setUseIntegratedAssembler(bool Value) override
Set whether assembly (inline or otherwise) should be parsed.
void printSpecifierExpr(raw_ostream &OS, const MCSpecifierExpr &Expr) const override
Definition: ARMMCAsmInfo.h:51
bool evaluateAsRelocatableImpl(const MCSpecifierExpr &, MCValue &, const MCAssembler *) const override
Definition: ARMMCAsmInfo.h:55
bool evaluateAsRelocatableImpl(const MCSpecifierExpr &, MCValue &, const MCAssembler *) const override
Definition: ARMMCAsmInfo.h:38
void printSpecifierExpr(raw_ostream &OS, const MCSpecifierExpr &Expr) const override
Definition: ARMMCAsmInfo.h:34
Context object for machine code objects.
Definition: MCContext.h:83
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:34
Extension point for target-specific MCExpr subclasses with a relocation specifier,...
Definition: MCExpr.h:495
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:47
LLVM Value Representation.
Definition: Value.h:75
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
const MCSpecifierExpr * createUpper0_7(const MCExpr *Expr, MCContext &Ctx)
@ S_GOTOFFFUNCDESC
Definition: ARMMCAsmInfo.h:116
@ S_GOTTPOFF_FDPIC
Definition: ARMMCAsmInfo.h:118
void printSpecifierExpr(const MCAsmInfo &MAI, raw_ostream &OS, const MCSpecifierExpr &Expr)
const MCSpecifierExpr * createUpper8_15(const MCExpr *Expr, MCContext &Ctx)
const MCSpecifierExpr * createLower16(const MCExpr *Expr, MCContext &Ctx)
const MCSpecifierExpr * createLower0_7(const MCExpr *Expr, MCContext &Ctx)
const MCSpecifierExpr * createLower8_15(const MCExpr *Expr, MCContext &Ctx)
const MCSpecifierExpr * createUpper16(const MCExpr *Expr, MCContext &Ctx)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18