Sketch structure for X86 disassembler.

llvm-svn: 89850
This commit is contained in:
Daniel Dunbar 2009-11-25 06:53:08 +00:00
parent c92791193d
commit 900f2ce31c
4 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,6 @@
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )
add_llvm_library(LLVMX86Disassembler
X86Disassembler.cpp
)
add_dependencies(LLVMX86Disassembler X86CodeGenTable_gen)

View File

@ -0,0 +1,16 @@
##===- lib/Target/X86/Disassembler/Makefile ----------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../..
LIBRARYNAME = LLVMX86Disassembler
# Hack: we need to include 'main' x86 target directory to grab private headers
CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..
include $(LEVEL)/Makefile.common

View File

@ -0,0 +1,29 @@
//===- X86Disassembler.cpp - Disassembler for x86 and x86_64 ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCDisassembler.h"
#include "llvm/Target/TargetRegistry.h"
#include "X86.h"
using namespace llvm;
static const MCDisassembler *createX86_32Disassembler(const Target &T) {
return 0;
}
static const MCDisassembler *createX86_64Disassembler(const Target &T) {
return 0;
}
extern "C" void LLVMInitializeX86Disassembler() {
// Register the disassembler.
TargetRegistry::RegisterMCDisassembler(TheX86_32Target,
createX86_32Disassembler);
TargetRegistry::RegisterMCDisassembler(TheX86_64Target,
createX86_64Disassembler);
}

View File

@ -18,6 +18,6 @@ BUILT_SOURCES = X86GenRegisterInfo.h.inc X86GenRegisterNames.inc \
X86GenFastISel.inc \
X86GenCallingConv.inc X86GenSubtarget.inc
DIRS = AsmPrinter AsmParser TargetInfo
DIRS = AsmPrinter AsmParser Disassembler TargetInfo
include $(LEVEL)/Makefile.common