2015-08-02 23:11:14 +00:00
|
|
|
//===-- Mos6502TargetMachine.h - Define TargetMachine for Mos6502 ---*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file declares the Mos6502 specific subclass of TargetMachine.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_LIB_TARGET_MOS6502_MOS6502TARGETMACHINE_H
|
|
|
|
#define LLVM_LIB_TARGET_MOS6502_MOS6502TARGETMACHINE_H
|
|
|
|
|
|
|
|
#include "Mos6502InstrInfo.h"
|
|
|
|
#include "Mos6502Subtarget.h"
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class Mos6502TargetMachine : public LLVMTargetMachine {
|
|
|
|
std::unique_ptr<TargetLoweringObjectFile> TLOF;
|
|
|
|
Mos6502Subtarget Subtarget;
|
2015-08-03 20:03:45 +00:00
|
|
|
|
2015-08-02 23:11:14 +00:00
|
|
|
public:
|
|
|
|
Mos6502TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
|
|
|
|
StringRef FS, const TargetOptions &Options,
|
2015-08-03 20:03:45 +00:00
|
|
|
Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL);
|
2015-08-02 23:11:14 +00:00
|
|
|
~Mos6502TargetMachine() override;
|
|
|
|
|
|
|
|
const Mos6502Subtarget *getSubtargetImpl(const Function &) const override {
|
|
|
|
return &Subtarget;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Pass Pipeline Configuration
|
|
|
|
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
|
|
|
|
TargetLoweringObjectFile *getObjFileLowering() const override {
|
|
|
|
return TLOF.get();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|