reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
; RUN: llvm-mc -filetype=obj -triple=avr %s -mattr=avr6 | llvm-objdump -r - | FileCheck %s

; CHECK: RELOCATION RECORDS FOR

.global bar
bar:
  jmp bar

; CHECK: R_AVR_LDI SYMBOL+3
ldi r21, SYMBOL+3

; CHECK-NEXT: R_AVR_6_ADIW FOO
adiw r24, FOO

; CHECK-NEXT: R_AVR_16 BAR+2
lds r8, BAR+2

; CHECK-NEXT: R_AVR_PORT5 foo
sbic foo, 1

; CHECK-NEXT: R_AVR_PORT6 Bar+2
in r30, Bar+2

; CHECK-NEXT: R_AVR_CALL foo+3
call foo+3

; CHECK-NEXT: R_AVR_13_PCREL foo-10
rjmp foo-10

; CHECK-NEXT: R_AVR_7_PCREL foo+2
brcs foo+2

; CHECK-NEXT: R_AVR_LO8_LDI bar+3
; CHECK-NEXT: R_AVR_LO8_LDI abc
; CHECK-NEXT: R_AVR_LO8_LDI abc
ldi r24, lo8(bar+3)
ldi r16, +lo8(abc)
ldi r16, lo8(+(abc))

; CHECK-NEXT: R_AVR_HI8_LDI abc
; CHECK-NEXT: R_AVR_HI8_LDI abc
; CHECK-NEXT: R_AVR_HI8_LDI abc
ldi r30, hi8(abc)
ldi r16, +hi8(abc)
ldi r16, hi8(+(abc))

; CHECK-NEXT: R_AVR_LO8_LDI_NEG abc
; CHECK-NEXT: R_AVR_LO8_LDI_NEG abc
ldi r16, -lo8(abc)
ldi r16, lo8(-(abc))

; CHECK-NEXT: R_AVR_HI8_LDI_NEG abc
; CHECK-NEXT: R_AVR_HI8_LDI_NEG abc
ldi r16, -hi8(abc)
ldi r16, hi8(-(abc))

; CHECK-NEXT: R_AVR_HH8_LDI foo
; CHECK-NEXT: R_AVR_HH8_LDI foo
; CHECK-NEXT: R_AVR_HH8_LDI foo
ldi r16, hh8(foo)
ldi r16, +hh8(foo)
ldi r16, hh8(+(foo))

; CHECK-NEXT: R_AVR_HH8_LDI_NEG foo
; CHECK-NEXT: R_AVR_HH8_LDI_NEG foo
ldi r16, -hh8(foo)
ldi r16, hh8(-(foo))

; CHECK-NEXT: R_AVR_HH8_LDI foo
; CHECK-NEXT: R_AVR_HH8_LDI foo
; CHECK-NEXT: R_AVR_HH8_LDI foo
ldi r24, hlo8(foo)
ldi r24, +hlo8(foo)
ldi r24, hlo8(+(foo))

; CHECK-NEXT: R_AVR_HH8_LDI_NEG foo
; CHECK-NEXT: R_AVR_HH8_LDI_NEG foo
ldi r24, -hlo8(foo)
ldi r24, hlo8(-(foo))

; CHECK-NEXT: R_AVR_MS8_LDI bar
; CHECK-NEXT: R_AVR_MS8_LDI bar
; CHECK-NEXT: R_AVR_MS8_LDI bar
ldi r24, hhi8(bar)
ldi r24, +hhi8(bar)
ldi r24, hhi8(+(bar))

; CHECK-NEXT: R_AVR_MS8_LDI_NEG bar
; CHECK-NEXT: R_AVR_MS8_LDI_NEG bar
ldi r24, -hhi8(bar)
ldi r24, hhi8(-(bar))

; CHECK-NEXT: R_AVR_LO8_LDI_PM foo
; CHECK-NEXT: R_AVR_LO8_LDI_PM foo
; CHECK-NEXT: R_AVR_LO8_LDI_PM foo
ldi r17, pm_lo8(foo)
ldi r25, +pm_lo8(foo)
ldi r25, pm_lo8(+(foo))

; CHECK-NEXT: R_AVR_HI8_LDI_PM bar
; CHECK-NEXT: R_AVR_HI8_LDI_PM foo
; CHECK-NEXT: R_AVR_HI8_LDI_PM foo
ldi r22, pm_hi8(bar)
ldi r25, +pm_hi8(foo)
ldi r25, pm_hi8(+(foo))

; CHECK-NEXT: R_AVR_HH8_LDI_PM baz
; CHECK-NEXT: R_AVR_HH8_LDI_PM foo
; CHECK-NEXT: R_AVR_HH8_LDI_PM foo
ldi r25, pm_hh8(baz)
ldi r25, +pm_hh8(foo)
ldi r25, pm_hh8(+(foo))

; CHECK-NEXT: R_AVR_LO8_LDI_PM_NEG foo
; CHECK-NEXT: R_AVR_LO8_LDI_PM_NEG foo
ldi r25, -pm_lo8(foo)
ldi r25, pm_lo8(-(foo))

; CHECK-NEXT: R_AVR_HI8_LDI_PM_NEG foo
; CHECK-NEXT: R_AVR_HI8_LDI_PM_NEG foo
ldi r25, -pm_hi8(foo)
ldi r25, pm_hi8(-(foo))

; CHECK-NEXT: R_AVR_HH8_LDI_PM_NEG foo
; CHECK-NEXT: R_AVR_HH8_LDI_PM_NEG foo
ldi r25, -pm_hh8(foo)
ldi r25, pm_hh8(-(foo))

; CHECK-NEXT: R_AVR_LO8_LDI_GS foo
ldi r17, lo8(gs(foo))

; CHECK-NEXT: R_AVR_HI8_LDI_GS foo
ldi r18, hi8(gs(foo))

; CHECK-NEXT: R_AVR_16
.short foo

; CHECK-NEXT: R_AVR_16_PM
.short gs(foo)

; CHECK-NEXT: R_AVR_8
.byte foo

; CHECK-NEXT: R_AVR_8_LO8
.byte lo8(foo)

; CHECK-NEXT: R_AVR_8_HI8
.byte hi8(foo)

; CHECK-NEXT: R_AVR_8_HLO8
.byte hlo8(foo)

; CHECK: R_AVR_DIFF8
.byte foo - bar

; CHECK: R_AVR_DIFF16
.short foo - bar

; CHECK: R_AVR_DIFF32
.long foo - bar