mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Initial support for the cfi directives. This is just enough to get
f: .cfi_startproc nop .cfi_endproc assembled (on ELF). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121434 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
75
include/llvm/Target/TargetAsmInfo.h
Normal file
75
include/llvm/Target/TargetAsmInfo.h
Normal file
@@ -0,0 +1,75 @@
|
||||
//===-- llvm/Target/TargetAsmInfo.h -----------------------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Interface to provide the information necessary for producing assembly files.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_TARGET_TARGETASMINFO_H
|
||||
#define LLVM_TARGET_TARGETASMINFO_H
|
||||
|
||||
#include "llvm/CodeGen/MachineLocation.h"
|
||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||
#include "llvm/Target/TargetFrameInfo.h"
|
||||
#include "llvm/Target/TargetRegisterInfo.h"
|
||||
|
||||
namespace llvm {
|
||||
class MCSection;
|
||||
class MCContext;
|
||||
class TargetMachine;
|
||||
class TargetLoweringObjectFile;
|
||||
|
||||
class TargetAsmInfo {
|
||||
unsigned PointerSize;
|
||||
bool IsLittleEndian;
|
||||
TargetFrameInfo::StackDirection StackDir;
|
||||
const TargetRegisterInfo *TRI;
|
||||
std::vector<MachineMove> InitialFrameState;
|
||||
const TargetLoweringObjectFile *TLOF;
|
||||
|
||||
public:
|
||||
explicit TargetAsmInfo(const TargetMachine &TM);
|
||||
|
||||
/// getPointerSize - Get the pointer size in bytes.
|
||||
unsigned getPointerSize() const {
|
||||
return PointerSize;
|
||||
}
|
||||
|
||||
/// islittleendian - True if the target is little endian.
|
||||
bool isLittleEndian() const {
|
||||
return IsLittleEndian;
|
||||
}
|
||||
|
||||
TargetFrameInfo::StackDirection getStackGrowthDirection() const {
|
||||
return StackDir;
|
||||
}
|
||||
|
||||
const MCSection *getDwarfLineSection() const {
|
||||
return TLOF->getDwarfLineSection();
|
||||
}
|
||||
|
||||
const MCSection *getEHFrameSection() const {
|
||||
return TLOF->getEHFrameSection();
|
||||
}
|
||||
|
||||
unsigned getDwarfRARegNum(bool isEH) const {
|
||||
return TRI->getDwarfRegNum(TRI->getRARegister(), isEH);
|
||||
}
|
||||
|
||||
const std::vector<MachineMove> &getInitialFrameState() const {
|
||||
return InitialFrameState;
|
||||
}
|
||||
|
||||
int getDwarfRegNum(unsigned RegNum, bool isEH) const {
|
||||
return TRI->getDwarfRegNum(RegNum, isEH);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user