1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356
|
.h8300s
.section .text
.align 2
.global _main
.global movb_tests
.global movw_tests
.global movl_tests
.global ldm_stm_tests
.global movfpe_movtpe_tests
.global add_sub_addx_subx_tests
.global inc_dec_adds_subs_tests
.global daa_das_tests
.global mul_div_tests
.global cmp_tests
.global neg_tests
.global ext_tests
.global tas_mac_tests
.global logic_operations_tests
.global sha_shl_tests
.global rot_rotx_tests
.global bset_bclr_tests
.global bnot_btst_tests
.global band_bor_bxor_tests
.global bld_bst_tests
.global branch_tests
.global system_control_tests
.global block_data_transfer_tests
_main:
nop
movb_tests:
mov.b r0l,r0h
mov.b #0x12,r1l
mov.b @er0,r1h
mov.b @(0x1234:16,er0),r2l
mov.b @(0x12345678:32,er0),r2h
mov.b @er0+,r3l
mov.b @0x12:8,r3h
mov.b @0x1234:16,r4l
mov.b @0x12345678:32,r4h
movw_tests:
mov.w e0,r0
mov.w #0x1234,r1
mov.w @er0,r2
mov.w @(0x1234:16,er0),r3
mov.w @(0x12345678:32,er0),r4
mov.w @er0+,r5
mov.w @0x1234:16,r6
mov.w @0x12345678:32,r7
movl_tests:
mov.l er0,er1
mov.l #0x12345678,er1
mov.l @er0,er2
mov.l @(0x1234:16,er0),er3
mov.l @(0x12345678:32,er0),er4
mov.l @er0+,er5
mov.l @0x1234:16,er6
mov.l @0x12345678:32,er7
ldm_stm_tests:
ldm.l @sp+,er0-er1
ldm.l @sp+,er0-er2
ldm.l @sp+,er0-er3
stm.l er0-er1,@-sp
stm.l er0-er2,@-sp
stm.l er0-er3,@-sp
movfpe_movtpe_tests:
movfpe @0x1234:16,r2l
movtpe r2l,@0x1234:16
add_sub_addx_subx_tests:
add.b #0x12,r0l
add.b r1l,r1h
add.w #0x1234,r2
add.w r3,r4
add.l #0x12345678,er5
add.l er6,er7
sub.b r1l,r1h
sub.w #0x1234,r2
sub.w r3,r4
sub.l #0x12345678,er5
sub.l er6,er7
addx #0x12,r0l
addx r1l,r1h
subx #0x12,r0l
subx r1l,r1h
inc_dec_adds_subs_tests:
inc.b r0l
inc.w #0x1,r4
inc.w #0x2,r3
inc.l #0x1,er2
inc.l #0x2,er1
dec.b r0l
dec.w #0x1,r4
dec.w #0x2,r3
dec.l #0x1,er2
dec.l #0x2,er1
adds #0x1,er7
adds #0x2,er6
adds #0x4,er5
subs #0x1,er7
subs #0x2,er6
subs #0x4,er5
daa_das_tests:
daa r0l
das r0h
mul_div_tests:
mulxs.b r0l,r1
mulxs.w r2,er3
mulxu.b r0l,e1
mulxu.w e2,er3
divxs.b r0l,r1
divxs.w r2,er3
divxu.b r0l,e1
divxu.w e2,er3
cmp_tests:
cmp.b #0x12,r0l
cmp.b r1l,r1h
cmp.w #0x1234,r2
cmp.w r3,e3
cmp.l #0x12345678,er4
cmp.l er5,er6
neg_tests:
neg.b r0l
neg.w r2
neg.l er3
ext_tests:
exts.w r0
exts.l er1
extu.w r2
extu.l er3
tas_mac_tests:
tas @er0
mac @er1+,@er2+
clrmac
ldmac er4,mach
ldmac er5,macl
stmac mach,er6
stmac macl,er7
logic_operations_tests:
and.b #0x12,r0l
and.b r1l,r2h
and.w #0x1234,r0
and.w r1,r2
and.l #0x12345678,er0
and.l er1,er2
or.b #0x12,r0l
or.b r1l,r2h
or.w #0x1234,r0
or.w r1,r2
or.l #0x12345678,er0
or.l er1,er2
xor.b #0x12,r0l
xor.b r1l,r2h
xor.w #0x1234,r0
xor.w r1,r2
xor.l #0x12345678,er0
xor.l er1,er2
not.b r0l
not.w r1
not.l er2
sha_shl_tests:
shal r0l
shal r1
shal er2
shar r3l
shar r4
shar er5
shll r0l
shll r1
shll er2
shlr r3l
shlr r4
shlr er5
rot_rotx_tests:
rotl r0l
rotl r1
rotl er2
rotr r3l
rotr r4
rotr er5
rotxl r0l
rotxl r1
rotxl er2
rotxr r3l
rotxr r4
rotxr er5
bset_bclr_tests:
bset #0x7,r0l
bset #0x6,@er1
bset #0x5,@0x12:8
bset #0x4,@0x1234:16
bset #0x3,@0x12345678:32
bset r7l,r0h
bset r6l,@er1
bset r5l,@0x12:8
bset r4l,@0x1234:16
bset r3l,@0x12345678:32
bclr #0x7,r0l
bclr #0x6,@er1
bclr #0x5,@0x12:8
bclr #0x4,@0x1234:16
bclr #0x3,@0x12345678:32
bclr r7h,r0h
bclr r6h,@er1
bclr r5h,@0x12:8
bclr r4h,@0x1234:16
bclr r3h,@0x12345678:32
bnot_btst_tests:
bnot #0x7,r0l
bnot #0x6,@er1
bnot #0x5,@0x12:8
bnot #0x4,@0x1234:16
bnot #0x3,@0x12345678:32
bnot r7l,r0h
bnot r6l,@er1
bnot r5l,@0x12:8
bnot r4l,@0x1234:16
bnot r3l,@0x12345678:32
btst #0x7,r0l
btst #0x6,@er1
btst #0x5,@0x12:8
btst #0x4,@0x1234:16
btst #0x3,@0x12345678:32
btst r7h,r0h
btst r6h,@er1
btst r5h,@0x12:8
btst r4h,@0x1234:16
btst r3h,@0x12345678:32
band_bor_bxor_tests:
band #0x7,r0l
band #0x6,@er1
band #0x5,@0x12:8
band #0x4,@0x1234:16
band #0x3,@0x12345678:32
bor #0x7,r0l
bor #0x6,@er1
bor #0x5,@0x12:8
bor #0x4,@0x1234:16
bor #0x3,@0x12345678:32
bxor #0x7,r0l
bxor #0x6,@er1
bxor #0x5,@0x12:8
bxor #0x4,@0x1234:16
bxor #0x3,@0x12345678:32
bld_bst_tests:
bld #0x7,r0l
bld #0x6,@er1
bld #0x5,@0x12:8
bld #0x4,@0x1234:16
bld #0x3,@0x12345678:32
bild #0x7,r0l
bild #0x6,@er1
bild #0x5,@0x12:8
bild #0x4,@0x1234:16
bild #0x3,@0x12345678:32
bst #0x7,r0l
bst #0x6,@er1
bst #0x5,@0x12:8
bst #0x4,@0x1234:16
bst #0x3,@0x12345678:32
bist #0x7,r0l
bist #0x6,@er1
bist #0x5,@0x12:8
bist #0x4,@0x1234:16
bist #0x3,@0x12345678:32
branch_tests:
bra branch_tests
brn branch_tests
bhi branch_tests
bls branch_tests
bcc branch_tests
bcs branch_tests
bne branch_tests
beq branch_tests
bvc branch_tests
bvs branch_tests
bpl branch_tests
bmi branch_tests
bge branch_tests
blt branch_tests
bgt branch_tests
ble branch_tests
jmp @er0
jmp @branch_tests
jmp @@0 (0)
bsr branch_tests:8
bsr branch_tests:16
jsr @er0
jsr @branch_tests
jsr @@0 (0)
rts
system_control_tests:
trapa #0x2
rte
sleep
ldc #0x12,ccr
ldc r3l,ccr
ldc @er0,ccr
ldc @(0x1234:16,er0),ccr
ldc @(0x12345678:32,er0),ccr
ldc @er1+,ccr
ldc @0x1234:16,ccr
ldc @0x12345678:32,ccr
stc ccr,r3l
stc ccr,@er0
stc ccr,@(0x1234:16,er0)
stc ccr,@(0x12345678:32,er0)
stc ccr,@-er1
stc ccr,@0x1234:16
stc ccr,@0x12345678:32
andc #0x12,ccr
orc #0x34,ccr
xorc #0x56,ccr
ldc #0x12,exr
ldc r3l,exr
ldc @er0,exr
ldc @(0x1234:16,er0),exr
ldc @(0x12345678:32,er0),exr
ldc @er1+,exr
ldc @0x1234:16,exr
ldc @0x12345678:32,exr
stc exr,r3l
stc exr,@er0
stc exr,@(0x1234:16,er0)
stc exr,@(0x12345678:32,er0)
stc exr,@-er1
stc exr,@0x1234:16
stc exr,@0x12345678:32
andc #0x12,exr
orc #0x34,exr
xorc #0x56,exr
nop
block_data_transfer_tests:
eepmov.b
eepmov.w
|