[llvm-commits] [llvm] r89850 - in /llvm/trunk/lib/Target/X86: Disassembler/ Disassembler/CMakeLists.txt Disassembler/Makefile Disassembler/X86Disassembler.cpp Makefile
Daniel Dunbar
daniel at zuster.org
Tue Nov 24 22:53:09 PST 2009
Author: ddunbar
Date: Wed Nov 25 00:53:08 2009
New Revision: 89850
URL: http://llvm.org/viewvc/llvm-project?rev=89850&view=rev
Log:
Sketch structure for X86 disassembler.
Added:
llvm/trunk/lib/Target/X86/Disassembler/
llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt
llvm/trunk/lib/Target/X86/Disassembler/Makefile
llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp
Modified:
llvm/trunk/lib/Target/X86/Makefile
Added: llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt?rev=89850&view=auto
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt (added)
+++ llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt Wed Nov 25 00:53:08 2009
@@ -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)
Added: llvm/trunk/lib/Target/X86/Disassembler/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/Makefile?rev=89850&view=auto
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/Makefile (added)
+++ llvm/trunk/lib/Target/X86/Disassembler/Makefile Wed Nov 25 00:53:08 2009
@@ -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
Added: llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp?rev=89850&view=auto
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp (added)
+++ llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp Wed Nov 25 00:53:08 2009
@@ -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);
+}
Modified: llvm/trunk/lib/Target/X86/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Makefile?rev=89850&r1=89849&r2=89850&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Makefile (original)
+++ llvm/trunk/lib/Target/X86/Makefile Wed Nov 25 00:53:08 2009
@@ -18,6 +18,6 @@
X86GenFastISel.inc \
X86GenCallingConv.inc X86GenSubtarget.inc
-DIRS = AsmPrinter AsmParser TargetInfo
+DIRS = AsmPrinter AsmParser Disassembler TargetInfo
include $(LEVEL)/Makefile.common
More information about the llvm-commits
mailing list