LLVM 24.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 bool usesCompInstByteOrder(const MCSubtargetInfo &STI) const override;
61};
62
64 void anchor() override;
65
66public:
69 const MCSpecifierExpr &Expr) const override {
70 ARM::printSpecifierExpr(*this, OS, Expr);
71 }
73 const MCAssembler *) const override {
74 return false;
75 }
76};
77
79 void anchor() override;
80
81public:
84 const MCSpecifierExpr &Expr) const override {
85 ARM::printSpecifierExpr(*this, OS, Expr);
86 }
88 const MCAssembler *) const override {
89 return false;
90 }
91};
92
93namespace ARM {
95enum {
98
100 MCSymbolRefExpr::FirstTargetSpecifier, // The R_ARM_MOVT_ABS relocation
101 // (:upper16: in the .s file)
102 S_LO16, // The R_ARM_MOVW_ABS_NC relocation (:lower16: in the .s file)
103
104 S_HI_8_15, // The R_ARM_THM_ALU_ABS_G3 relocation (:upper8_15: in
105 // the .s file)
106 S_HI_0_7, // The R_ARM_THM_ALU_ABS_G2_NC relocation (:upper0_8: in the
107 // .s file)
108 S_LO_8_15, // The R_ARM_THM_ALU_ABS_G1_NC relocation (:lower8_15: in
109 // the .s file)
110 S_LO_0_7, // The R_ARM_THM_ALU_ABS_G0_NC relocation (:lower0_7: in the
111 // .s file)
112
136};
137
138const MCSpecifierExpr *createUpper16(const MCExpr *Expr, MCContext &Ctx);
139const MCSpecifierExpr *createLower16(const MCExpr *Expr, MCContext &Ctx);
140const MCSpecifierExpr *createUpper8_15(const MCExpr *Expr, MCContext &Ctx);
141const MCSpecifierExpr *createUpper0_7(const MCExpr *Expr, MCContext &Ctx);
142const MCSpecifierExpr *createLower8_15(const MCExpr *Expr, MCContext &Ctx);
143const MCSpecifierExpr *createLower0_7(const MCExpr *Expr, MCContext &Ctx);
144}
145
146} // namespace llvm
147
148#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
bool usesCompInstByteOrder(const MCSubtargetInfo &STI) const override
True if the instruction is stored in multiple halfwords, with the high-order half appearing first in ...
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:494
Generic base class for all target subtargets.
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:48
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.