aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/MC/AVR/inst-brcc.s
blob: eba05e06bb43b6b84675a846d875575b690c0b7b (plain)
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
; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s
;
; RUN: llvm-mc -filetype=obj -triple avr < %s \
; RUN:     | llvm-objdump -dr - \
; RUN:     | FileCheck --check-prefix=INST %s

foo:
  brcc .+66
  brcc .-22
  brbc 0, .+66
  brbc 0, bar

bar:

; CHECK: brcc .Ltmp0+66+2  ; encoding: [0bAAAAA000,0b111101AA]
; CHECK: brcc .Ltmp1-22+2  ; encoding: [0bAAAAA000,0b111101AA]
; CHECK: brcc .Ltmp2+66+2  ; encoding: [0bAAAAA000,0b111101AA]
; CHECK: brcc bar            ; encoding: [0bAAAAA000,0b111101AA]

; INST-LABEL: <foo>:
; INST-NEXT: f8 f7      brsh .-2
; INST-NEXT: R_AVR_7_PCREL .text+0x44
; INST-NEXT: f8 f7      brsh .-2
; INST-NEXT: R_AVR_7_PCREL .text-0x12
; INST-NEXT: f8 f7      brsh .-2
; INST-NEXT: R_AVR_7_PCREL .text+0x48
; INST-NEXT: f8 f7      brsh .-2
; INST-NEXT: R_AVR_7_PCREL .text+0x8