1 # RUN: llc %s -mtriple=m68k -start-after=prologepilog -O0 -filetype=obj -o - \
2 # RUN: | extract-section .text \
3 # RUN: | FileCheck %s -check-prefixes=MOV8DK,MOV32RK,MOV8DQ,MOV32RQ,MOV8DF,MOV32RF
4 # RUN: llc %s -mtriple=m68k -start-after=prologepilog -O0 -filetype=obj -o - \
5 # RUN: | extract-section .text \
6 # RUN: | FileCheck %s -check-prefixes=MOV8DP,MOV32RP,MOV8DJ,MOV32RJ,MOV8DO,MOV32RO
7 # RUN: llc %s -mtriple=m68k -start-after=prologepilog -O0 -filetype=obj -o - \
8 # RUN: | extract-section .text \
9 # RUN: | FileCheck %s -check-prefixes=MOV8DE,MOV32RE,MOV8DB,MOV32RB
11 #------------------------------------------------------------------------------
12 # MxMove_RM is used for moving data from memory to register
13 #------------------------------------------------------------------------------
16 # ---------------------------+-----------+-----------+-----------
17 # F E | D C | B A 9 | 8 7 6 | 5 4 3 | 2 1 0
18 # -------+-------+-----------+-----------+-----------+-----------
19 # | | DESTINATION | SOURCE
20 # 0 0 | SIZE | REG | MODE | MODE | REG
21 # -------+-------+-----------+-----------+-----------+-----------
22 # MOV8DK: 0 0 0 1 0 0 0 0 . 0 0 1 1 1 0 1 1
23 # MOV8DK-SAME: 0 0 0 1 1 0 0 0 . 0 0 0 0 0 0 0 0
24 # ---------------------------------------------------------------
25 # MOV8DK-SAME: 0 0 0 1 0 0 0 0 . 0 0 1 1 1 0 1 1
26 # MOV8DK-SAME: 0 0 0 1 1 0 0 0 . 1 1 1 1 1 1 1 1
27 # ---------------------------------------------------------------
28 # MOV32RK-SAME: 0 0 1 0 0 0 0 0 . 0 0 1 1 1 0 1 1
29 # MOV32RK-SAME: 0 0 0 1 1 0 0 0 . 0 0 0 0 0 0 0 0
30 # ---------------------------------------------------------------
31 # MOV32RK-SAME: 0 0 1 0 0 0 1 0 . 0 0 1 1 1 0 1 1
32 # MOV32RK-SAME: 1 0 1 0 1 0 0 0 . 0 0 0 0 0 0 0 0
33 # ---+-----------+---+-------+---+-------------------------------
34 # BRIEF DA | REG | L | SCALE | 0 | DISPLACEMENT
35 # ---+-----------+---+-------+---+-------------------------------
39 $bd0 = MOV8dk 0, $d1, implicit-def $ccr
40 $bd0 = MOV8dk -1, $d1, implicit-def $ccr
41 $d0 = MOV32rk 0, $d1, implicit-def $ccr
42 $d1 = MOV32rk 0, $a2, implicit-def $ccr
46 # ---------------------------+-----------+-----------+-----------
47 # F E | D C | B A 9 | 8 7 6 | 5 4 3 | 2 1 0
48 # -------+-------+-----------+-----------+-----------+-----------
49 # | | DESTINATION | SOURCE
50 # 0 0 | SIZE | REG | MODE | MODE | REG
51 # -------+-------+-----------+-----------+-----------+-----------
52 # MOV8DQ-SAME: 0 0 0 1 0 0 0 0 . 0 0 1 1 1 0 1 0
53 # MOV8DQ-SAME: 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
54 # ---------------------------------------------------------------
55 # MOV32RQ-SAME: 0 0 1 0 0 0 0 0 . 0 0 1 1 1 0 1 0
56 # MOV32RQ-SAME: 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1
57 # ---------------------------------------------------------------
58 # MOV32RQ-SAME: 0 0 1 0 0 0 0 0 . 0 1 1 1 1 0 1 0
59 # MOV32RQ-SAME: 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1
63 $bd0 = MOV8dq 0, implicit-def $ccr
64 $d0 = MOV32rq -1, implicit-def $ccr
65 $a0 = MOV32rq -1, implicit-def $ccr
69 # ---------------------------+-----------+-----------+-----------
70 # F E | D C | B A 9 | 8 7 6 | 5 4 3 | 2 1 0
71 # -------+-------+-----------+-----------+-----------+-----------
72 # | | DESTINATION | SOURCE
73 # 0 0 | SIZE | REG | MODE | MODE | REG
74 # -------+-------+-----------+-----------+-----------+-----------
75 # MOV8DF: 0 0 0 1 0 0 0 0 . 0 0 1 1 0 0 0 0
76 # MOV8DF-SAME: 0 0 0 1 1 0 0 0 . 0 0 0 0 0 0 0 0
77 # ---------------------------------------------------------------
78 # MOV8DF-SAME: 0 0 0 1 0 0 0 0 . 0 0 1 1 0 0 0 0
79 # MOV8DF-SAME: 0 0 0 1 1 0 0 0 . 1 1 1 1 1 1 1 1
80 # ---------------------------------------------------------------
81 # MOV32RF-SAME: 0 0 1 0 0 0 0 0 . 0 0 1 1 0 0 0 1
82 # MOV32RF-SAME: 0 0 0 1 1 0 0 0 . 0 0 0 0 0 0 0 0
83 # ---------------------------------------------------------------
84 # MOV32RF-SAME: 0 0 1 0 0 0 1 0 . 0 0 1 1 0 0 1 0
85 # MOV32RF-SAME: 1 0 1 0 1 0 0 0 . 0 0 0 0 0 0 0 0
86 # ---+-----------+---+-------+---+-------------------------------
87 # BRIEF DA | REG | L | SCALE | 0 | DISPLACEMENT
88 # ---+-----------+---+-------+---+-------------------------------
92 $bd0 = MOV8df 0, $a0, $d1, implicit-def $ccr
93 $bd0 = MOV8df -1, $a0, $d1, implicit-def $ccr
94 $d0 = MOV32rf 0, $a1, $d1, implicit-def $ccr
95 $d1 = MOV32rf 0, $a2, $a2, implicit-def $ccr
99 # ---------------------------+-----------+-----------+-----------
100 # F E | D C | B A 9 | 8 7 6 | 5 4 3 | 2 1 0
101 # -------+-------+-----------+-----------+-----------+-----------
102 # | | DESTINATION | SOURCE
103 # 0 0 | SIZE | REG | MODE | MODE | REG
104 # -------+-------+-----------+-----------+-----------+-----------
105 # MOV8DP: 0 0 0 1 0 0 0 0 . 0 0 1 0 1 0 0 0
106 # MOV8DP-SAME: 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
107 # ---------------------------------------------------------------
108 # MOV32RP-SAME: 0 0 1 0 0 0 0 0 . 0 0 1 0 1 0 0 1
109 # MOV32RP-SAME: 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1
110 # ---------------------------------------------------------------
111 # MOV32RP-SAME: 0 0 1 0 0 0 0 0 . 0 1 1 0 1 0 0 1
112 # MOV32RP-SAME: 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1
116 $bd0 = MOV8dp 0, $a0, implicit-def $ccr
117 $d0 = MOV32rp -1, $a1, implicit-def $ccr
118 $a0 = MOV32rp -1, $a1, implicit-def $ccr
122 # ---------------------------+-----------+-----------+-----------
123 # F E | D C | B A 9 | 8 7 6 | 5 4 3 | 2 1 0
124 # -------+-------+-----------+-----------+-----------+-----------
125 # | | DESTINATION | SOURCE
126 # 0 0 | SIZE | REG | MODE | MODE | REG
127 # -------+-------+-----------+-----------+-----------+-----------
128 # MOV8DE: 0 0 0 1 0 0 0 0 . 0 0 1 0 0 0 0 0
129 # ---------------------------------------------------------------
130 # MOV32RE-SAME: 0 0 1 0 0 1 1 0 . 0 0 1 0 0 0 0 1
131 # ---------------------------------------------------------------
132 # MOV32RE-SAME: 0 0 1 0 1 0 0 0 . 0 1 1 0 0 0 0 1
133 name: MxMove_RM_ARIPD
136 $bd0 = MOV8de $a0, implicit-def $ccr
137 $d3 = MOV32re $a1, implicit-def $ccr
138 $a4 = MOV32re $a1, implicit-def $ccr
142 # ---------------------------+-----------+-----------+-----------
143 # F E | D C | B A 9 | 8 7 6 | 5 4 3 | 2 1 0
144 # -------+-------+-----------+-----------+-----------+-----------
145 # | | DESTINATION | SOURCE
146 # 0 0 | SIZE | REG | MODE | MODE | REG
147 # -------+-------+-----------+-----------+-----------+-----------
148 # MOV8DO-SAME: 0 0 0 1 0 0 0 0 . 0 0 0 1 1 0 0 0
149 # ---------------------------------------------------------------
150 # MOV32RO-SAME: 0 0 1 0 0 1 1 0 . 0 0 0 1 1 0 0 1
151 # ---------------------------------------------------------------
152 # MOV32RO-SAME: 0 0 1 0 1 0 0 0 . 0 1 0 1 1 0 0 1
153 name: MxMove_RM_ARIPI
156 $bd0 = MOV8do $a0, implicit-def $ccr
157 $d3 = MOV32ro $a1, implicit-def $ccr
158 $a4 = MOV32ro $a1, implicit-def $ccr
162 # ---------------------------+-----------+-----------+-----------
163 # F E | D C | B A 9 | 8 7 6 | 5 4 3 | 2 1 0
164 # -------+-------+-----------+-----------+-----------+-----------
165 # | | DESTINATION | SOURCE
166 # 0 0 | SIZE | REG | MODE | MODE | REG
167 # -------+-------+-----------+-----------+-----------+-----------
168 # MOV8DJ-SAME: 0 0 0 1 0 0 0 0 . 0 0 0 1 0 0 0 0
169 # ---------------------------------------------------------------
170 # MOV32RJ-SAME: 0 0 1 0 0 1 1 0 . 0 0 0 1 0 0 0 1
171 # ---------------------------------------------------------------
172 # MOV32RJ-SAME: 0 0 1 0 1 0 0 0 . 0 1 0 1 0 0 0 1
176 $bd0 = MOV8dj $a0, implicit-def $ccr
177 $d3 = MOV32rj $a1, implicit-def $ccr
178 $a4 = MOV32rj $a1, implicit-def $ccr
182 # ---------------------------+-----------+-----------+-----------
183 # F E | D C | B A 9 | 8 7 6 | 5 4 3 | 2 1 0
184 # -------+-------+-----------+-----------+-----------+-----------
185 # | | DESTINATION | SOURCE
186 # 0 0 | SIZE | REG | MODE | MODE | REG
187 # -------+-------+-----------+-----------+-----------+-----------
188 # MOV8DB-SAME: 0 0 0 1 0 0 0 0 . 0 0 1 1 1 0 0 1
189 # MOV8DB-SAME: 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
190 # ---------------------------------------------------------------
191 # MOV32RB-SAME: 0 0 1 0 0 1 1 0 . 0 0 1 1 1 0 0 1
192 # MOV32RB-SAME: 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
193 # MOV32RB-SAME: 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
194 # ---------------------------------------------------------------
195 # MOV32RB-SAME: 0 0 1 0 1 0 0 0 . 0 1 1 1 1 0 0 1
196 # MOV32RB-SAME: 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
197 # MOV32RB-SAME: 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
201 $bd0 = MOV8db 0, implicit-def $ccr
202 $d3 = MOV32rb 0, implicit-def $ccr
203 $a4 = MOV32rb 0, implicit-def $ccr