[AMDGPU][True16][CodeGen] true16 codegen pattern for v_med3_u/i16 (#121850)
[llvm-project.git] / llvm / test / MC / AVR / relocations.s
blob02d4595a510e5a732e059051e6fb072775bd11c3
1 ; RUN: llvm-mc -filetype=obj -triple=avr %s -mattr=avr6 | llvm-objdump -r - | FileCheck %s
3 ; CHECK: RELOCATION RECORDS FOR
5 .global bar
7 bar:
8 jmp bar
10 ; CHECK: R_AVR_LDI SYMBOL+0x3
11 ldi r21, SYMBOL+3
13 ; CHECK: R_AVR_6 SYMBOL+0x4
14 ldd r8, Y+SYMBOL+4
16 ; CHECK-NEXT: R_AVR_6_ADIW FOO
17 adiw r24, FOO
19 ; CHECK-NEXT: R_AVR_16 BAR+0x2
20 lds r8, BAR+2
22 ; CHECK-NEXT: R_AVR_PORT5 foo
23 sbic foo, 1
25 ; CHECK-NEXT: R_AVR_PORT6 Bar+0x2
26 in r30, Bar+2
28 ; CHECK-NEXT: R_AVR_CALL foo+0x3
29 call foo+3
31 ; CHECK-NEXT: R_AVR_13_PCREL foo-0xa
32 rjmp foo-10
34 ; CHECK-NEXT: R_AVR_7_PCREL foo+0x2
35 brcs foo+2
37 ; CHECK-NEXT: R_AVR_LO8_LDI bar+0x3
38 ; CHECK-NEXT: R_AVR_LO8_LDI abc
39 ldi r24, lo8(bar+3)
40 ldi r16, lo8(+(abc))
42 ; CHECK-NEXT: R_AVR_HI8_LDI abc
43 ; CHECK-NEXT: R_AVR_HI8_LDI abc
44 ldi r30, hi8(abc)
45 ldi r16, hi8(+(abc))
47 ; CHECK-NEXT: R_AVR_LO8_LDI_NEG abc
48 ldi r16, lo8(-(abc))
50 ; CHECK-NEXT: R_AVR_HI8_LDI_NEG abc
51 ldi r16, hi8(-(abc))
53 ; CHECK-NEXT: R_AVR_HH8_LDI foo
54 ; CHECK-NEXT: R_AVR_HH8_LDI foo
55 ldi r16, hh8(foo)
56 ldi r16, hh8(+(foo))
58 ; CHECK-NEXT: R_AVR_HH8_LDI_NEG foo
59 ldi r16, hh8(-(foo))
61 ; CHECK-NEXT: R_AVR_HH8_LDI foo
62 ; CHECK-NEXT: R_AVR_HH8_LDI foo
63 ldi r24, hlo8(foo)
64 ldi r24, hlo8(+(foo))
66 ; CHECK-NEXT: R_AVR_HH8_LDI_NEG foo
67 ldi r24, hlo8(-(foo))
69 ; CHECK-NEXT: R_AVR_MS8_LDI bar
70 ; CHECK-NEXT: R_AVR_MS8_LDI bar
71 ldi r24, hhi8(bar)
72 ldi r24, hhi8(+(bar))
74 ; CHECK-NEXT: R_AVR_MS8_LDI_NEG bar
75 ldi r24, hhi8(-(bar))
77 ; CHECK-NEXT: R_AVR_LO8_LDI_PM foo
78 ; CHECK-NEXT: R_AVR_LO8_LDI_PM foo
79 ldi r17, pm_lo8(foo)
80 ldi r25, pm_lo8(+(foo))
82 ; CHECK-NEXT: R_AVR_HI8_LDI_PM bar
83 ; CHECK-NEXT: R_AVR_HI8_LDI_PM foo
84 ldi r22, pm_hi8(bar)
85 ldi r25, pm_hi8(+(foo))
87 ; CHECK-NEXT: R_AVR_HH8_LDI_PM baz
88 ; CHECK-NEXT: R_AVR_HH8_LDI_PM foo
89 ldi r25, pm_hh8(baz)
90 ldi r25, pm_hh8(+(foo))
92 ; CHECK-NEXT: R_AVR_LO8_LDI_PM_NEG foo
93 ldi r25, pm_lo8(-(foo))
95 ; CHECK-NEXT: R_AVR_HI8_LDI_PM_NEG foo
96 ldi r25, pm_hi8(-(foo))
98 ; CHECK-NEXT: R_AVR_HH8_LDI_PM_NEG foo
99 ldi r25, pm_hh8(-(foo))
101 ; CHECK-NEXT: R_AVR_LO8_LDI_GS foo
102 ldi r17, lo8(gs(foo))
104 ; CHECK-NEXT: R_AVR_HI8_LDI_GS foo
105 ldi r18, hi8(gs(foo))
107 ; CHECK-NEXT: R_AVR_16 foo
108 .short foo
110 ; CHECK-NEXT: R_AVR_16_PM foo
111 .short gs(foo)
113 ; CHECK-NEXT: R_AVR_16_PM foo
114 .short pm(foo)
116 ; CHECK-NEXT: R_AVR_8
117 .byte foo
119 ; CHECK-NEXT: R_AVR_8_LO8
120 .byte lo8(foo)
122 ; CHECK-NEXT: R_AVR_8_HI8
123 .byte hi8(foo)
125 ; CHECK-NEXT: R_AVR_8_HLO8
126 .byte hlo8(foo)
128 ; CHECK: R_AVR_DIFF8
129 .byte foo - bar
131 ; CHECK: R_AVR_DIFF16
132 .short foo - bar
134 ; CHECK: R_AVR_DIFF32
135 .long foo - bar