LLVM 23.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,
36 const MCSpecifierExpr &Expr) const override {
37 ARM::printSpecifierExpr(*this, OS, Expr);
38 }
40 const MCAssembler *) const override {
41 return false;
42 }
43};
44
46 void anchor() override;
47
48public:
49 explicit ARMELFMCAsmInfo(const Triple &TT, const MCTargetOptions &Options);
50
51 void setUseIntegratedAssembler(bool Value) override;
53 const MCSpecifierExpr &Expr) const override {
54 ARM::printSpecifierExpr(*this, OS, Expr);
55 }
57 const MCAssembler *) const override {
58 return false;
59 }
60};
61
63 void anchor() override;
64
65public:
68 const MCSpecifierExpr &Expr) const override {
69 ARM::printSpecifierExpr(*this, OS, Expr);
70 }
72 const MCAssembler *) const override {
73 return false;
74 }
75};
76
78 void anchor() override;
79
80public:
83 const MCSpecifierExpr &Expr) const override {
84 ARM::printSpecifierExpr(*this, OS, Expr);
85 }
87 const MCAssembler *) const override {
88 return false;
89 }
90};
91
92namespace ARM {
94enum {
97
99 MCSymbolRefExpr::FirstTargetSpecifier, // The R_ARM_MOVT_ABS relocation
100 // (:upper16: in the .s file)
101 S_LO16, // The R_ARM_MOVW_ABS_NC relocation (:lower16: in the .s file)
102
103 S_HI_8_15, // The R_ARM_THM_ALU_ABS_G3 relocation (:upper8_15: in
104 // the .s file)
105 S_HI_0_7, // The R_ARM_THM_ALU_ABS_G2_NC relocation (:upper0_8: in the
106 // .s file)
107 S_LO_8_15, // The R_ARM_THM_ALU_ABS_G1_NC relocation (:lower8_15: in
108 // the .s file)
109 S_LO_0_7, // The R_ARM_THM_ALU_ABS_G0_NC relocation (:lower0_7: in the
110 // .s file)
111
135};
136
137const MCSpecifierExpr *createUpper16(const MCExpr *Expr, MCContext &Ctx);
138const MCSpecifierExpr *createLower16(const MCExpr *Expr, MCContext &Ctx);
139const MCSpecifierExpr *createUpper8_15(const MCExpr *Expr, MCContext &Ctx);
140const MCSpecifierExpr *createUpper0_7(const MCExpr *Expr, MCContext &Ctx);
141const MCSpecifierExpr *createLower8_15(const MCExpr *Expr, MCContext &Ctx);
142const MCSpecifierExpr *createLower0_7(const MCExpr *Expr, MCContext &Ctx);
143}
144
145} // namespace llvm
146
147#endif
static LVOptions Options
Definition LVOptions.cpp:25
bool evaluateAsRelocatableImpl(const MCSpecifierExpr &, MCValue &, const MCAssembler *) const override
void printSpecifierExpr(raw_ostream &OS, const MCSpecifierExpr &Expr) const override
ARMCOFFMCAsmInfoGNU(const MCTargetOptions &Options)
void printSpecifierExpr(raw_ostream &OS, const MCSpecifierExpr &Expr) const override
ARMCOFFMCAsmInfoMicrosoft(const MCTargetOptions &Options)
bool evaluateAsRelocatableImpl(const MCSpecifierExpr &, MCValue &, const MCAssembler *) const override
void setUseIntegratedAssembler(bool Value) override
Set whether assembly (inline or otherwise) should be parsed.
ARMELFMCAsmInfo(const Triple &TT, const MCTargetOptions &Options)
void printSpecifierExpr(raw_ostream &OS, const MCSpecifierExpr &Expr) const override
bool evaluateAsRelocatableImpl(const MCSpecifierExpr &, MCValue &, const MCAssembler *) const override
bool evaluateAsRelocatableImpl(const MCSpecifierExpr &, MCValue &, const MCAssembler *) const override
ARMMCAsmInfoDarwin(const Triple &TheTriple, const MCTargetOptions &Options)
void printSpecifierExpr(raw_ostream &OS, const MCSpecifierExpr &Expr) const override
MCAsmInfoDarwin(const MCTargetOptions &Options)
MCAsmInfoELF(const MCTargetOptions &Options)
MCAsmInfoGNUCOFF(const MCTargetOptions &Options)
MCAsmInfoMicrosoft(const MCTargetOptions &Options)
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
Define some predicates that are used for node matching.
Definition ARMEHABI.h:25
const MCSpecifierExpr * createUpper0_7(const MCExpr *Expr, MCContext &Ctx)
void printSpecifierExpr(const MCAsmInfo &MAI, raw_ostream &OS, const MCSpecifierExpr &Expr)
uint16_t Specifier
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.