Re-enable ARM/Thumb disassembler and add a workaround for a memcpy() call in

ARMDecoderEmitter.cpp, with FIXME comment.

llvm-svn: 100690
This commit is contained in:
Johnny Chen 2010-04-07 20:53:12 +00:00
parent 4cdb545401
commit 2c992fb384
3 changed files with 25 additions and 4 deletions

View File

@ -0,0 +1,16 @@
##===- lib/Target/ARM/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 = LLVMARMDisassembler
# Hack: we need to include 'main' arm target directory to grab private headers
CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..
include $(LEVEL)/Makefile.common

View File

@ -16,8 +16,9 @@ BUILT_SOURCES = ARMGenRegisterInfo.h.inc ARMGenRegisterNames.inc \
ARMGenRegisterInfo.inc ARMGenInstrNames.inc \
ARMGenInstrInfo.inc ARMGenAsmWriter.inc \
ARMGenDAGISel.inc ARMGenSubtarget.inc \
ARMGenCodeEmitter.inc ARMGenCallingConv.inc
ARMGenCodeEmitter.inc ARMGenCallingConv.inc \
ARMGenDecoderTables.inc
DIRS = AsmPrinter AsmParser TargetInfo
DIRS = AsmPrinter AsmParser Disassembler TargetInfo
include $(LEVEL)/Makefile.common

View File

@ -596,7 +596,11 @@ void Filter::recurse() {
bit_value_t BitValueArray[BIT_WIDTH];
// Starts by inheriting our parent filter chooser's filter bit values.
memcpy(BitValueArray, Owner->FilterBitValues, sizeof(BitValueArray));
bit_value_t *BitVals = Owner->FilterBitValues;
for (unsigned i = 0; i < BIT_WIDTH; ++i)
BitValueArray[i] = BitVals[i];
// FIXME: memcpy() is optmized out with self-hosting llvm-gcc (-O1 and -O2).
//memcpy(BitValueArray, Owner->FilterBitValues, sizeof(BitValueArray));
unsigned bitIndex;
@ -623,7 +627,7 @@ void Filter::recurse() {
assert(FilterChooserMap.size() == 1);
return;
}
// Otherwise, create sub choosers.
for (mapIterator = FilteredInstructions.begin();
mapIterator != FilteredInstructions.end();