[AVR] Fix incorrect decoding of RJMP and RCALL
[llvm-project.git] / llvm / test / MC / AVR / inst-rcall.s
blob4e75620b147e794b4d32bd610a9957a9d0a56811
1 ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s
2 ; RUN: llvm-mc -filetype=obj -triple avr < %s \
3 ; RUN: | llvm-objdump -d - | FileCheck --check-prefix=INST %s
6 foo:
8 rcall .+0
9 rcall .-8
10 rcall .+12
11 rcall .+46
12 .short 0xdfea
14 ; CHECK: rcall .Ltmp0+0 ; encoding: [A,0b1101AAAA]
15 ; CHECK: ; fixup A - offset: 0, value: .Ltmp0+0, kind: fixup_13_pcrel
16 ; CHECK: rcall .Ltmp1-8 ; encoding: [A,0b1101AAAA]
17 ; CHECK: ; fixup A - offset: 0, value: .Ltmp1-8, kind: fixup_13_pcrel
18 ; CHECK: rcall .Ltmp2+12 ; encoding: [A,0b1101AAAA]
19 ; CHECK: ; fixup A - offset: 0, value: .Ltmp2+12, kind: fixup_13_pcrel
20 ; CHECK: rcall .Ltmp3+46 ; encoding: [A,0b1101AAAA]
21 ; CHECK: ; fixup A - offset: 0, value: .Ltmp3+46, kind: fixup_13_pcrel
23 ; INST: rcall .+0
24 ; INST: rcall .+0
25 ; INST: rcall .+0
26 ; INST: rcall .+0
27 ; INST: rcall .-44