From: Eli Bendersky Date: Tue, 20 Nov 2012 23:44:22 +0000 (+0000) Subject: Add a tests for the new -no-show-raw-insn option of llvm-objdump. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=857fc5e354568ccdeecb23e7bb18fdf2767b4bec;p=platform%2Fupstream%2Fllvm.git Add a tests for the new -no-show-raw-insn option of llvm-objdump. This also initiates a test/tools directory where tools-specific tests can be placed. llvm-svn: 168397 --- diff --git a/llvm/test/tools/llvm-objdump/disassembly-show-raw.s b/llvm/test/tools/llvm-objdump/disassembly-show-raw.s new file mode 100644 index 0000000..32fcad4 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/disassembly-show-raw.s @@ -0,0 +1,15 @@ +// RUN: llvm-mc -filetype=obj -arch=x86 %s | llvm-objdump -d - \ +// RUN: | FileCheck %s -check-prefix=WITHRAW +// RUN: llvm-mc -filetype=obj -arch=x86 %s | llvm-objdump -d -no-show-raw-insn - \ +// RUN: | FileCheck %s -check-prefix=NORAW + +// Expect to find the raw incoding when run with raw output (default), but not +// when run explicitly with -no-show-raw-insn + +movl 0, %eax +// WITHRAW: a1 00 00 00 00 movl + +// NORAW: movl +// NORAW-NOT: a1 00 + + diff --git a/llvm/test/tools/llvm-objdump/lit.local.cfg b/llvm/test/tools/llvm-objdump/lit.local.cfg new file mode 100644 index 0000000..56bf008 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/lit.local.cfg @@ -0,0 +1,6 @@ +config.suffixes = ['.ll', '.s'] + +targets = set(config.root.targets_to_build.split()) +if not 'X86' in targets: + config.unsupported = True +