Home | History | Annotate | Download | only in m68k
      1 # Test handling of MIT and Motorola syntax operands
      2 # If you change this file, see also op68000.d.
      3 	.text
      4 foo:
      5 	| Data register direct
      6 	tstl	%d0
      7 
      8 	| Address register direct
      9 	tstl	%a0
     10 
     11 	| Address register indirect
     12 	tstl	%a0@
     13 	tstl	(%a0)
     14 
     15 	| Address register indirect with postincrement
     16 	tstl	%a0@+
     17 	tstl	(%a0)+
     18 
     19 	| Address register indirect with predecrement
     20 	tstl	%a0@-
     21 	tstl	-(%a0)
     22 
     23 	| Address register indirect with displacement
     24 	tstl	%a0@(8)
     25 	tstl	(8,%a0)
     26 	tstl	8(%a0)
     27 
     28 	| Address register indirect with index (8-bit displacement)
     29 	tstl	%a0@(8,%d0)
     30 	tstl	%a0@(8,%d0:w)
     31 	tstl	%a0@(8,%d0:w:1)
     32 	tstl	%a0@(8,%d0:w:2)
     33 	tstl	%a0@(8,%d0:w:4)
     34 	tstl	%a0@(8,%d0:w:8)
     35 	tstl	%a0@(8,%d0:l)
     36 	tstl	%a0@(8,%d0:l:1)
     37 	tstl	%a0@(8,%d0:l:2)
     38 	tstl	%a0@(8,%d0:l:4)
     39 	tstl	%a0@(8,%d0:l:8)
     40 	tstl	%a0@(%d0:w:2)
     41 	tstl	(8,%a0,%d0)
     42 	tstl	(8,%a0,%d0*1)
     43 	tstl	(8,%a0,%d0*2)
     44 	tstl	(8,%a0,%d0*4)
     45 	tstl	(8,%a0,%d0*8)
     46 	tstl	(8,%a0,%d0.w)
     47 	tstl	(8,%a0,%d0.w*1)
     48 	tstl	(8,%a0,%d0.w*2)
     49 	tstl	(8,%a0,%d0.w*4)
     50 	tstl	(8,%a0,%d0.w*8)
     51 	tstl	(8,%a0,%d0.l)
     52 	tstl	(8,%a0,%d0.l*1)
     53 	tstl	(8,%a0,%d0.l*2)
     54 	tstl	(8,%a0,%d0.l*4)
     55 	tstl	(8,%a0,%d0.l*8)
     56 	tstl	(8,%d0,%a0)
     57 	tstl	(8,%a1.w*2,%a0)
     58 	tstl	(8,%a1,%a0)
     59 	tstl	8(%a0,%d0.w*2)
     60 	tstl	8(%d0.w*2,%a0)
     61 	tstl	8(%a1.w*2,%a0)
     62 	tstl	(%a0,%d0.w*2)
     63 	tstl	(%d0.w*2,%a0)
     64 
     65 	| Address register indirect with index (base displacement)
     66 	tstl	%a0@(1000,%d0:w:2)
     67 	tstl	@(1000,%d0:w:2)
     68 	tstl	@(%d0:w:2)
     69 	tstl	@(1000)
     70 	tstl	%a0@(100000)
     71 	tstl	(1000,%a0,%d0.w*2)
     72 	tstl	(1000,%d0,%a0)
     73 	tstl	(1000,%a1.w*2,%a0)
     74 	tstl	1000(%a0,%d0.w*2)
     75 	tstl	1000(%d0,%a0)
     76 	tstl	(1000,%d0.w*2)
     77 	tstl	1000(%d0.w*2)
     78 	tstl	(%d0.w*2)
     79 	tstl	(100000,%a0)
     80 	tstl	100000(%a0)
     81 	tstl	%za1@(1000,%d0:w:2)
     82 	tstl	%za1@(100000)
     83 	tstl	(1000,%za1,%d0.w*2)
     84 	tstl	(1000,%d0,%za1)
     85 	tstl	(1000,%a1.w*2,%za1)
     86 	tstl	1000(%za1,%d0.w*2)
     87 	tstl	1000(%d0,%za1)
     88 	tstl	(100000,%za1)
     89 	tstl	100000(%za1)
     90 	tstl	%a0@(1000,%zd1:w:2)
     91 	tstl	@(1000,%zd1:w:2)
     92 	tstl	@(%zd1:w:2)
     93 	tstl	(1000,%a0,%zd1.w*2)
     94 	tstl	(1000,%zd1,%a0)
     95 	tstl	(1000,%za1.w*2,%a0)
     96 	tstl	1000(%a0,%zd1.w*2)
     97 	tstl	1000(%zd1,%a0)
     98 	tstl	(1000,%zd1.w*2)
     99 	tstl	1000(%zd1.w*2)
    100 	tstl	(%zd1.w*2)
    101 
    102 	| Memory indirect postindexed
    103 	tstl	%a0@(1000)@(2000,%d0:w:2)
    104 	tstl	%a0@(1000)@(%d0:w:2)
    105 	tstl	%a0@(1000)@(2000)
    106 	tstl	@(1000)@(2000,%d0:w:2)
    107 	tstl	@(1000)@(%d0:w:2)
    108 	tstl	@(1000)@(2000)
    109 	tstl	%a0@(0)@(2000,%d0:w:2)
    110 	tstl	%a0@(0)@(%d0:w:2)
    111 	tstl	%a0@(0)@(2000)
    112 	tstl	@(0)@(2000,%d0:w:2)
    113 	tstl	@(0)@(%d0:w:2)
    114 	tstl	@(0)@(2000)
    115 	tstl	([1000,%a0],%d0:w:2,2000)
    116 	tstl	([1000,%a0],%d0:w:2)
    117 	tstl	([1000,%a0],2000)
    118 	tstl	([1000],%d0:w:2,2000)
    119 	tstl	([1000],%d0:w:2)
    120 	tstl	([1000],2000)
    121 	tstl	([%a0],%d0:w:2,2000)
    122 	tstl	([%a0],%d0:w:2)
    123 	tstl	([%a0],2000)
    124 	tstl	([0],%d0:w:2,2000)
    125 	tstl	([0],%d0:w:2)
    126 	tstl	([0],2000)
    127 
    128 	| Memory indirect preindexed
    129 	tstl	%a0@(1000,%d0:w:2)@(2000)
    130 	tstl	%a0@(1000,%d0:w:2)@(0)
    131 	tstl	@(1000,%d0:w:2)@(2000)
    132 	tstl	@(1000,%d0:w:2)@(0)
    133 	tstl	%a0@(%d0:w:2)@(2000)
    134 	tstl	%a0@(%d0:w:2)@(0)
    135 	tstl	@(%d0:w:2)@(2000)
    136 	tstl	@(%d0:w:2)@(0)
    137 	tstl	([1000,%a0,%d0:w:2],2000)
    138 	tstl	([1000,%d0:w:2,%a0],2000)
    139 	tstl	([1000,%d0,%a0],2000)
    140 	tstl	([1000,%a1,%a0],2000)
    141 	tstl	([1000,%a1:w:2,%a0],2000)
    142 	tstl	([1000,%a0,%d0:w:2])
    143 	tstl	([1000,%d0,%a0])
    144 	tstl	([1000,%d0:w:2],2000)
    145 	tstl	([1000,%d0:w:2])
    146 	tstl	([%a0,%d0:w:2],2000)
    147 	tstl	([%d0,%a0],2000)
    148 	tstl	([%a0,%d0:w:2])
    149 	tstl	([%d0,%a0])
    150 	tstl	([%d0:w:2],2000)
    151 	tstl	([%d0:w:2])
    152 
    153 	| Program counter indirect with displacement
    154 	pea	%pc@(8)
    155 	pea	(8,%pc)
    156 	pea	8(%pc)
    157 	pea	foo
    158 
    159 	| Program counter indirect with index (8-bit displacement)
    160 	pea	%pc@(8,%d0:w:2)
    161 	pea	%pc@(%d0:w:2)
    162 	pea	(8,%pc,%d0.w*2)
    163 	pea	(8,%d0,%pc)
    164 	pea	(8,%a0,%pc)
    165 	pea	8(%pc,%d0.w*2)
    166 	pea	8(%d0,%pc)
    167 	pea	8(%a0,%pc)
    168 	pea	(%pc,%d0.w*2)
    169 	pea	(%d0,%pc)
    170 	pea	(%a0,%pc)
    171 
    172 	| Program counter indirect with index (base displacement)
    173 	pea	%pc@(1000,%d0:w:2)
    174 	pea	%pc@(100000)
    175 	pea	(1000,%pc,%d0.w*2)
    176 	pea	(1000,%d0,%pc)
    177 	pea	(1000,%a1.w*2,%pc)
    178 	pea	(1000,%a1,%pc)
    179 	pea	1000(%pc,%d0.w*2)
    180 	pea	1000(%d0,%pc)
    181 	pea	1000(%a1,%pc)
    182 	pea	(100000,%pc)
    183 	pea	100000(%pc)
    184 	pea	%zpc@(1000,%d0:w:2)
    185 	pea	%zpc@(100000)
    186 	pea	(1000,%zpc,%d0.w*2)
    187 	pea	(1000,%d0,%zpc)
    188 	pea	(1000,%a1.w*2,%zpc)
    189 	pea	(1000,%a1,%zpc)
    190 	pea	1000(%zpc,%d0.w*2)
    191 	pea	1000(%d0,%zpc)
    192 	pea	1000(%a1,%zpc)
    193 	pea	(100000,%zpc)
    194 	pea	100000(%zpc)
    195 
    196 	| Program counter memory indirect postindexed
    197 	pea	%pc@(1000)@(2000,%d0:w:2)
    198 	pea	%pc@(1000)@(%d0:w:2)
    199 	pea	%pc@(1000)@(2000)
    200 	pea	%pc@(0)@(2000,%d0:w:2)
    201 	pea	%pc@(0)@(%d0:w:2)
    202 	pea	%pc@(0)@(2000)
    203 	pea	([1000,%pc],%d0:w:2,2000)
    204 	pea	([1000,%pc],%d0:w:2)
    205 	pea	([1000,%pc],2000)
    206 	pea	([%pc],%d0:w:2,2000)
    207 	pea	([%pc],%d0:w:2)
    208 	pea	([%pc],2000)
    209 	pea	%zpc@(1000)@(2000,%d0:w:2)
    210 	pea	%zpc@(1000)@(%d0:w:2)
    211 	pea	%zpc@(1000)@(2000)
    212 	pea	%zpc@(0)@(2000,%d0:w:2)
    213 	pea	%zpc@(0)@(%d0:w:2)
    214 	pea	%zpc@(0)@(2000)
    215 	pea	([1000,%zpc],%d0:w:2,2000)
    216 	pea	([1000,%zpc],%d0:w:2)
    217 	pea	([1000,%zpc],2000)
    218 	pea	([%zpc],%d0:w:2,2000)
    219 	pea	([%zpc],%d0:w:2)
    220 	pea	([%zpc],2000)
    221 
    222 	| Program counter memory indirect preindexed
    223 	pea	%pc@(1000,%d0:w:2)@(2000)
    224 	pea	%pc@(1000,%d0:w:2)@(0)
    225 	pea	%pc@(%d0:w:2)@(2000)
    226 	pea	%pc@(%d0:w:2)@(0)
    227 	pea	([1000,%pc,%d0:w:2],2000)
    228 	pea	([1000,%d0:w:2,%pc],2000)
    229 	pea	([1000,%d0,%pc],2000)
    230 	pea	([1000,%a1,%pc],2000)
    231 	pea	([1000,%pc,%a1],2000)
    232 	pea	([1000,%a1:w:2,%pc],2000)
    233 	pea	([1000,%pc,%d0:w:2])
    234 	pea	([1000,%d0,%pc])
    235 	pea	([1000,%a1,%pc])
    236 	pea	([%pc,%d0:w:2],2000)
    237 	pea	([%pc,%a0],2000)
    238 	pea	([%pc,%d0:w:2])
    239 	pea	([%d0,%pc])
    240 	pea	%zpc@(1000,%d0:w:2)@(2000)
    241 	pea	%zpc@(1000,%d0:w:2)@(0)
    242 	pea	%zpc@(%d0:w:2)@(2000)
    243 	pea	%zpc@(%d0:w:2)@(0)
    244 	pea	([1000,%zpc,%d0:w:2],2000)
    245 	pea	([1000,%d0:w:2,%zpc],2000)
    246 	pea	([1000,%d0,%zpc],2000)
    247 	pea	([1000,%a1,%zpc],2000)
    248 	pea	([1000,%zpc,%a1],2000)
    249 	pea	([1000,%a1:w:2,%zpc],2000)
    250 	pea	([1000,%zpc,%d0:w:2])
    251 	pea	([1000,%d0,%zpc])
    252 	pea	([1000,%a1,%zpc])
    253 	pea	([%zpc,%d0:w:2],2000)
    254 	pea	([%zpc,%a0],2000)
    255 	pea	([%zpc,%d0:w:2])
    256 	pea	([%d0,%zpc])
    257 
    258 	| Absolute short
    259 	tstl	4
    260 	tstl	4.w
    261 	tstl	(4).w
    262 
    263 	| Absolute long
    264 	tstl	100000
    265 	tstl	8.l
    266 	tstl	(8).l
    267 
    268 	| Immediate
    269 	addib	&1,%d0
    270 	addiw	&1,%d0
    271 	addil	&1,%d0
    272 	addqb	&1,%d0
    273