Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / AVR / reloc-directive.s
blob60913172502cf7853e8264fd0b1297a018ca31d5
1 # RUN: llvm-mc -triple=avr %s | FileCheck --check-prefix=PRINT %s
2 # RUN: llvm-mc -filetype=obj -triple=avr %s | llvm-readobj -r - | FileCheck %s
4 # PRINT: .reloc 4, R_AVR_NONE, .data
5 # PRINT-NEXT: .reloc 2, R_AVR_NONE, foo+4
6 # PRINT-NEXT: .reloc 0, R_AVR_NONE, 8
7 # PRINT: .reloc 0, R_AVR_32, .data+2
8 # PRINT-NEXT: .reloc 0, R_AVR_16, foo+3
9 # PRINT: .reloc 0, BFD_RELOC_NONE, 9
10 # PRINT-NEXT: .reloc 0, BFD_RELOC_16, 9
11 # PRINT-NEXT: .reloc 0, BFD_RELOC_32, 9
13 # CHECK: Section ({{.*}}) .rela.text {
14 # CHECK-NEXT: 0x4 R_AVR_NONE .data 0x0
15 # CHECK-NEXT: 0x2 R_AVR_NONE foo 0x4
16 # CHECK-NEXT: 0x0 R_AVR_NONE - 0x8
17 # CHECK-NEXT: 0x0 R_AVR_32 .data 0x2
18 # CHECK-NEXT: 0x0 R_AVR_16 foo 0x3
19 # CHECK-NEXT: 0x0 R_AVR_NONE - 0x9
20 # CHECK-NEXT: 0x0 R_AVR_16 - 0x9
21 # CHECK-NEXT: 0x0 R_AVR_32 - 0x9
22 # CHECK-NEXT: }
24 .text
25 ret
26 nop
27 nop
28 .reloc 4, R_AVR_NONE, .data
29 .reloc 2, R_AVR_NONE, foo+4
30 .reloc 0, R_AVR_NONE, 8
32 .reloc 0, R_AVR_32, .data+2
33 .reloc 0, R_AVR_16, foo+3
35 .reloc 0, BFD_RELOC_NONE, 9
36 .reloc 0, BFD_RELOC_16, 9
37 .reloc 0, BFD_RELOC_32, 9
39 .data
40 .globl foo
41 foo:
42 .word 0
43 .word 0