[DAG] TransformFPLoadStorePair - early out if we're not loading a simple type
[llvm-project.git] / llvm / test / MC / ELF / common.s
blob016c1f8ca6f6b30c4cd5b569a19611e943c21ace
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols - | FileCheck %s
4 .text
6 // Test that this produces a regular local symbol.
7 .type common1,@object
8 .local common1
9 .comm common1,1,1
11 // CHECK: Symbol {
12 // CHECK: Name: common1
13 // CHECK-NEXT: Value: 0x0
14 // CHECK-NEXT: Size: 1
15 // CHECK-NEXT: Binding: Local
16 // CHECK-NEXT: Type: Object
17 // CHECK-NEXT: Other: 0
18 // CHECK-NEXT: Section:
19 // CHECK-NEXT: }
22 // Same as common1, but with directives in a different order.
23 .local common2
24 .type common2,@object
25 .comm common2,1,1
27 // CHECK: Symbol {
28 // CHECK: Name: common2
29 // CHECK-NEXT: Value: 0x1
30 // CHECK-NEXT: Size: 1
31 // CHECK-NEXT: Binding: Local
32 // CHECK-NEXT: Type: Object
33 // CHECK-NEXT: Other: 0
34 // CHECK-NEXT: Section:
35 // CHECK-NEXT: }
38 .local common6
39 .comm common6,8,16
41 // CHECK: Symbol {
42 // CHECK: Name: common6
43 // CHECK-NEXT: Value: 0x10
44 // CHECK-NEXT: Size: 8
45 // CHECK-NEXT: Binding: Local
46 // CHECK-NEXT: Type: Object
47 // CHECK-NEXT: Other: 0
48 // CHECK-NEXT: Section: .bss
49 // CHECK-NEXT: }
52 // Test that without an explicit .local we produce a global.
53 .type common3,@object
54 .comm common3,4,4
56 // CHECK: Symbol {
57 // CHECK: Name: common3
58 // CHECK-NEXT: Value: 0x4
59 // CHECK-NEXT: Size: 4
60 // CHECK-NEXT: Binding: Global
61 // CHECK-NEXT: Type: Object
62 // CHECK-NEXT: Other: 0
63 // CHECK-NEXT: Section: Common (0xFFF2)
64 // CHECK-NEXT: }
67 // Test that without an explicit .local we produce a global, even if the first
68 // occurrence is not in a directive.
69 .globl foo
70 .type foo,@function
71 foo:
72 movsbl common4+3(%rip), %eax
75 .type common4,@object
76 .comm common4,40,16
78 // CHECK: Symbol {
79 // CHECK: Name: common4
80 // CHECK-NEXT: Value: 0x10
81 // CHECK-NEXT: Size: 40
82 // CHECK-NEXT: Binding: Global
83 // CHECK-NEXT: Type: Object
84 // CHECK-NEXT: Other: 0
85 // CHECK-NEXT: Section: Common (0xFFF2)
86 // CHECK-NEXT: }
89 .comm common5,4,4
91 // CHECK: Symbol {
92 // CHECK: Name: common5
93 // CHECK-NEXT: Value: 0x4
94 // CHECK-NEXT: Size: 4
95 // CHECK-NEXT: Binding: Global
96 // CHECK-NEXT: Type: Object
97 // CHECK-NEXT: Other: 0
98 // CHECK-NEXT: Section: Common (0xFFF2)
99 // CHECK-NEXT: }