[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / ELF / set.s
blob1c8a06a0678bc59892a88c009d82b5828a78d8f3
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols - | FileCheck %s
3 // Test that we emit the correct value.
5 .set kernbase,0xffffffff80000000
7 // CHECK: Symbol {
8 // CHECK: Name: kernbase
9 // CHECK-NEXT: Value: 0xFFFFFFFF80000000
10 // CHECK-NEXT: Size: 0
11 // CHECK-NEXT: Binding: Local
12 // CHECK-NEXT: Type: None
13 // CHECK-NEXT: Other: 0
14 // CHECK-NEXT: Section: Absolute (0xFFF1)
15 // CHECK-NEXT: }
17 // Test that we accept .set of a symbol after it has been used in a statement.
19 jmp foo
20 .set foo, bar
22 // or a .quad
24 .quad foo2
25 .set foo2,bar2
27 // Test that there is an undefined reference to bar
28 // CHECK: Symbol {
29 // CHECK: Name: bar
30 // CHECK-NEXT: Value: 0x0
31 // CHECK-NEXT: Size: 0
32 // CHECK-NEXT: Binding: Global
33 // CHECK-NEXT: Type: None
34 // CHECK-NEXT: Other: 0
35 // CHECK-NEXT: Section: Undefined (0x0)
36 // CHECK-NEXT: }