mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
MC/X86: Add stub AsmBackend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96763 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e7bd886cb8
commit
12783d1c3a
@ -18,4 +18,5 @@ add_llvm_library(LLVMMC
|
||||
MCStreamer.cpp
|
||||
MCSymbol.cpp
|
||||
MCValue.cpp
|
||||
TargetAsmBackend.cpp
|
||||
)
|
||||
|
@ -15,6 +15,7 @@ tablegen(X86GenCallingConv.inc -gen-callingconv)
|
||||
tablegen(X86GenSubtarget.inc -gen-subtarget)
|
||||
|
||||
set(sources
|
||||
X86AsmBackend.cpp
|
||||
X86CodeEmitter.cpp
|
||||
X86COFFMachineModuleInfo.cpp
|
||||
X86ELFWriterInfo.cpp
|
||||
|
@ -19,13 +19,15 @@
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class X86TargetMachine;
|
||||
class FunctionPass;
|
||||
class MachineCodeEmitter;
|
||||
class JITCodeEmitter;
|
||||
class MCAssembler;
|
||||
class MCCodeEmitter;
|
||||
class MCContext;
|
||||
class JITCodeEmitter;
|
||||
class MachineCodeEmitter;
|
||||
class Target;
|
||||
class TargetAsmBackend;
|
||||
class X86TargetMachine;
|
||||
class formatted_raw_ostream;
|
||||
|
||||
/// createX86ISelDag - This pass converts a legalized DAG into a
|
||||
@ -55,6 +57,9 @@ MCCodeEmitter *createX86_32MCCodeEmitter(const Target &, TargetMachine &TM,
|
||||
MCCodeEmitter *createX86_64MCCodeEmitter(const Target &, TargetMachine &TM,
|
||||
MCContext &Ctx);
|
||||
|
||||
TargetAsmBackend *createX86_32AsmBackend(const Target &, MCAssembler &);
|
||||
TargetAsmBackend *createX86_64AsmBackend(const Target &, MCAssembler &);
|
||||
|
||||
/// createX86EmitCodeToMemory - Returns a pass that converts a register
|
||||
/// allocated function into raw machine code in a dynamically
|
||||
/// allocated chunk of memory.
|
||||
|
34
lib/Target/X86/X86AsmBackend.cpp
Normal file
34
lib/Target/X86/X86AsmBackend.cpp
Normal file
@ -0,0 +1,34 @@
|
||||
//===-- X86AsmBackend.cpp - X86 Assembler Backend -------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Target/TargetAsmBackend.h"
|
||||
#include "X86.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
#include "llvm/Target/TargetAsmBackend.h"
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
|
||||
class X86AsmBackend : public TargetAsmBackend {
|
||||
public:
|
||||
X86AsmBackend(const Target &T, MCAssembler &A)
|
||||
: TargetAsmBackend(T) {}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
TargetAsmBackend *llvm::createX86_32AsmBackend(const Target &T,
|
||||
MCAssembler &A) {
|
||||
return new X86AsmBackend(T, A);
|
||||
}
|
||||
|
||||
TargetAsmBackend *llvm::createX86_64AsmBackend(const Target &T,
|
||||
MCAssembler &A) {
|
||||
return new X86AsmBackend(T, A);
|
||||
}
|
@ -51,6 +51,12 @@ extern "C" void LLVMInitializeX86Target() {
|
||||
createX86_32MCCodeEmitter);
|
||||
TargetRegistry::RegisterCodeEmitter(TheX86_64Target,
|
||||
createX86_64MCCodeEmitter);
|
||||
|
||||
// Register the asm backend.
|
||||
TargetRegistry::RegisterAsmBackend(TheX86_32Target,
|
||||
createX86_32AsmBackend);
|
||||
TargetRegistry::RegisterAsmBackend(TheX86_64Target,
|
||||
createX86_64AsmBackend);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user