1; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s
2; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s
3
4
5foo:
6
7  in r2, 4
8  in r9, 6
9  in r5, 32
10  in r0, 0
11  in r31, 0
12  in r0, 63
13  in r31, 63
14
15  in r20, foo+1
16
17; CHECK: in r2, 4                   ; encoding: [0x24,0xb0]
18; CHECK: in r9, 6                   ; encoding: [0x96,0xb0]
19; CHECK: in r5, 32                  ; encoding: [0x50,0xb4]
20; CHECK: in r0, 0                   ; encoding: [0x00,0xb0]
21; CHECK: in r31, 0                  ; encoding: [0xf0,0xb1]
22; CHECK: in r0, 63                  ; encoding: [0x0f,0xb6]
23; CHECK: in r31, 63                 ; encoding: [0xff,0xb7]
24
25; CHECK: in r20, foo+1              ; encoding: [0x40'A',0xb1'A']
26; CHECK:                            ;   fixup A - offset: 0, value: foo+1, kind: fixup_port6
27
28; CHECK-INST: in r2, 4
29; CHECK-INST: in r9, 6
30; CHECK-INST: in r5, 32
31; CHECK-INST: in r0, 0
32; CHECK-INST: in r31, 0
33; CHECK-INST: in r0, 63
34; CHECK-INST: in r31, 63
35
36; CHECK-INST: in r20, 0
37