forked from OSchip/llvm-project
[BOLT][test] Fix X86 cross-platform tests
Use target-specific flags for building X86 non-runnable tests. Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D123072
This commit is contained in:
parent
4875ff1dc9
commit
f0f5d19a36
|
@ -1,18 +1,18 @@
|
|||
.globl main
|
||||
main:
|
||||
|
||||
.globl foo
|
||||
foo:
|
||||
.cfi_startproc
|
||||
jmpq *%rax
|
||||
.cfi_endproc
|
||||
.size foo, .-foo
|
||||
|
||||
.globl bar
|
||||
bar:
|
||||
.cfi_startproc
|
||||
jmp moo
|
||||
.cfi_endproc
|
||||
.size bar, .-bar
|
||||
|
||||
.globl moo
|
||||
moo:
|
||||
nop
|
||||
.size moo, .-moo
|
||||
|
|
|
@ -109,8 +109,3 @@ _Z7catchitv:
|
|||
|
||||
.cfi_endproc
|
||||
.size _Z7catchitv, .-_Z7catchitv
|
||||
.set "_Z5raisev", 0
|
||||
.set _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc, 0
|
||||
.set _ZNSolsEPFRSoS_E, 0
|
||||
.set __cxa_begin_catch, 0
|
||||
.set __cxa_end_catch, 0
|
||||
|
|
|
@ -45,7 +45,7 @@ inc_dup:
|
|||
# CHECK: leaq "JUMP_TABLE{{.*}}"(%rip), %rdx
|
||||
leaq .L4(%rip), %rdx
|
||||
jmp .LJT
|
||||
# CHECK: leaq DATAat{{.*}}(%rip), %rdx
|
||||
# CHECK: leaq {{.*}}(%rip), %rdx
|
||||
leaq .LC0(%rip), %rdx
|
||||
jmp .L10
|
||||
.LJT:
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# RUN: | FileCheck %s
|
||||
|
||||
## The call to puts() should come from inline-foo.c:
|
||||
# CHECK: callq puts@PLT # debug line {{.*}}inline-foo.c:4:3
|
||||
# CHECK: callq {{.*}} # debug line {{.*}}inline-foo.c:4:3
|
||||
|
||||
# RUN: llvm-objdump --disassemble-symbols=main -d --line-numbers %t.bolt \
|
||||
# RUN: | FileCheck %s -check-prefix=CHECK-OBJDUMP
|
||||
|
|
|
@ -53,4 +53,7 @@ FUNC:
|
|||
main:
|
||||
xorq %rax, %rax
|
||||
retq
|
||||
|
||||
# For relocations against .text
|
||||
call exit
|
||||
.Lend2:
|
||||
|
|
|
@ -1,2 +1,7 @@
|
|||
if config.host_arch not in ['x86', 'X86', 'x86_64']:
|
||||
config.unsupported = True
|
||||
|
||||
config.substitutions.insert(
|
||||
0, ('%cflags',
|
||||
'%cflags --target=x86_64--pc-linux -nostartfiles -nostdlib -fuse-ld=lld'
|
||||
' -Wl,--unresolved-symbols=ignore-all'))
|
||||
|
|
|
@ -44,4 +44,7 @@ main:
|
|||
cmp $16, %rax
|
||||
jl .Jloop
|
||||
retq
|
||||
|
||||
# For relocations against .text
|
||||
call exit
|
||||
.Lend:
|
||||
|
|
|
@ -9,8 +9,8 @@ RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
|
|||
RUN: llvm-bolt %t.exe -o %t -data=%t.fdata \
|
||||
RUN: -print-cfg -print-loops -sequential-disassembly -lite=0 2>&1 | FileCheck %s
|
||||
|
||||
CHECK: Binary Function "main" after building cfg
|
||||
CHECK: Loop Info for Function "main"
|
||||
CHECK: Binary Function "main{{.*}}" after building cfg
|
||||
CHECK: Loop Info for Function "main{{.*}}"
|
||||
CHECK: Outer loop header: .Ltmp[[#MAIN_OUTER_HDR:]]
|
||||
CHECK-NEXT: Loop basic blocks: .Ltmp[[#MAIN_OUTER_HDR]], .Ltmp[[#]]
|
||||
|
||||
|
|
|
@ -12,6 +12,13 @@
|
|||
# CHECK-NOT: unclaimed PC-relative relocations left in data
|
||||
# CHECK: BOLT-INFO: marking main.cold as a fragment of main
|
||||
.text
|
||||
.globl _start
|
||||
.type _start, %function
|
||||
_start:
|
||||
callq main.cold
|
||||
call exit
|
||||
.size _start, .-_start
|
||||
|
||||
.globl main.cold
|
||||
.type main.cold, %function
|
||||
.p2align 2
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# RUN: llvm-bolt %t.exe -o %t.out -data %t.fdata -relocs \
|
||||
# RUN: -tail-duplication=1 -tail-duplication-aggressive=1 \
|
||||
# RUN: -print-cfg | FileCheck %s
|
||||
# CHECK: Jump table JUMP_TABLE/a.0 for function a at {{.*}} with a total count of 3
|
||||
# CHECK: Jump table {{.*}} for function a at {{.*}} with a total count of 3
|
||||
.globl main
|
||||
main:
|
||||
.globl a
|
||||
|
|
|
@ -23,4 +23,6 @@ main:
|
|||
inc %rax
|
||||
.BB2:
|
||||
retq
|
||||
# For relocations against .text
|
||||
call exit
|
||||
.Lend:
|
||||
|
|
Loading…
Reference in New Issue