• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llvm-mc -triple avr -mattr=sram -show-encoding < %s | FileCheck %s
2
3
4foo:
5
6  ; Normal
7
8  ld r10, X
9  ld r17, X
10
11  ld r30, Y
12  ld r19, Y
13
14  ld r10, Z
15  ld r2,  Z
16
17  ; Postincremenet
18
19  ld r10, X+
20  ld r17, X+
21
22  ld r30, Y+
23  ld r19, Y+
24
25  ld r10, Z+
26  ld r2,  Z+
27
28  ; Predecrement
29
30  ld r10, -X
31  ld r17, -X
32
33  ld r30, -Y
34  ld r19, -Y
35
36  ld r10, -Z
37  ld r2,  -Z
38
39
40; Normal
41
42; CHECK: ld r10,  X                 ; encoding: [0xac,0x90]
43; CHECK: ld r17,  X                 ; encoding: [0x1c,0x91]
44
45; CHECK: ld r30,  Y                 ; encoding: [0xe8,0x81]
46; CHECK: ld r19,  Y                 ; encoding: [0x38,0x81]
47
48; CHECK: ld r10,  Z                 ; encoding: [0xa0,0x80]
49; CHECK: ld r2,   Z                 ; encoding: [0x20,0x80]
50
51
52; Postincrement
53
54; CHECK: ld r10,  X+                ; encoding: [0xad,0x90]
55; CHECK: ld r17,  X+                ; encoding: [0x1d,0x91]
56
57; CHECK: ld r30,  Y+                ; encoding: [0xe9,0x91]
58; CHECK: ld r19,  Y+                ; encoding: [0x39,0x91]
59
60; CHECK: ld r10,  Z+                ; encoding: [0xa1,0x90]
61; CHECK: ld r2,   Z+                ; encoding: [0x21,0x90]
62
63
64; Predecrement
65
66; CHECK: ld r10, -X                 ; encoding: [0xae,0x90]
67; CHECK: ld r17, -X                 ; encoding: [0x1e,0x91]
68
69; CHECK: ld r30, -Y                 ; encoding: [0xea,0x91]
70; CHECK: ld r19, -Y                 ; encoding: [0x3a,0x91]
71
72; CHECK: ld r10, -Z                 ; encoding: [0xa2,0x90]
73; CHECK: ld r2,  -Z                 ; encoding: [0x22,0x90]
74