llvm.org GIT mirror llvm / df06a07
Revert r265817 lld tests need to be addressed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265822 91177308-0d34-0410-b5e6-96231b3b80d8 Colin LeMahieu 4 years ago
62 changed file(s) with 105 addition(s) and 107 deletion(s). Raw diff Collapse all Expand all
None ;RUN: llc -mtriple=thumbv7-linux-gnueabi < %s | llvm-mc -triple=thumbv7-linux-gnueabi -filetype=obj | llvm-objdump --print-imm-hex=false -triple=thumbv7 -d - | FileCheck %s
0 ;RUN: llc -mtriple=thumbv7-linux-gnueabi < %s | llvm-mc -triple=thumbv7-linux-gnueabi -filetype=obj | llvm-objdump -triple=thumbv7 -d - | FileCheck %s
11 ;RUN: llc -mtriple=thumbv7-linux-gnueabi < %s | FileCheck %s -check-prefix=ASM
22 ;RUN: llc -mtriple=thumbv7-apple-darwin < %s | FileCheck %s -check-prefix=ASM
33
0 ;RUN: llc -mtriple=thumbv7-linux-gnueabi < %s | llvm-mc -triple=thumbv7-linux-gnueabi -filetype=obj > %t
11 ; Two pass decoding needed because llvm-objdump does not respect mapping symbols
2 ;RUN: llvm-objdump --print-imm-hex=false -triple=armv7 -d %t | FileCheck %s --check-prefix=ARM
3 ;RUN: llvm-objdump --print-imm-hex=false -triple=thumbv7 -d %t | FileCheck %s --check-prefix=THUMB
2 ;RUN: llvm-objdump -triple=armv7 -d %t | FileCheck %s --check-prefix=ARM
3 ;RUN: llvm-objdump -triple=thumbv7 -d %t | FileCheck %s --check-prefix=THUMB
44
55 define hidden i32 @bah(i8* %start) #0 align 2 {
66 %1 = ptrtoint i8* %start to i32
None ;RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mattr=+neon -verify-machineinstrs -filetype=obj | llvm-objdump --print-imm-hex=false -triple armv7-none-linux-gnueabi -disassemble - | FileCheck %s --check-prefix=ARM
1 ;RUN: llc < %s -mtriple=thumbv7-none-linux-gnueabi -mattr=+neon -verify-machineinstrs -filetype=obj | llvm-objdump --print-imm-hex=false -triple thumbv7-none-linux-gnueabi -disassemble - | FileCheck %s --check-prefix=THUMB2
2 ;RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mattr=-neon -verify-machineinstrs -filetype=obj | llvm-objdump --print-imm-hex=false -triple armv7-none-linux-gnueabi -disassemble - | FileCheck %s --check-prefix=NO_NEON
0 ;RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mattr=+neon -verify-machineinstrs -filetype=obj | llvm-objdump -triple armv7-none-linux-gnueabi -disassemble - | FileCheck %s --check-prefix=ARM
1 ;RUN: llc < %s -mtriple=thumbv7-none-linux-gnueabi -mattr=+neon -verify-machineinstrs -filetype=obj | llvm-objdump -triple thumbv7-none-linux-gnueabi -disassemble - | FileCheck %s --check-prefix=THUMB2
2 ;RUN: llc < %s -mtriple=armv7-none-linux-gnueabi -mattr=-neon -verify-machineinstrs -filetype=obj | llvm-objdump -triple armv7-none-linux-gnueabi -disassemble - | FileCheck %s --check-prefix=NO_NEON
33 ;We want to have both positive and negative checks for thumb1. These checks
44 ;are not easy to do in a single pass so we generate the output once to a
55 ;temp file and run filecheck twice with different prefixes.
6 ;RUN: llc < %s -mtriple=thumbv5-none-linux-gnueabi -verify-machineinstrs -filetype=obj | llvm-objdump --print-imm-hex=false -triple thumbv5-none-linux-gnueabi -disassemble - > %t
6 ;RUN: llc < %s -mtriple=thumbv5-none-linux-gnueabi -verify-machineinstrs -filetype=obj | llvm-objdump -triple thumbv5-none-linux-gnueabi -disassemble - > %t
77 ;RUN: cat %t | FileCheck %s --check-prefix=THUMB1
88 ;RUN: cat %t | FileCheck %s --check-prefix=T1POST
99
0 ; RUN: llc < %s -mtriple=thumbv6-apple-darwin | FileCheck %s
11 ; RUN: llc < %s -mtriple=thumbv6-apple-darwin -regalloc=basic | FileCheck %s
22 ; RUN: llc < %s -o %t -filetype=obj -mtriple=thumbv6-apple-darwin
3 ; RUN: llvm-objdump --print-imm-hex=false -triple=thumbv6-apple-darwin -d %t | FileCheck %s
3 ; RUN: llvm-objdump -triple=thumbv6-apple-darwin -d %t | FileCheck %s
44
55 @__bar = external hidden global i8*
66 @__baz = external hidden global i8*
None ; RUN: llc -march=hexagon --filetype=obj < %s -o - | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
0 ; RUN: llc -march=hexagon --filetype=obj < %s -o - | llvm-objdump -d - | FileCheck %s
11
22 ; Function Attrs: nounwind
33 define i32 @cmpeq(i32 %i) #0 {
None ; RUN: llc -march=hexagon -filetype=obj < %s | llvm-objdump --print-imm-hex=false -d -r - | FileCheck %s
0 ; RUN: llc -march=hexagon -filetype=obj < %s | llvm-objdump -d -r - | FileCheck %s
11
22 declare void @bar()
33
0 ; RUN: llc -march=mipsel -filetype=obj --disable-machine-licm -mattr=micromips < %s -o - \
1 ; RUN: | llvm-objdump --print-imm-hex=false -no-show-raw-insn -arch mipsel -mcpu=mips32r2 -mattr=micromips -d - \
1 ; RUN: | llvm-objdump -no-show-raw-insn -arch mipsel -mcpu=mips32r2 -mattr=micromips -d - \
22 ; RUN: | FileCheck %s -check-prefix=MICROMIPS
33
44 ; Use llvm-objdump to check wheter the encodings of microMIPS atomic instructions are correct.
0 ; RUN: llc < %s -mtriple=thumb-apple-ios | FileCheck %s --check-prefix=CHECK --check-prefix=IOS
11 ; RUN: llc < %s -mtriple=thumb-none-eabi | FileCheck %s --check-prefix=CHECK --check-prefix=EABI
22 ; RUN: llc < %s -o %t -filetype=obj -mtriple=thumbv6-apple-ios
3 ; RUN: llvm-objdump --print-imm-hex=false -triple=thumbv6-apple-ios -d %t | FileCheck %s --check-prefix=CHECK --check-prefix=IOS
3 ; RUN: llvm-objdump -triple=thumbv6-apple-ios -d %t | FileCheck %s --check-prefix=CHECK --check-prefix=IOS
44 ; RUN: llc < %s -o %t -filetype=obj -mtriple=thumbv6-none-eabi
5 ; RUN: llvm-objdump --print-imm-hex=false -triple=thumbv6-none-eabi -d %t | FileCheck %s --check-prefix=CHECK --check-prefix=EABI
5 ; RUN: llvm-objdump -triple=thumbv6-none-eabi -d %t | FileCheck %s --check-prefix=CHECK --check-prefix=EABI
66
77 ; Largest stack for which a single tADDspi/tSUBspi is enough
88 define void @test1() {
0 ; RUN: llvm-as < %s >%t1
11 ; RUN: llvm-lto -exported-symbol=_main -set-merged-module -o %t2 %t1
2 ; RUN: llvm-objdump -d %t2 | FileCheck %s
2 ; RUN: llvm-objdump --print-imm-hex=false -d %t2 | FileCheck %s
33
44 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
55 target triple = "x86_64-apple-macosx10.10.0"
11 @ RUN: | llvm-readobj -r - | FileCheck %s -check-prefix CHECK-RELOCATION
22
33 @ RUN: llvm-mc -triple thumbv7-windows-itanium -filetype obj -o - %s \
4 @ RUN: | llvm-objdump --print-imm-hex=false -d - | FileCheck %s \
5 @ RUN: -check-prefix CHECK-ENCODING
4 @ RUN: | llvm-objdump -d - | FileCheck %s -check-prefix CHECK-ENCODING
65
76 .syntax unified
87 .text
0 @ RUN: not llvm-mc -triple thumbv6m-none-macho -filetype=obj -o /dev/null %s 2>&1 | FileCheck --check-prefix=CHECK-ERROR %s
11 @ RUN: not llvm-mc -triple thumbv7m-none-macho -filetype=obj -o /dev/null %s 2>&1 | FileCheck --check-prefix=CHECK-ERROR %s
22 @ RUN: llvm-mc -triple thumbv7m-none-eabi -filetype=obj -o %t %s
3 @ RUN: llvm-objdump --print-imm-hex=false -d -r -triple thumbv7m-none-eabi %t | FileCheck --check-prefix=CHECK-ELF %s
3 @ RUN: llvm-objdump -d -r -triple thumbv7m-none-eabi %t | FileCheck --check-prefix=CHECK-ELF %s
44
55 .global func1
66 _func1:
0 @ RUN: not llvm-mc -triple thumbv6m-none-macho -filetype=obj -o /dev/null %s 2>&1 | FileCheck --check-prefix=CHECK-ERROR %s
11 @ RUN: llvm-mc -triple thumbv7m-none-macho -filetype=obj -o %t %s
2 @ RUN: llvm-objdump --print-imm-hex=false -d -r -triple thumbv7m-none-macho %t | FileCheck --check-prefix=CHECK-MACHO %s
2 @ RUN: llvm-objdump -d -r -triple thumbv7m-none-macho %t | FileCheck --check-prefix=CHECK-MACHO %s
33 @ RUN: llvm-mc -triple thumbv7m-none-eabi -filetype=obj -o %t %s
4 @ RUN: llvm-objdump --print-imm-hex=false -d -r -triple thumbv7m-none-eabi %t | FileCheck --check-prefix=CHECK-ELF %s
4 @ RUN: llvm-objdump -d -r -triple thumbv7m-none-eabi %t | FileCheck --check-prefix=CHECK-ELF %s
55
66 .global func1
77 _func1:
0 @ RUN: llvm-mc -triple thumbv7-apple-darwin -filetype=obj -o %t.o %s
1 @ RUN: llvm-objdump --print-imm-hex=false -triple thumbv7-apple-darwin -d %t.o | FileCheck %s
1 @ RUN: llvm-objdump -triple thumbv7-apple-darwin -d %t.o | FileCheck %s
22
33 .thumb
44 start:
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-objdump -d - | FileCheck %s
11
22 // Test that we correctly relax these instructions into versions that use
33 // 16 or 32 bit immediate values.
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-objdump -d - | FileCheck %s
11
22 // Test that we avoid relaxing these instructions and instead generate versions
33 // that use 8-bit immediate values.
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-objdump -d - | FileCheck %s
11
22 // Test that we correctly relax these instructions into versions that use
33 // 16 or 32 bit immediate values.
None // RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-objdump -d - | FileCheck %s
11
22 // Test for proper instruction relaxation behavior for the push $imm
33 // instruction forms. This is the 32-bit version of the push $imm tests from
None #RUN: llvm-mc -triple=hexagon -filetype=obj %s | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
0 #RUN: llvm-mc -triple=hexagon -filetype=obj %s | llvm-objdump -d - | FileCheck %s
11
22 # Make sure that the assembler mapped instructions are being handled correctly.
33
None #RUN: llvm-mc -triple=hexagon -filetype=obj %s | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
0 #RUN: llvm-mc -triple=hexagon -filetype=obj %s | llvm-objdump -d - | FileCheck %s
11
22 .text
33 {
None # RUN: llvm-mc -arch=hexagon -filetype=obj %s | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
0 # RUN: llvm-mc -arch=hexagon -filetype=obj %s | llvm-objdump -d - | FileCheck %s
11
22 .text
33 # CHECK-LABEL: 0:
None # RUN: llvm-mc -triple=hexagon -filetype=obj %s | llvm-objdump --print-imm-hex=false -d -r - | FileCheck %s
0 # RUN: llvm-mc -triple=hexagon -filetype=obj %s | llvm-objdump -d -r - | FileCheck %s
11
22 a:
33 # CHECK: r0 = add(r0, #0)
0 ;; RUN: llc -mtriple=hexagon-unknown-elf -filetype=obj %s -o - \
1 ;; RUN: | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
1 ;; RUN: | llvm-objdump -d - | FileCheck %s
22
33 define i1 @foo (i32 %a)
44 {
0 ;; RUN: llc -mtriple=hexagon-unknown-elf -filetype=obj %s -o - \
1 ;; RUN: | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
1 ;; RUN: | llvm-objdump -d - | FileCheck %s
22
33 define i1 @foo (i32 %a)
44 {
0 ;; RUN: llc -mtriple=hexagon-unknown-elf -filetype=obj %s -o - \
1 ;; RUN: | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
1 ;; RUN: | llvm-objdump -d - | FileCheck %s
22
33 define i1 @foo (i32 %a)
44 {
None # RUN: llvm-mc -triple=hexagon -filetype=obj %s | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
0 # RUN: llvm-mc -triple=hexagon -filetype=obj %s | llvm-objdump -d - | FileCheck %s
11 # Make sure relaxation doesn't hinder newvalue calculation
22
33 #CHECK: r18 = add(r2, #-6)
None # RUN: llvm-mc -triple=hexagon -filetype=obj %s | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
0 # RUN: llvm-mc -triple=hexagon -filetype=obj %s | llvm-objdump -d - | FileCheck %s
11
22 # verify two extenders generated during relaxation
33 {
0 #RUN: llvm-mc -triple=hexagon -mcpu=hexagonv60 -filetype=obj %s | \
1 #RUN: llvm-objdump --print-imm-hex=false -triple=hexagon -mcpu=hexagonv60 -d - | \
1 #RUN: llvm-objdump -triple=hexagon -mcpu=hexagonv60 -d - | \
22 #RUN: FileCheck %s
33
44 #CHECK: 292cc11b { vmem(r12++#1) = v27 }
11 # RUN: FileCheck %s
22
33 # RUN: llvm-mc %s -arch=mips -mcpu=mips32 -relocation-model=pic -filetype=obj -o -| \
4 # RUN: llvm-objdump --print-imm-hex=false -d -r -arch=mips - | \
4 # RUN: llvm-objdump -d -r -arch=mips - | \
55 # RUN: FileCheck %s -check-prefix=CHECK-FOR-STORE
66
77 # RUN: llvm-mc %s -arch=mips -mcpu=mips32 -mattr=+micromips -relocation-model=pic -show-encoding | \
11 # RUN: FileCheck %s
22
33 # RUN: llvm-mc %s -arch=mips -mcpu=mips32 -relocation-model=pic -filetype=obj -o -| \
4 # RUN: llvm-objdump --print-imm-hex=false -d -r -arch=mips - | \
4 # RUN: llvm-objdump -d -r -arch=mips - | \
55 # RUN: FileCheck %s -check-prefix=CHECK-FOR-STORE
66
77 # RUN: llvm-mc %s -arch=mips -mcpu=mips32 -mattr=+micromips -relocation-model=pic -show-encoding | \
0 # RUN: llvm-mc -triple mips64-unknown-unknown -target-abi o32 -filetype=obj -o - %s | \
1 # RUN: llvm-objdump --print-imm-hex=false -d -r -arch=mips64 - | \
1 # RUN: llvm-objdump -d -r -arch=mips64 - | \
22 # RUN: FileCheck -check-prefix=ALL -check-prefix=O32 %s
33
44 # RUN: llvm-mc -triple mips64-unknown-unknown -target-abi o32 %s | \
55 # RUN: FileCheck -check-prefix=ALL -check-prefix=ASM %s
66
77 # RUN: llvm-mc -triple mips64-unknown-unknown -target-abi n32 -filetype=obj -o - %s | \
8 # RUN: llvm-objdump --print-imm-hex=false -d -r -t -arch=mips64 - | \
8 # RUN: llvm-objdump -d -r -t -arch=mips64 - | \
99 # RUN: FileCheck -check-prefix=ALL -check-prefix=NXX -check-prefix=N32 %s
1010
1111 # RUN: llvm-mc -triple mips64-unknown-unknown -target-abi n32 %s | \
1212 # RUN: FileCheck -check-prefix=ALL -check-prefix=ASM %s
1313
1414 # RUN: llvm-mc -triple mips64-unknown-unknown %s -filetype=obj -o - | \
15 # RUN: llvm-objdump --print-imm-hex=false -d -r -t -arch=mips64 - | \
15 # RUN: llvm-objdump -d -r -t -arch=mips64 - | \
1616 # RUN: FileCheck -check-prefix=ALL -check-prefix=NXX -check-prefix=N64 %s
1717
1818 # RUN: llvm-mc -triple mips64-unknown-unknown %s | \
11 # as an argument of the %got relocation.
22
33 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s \
4 # RUN: | llvm-objdump --print-imm-hex=false -d -r - | FileCheck %s
4 # RUN: | llvm-objdump -d -r - | FileCheck %s
55
66 .text
77 foo:
0 # RUN: llvm-mc -filetype=obj %s -triple=mips-unknown-linux \
1 # RUN: | llvm-objdump -d - | FileCheck %s
1 # RUN: | llvm-objdump -d --print-imm-hex - | FileCheck %s
22
33 # CHECK: jal 0x20
44 # CHECK: addiu $sp, $sp, -0x20
0 # RUN: llvm-mc -filetype=obj -triple=mips64el-unknown-linux -mcpu=mips64r2 %s \
1 # RUN: | llvm-objdump --print-imm-hex=false -disassemble -triple mips64el - | FileCheck %s
1 # RUN: | llvm-objdump -disassemble -triple mips64el - | FileCheck %s
22
33 # RUN: llvm-mc -filetype=obj -triple=mips64el-unknown-linux -mcpu=mips64r2 %s \
44 # RUN: | llvm-readobj -r | FileCheck %s -check-prefix=CHECK-REL
11 # RUN: | FileCheck %s -check-prefix=CHECK-ENC
22
33 # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux %s \
4 # RUN: | llvm-objdump --print-imm-hex=false -disassemble - | FileCheck %s -check-prefix=CHECK-INSTR
4 # RUN: | llvm-objdump -disassemble - | FileCheck %s -check-prefix=CHECK-INSTR
55
66 # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux %s \
77 # RUN: | llvm-readobj -r | FileCheck %s -check-prefix=CHECK-REL
0 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o - \
1 # RUN: | llvm-objdump --print-imm-hex=false -d - | FileCheck %s
1 # RUN: | llvm-objdump -d - | FileCheck %s
22
33 # CHECK: foo:
44 # CHECK-NEXT: 0: 0c 00 00 02 jal 8
0 # RUN: llvm-mc %s -triple=mipsel-unknown-linux -mcpu=mips32r2 \
11 # RUN: -mattr=+micromips 2>&1 -filetype=obj > %t.o
2 # RUN: llvm-objdump --print-imm-hex=false %t.o -triple mipsel -mattr=+micromips -d | FileCheck %s
2 # RUN: llvm-objdump %t.o -triple mipsel -mattr=+micromips -d | FileCheck %s
33
44 # Check that fixup data is written in the microMIPS specific little endian
55 # byte order.
0 ; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 -target-abi=n64 %s -o - \
1 ; RUN: | llvm-objdump --print-imm-hex=false -disassemble -triple mips64el -mattr +mips64r2 - \
1 ; RUN: | llvm-objdump -disassemble -triple mips64el -mattr +mips64r2 - \
22 ; RUN: | FileCheck %s
33
44 define i64 @dext(i64 %i) nounwind readnone {
0 ; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 -disable-mips-delay-filler %s -o - \
1 ; RUN: | llvm-objdump --print-imm-hex=false -disassemble -triple mips64el - | FileCheck %s
1 ; RUN: | llvm-objdump -disassemble -triple mips64el - | FileCheck %s
22
33 ; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 %s -o - \
4 ; RUN: | llvm-objdump --print-imm-hex=false -disassemble -triple mips64el - | FileCheck %s
4 ; RUN: | llvm-objdump -disassemble -triple mips64el - | FileCheck %s
55
66 define i64 @f3(i64 %a0) nounwind readnone {
77 entry:
33 // field.
44
55 // RUN: llvm-mc -mcpu=mips32r2 -triple=mipsel-pc-linux -filetype=obj -relocation-model=static %s -o - \
6 // RUN: | llvm-objdump --print-imm-hex=false -disassemble -mattr +mips32r2 - \
6 // RUN: | llvm-objdump -disassemble -mattr +mips32r2 - \
77 // RUN: | FileCheck %s
88 // RUN: llvm-mc -mcpu=mips32r2 -triple=mips-pc-linux -filetype=obj -relocation-model=static %s -o - \
9 // RUN: | llvm-objdump --print-imm-hex=false -disassemble -mattr +mips32r2 - \
9 // RUN: | llvm-objdump -disassemble -mattr +mips32r2 - \
1010 // RUN: | FileCheck %s
1111
1212 .text
0 # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-nacl %s \
1 # RUN: | llvm-objdump --print-imm-hex=false -triple mipsel -disassemble -no-show-raw-insn - \
1 # RUN: | llvm-objdump -triple mipsel -disassemble -no-show-raw-insn - \
22 # RUN: | FileCheck %s
33
44 # This test tests that address-masking sandboxing is added when given assembly
0 # RUN: llvm-mc -triple=i686-linux -filetype=obj %s -o - | \
1 # RUN: llvm-objdump --print-imm-hex=false -disassemble -no-show-raw-insn -r - | FileCheck %s
1 # RUN: llvm-objdump -disassemble -no-show-raw-insn -r - | FileCheck %s
22 # RUN: llvm-mc -triple=i686-nacl -filetype=obj %s -o - | \
3 # RUN: llvm-objdump --print-imm-hex=false -disassemble -no-show-raw-insn -r - | FileCheck %s
3 # RUN: llvm-objdump -disassemble -no-show-raw-insn -r - | FileCheck %s
44 # RUN: llvm-mc -triple=i686-nacl -filetype=obj -mc-relax-all %s -o - | \
5 # RUN: llvm-objdump --print-imm-hex=false -disassemble -no-show-raw-insn -r - | FileCheck %s
5 # RUN: llvm-objdump -disassemble -no-show-raw-insn -r - | FileCheck %s
66
77 .bundle_align_mode 5
88 .text
0 # RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - \
1 # RUN: | llvm-objdump --print-imm-hex=false -disassemble -no-show-raw-insn - \
1 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - \
22 # RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK-OPT %s
33 # RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu -mc-relax-all %s -o - \
4 # RUN: | llvm-objdump --print-imm-hex=false -disassemble -no-show-raw-insn - \
4 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - \
55 # RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK-RELAX %s
66
77 .text
0 # RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - \
1 # RUN: | llvm-objdump --print-imm-hex=false -disassemble -no-show-raw-insn - \
1 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - \
22 # RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK-OPT %s
33 # RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu -mc-relax-all %s -o - \
4 # RUN: | llvm-objdump --print-imm-hex=false -disassemble -no-show-raw-insn - \
4 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - \
55 # RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK-RELAX %s
66
77 .text
0 # RUN: llvm-mc -triple=i686-nacl -filetype=obj %s -o - \
1 # RUN: | llvm-objdump --print-imm-hex=false -disassemble -no-show-raw-insn - | FileCheck %s
1 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - | FileCheck %s
22 # RUN: llvm-mc -triple=i686-nacl -filetype=obj -mc-relax-all %s -o - \
3 # RUN: | llvm-objdump --print-imm-hex=false -disassemble -no-show-raw-insn - | FileCheck %s
3 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - | FileCheck %s
44
55 .bundle_align_mode 5
66 .text
0 # RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
1 # RUN: | llvm-objdump --print-imm-hex=false -disassemble -no-show-raw-insn - | FileCheck -check-prefix=CHECK -check-prefix=CHECK-OPT %s
1 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - | FileCheck -check-prefix=CHECK -check-prefix=CHECK-OPT %s
22 # RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu -mc-relax-all %s -o - \
3 # RUN: | llvm-objdump --print-imm-hex=false -disassemble -no-show-raw-insn - | FileCheck -check-prefix=CHECK -check-prefix=CHECK-RELAX %s
3 # RUN: | llvm-objdump -disassemble -no-show-raw-insn - | FileCheck -check-prefix=CHECK -check-prefix=CHECK-RELAX %s
44
55 # Test simple NOP insertion for single instructions.
66
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t
1 // RUN: llvm-objdump --print-imm-hex=false -d %t | FileCheck %s
1 // RUN: llvm-objdump -d %t | FileCheck %s
22
33 //PR18303
44 .global edata
None # RUN: llvm-mc -filetype=obj %s -triple=x86_64-apple-darwin9 | llvm-objdump -d - | FileCheck %s
0 # RUN: llvm-mc -filetype=obj %s -triple=x86_64-apple-darwin9 | llvm-objdump -d --print-imm-hex - | FileCheck %s
11
22 # CHECK: movabsq $0x7fffffffffffffff, %rcx
33 movabsq $0x7fffffffffffffff, %rcx
None RUN: llvm-objdump --print-imm-hex=false -disassemble -triple mips64el -mattr +mips64r2 %p/../Inputs/dext-test.elf-mips64r2 \
0 RUN: llvm-objdump -disassemble -triple mips64el -mattr +mips64r2 %p/../Inputs/dext-test.elf-mips64r2 \
11 RUN: | FileCheck %s
22
33 CHECK: Disassembly of section .text:
None RUN: llvm-objdump --print-imm-hex=false -d -mattr=micromips %p/../Inputs/micro-mips.elf-mipsel \
0 RUN: llvm-objdump -d -mattr=micromips %p/../Inputs/micro-mips.elf-mipsel \
11 RUN: | FileCheck %s
22
33 CHECK: foo:
None RUN: llvm-objdump --print-imm-hex=false -d -r %p/../Inputs/trivial-object-test.coff-i386 \
0 RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.coff-i386 \
11 RUN: | FileCheck %s -check-prefix COFF-i386
2 RUN: llvm-objdump --print-imm-hex=false -d -r %p/../Inputs/trivial-object-test.coff-x86-64 \
2 RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.coff-x86-64 \
33 RUN: | FileCheck %s -check-prefix COFF-x86-64
4 RUN: llvm-objdump --print-imm-hex=false -d -r %p/../Inputs/trivial-object-test.macho-i386 \
4 RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.macho-i386 \
55 RUN: | FileCheck %s -check-prefix MACHO-i386
6 RUN: llvm-objdump --print-imm-hex=false -d -r %p/../Inputs/trivial-object-test.macho-x86-64 \
6 RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.macho-x86-64 \
77 RUN: | FileCheck %s -check-prefix MACHO-x86-64
8 RUN: llvm-objdump --print-imm-hex=false -d -r %p/../Inputs/trivial-object-test.elf-i386 \
8 RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.elf-i386 \
99 RUN: | FileCheck %s -check-prefix ELF-i386
10 RUN: llvm-objdump --print-imm-hex=false -d -r %p/../Inputs/trivial-object-test.elf-x86-64 \
10 RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.elf-x86-64 \
1111 RUN: | FileCheck %s -check-prefix ELF-x86-64
1212
1313 COFF-i386: file format COFF-i386
None RUN: llvm-objdump --print-imm-hex=false -d %p/../Inputs/trivial-object-test.coff-i386 \
0 RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-i386 \
11 RUN: | FileCheck %s -check-prefix COFF-i386
2 RUN: llvm-objdump --print-imm-hex=false -d %p/../Inputs/trivial-object-test.coff-x86-64 \
2 RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-x86-64 \
33 RUN: | FileCheck %s -check-prefix COFF-x86-64
4 RUN: llvm-objdump --print-imm-hex=false -d %p/../Inputs/trivial-object-test.elf-i386 \
4 RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.elf-i386 \
55 RUN: | FileCheck %s -check-prefix ELF-i386
6 RUN: llvm-objdump --print-imm-hex=false -d %p/../Inputs/trivial-object-test.elf-x86-64 \
6 RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.elf-x86-64 \
77 RUN: | FileCheck %s -check-prefix ELF-x86-64
88
99 COFF-i386: file format COFF-i386
None // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr %p/Inputs/hello.obj.macho-aarch64 | FileCheck %s -check-prefix=OBJ
1 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr %p/Inputs/hello.exe.macho-aarch64 | FileCheck %s -check-prefix=EXE
2 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr %p/Inputs/ObjC.obj.macho-aarch64 | FileCheck %s -check-prefix=ObjC-OBJ
3 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr %p/Inputs/ObjC.exe.macho-aarch64 | FileCheck %s -check-prefix=ObjC-EXE
0 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.obj.macho-aarch64 | FileCheck %s -check-prefix=OBJ
1 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.exe.macho-aarch64 | FileCheck %s -check-prefix=EXE
2 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/ObjC.obj.macho-aarch64 | FileCheck %s -check-prefix=ObjC-OBJ
3 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/ObjC.exe.macho-aarch64 | FileCheck %s -check-prefix=ObjC-EXE
44
55 OBJ: 000000000000001c adrp x0, L_.str@PAGE
66 OBJ: 0000000000000020 add x0, x0, L_.str@PAGEOFF
None // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr %p/Inputs/hello.obj.macho-arm | FileCheck %s -check-prefix=OBJ
1 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr %p/Inputs/hello.exe.macho-arm | FileCheck %s -check-prefix=EXE
0 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.obj.macho-arm | FileCheck %s -check-prefix=OBJ
1 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.exe.macho-arm | FileCheck %s -check-prefix=EXE
22
33 OBJ: 00000006 movw r3, :lower16:((54-14)-4)
44 OBJ: 0000000a movt r3, :upper16:((54-14)-4)
None // RUN: llvm-objdump --print-imm-hex=false -d %p/Inputs/disassemble.dll.coff-i386 | \
0 // RUN: llvm-objdump -d %p/Inputs/disassemble.dll.coff-i386 | \
11 // RUN: FileCheck %s
22
33 // CHECK-LABEL: g:
0 # Check that target displacement has '0x' prefix
11 # to accent hex format of the number.
22
3 # RUN: llvm-objdump --print-imm-hex=false -d %p/Inputs/hello.exe.macho-i386 | FileCheck %s
3 # RUN: llvm-objdump -d %p/Inputs/hello.exe.macho-i386 | FileCheck %s
44
55 # CHECK: 1f47: e8 00 00 00 00 calll 0 <_main+0xC>
None # RUN: llvm-objdump -m -d %p/Inputs/hello.obj.macho-x86_64 -no-show-raw-insn -no-leading-addr | FileCheck %s
0 # RUN: llvm-objdump -m -d %p/Inputs/hello.obj.macho-x86_64 -no-show-raw-insn -print-imm-hex -no-leading-addr | FileCheck %s
11
22 # CHECK: (__TEXT,__text) section
33 # CHECK: _main:
None # RUN: llvm-objdump -m -d %p/Inputs/exeThread.macho-x86_64 -dis-symname start -no-show-raw-insn -full-leading-addr | FileCheck %s
0 # RUN: llvm-objdump -m -d %p/Inputs/exeThread.macho-x86_64 -dis-symname start -no-show-raw-insn -full-leading-addr -print-imm-hex | FileCheck %s
11
22 # CHECK: (__TEXT,__text) section
33 # CHECK: start:
None # RUN: llvm-mc < %s -triple x86_64-apple-darwin -filetype=obj | llvm-objdump -m -section __FOO,__bar -full-leading-addr -no-show-raw-insn - | FileCheck %s
0 # RUN: llvm-mc < %s -triple x86_64-apple-darwin -filetype=obj | llvm-objdump -m -section __FOO,__bar -full-leading-addr -print-imm-hex -no-show-raw-insn - | FileCheck %s
11
22 .section __FOO, __bar
33 _foo:
None // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s -check-prefix=OBJ
1 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr %p/Inputs/hello.exe.macho-x86_64 | FileCheck %s -check-prefix=EXE
2 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr %p/Inputs/ObjC.obj.macho-x86_64 | FileCheck %s -check-prefix=ObjC-OBJ
3 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr %p/Inputs/ObjC.exe.macho-x86_64 | FileCheck %s -check-prefix=ObjC-EXE
4 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr %p/Inputs/hello_cpp.exe.macho-x86_64 | FileCheck %s -check-prefix=CXX-EXE
0 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s -check-prefix=OBJ
1 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.exe.macho-x86_64 | FileCheck %s -check-prefix=EXE
2 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/ObjC.obj.macho-x86_64 | FileCheck %s -check-prefix=ObjC-OBJ
3 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/ObjC.exe.macho-x86_64 | FileCheck %s -check-prefix=ObjC-EXE
4 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello_cpp.exe.macho-x86_64 | FileCheck %s -check-prefix=CXX-EXE
55
6 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr %p/Inputs/hello.obj.macho-i386 | FileCheck %s -check-prefix=i386-OBJ
7 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr %p/Inputs/hello.exe.macho-i386 | FileCheck %s -check-prefix=i386-EXE
6 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.obj.macho-i386 | FileCheck %s -check-prefix=i386-OBJ
7 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.exe.macho-i386 | FileCheck %s -check-prefix=i386-EXE
88
9 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -no-symbolic-operands %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s -check-prefix=NO-SYM-OPS-OBJ
10 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -no-symbolic-operands %p/Inputs/hello.exe.macho-x86_64 | FileCheck %s -check-prefix=NO-SYM-OPS-EXE
9 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex -no-symbolic-operands %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s -check-prefix=NO-SYM-OPS-OBJ
10 // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex -no-symbolic-operands %p/Inputs/hello.exe.macho-x86_64 | FileCheck %s -check-prefix=NO-SYM-OPS-EXE
1111
1212 OBJ: 0000000000000008 leaq L_.str(%rip), %rax ## literal pool for: "Hello world\n"
1313 OBJ: 0000000000000026 callq _printf
None RUN: llvm-objdump %p/Inputs/macho-universal.x86_64.i386 -d -m -no-show-raw-insn -full-leading-addr -arch all \
0 RUN: llvm-objdump %p/Inputs/macho-universal.x86_64.i386 -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex -arch all \
11 RUN: | FileCheck %s -check-prefix UEXE-all
2 RUN: llvm-objdump %p/Inputs/macho-universal-archive.x86_64.i386 -d -m -no-show-raw-insn -full-leading-addr -arch i386 \
2 RUN: llvm-objdump %p/Inputs/macho-universal-archive.x86_64.i386 -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex -arch i386 \
33 RUN: | FileCheck %s -check-prefix UArchive-i386
44 RUN: llvm-objdump %p/Inputs/macho-universal.x86_64.i386 -universal-headers -m \
55 RUN: | FileCheck %s -check-prefix FAT
0 // These test checks that llvm-objdump will not crash with malformed Mach-O
11 // files. So the check line is not all that important but the bug fixes to
22 // make sure llvm-objdump is robust is what matters.
3 # RUN: llvm-objdump --print-imm-hex=false -macho -objc-meta-data \
3 # RUN: llvm-objdump -macho -objc-meta-data \
44 # RUN: %p/Inputs/malformed-machos/mem-crup-0001.macho \
55 # RUN: | FileCheck -check-prefix=m0001 %s
66
77 # m0001: (method_t extends past the end of the section)
88
9 # RUN: llvm-objdump --print-imm-hex=false -macho -objc-meta-data \
9 # RUN: llvm-objdump -macho -objc-meta-data \
1010 # RUN: %p/Inputs/malformed-machos/mem-crup-0006.macho \
1111 # RUN: | FileCheck -check-prefix=m0006 %s
1212
1313 # m0006: ivarLayout 0x8
1414
15 # RUN: llvm-objdump --print-imm-hex=false -macho -objc-meta-data \
15 # RUN: llvm-objdump -macho -objc-meta-data \
1616 # RUN: %p/Inputs/malformed-machos/mem-crup-0006.macho \
1717 # RUN: | FileCheck -check-prefix=m0010 %s
1818
1919 # m0010: 00000000000010e0 0x10e8 _OBJC_CLASS_
2020
21 # RUN: llvm-objdump --print-imm-hex=false -macho -objc-meta-data \
21 # RUN: llvm-objdump -macho -objc-meta-data \
2222 # RUN: %p/Inputs/malformed-machos/mem-crup-0040.macho \
2323 # RUN: | FileCheck -check-prefix=m0040 %s
2424
2525 # m0040: 00000000000010a0 0xf39 -[tiny_dylib init]
2626
27 # RUN: llvm-objdump --print-imm-hex=false -macho -objc-meta-data \
27 # RUN: llvm-objdump -macho -objc-meta-data \
2828 # RUN: %p/Inputs/malformed-machos/mem-crup-0080.macho \
2929 # RUN: | FileCheck -check-prefix=m0080 %s
3030
3131 # m0080: data 0xf960000 (struct class_ro_t *)
3232
33 # RUN: llvm-objdump --print-imm-hex=false -macho -objc-meta-data \
33 # RUN: llvm-objdump -macho -objc-meta-data \
3434 # RUN: %p/Inputs/malformed-machos/mem-crup-0261.macho
3535
36 # RUN: llvm-objdump --print-imm-hex=false -macho -disassemble \
36 # RUN: llvm-objdump -macho -disassemble \
3737 # RUN: %p/Inputs/malformed-machos/mem-crup-0337.macho \
3838 # RUN: | FileCheck -check-prefix=m0337 %s
3939
176176
177177 cl::opt
178178 llvm::PrintImmHex("print-imm-hex",
179 cl::desc("Use hex format for immediate values"),
180 cl::init(true));
179 cl::desc("Use hex format for immediate values"));
181180
182181 cl::opt PrintFaultMaps("fault-map-section",
183182 cl::desc("Display contents of faultmap section"));