1 ; RUN: llc -march=bpfel -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s
2 ; RUN: llc -march=bpfeb -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s
7 ; clang -target bpf -O2 -g -S -emit-llvm t.c
9 @a = dso_local local_unnamed_addr global float 0.000000e+00, align 4, !dbg !0
12 !llvm.module.flags = !{!7, !8, !9}
15 ; CHECK: .section .BTF,"",@progbits
16 ; CHECK-NEXT: .short 60319 # 0xeb9f
19 ; CHECK-NEXT: .long 24
21 ; CHECK-NEXT: .long 52
22 ; CHECK-NEXT: .long 52
23 ; CHECK-NEXT: .long 14
24 ; [1] float, size=4 bytes (32 bits)
25 ; CHECK-NEXT: .long 1 # BTF_KIND_FLOAT(id = 1)
26 ; CHECK-NEXT: .long 268435456 # 0x10000000
28 ; [2] a, type=float (1), global
29 ; CHECK-NEXT: .long 7 # BTF_KIND_VAR(id = 2)
30 ; CHECK-NEXT: .long 234881024 # 0xe000000
33 ; [3] .bss, 1 var, {a, offset=&a, size=4 bytes}
34 ; CHECK-NEXT: .long 9 # BTF_KIND_DATASEC(id = 3)
35 ; CHECK-NEXT: .long 251658241 # 0xf000001
40 ; CHECK-NEXT: .byte 0 # string offset=0
41 ; CHECK-NEXT: .ascii "float" # string offset=1
43 ; CHECK-NEXT: .byte 97 # string offset=7
45 ; CHECK-NEXT: .ascii ".bss" # string offset=9
48 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
49 !1 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
50 !2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 11.0.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, splitDebugInlining: false, nameTableKind: None)
51 !3 = !DIFile(filename: "t.c", directory: "/home/yhs/tmp")
54 !6 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
55 !7 = !{i32 7, !"Dwarf Version", i32 4}
56 !8 = !{i32 2, !"Debug Info Version", i32 3}
57 !9 = !{i32 1, !"wchar_size", i32 4}
58 !10 = !{!"clang version 11.0.0 "}