llvm.org GIT mirror llvm / e2f60cf
Convert another llc -filetype=obj test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193536 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
2 changed file(s) with 33 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
+0
-17
test/CodeGen/AArch64/elf-extern.ll less more
None ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -filetype=obj | llvm-readobj -r | FileCheck %s
1
2 ; External symbols are a different concept to global variables but should still
3 ; get relocations and so on when used.
4
5 declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
6
7 define i32 @check_extern() {
8 call void @llvm.memcpy.p0i8.p0i8.i32(i8* undef, i8* undef, i32 undef, i32 4, i1 0)
9 ret i32 0
10 }
11
12 ; CHECK: Relocations [
13 ; CHECK: Section (2) .rela.text {
14 ; CHECK: 0x{{[0-9,A-F]+}} R_AARCH64_CALL26 memcpy
15 ; CHECK: }
16 ; CHECK: ]
0 // RUN: llvm-mc < %s -triple=aarch64-none-linux-gnu -filetype=obj | llvm-readobj -r | FileCheck %s
1
2 // External symbols are a different concept to global variables but should still
3 // get relocations and so on when used.
4
5 .file ""
6 .text
7 .globl check_extern
8 .type check_extern,@function
9 check_extern: // @check_extern
10 .cfi_startproc
11 // BB#0:
12 sub sp, sp, #16
13 .Ltmp2:
14 .cfi_def_cfa sp, 16
15 str x30, [sp, #8] // 8-byte Folded Spill
16 .Ltmp3:
17 .cfi_offset x30, -8
18 bl memcpy
19 mov x0, xzr
20 ldr x30, [sp, #8] // 8-byte Folded Reload
21 add sp, sp, #16
22 ret
23 .Ltmp4:
24 .size check_extern, .Ltmp4-check_extern
25 .cfi_endproc
26
27
28 // CHECK: Relocations [
29 // CHECK: Section (2) .rela.text {
30 // CHECK: 0x{{[0-9,A-F]+}} R_AARCH64_CALL26 memcpy
31 // CHECK: }
32 // CHECK: ]