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/TargetFrameInfo.h"
20 #include "llvm/Target/TargetRegisterInfo.h"
26 class TargetLoweringObjectFile;
31 TargetFrameInfo::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 TargetFrameInfo::StackDirection getStackGrowthDirection() const {
53 const MCSection *getDwarfLineSection() const {
54 return TLOF->getDwarfLineSection();
57 const MCSection *getEHFrameSection() const {
58 return TLOF->getEHFrameSection();
61 unsigned getDwarfRARegNum(bool isEH) const {
62 return TRI->getDwarfRegNum(TRI->getRARegister(), isEH);
65 const std::vector<MachineMove> &getInitialFrameState() const {
66 return InitialFrameState;
69 int getDwarfRegNum(unsigned RegNum, bool isEH) const {
70 return TRI->getDwarfRegNum(RegNum, isEH);