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  cpi r16, 241
8  cpi r29, 190
9  cpi r22, 172
10  cpi r27, 92
11
12  cpi r21, ear
13
14; CHECK: cpi r16, 241                  ; encoding: [0x01,0x3f]
15; CHECK: cpi r29, 190                  ; encoding: [0xde,0x3b]
16; CHECK: cpi r22, 172                  ; encoding: [0x6c,0x3a]
17; CHECK: cpi r27, 92                   ; encoding: [0xbc,0x35]
18
19; CHECK: cpi r21, ear                  ; encoding: [0x50'A',0x30]
20; CHECK:                               ;   fixup A - offset: 0, value: ear, kind: fixup_ldi
21
22; CHECK-INST: cpi r16, 241
23; CHECK-INST: cpi r29, 190
24; CHECK-INST: cpi r22, 172
25; CHECK-INST: cpi r27, 92
26; CHECK-INST: cpi r21, 0
27