1 //===-- llvm/Target/TargetAsmInfo.h -----------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Interface to provide the information necessary for producing assembly files.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TARGET_TARGETASMINFO_H
15 #define LLVM_TARGET_TARGETASMINFO_H
17 #include "llvm/CodeGen/MachineLocation.h"
18 #include "llvm/Target/TargetLoweringObjectFile.h"
19 #include "llvm/Target/TargetFrameLowering.h"
20 #include "llvm/Target/TargetRegisterInfo.h"
26 class TargetLoweringObjectFile;
31 TargetFrameLowering::StackDirection StackDir;
32 const TargetRegisterInfo *TRI;
33 std::vector<MachineMove> InitialFrameState;
34 const TargetLoweringObjectFile *TLOF;
37 explicit TargetAsmInfo(const TargetMachine &TM);
39 /// getPointerSize - Get the pointer size in bytes.
40 unsigned getPointerSize() const {
44 /// islittleendian - True if the target is little endian.
45 bool isLittleEndian() const {
46 return IsLittleEndian;
49 TargetFrameLowering::StackDirection getStackGrowthDirection() const {
53 const MCSection *getDwarfLineSection() const {
54 return TLOF->getDwarfLineSection();
57 const MCSection *getEHFrameSection() const {
58 return TLOF->getEHFrameSection();
61 const unsigned getFDEEncoding() const {
62 return TLOF->getFDEEncoding();
65 unsigned getDwarfRARegNum(bool isEH) const {
66 return TRI->getDwarfRegNum(TRI->getRARegister(), isEH);
69 const std::vector<MachineMove> &getInitialFrameState() const {
70 return InitialFrameState;
73 int getDwarfRegNum(unsigned RegNum, bool isEH) const {
74 return TRI->getDwarfRegNum(RegNum, isEH);