1 1.1 christos # Hitachi H8 testcase 'mov.l' 2 1.1 christos # mach(): h8300h h8300s h8sx 3 1.1 christos # as(h8300h): --defsym sim_cpu=1 4 1.1 christos # as(h8300s): --defsym sim_cpu=2 5 1.1 christos # as(h8sx): --defsym sim_cpu=3 6 1.1 christos # ld(h8300h): -m h8300helf 7 1.1 christos # ld(h8300s): -m h8300self 8 1.1 christos # ld(h8sx): -m h8300sxelf 9 1.1 christos 10 1.1 christos .include "testutils.inc" 11 1.1 christos 12 1.1 christos start 13 1.1 christos 14 1.1 christos .data 15 1.1 christos .align 4 16 1.1 christos long_dst_dec: 17 1.1 christos .long 0 18 1.1 christos long_src: 19 1.1 christos .long 0x77777777 20 1.1 christos long_dst: 21 1.1 christos .long 0 22 1.1 christos 23 1.1 christos .text 24 1.1 christos 25 1.1 christos ;; 26 1.1 christos ;; Move long from immediate source 27 1.1 christos ;; 28 1.1 christos 29 1.1 christos .if (sim_cpu == h8sx) 30 1.1 christos mov_l_imm3_to_reg32: 31 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 32 1.1 christos set_ccr_zero 33 1.1 christos 34 1.1 christos ;; mov.l #xx:3, erd 35 1.1 christos mov.l #0x3:3, er0 ; Immediate 3-bit operand 36 1.1 christos ;;; .word 0x0fb8 37 1.1 christos 38 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 39 1.1 christos test_neg_clear 40 1.1 christos test_zero_clear 41 1.1 christos test_ovf_clear 42 1.1 christos test_carry_clear 43 1.1 christos 44 1.1 christos test_h_gr32 0x3 er0 45 1.1 christos 46 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 47 1.1 christos test_gr_a5a5 2 48 1.1 christos test_gr_a5a5 3 49 1.1 christos test_gr_a5a5 4 50 1.1 christos test_gr_a5a5 5 51 1.1 christos test_gr_a5a5 6 52 1.1 christos test_gr_a5a5 7 53 1.1 christos 54 1.1 christos mov_l_imm16_to_reg32: 55 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 56 1.1 christos set_ccr_zero 57 1.1 christos 58 1.1 christos ;; mov.l #xx:16, erd 59 1.1 christos mov.l #0x1234, er0 ; Immediate 16-bit operand 60 1.1 christos ;;; .word 0x7a08 61 1.1 christos ;;; .word 0x1234 62 1.1 christos 63 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 64 1.1 christos test_neg_clear 65 1.1 christos test_zero_clear 66 1.1 christos test_ovf_clear 67 1.1 christos test_carry_clear 68 1.1 christos 69 1.1 christos test_h_gr32 0x1234 er0 70 1.1 christos 71 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 72 1.1 christos test_gr_a5a5 2 73 1.1 christos test_gr_a5a5 3 74 1.1 christos test_gr_a5a5 4 75 1.1 christos test_gr_a5a5 5 76 1.1 christos test_gr_a5a5 6 77 1.1 christos test_gr_a5a5 7 78 1.1 christos .endif 79 1.1 christos 80 1.1 christos mov_l_imm32_to_reg32: 81 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 82 1.1 christos set_ccr_zero 83 1.1 christos 84 1.1 christos ;; mov.l #xx:32, erd 85 1.1 christos mov.l #0x12345678, er0 ; Immediate 32-bit operand 86 1.1 christos ;;; .word 0x7a00 87 1.1 christos ;;; .long 0x12345678 88 1.1 christos 89 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 90 1.1 christos test_neg_clear 91 1.1 christos test_zero_clear 92 1.1 christos test_ovf_clear 93 1.1 christos test_carry_clear 94 1.1 christos 95 1.1 christos test_h_gr32 0x12345678 er0 96 1.1 christos 97 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 98 1.1 christos test_gr_a5a5 2 99 1.1 christos test_gr_a5a5 3 100 1.1 christos test_gr_a5a5 4 101 1.1 christos test_gr_a5a5 5 102 1.1 christos test_gr_a5a5 6 103 1.1 christos test_gr_a5a5 7 104 1.1 christos 105 1.1 christos .if (sim_cpu == h8sx) 106 1.1 christos mov_l_imm8_to_indirect: 107 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 108 1.1 christos set_ccr_zero 109 1.1 christos 110 1.1 christos ;; mov.l #xx:8, @erd 111 1.1 christos mov.l #long_dst, er1 112 1.1 christos mov.l #0xa5:8, @er1 ; Register indirect operand 113 1.1 christos ;;; .word 0x010d 114 1.1 christos ;;; .word 0x01a5 115 1.1 christos 116 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 117 1.1 christos test_neg_clear 118 1.1 christos test_zero_clear 119 1.1 christos test_ovf_clear 120 1.1 christos test_carry_clear 121 1.1 christos 122 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 123 1.1 christos test_h_gr32 long_dst, er1 124 1.1 christos test_gr_a5a5 2 125 1.1 christos test_gr_a5a5 3 126 1.1 christos test_gr_a5a5 4 127 1.1 christos test_gr_a5a5 5 128 1.1 christos test_gr_a5a5 6 129 1.1 christos test_gr_a5a5 7 130 1.1 christos 131 1.1 christos ;; Now check the result of the move to memory. 132 1.1 christos cmp.l #0xa5, @long_dst 133 1.1 christos beq .Lnext1 134 1.1 christos fail 135 1.1 christos .Lnext1: 136 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 137 1.1 christos 138 1.1 christos mov_l_imm8_to_postinc: ; post-increment from imm8 to mem 139 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 140 1.1 christos set_ccr_zero 141 1.1 christos 142 1.1 christos ;; mov.l #xx:8, @erd+ 143 1.1 christos mov.l #long_dst, er1 144 1.1 christos mov.l #0xa5:8, @er1+ ; Imm8, register post-incr operands. 145 1.1 christos ;;; .word 0x010d 146 1.1 christos ;;; .word 0x81a5 147 1.1 christos 148 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 149 1.1 christos test_neg_clear 150 1.1 christos test_zero_clear 151 1.1 christos test_ovf_clear 152 1.1 christos test_carry_clear 153 1.1 christos 154 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 155 1.1 christos test_h_gr32 long_dst+4, er1 156 1.1 christos test_gr_a5a5 2 157 1.1 christos test_gr_a5a5 3 158 1.1 christos test_gr_a5a5 4 159 1.1 christos test_gr_a5a5 5 160 1.1 christos test_gr_a5a5 6 161 1.1 christos test_gr_a5a5 7 162 1.1 christos 163 1.1 christos ;; Now check the result of the move to memory. 164 1.1 christos cmp.l #0xa5, @long_dst 165 1.1 christos beq .Lnext2 166 1.1 christos fail 167 1.1 christos .Lnext2: 168 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 169 1.1 christos 170 1.1 christos mov_l_imm8_to_postdec: ; post-decrement from imm8 to mem 171 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 172 1.1 christos set_ccr_zero 173 1.1 christos 174 1.1 christos ;; mov.l #xx:8, @erd- 175 1.1 christos mov.l #long_dst, er1 176 1.1 christos mov.l #0xa5:8, @er1- ; Imm8, register post-decr operands. 177 1.1 christos ;;; .word 0x010d 178 1.1 christos ;;; .word 0xa1a5 179 1.1 christos 180 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 181 1.1 christos test_neg_clear 182 1.1 christos test_zero_clear 183 1.1 christos test_ovf_clear 184 1.1 christos test_carry_clear 185 1.1 christos 186 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 187 1.1 christos test_h_gr32 long_dst-4, er1 188 1.1 christos test_gr_a5a5 2 189 1.1 christos test_gr_a5a5 3 190 1.1 christos test_gr_a5a5 4 191 1.1 christos test_gr_a5a5 5 192 1.1 christos test_gr_a5a5 6 193 1.1 christos test_gr_a5a5 7 194 1.1 christos 195 1.1 christos ;; Now check the result of the move to memory. 196 1.1 christos cmp.l #0xa5, @long_dst 197 1.1 christos beq .Lnext3 198 1.1 christos fail 199 1.1 christos .Lnext3: 200 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 201 1.1 christos 202 1.1 christos mov_l_imm8_to_preinc: ; pre-increment from register to mem 203 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 204 1.1 christos set_ccr_zero 205 1.1 christos 206 1.1 christos ;; mov.l #xx:8, @+erd 207 1.1 christos mov.l #long_dst-4, er1 208 1.1 christos mov.l #0xa5:8, @+er1 ; Imm8, register pre-incr operands 209 1.1 christos ;;; .word 0x010d 210 1.1 christos ;;; .word 0x91a5 211 1.1 christos 212 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 213 1.1 christos test_neg_clear 214 1.1 christos test_zero_clear 215 1.1 christos test_ovf_clear 216 1.1 christos test_carry_clear 217 1.1 christos 218 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 219 1.1 christos test_h_gr32 long_dst, er1 220 1.1 christos test_gr_a5a5 2 221 1.1 christos test_gr_a5a5 3 222 1.1 christos test_gr_a5a5 4 223 1.1 christos test_gr_a5a5 5 224 1.1 christos test_gr_a5a5 6 225 1.1 christos test_gr_a5a5 7 226 1.1 christos 227 1.1 christos ;; Now check the result of the move to memory. 228 1.1 christos cmp.l #0xa5, @long_dst 229 1.1 christos beq .Lnext4 230 1.1 christos fail 231 1.1 christos .Lnext4: 232 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 233 1.1 christos 234 1.1 christos mov_l_imm8_to_predec: ; pre-decrement from register to mem 235 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 236 1.1 christos set_ccr_zero 237 1.1 christos 238 1.1 christos ;; mov.l #xx:8, @-erd 239 1.1 christos mov.l #long_dst+4, er1 240 1.1 christos mov.l #0xa5:8, @-er1 ; Imm8, register pre-decr operands 241 1.1 christos ;;; .word 0x010d 242 1.1 christos ;;; .word 0xb1a5 243 1.1 christos 244 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 245 1.1 christos test_neg_clear 246 1.1 christos test_zero_clear 247 1.1 christos test_ovf_clear 248 1.1 christos test_carry_clear 249 1.1 christos 250 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 251 1.1 christos test_h_gr32 long_dst, er1 252 1.1 christos test_gr_a5a5 2 253 1.1 christos test_gr_a5a5 3 254 1.1 christos test_gr_a5a5 4 255 1.1 christos test_gr_a5a5 5 256 1.1 christos test_gr_a5a5 6 257 1.1 christos test_gr_a5a5 7 258 1.1 christos 259 1.1 christos ;; Now check the result of the move to memory. 260 1.1 christos cmp.l #0xa5, @long_dst 261 1.1 christos beq .Lnext5 262 1.1 christos fail 263 1.1 christos .Lnext5: 264 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 265 1.1 christos 266 1.1 christos mov_l_imm8_to_disp2: 267 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 268 1.1 christos set_ccr_zero 269 1.1 christos 270 1.1 christos ;; mov.l #xx:8, @(dd:2, erd) 271 1.1 christos mov.l #long_dst-12, er1 272 1.1 christos mov.l #0xa5:8, @(12:2, er1) ; Imm8, reg plus 2-bit disp. operand 273 1.1 christos ;;; .word 0x010d 274 1.1 christos ;;; .word 0x31a5 275 1.1 christos 276 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 277 1.1 christos test_neg_clear 278 1.1 christos test_zero_clear 279 1.1 christos test_ovf_clear 280 1.1 christos test_carry_clear 281 1.1 christos 282 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 283 1.1 christos test_h_gr32 long_dst-12, er1 284 1.1 christos test_gr_a5a5 2 285 1.1 christos test_gr_a5a5 3 286 1.1 christos test_gr_a5a5 4 287 1.1 christos test_gr_a5a5 5 288 1.1 christos test_gr_a5a5 6 289 1.1 christos test_gr_a5a5 7 290 1.1 christos 291 1.1 christos ;; Now check the result of the move to memory. 292 1.1 christos cmp.l #0xa5, @long_dst 293 1.1 christos beq .Lnext6 294 1.1 christos fail 295 1.1 christos .Lnext6: 296 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 297 1.1 christos 298 1.1 christos mov_l_imm8_to_disp16: 299 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 300 1.1 christos set_ccr_zero 301 1.1 christos 302 1.1 christos ;; mov.l #xx:8, @(dd:16, erd) 303 1.1 christos mov.l #long_dst-4, er1 304 1.1 christos mov.l #0xa5:8, @(4:16, er1) ; Register plus 16-bit disp. operand 305 1.1 christos ;;; .word 0x010d 306 1.1 christos ;;; .word 0x6f90 307 1.1 christos ;;; .word 0x0004 308 1.1 christos 309 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 310 1.1 christos test_neg_clear 311 1.1 christos test_zero_clear 312 1.1 christos test_ovf_clear 313 1.1 christos test_carry_clear 314 1.1 christos 315 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 316 1.1 christos test_h_gr32 long_dst-4, er1 317 1.1 christos test_gr_a5a5 2 318 1.1 christos test_gr_a5a5 3 319 1.1 christos test_gr_a5a5 4 320 1.1 christos test_gr_a5a5 5 321 1.1 christos test_gr_a5a5 6 322 1.1 christos test_gr_a5a5 7 323 1.1 christos 324 1.1 christos ;; Now check the result of the move to memory. 325 1.1 christos cmp.l #0xa5, @long_dst 326 1.1 christos beq .Lnext7 327 1.1 christos fail 328 1.1 christos .Lnext7: 329 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 330 1.1 christos 331 1.1 christos mov_l_imm8_to_disp32: 332 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 333 1.1 christos set_ccr_zero 334 1.1 christos 335 1.1 christos ;; mov.l #xx:8, @(dd:32, erd) 336 1.1 christos mov.l #long_dst-8, er1 337 1.1 christos mov.l #0xa5:8, @(8:32, er1) ; Register plus 32-bit disp. operand 338 1.1 christos ;;; .word 0x010d 339 1.1 christos ;;; .word 0xc9a5 340 1.1 christos ;;; .long 8 341 1.1 christos 342 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 343 1.1 christos test_neg_clear 344 1.1 christos test_zero_clear 345 1.1 christos test_ovf_clear 346 1.1 christos test_carry_clear 347 1.1 christos 348 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 349 1.1 christos test_h_gr32 long_dst-8, er1 350 1.1 christos test_gr_a5a5 2 351 1.1 christos test_gr_a5a5 3 352 1.1 christos test_gr_a5a5 4 353 1.1 christos test_gr_a5a5 5 354 1.1 christos test_gr_a5a5 6 355 1.1 christos test_gr_a5a5 7 356 1.1 christos 357 1.1 christos ;; Now check the result of the move to memory. 358 1.1 christos cmp.l #0xa5, @long_dst 359 1.1 christos beq .Lnext8 360 1.1 christos fail 361 1.1 christos .Lnext8: 362 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 363 1.1 christos 364 1.1 christos mov_l_imm8_to_abs16: 365 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 366 1.1 christos set_ccr_zero 367 1.1 christos 368 1.1 christos ;; mov.l #xx:8, @aa:16 369 1.1 christos mov.l #0xa5:8, @long_dst:16 ; 16-bit address-direct operand 370 1.1 christos ;;; .word 0x010d 371 1.1 christos ;;; .word 0x40a5 372 1.1 christos ;;; .word @long_dst 373 1.1 christos 374 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 375 1.1 christos test_neg_clear 376 1.1 christos test_zero_clear 377 1.1 christos test_ovf_clear 378 1.1 christos test_carry_clear 379 1.1 christos 380 1.1 christos test_gr_a5a5 0 ; Make sure _ALL_ general regs not disturbed 381 1.1 christos test_gr_a5a5 1 ; (first, because on h8/300 we must use one 382 1.1 christos test_gr_a5a5 2 ; to examine the destination memory). 383 1.1 christos test_gr_a5a5 3 384 1.1 christos test_gr_a5a5 4 385 1.1 christos test_gr_a5a5 5 386 1.1 christos test_gr_a5a5 6 387 1.1 christos test_gr_a5a5 7 388 1.1 christos 389 1.1 christos ;; Now check the result of the move to memory. 390 1.1 christos cmp.l #0xa5, @long_dst 391 1.1 christos beq .Lnext9 392 1.1 christos fail 393 1.1 christos .Lnext9: 394 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 395 1.1 christos 396 1.1 christos mov_l_imm8_to_abs32: 397 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 398 1.1 christos set_ccr_zero 399 1.1 christos 400 1.1 christos ;; mov.l #xx:8, @aa:32 401 1.1 christos mov.l #0xa5:8, @long_dst:32 ; 32-bit address-direct operand 402 1.1 christos ;;; .word 0x010d 403 1.1 christos ;;; .word 0x48a5 404 1.1 christos ;;; .long @long_dst 405 1.1 christos 406 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 407 1.1 christos test_neg_clear 408 1.1 christos test_zero_clear 409 1.1 christos test_ovf_clear 410 1.1 christos test_carry_clear 411 1.1 christos 412 1.1 christos test_gr_a5a5 0 ; Make sure _ALL_ general regs not disturbed 413 1.1 christos test_gr_a5a5 1 ; (first, because on h8/300 we must use one 414 1.1 christos test_gr_a5a5 2 ; to examine the destination memory). 415 1.1 christos test_gr_a5a5 3 416 1.1 christos test_gr_a5a5 4 417 1.1 christos test_gr_a5a5 5 418 1.1 christos test_gr_a5a5 6 419 1.1 christos test_gr_a5a5 7 420 1.1 christos 421 1.1 christos ;; Now check the result of the move to memory. 422 1.1 christos cmp.l #0xa5, @long_dst 423 1.1 christos beq .Lnext10 424 1.1 christos fail 425 1.1 christos .Lnext10: 426 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 427 1.1 christos 428 1.1 christos mov_l_imm16_to_indirect: 429 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 430 1.1 christos set_ccr_zero 431 1.1 christos 432 1.1 christos ;; mov.l #xx:16, @erd 433 1.1 christos mov.l #long_dst, er1 434 1.1 christos mov.l #0xdead:16, @er1 ; Register indirect operand 435 1.1 christos ;;; .word 0x7a7c 436 1.1 christos ;;; .word 0xdead 437 1.1 christos ;;; .word 0x0100 438 1.1 christos 439 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 440 1.1 christos test_neg_clear 441 1.1 christos test_zero_clear 442 1.1 christos test_ovf_clear 443 1.1 christos test_carry_clear 444 1.1 christos 445 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 446 1.1 christos test_h_gr32 long_dst, er1 447 1.1 christos test_gr_a5a5 2 448 1.1 christos test_gr_a5a5 3 449 1.1 christos test_gr_a5a5 4 450 1.1 christos test_gr_a5a5 5 451 1.1 christos test_gr_a5a5 6 452 1.1 christos test_gr_a5a5 7 453 1.1 christos 454 1.1 christos ;; Now check the result of the move to memory. 455 1.1 christos cmp.l #0xdead, @long_dst 456 1.1 christos beq .Lnext11 457 1.1 christos fail 458 1.1 christos .Lnext11: 459 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 460 1.1 christos 461 1.1 christos mov_l_imm16_to_postinc: ; post-increment from imm16 to mem 462 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 463 1.1 christos set_ccr_zero 464 1.1 christos 465 1.1 christos ;; mov.l #xx:16, @erd+ 466 1.1 christos mov.l #long_dst, er1 467 1.1 christos mov.l #0xdead:16, @er1+ ; Imm16, register post-incr operands. 468 1.1 christos ;;; .word 0x7a7c 469 1.1 christos ;;; .word 0xdead 470 1.1 christos ;;; .word 0x8100 471 1.1 christos 472 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 473 1.1 christos test_neg_clear 474 1.1 christos test_zero_clear 475 1.1 christos test_ovf_clear 476 1.1 christos test_carry_clear 477 1.1 christos 478 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 479 1.1 christos test_h_gr32 long_dst+4, er1 480 1.1 christos test_gr_a5a5 2 481 1.1 christos test_gr_a5a5 3 482 1.1 christos test_gr_a5a5 4 483 1.1 christos test_gr_a5a5 5 484 1.1 christos test_gr_a5a5 6 485 1.1 christos test_gr_a5a5 7 486 1.1 christos 487 1.1 christos ;; Now check the result of the move to memory. 488 1.1 christos cmp.l #0xdead, @long_dst 489 1.1 christos beq .Lnext12 490 1.1 christos fail 491 1.1 christos .Lnext12: 492 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 493 1.1 christos 494 1.1 christos mov_l_imm16_to_postdec: ; post-decrement from imm16 to mem 495 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 496 1.1 christos set_ccr_zero 497 1.1 christos 498 1.1 christos ;; mov.l #xx:16, @erd- 499 1.1 christos mov.l #long_dst, er1 500 1.1 christos mov.l #0xdead:16, @er1- ; Imm16, register post-decr operands. 501 1.1 christos ;;; .word 0x7a7c 502 1.1 christos ;;; .word 0xdead 503 1.1 christos ;;; .word 0xa100 504 1.1 christos 505 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 506 1.1 christos test_neg_clear 507 1.1 christos test_zero_clear 508 1.1 christos test_ovf_clear 509 1.1 christos test_carry_clear 510 1.1 christos 511 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 512 1.1 christos test_h_gr32 long_dst-4, er1 513 1.1 christos test_gr_a5a5 2 514 1.1 christos test_gr_a5a5 3 515 1.1 christos test_gr_a5a5 4 516 1.1 christos test_gr_a5a5 5 517 1.1 christos test_gr_a5a5 6 518 1.1 christos test_gr_a5a5 7 519 1.1 christos 520 1.1 christos ;; Now check the result of the move to memory. 521 1.1 christos cmp.l #0xdead, @long_dst 522 1.1 christos beq .Lnext13 523 1.1 christos fail 524 1.1 christos .Lnext13: 525 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 526 1.1 christos 527 1.1 christos mov_l_imm16_to_preinc: ; pre-increment from register to mem 528 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 529 1.1 christos set_ccr_zero 530 1.1 christos 531 1.1 christos ;; mov.l #xx:16, @+erd 532 1.1 christos mov.l #long_dst-4, er1 533 1.1 christos mov.l #0xdead:16, @+er1 ; Imm16, register pre-incr operands 534 1.1 christos ;;; .word 0x7a7c 535 1.1 christos ;;; .word 0xdead 536 1.1 christos ;;; .word 0x9100 537 1.1 christos 538 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 539 1.1 christos test_neg_clear 540 1.1 christos test_zero_clear 541 1.1 christos test_ovf_clear 542 1.1 christos test_carry_clear 543 1.1 christos 544 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 545 1.1 christos test_h_gr32 long_dst, er1 546 1.1 christos test_gr_a5a5 2 547 1.1 christos test_gr_a5a5 3 548 1.1 christos test_gr_a5a5 4 549 1.1 christos test_gr_a5a5 5 550 1.1 christos test_gr_a5a5 6 551 1.1 christos test_gr_a5a5 7 552 1.1 christos 553 1.1 christos ;; Now check the result of the move to memory. 554 1.1 christos cmp.l #0xdead, @long_dst 555 1.1 christos beq .Lnext14 556 1.1 christos fail 557 1.1 christos .Lnext14: 558 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 559 1.1 christos 560 1.1 christos mov_l_imm16_to_predec: ; pre-decrement from register to mem 561 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 562 1.1 christos set_ccr_zero 563 1.1 christos 564 1.1 christos ;; mov.l #xx:16, @-erd 565 1.1 christos mov.l #long_dst+4, er1 566 1.1 christos mov.l #0xdead:16, @-er1 ; Imm16, register pre-decr operands 567 1.1 christos ;;; .word 0x7a7c 568 1.1 christos ;;; .word 0xdead 569 1.1 christos ;;; .word 0xb100 570 1.1 christos 571 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 572 1.1 christos test_neg_clear 573 1.1 christos test_zero_clear 574 1.1 christos test_ovf_clear 575 1.1 christos test_carry_clear 576 1.1 christos 577 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 578 1.1 christos test_h_gr32 long_dst, er1 579 1.1 christos test_gr_a5a5 2 580 1.1 christos test_gr_a5a5 3 581 1.1 christos test_gr_a5a5 4 582 1.1 christos test_gr_a5a5 5 583 1.1 christos test_gr_a5a5 6 584 1.1 christos test_gr_a5a5 7 585 1.1 christos 586 1.1 christos ;; Now check the result of the move to memory. 587 1.1 christos cmp.l #0xdead, @long_dst 588 1.1 christos beq .Lnext15 589 1.1 christos fail 590 1.1 christos .Lnext15: 591 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 592 1.1 christos 593 1.1 christos mov_l_imm16_to_disp2: 594 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 595 1.1 christos set_ccr_zero 596 1.1 christos 597 1.1 christos ;; mov.l #xx:16, @(dd:2, erd) 598 1.1 christos mov.l #long_dst-12, er1 599 1.1 christos mov.l #0xdead:16, @(12:2, er1) ; Imm16, reg plus 2-bit disp. operand 600 1.1 christos ;;; .word 0x7a7c 601 1.1 christos ;;; .word 0xdead 602 1.1 christos ;;; .word 0x3100 603 1.1 christos 604 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 605 1.1 christos test_neg_clear 606 1.1 christos test_zero_clear 607 1.1 christos test_ovf_clear 608 1.1 christos test_carry_clear 609 1.1 christos 610 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 611 1.1 christos test_h_gr32 long_dst-12, er1 612 1.1 christos test_gr_a5a5 2 613 1.1 christos test_gr_a5a5 3 614 1.1 christos test_gr_a5a5 4 615 1.1 christos test_gr_a5a5 5 616 1.1 christos test_gr_a5a5 6 617 1.1 christos test_gr_a5a5 7 618 1.1 christos 619 1.1 christos ;; Now check the result of the move to memory. 620 1.1 christos cmp.l #0xdead, @long_dst 621 1.1 christos beq .Lnext16 622 1.1 christos fail 623 1.1 christos .Lnext16: 624 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 625 1.1 christos 626 1.1 christos mov_l_imm16_to_disp16: 627 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 628 1.1 christos set_ccr_zero 629 1.1 christos 630 1.1 christos ;; mov.l #xx:16, @(dd:16, erd) 631 1.1 christos mov.l #long_dst-4, er1 632 1.1 christos mov.l #0xdead:16, @(4:16, er1) ; Register plus 16-bit disp. operand 633 1.1 christos ;;; .word 0x7a7c 634 1.1 christos ;;; .word 0xdead 635 1.1 christos ;;; .word 0xc100 636 1.1 christos ;;; .word 0x0004 637 1.1 christos 638 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 639 1.1 christos test_neg_clear 640 1.1 christos test_zero_clear 641 1.1 christos test_ovf_clear 642 1.1 christos test_carry_clear 643 1.1 christos 644 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 645 1.1 christos test_h_gr32 long_dst-4, er1 646 1.1 christos test_gr_a5a5 2 647 1.1 christos test_gr_a5a5 3 648 1.1 christos test_gr_a5a5 4 649 1.1 christos test_gr_a5a5 5 650 1.1 christos test_gr_a5a5 6 651 1.1 christos test_gr_a5a5 7 652 1.1 christos 653 1.1 christos ;; Now check the result of the move to memory. 654 1.1 christos cmp.l #0xdead, @long_dst 655 1.1 christos beq .Lnext17 656 1.1 christos fail 657 1.1 christos .Lnext17: 658 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 659 1.1 christos 660 1.1 christos mov_l_imm16_to_disp32: 661 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 662 1.1 christos set_ccr_zero 663 1.1 christos 664 1.1 christos ;; mov.l #xx:16, @(dd:32, erd) 665 1.1 christos mov.l #long_dst-8, er1 666 1.1 christos mov.l #0xdead:16, @(8:32, er1) ; Register plus 32-bit disp. operand 667 1.1 christos ;;; .word 0x7a7c 668 1.1 christos ;;; .word 0xdead 669 1.1 christos ;;; .word 0xc900 670 1.1 christos ;;; .long 8 671 1.1 christos 672 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 673 1.1 christos test_neg_clear 674 1.1 christos test_zero_clear 675 1.1 christos test_ovf_clear 676 1.1 christos test_carry_clear 677 1.1 christos 678 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 679 1.1 christos test_h_gr32 long_dst-8, er1 680 1.1 christos test_gr_a5a5 2 681 1.1 christos test_gr_a5a5 3 682 1.1 christos test_gr_a5a5 4 683 1.1 christos test_gr_a5a5 5 684 1.1 christos test_gr_a5a5 6 685 1.1 christos test_gr_a5a5 7 686 1.1 christos 687 1.1 christos ;; Now check the result of the move to memory. 688 1.1 christos cmp.l #0xdead, @long_dst 689 1.1 christos beq .Lnext18 690 1.1 christos fail 691 1.1 christos .Lnext18: 692 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 693 1.1 christos 694 1.1 christos mov_l_imm16_to_abs16: 695 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 696 1.1 christos set_ccr_zero 697 1.1 christos 698 1.1 christos ;; mov.l #xx:16, @aa:16 699 1.1 christos mov.l #0xdead:16, @long_dst:16 ; 16-bit address-direct operand 700 1.1 christos ;;; .word 0x7a7c 701 1.1 christos ;;; .word 0xdead 702 1.1 christos ;;; .word 0x4000 703 1.1 christos ;;; .word @long_dst 704 1.1 christos 705 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 706 1.1 christos test_neg_clear 707 1.1 christos test_zero_clear 708 1.1 christos test_ovf_clear 709 1.1 christos test_carry_clear 710 1.1 christos 711 1.1 christos test_gr_a5a5 0 ; Make sure _ALL_ general regs not disturbed 712 1.1 christos test_gr_a5a5 1 ; (first, because on h8/300 we must use one 713 1.1 christos test_gr_a5a5 2 ; to examine the destination memory). 714 1.1 christos test_gr_a5a5 3 715 1.1 christos test_gr_a5a5 4 716 1.1 christos test_gr_a5a5 5 717 1.1 christos test_gr_a5a5 6 718 1.1 christos test_gr_a5a5 7 719 1.1 christos 720 1.1 christos ;; Now check the result of the move to memory. 721 1.1 christos cmp.l #0xdead, @long_dst 722 1.1 christos beq .Lnext19 723 1.1 christos fail 724 1.1 christos .Lnext19: 725 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 726 1.1 christos 727 1.1 christos mov_l_imm16_to_abs32: 728 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 729 1.1 christos set_ccr_zero 730 1.1 christos 731 1.1 christos ;; mov.l #xx:16, @aa:32 732 1.1 christos mov.l #0xdead:16, @long_dst:32 ; 32-bit address-direct operand 733 1.1 christos ;;; .word 0x7a7c 734 1.1 christos ;;; .word 0xdead 735 1.1 christos ;;; .word 0x4800 736 1.1 christos ;;; .long @long_dst 737 1.1 christos 738 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 739 1.1 christos test_neg_clear 740 1.1 christos test_zero_clear 741 1.1 christos test_ovf_clear 742 1.1 christos test_carry_clear 743 1.1 christos 744 1.1 christos test_gr_a5a5 0 ; Make sure _ALL_ general regs not disturbed 745 1.1 christos test_gr_a5a5 1 ; (first, because on h8/300 we must use one 746 1.1 christos test_gr_a5a5 2 ; to examine the destination memory). 747 1.1 christos test_gr_a5a5 3 748 1.1 christos test_gr_a5a5 4 749 1.1 christos test_gr_a5a5 5 750 1.1 christos test_gr_a5a5 6 751 1.1 christos test_gr_a5a5 7 752 1.1 christos 753 1.1 christos ;; Now check the result of the move to memory. 754 1.1 christos cmp.l #0xdead, @long_dst 755 1.1 christos beq .Lnext20 756 1.1 christos fail 757 1.1 christos .Lnext20: 758 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 759 1.1 christos 760 1.1 christos mov_l_imm32_to_indirect: 761 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 762 1.1 christos set_ccr_zero 763 1.1 christos 764 1.1 christos ;; mov.l #xx:32, @erd 765 1.1 christos mov.l #long_dst, er1 766 1.1 christos mov.l #0xcafedead:32, @er1 ; Register indirect operand 767 1.1 christos ;;; .word 0x7a74 768 1.1 christos ;;; .long 0xcafedead 769 1.1 christos ;;; .word 0x0100 770 1.1 christos 771 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 772 1.1 christos test_neg_set 773 1.1 christos test_zero_clear 774 1.1 christos test_ovf_clear 775 1.1 christos test_carry_clear 776 1.1 christos 777 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 778 1.1 christos test_h_gr32 long_dst, er1 779 1.1 christos test_gr_a5a5 2 780 1.1 christos test_gr_a5a5 3 781 1.1 christos test_gr_a5a5 4 782 1.1 christos test_gr_a5a5 5 783 1.1 christos test_gr_a5a5 6 784 1.1 christos test_gr_a5a5 7 785 1.1 christos 786 1.1 christos ;; Now check the result of the move to memory. 787 1.1 christos cmp.l #0xcafedead, @long_dst 788 1.1 christos beq .Lnext21 789 1.1 christos fail 790 1.1 christos .Lnext21: 791 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 792 1.1 christos 793 1.1 christos mov_l_imm32_to_postinc: ; post-increment from imm32 to mem 794 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 795 1.1 christos set_ccr_zero 796 1.1 christos 797 1.1 christos ;; mov.l #xx:32, @erd+ 798 1.1 christos mov.l #long_dst, er1 799 1.1 christos mov.l #0xcafedead:32, @er1+ ; Imm32, register post-incr operands. 800 1.1 christos ;;; .word 0x7a74 801 1.1 christos ;;; .long 0xcafedead 802 1.1 christos ;;; .word 0x8100 803 1.1 christos 804 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 805 1.1 christos test_neg_set 806 1.1 christos test_zero_clear 807 1.1 christos test_ovf_clear 808 1.1 christos test_carry_clear 809 1.1 christos 810 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 811 1.1 christos test_h_gr32 long_dst+4, er1 812 1.1 christos test_gr_a5a5 2 813 1.1 christos test_gr_a5a5 3 814 1.1 christos test_gr_a5a5 4 815 1.1 christos test_gr_a5a5 5 816 1.1 christos test_gr_a5a5 6 817 1.1 christos test_gr_a5a5 7 818 1.1 christos 819 1.1 christos ;; Now check the result of the move to memory. 820 1.1 christos cmp.l #0xcafedead, @long_dst 821 1.1 christos beq .Lnext22 822 1.1 christos fail 823 1.1 christos .Lnext22: 824 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 825 1.1 christos 826 1.1 christos mov_l_imm32_to_postdec: ; post-decrement from imm32 to mem 827 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 828 1.1 christos set_ccr_zero 829 1.1 christos 830 1.1 christos ;; mov.l #xx:32, @erd- 831 1.1 christos mov.l #long_dst, er1 832 1.1 christos mov.l #0xcafedead:32, @er1- ; Imm32, register post-decr operands. 833 1.1 christos ;;; .word 0x7a74 834 1.1 christos ;;; .long 0xcafedead 835 1.1 christos ;;; .word 0xa100 836 1.1 christos 837 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 838 1.1 christos test_neg_set 839 1.1 christos test_zero_clear 840 1.1 christos test_ovf_clear 841 1.1 christos test_carry_clear 842 1.1 christos 843 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 844 1.1 christos test_h_gr32 long_dst-4, er1 845 1.1 christos test_gr_a5a5 2 846 1.1 christos test_gr_a5a5 3 847 1.1 christos test_gr_a5a5 4 848 1.1 christos test_gr_a5a5 5 849 1.1 christos test_gr_a5a5 6 850 1.1 christos test_gr_a5a5 7 851 1.1 christos 852 1.1 christos ;; Now check the result of the move to memory. 853 1.1 christos cmp.l #0xcafedead, @long_dst 854 1.1 christos beq .Lnext23 855 1.1 christos fail 856 1.1 christos .Lnext23: 857 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 858 1.1 christos 859 1.1 christos mov_l_imm32_to_preinc: ; pre-increment from register to mem 860 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 861 1.1 christos set_ccr_zero 862 1.1 christos 863 1.1 christos ;; mov.l #xx:32, @+erd 864 1.1 christos mov.l #long_dst-4, er1 865 1.1 christos mov.l #0xcafedead:32, @+er1 ; Imm32, register pre-incr operands 866 1.1 christos ;;; .word 0x7a74 867 1.1 christos ;;; .long 0xcafedead 868 1.1 christos ;;; .word 0x9100 869 1.1 christos 870 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 871 1.1 christos test_neg_set 872 1.1 christos test_zero_clear 873 1.1 christos test_ovf_clear 874 1.1 christos test_carry_clear 875 1.1 christos 876 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 877 1.1 christos test_h_gr32 long_dst, er1 878 1.1 christos test_gr_a5a5 2 879 1.1 christos test_gr_a5a5 3 880 1.1 christos test_gr_a5a5 4 881 1.1 christos test_gr_a5a5 5 882 1.1 christos test_gr_a5a5 6 883 1.1 christos test_gr_a5a5 7 884 1.1 christos 885 1.1 christos ;; Now check the result of the move to memory. 886 1.1 christos cmp.l #0xcafedead, @long_dst 887 1.1 christos beq .Lnext24 888 1.1 christos fail 889 1.1 christos .Lnext24: 890 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 891 1.1 christos 892 1.1 christos mov_l_imm32_to_predec: ; pre-decrement from register to mem 893 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 894 1.1 christos set_ccr_zero 895 1.1 christos 896 1.1 christos ;; mov.l #xx:32, @-erd 897 1.1 christos mov.l #long_dst+4, er1 898 1.1 christos mov.l #0xcafedead:32, @-er1 ; Imm32, register pre-decr operands 899 1.1 christos ;;; .word 0x7a74 900 1.1 christos ;;; .long 0xcafedead 901 1.1 christos ;;; .word 0xb100 902 1.1 christos 903 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 904 1.1 christos test_neg_set 905 1.1 christos test_zero_clear 906 1.1 christos test_ovf_clear 907 1.1 christos test_carry_clear 908 1.1 christos 909 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 910 1.1 christos test_h_gr32 long_dst, er1 911 1.1 christos test_gr_a5a5 2 912 1.1 christos test_gr_a5a5 3 913 1.1 christos test_gr_a5a5 4 914 1.1 christos test_gr_a5a5 5 915 1.1 christos test_gr_a5a5 6 916 1.1 christos test_gr_a5a5 7 917 1.1 christos 918 1.1 christos ;; Now check the result of the move to memory. 919 1.1 christos cmp.l #0xcafedead, @long_dst 920 1.1 christos beq .Lnext25 921 1.1 christos fail 922 1.1 christos .Lnext25: 923 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 924 1.1 christos 925 1.1 christos mov_l_imm32_to_disp2: 926 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 927 1.1 christos set_ccr_zero 928 1.1 christos 929 1.1 christos ;; mov.l #xx:32, @(dd:2, erd) 930 1.1 christos mov.l #long_dst-12, er1 931 1.1 christos mov.l #0xcafedead:32, @(12:2, er1) ; Imm32, reg plus 2-bit disp. operand 932 1.1 christos ;;; .word 0x7a74 933 1.1 christos ;;; .long 0xcafedead 934 1.1 christos ;;; .word 0x3100 935 1.1 christos 936 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 937 1.1 christos test_neg_set 938 1.1 christos test_zero_clear 939 1.1 christos test_ovf_clear 940 1.1 christos test_carry_clear 941 1.1 christos 942 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 943 1.1 christos test_h_gr32 long_dst-12, er1 944 1.1 christos test_gr_a5a5 2 945 1.1 christos test_gr_a5a5 3 946 1.1 christos test_gr_a5a5 4 947 1.1 christos test_gr_a5a5 5 948 1.1 christos test_gr_a5a5 6 949 1.1 christos test_gr_a5a5 7 950 1.1 christos 951 1.1 christos ;; Now check the result of the move to memory. 952 1.1 christos cmp.l #0xcafedead, @long_dst 953 1.1 christos beq .Lnext26 954 1.1 christos fail 955 1.1 christos .Lnext26: 956 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 957 1.1 christos 958 1.1 christos mov_l_imm32_to_disp16: 959 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 960 1.1 christos set_ccr_zero 961 1.1 christos 962 1.1 christos ;; mov.l #xx:32, @(dd:16, erd) 963 1.1 christos mov.l #long_dst-4, er1 964 1.1 christos mov.l #0xcafedead:32, @(4:16, er1) ; Register plus 16-bit disp. operand 965 1.1 christos ;;; .word 0x7a74 966 1.1 christos ;;; .long 0xcafedead 967 1.1 christos ;;; .word 0xc100 968 1.1 christos ;;; .word 0x0004 969 1.1 christos 970 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 971 1.1 christos test_neg_set 972 1.1 christos test_zero_clear 973 1.1 christos test_ovf_clear 974 1.1 christos test_carry_clear 975 1.1 christos 976 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 977 1.1 christos test_h_gr32 long_dst-4, er1 978 1.1 christos test_gr_a5a5 2 979 1.1 christos test_gr_a5a5 3 980 1.1 christos test_gr_a5a5 4 981 1.1 christos test_gr_a5a5 5 982 1.1 christos test_gr_a5a5 6 983 1.1 christos test_gr_a5a5 7 984 1.1 christos 985 1.1 christos ;; Now check the result of the move to memory. 986 1.1 christos cmp.l #0xcafedead, @long_dst 987 1.1 christos beq .Lnext27 988 1.1 christos fail 989 1.1 christos .Lnext27: 990 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 991 1.1 christos 992 1.1 christos mov_l_imm32_to_disp32: 993 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 994 1.1 christos set_ccr_zero 995 1.1 christos 996 1.1 christos ;; mov.l #xx:32, @(dd:32, erd) 997 1.1 christos mov.l #long_dst-8, er1 998 1.1 christos mov.l #0xcafedead:32, @(8:32, er1) ; Register plus 32-bit disp. operand 999 1.1 christos ;;; .word 0x7a74 1000 1.1 christos ;;; .long 0xcafedead 1001 1.1 christos ;;; .word 0xc900 1002 1.1 christos ;;; .long 8 1003 1.1 christos 1004 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 1005 1.1 christos test_neg_set 1006 1.1 christos test_zero_clear 1007 1.1 christos test_ovf_clear 1008 1.1 christos test_carry_clear 1009 1.1 christos 1010 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1011 1.1 christos test_h_gr32 long_dst-8, er1 1012 1.1 christos test_gr_a5a5 2 1013 1.1 christos test_gr_a5a5 3 1014 1.1 christos test_gr_a5a5 4 1015 1.1 christos test_gr_a5a5 5 1016 1.1 christos test_gr_a5a5 6 1017 1.1 christos test_gr_a5a5 7 1018 1.1 christos 1019 1.1 christos ;; Now check the result of the move to memory. 1020 1.1 christos cmp.l #0xcafedead, @long_dst 1021 1.1 christos beq .Lnext28 1022 1.1 christos fail 1023 1.1 christos .Lnext28: 1024 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 1025 1.1 christos 1026 1.1 christos mov_l_imm32_to_abs16: 1027 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1028 1.1 christos set_ccr_zero 1029 1.1 christos 1030 1.1 christos ;; mov.l #xx:32, @aa:16 1031 1.1 christos mov.l #0xcafedead:32, @long_dst:16 ; 16-bit address-direct operand 1032 1.1 christos ;;; .word 0x7a74 1033 1.1 christos ;;; .long 0xcafedead 1034 1.1 christos ;;; .word 0x4000 1035 1.1 christos ;;; .word @long_dst 1036 1.1 christos 1037 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 1038 1.1 christos test_neg_set 1039 1.1 christos test_zero_clear 1040 1.1 christos test_ovf_clear 1041 1.1 christos test_carry_clear 1042 1.1 christos 1043 1.1 christos test_gr_a5a5 0 ; Make sure _ALL_ general regs not disturbed 1044 1.1 christos test_gr_a5a5 1 ; (first, because on h8/300 we must use one 1045 1.1 christos test_gr_a5a5 2 ; to examine the destination memory). 1046 1.1 christos test_gr_a5a5 3 1047 1.1 christos test_gr_a5a5 4 1048 1.1 christos test_gr_a5a5 5 1049 1.1 christos test_gr_a5a5 6 1050 1.1 christos test_gr_a5a5 7 1051 1.1 christos 1052 1.1 christos ;; Now check the result of the move to memory. 1053 1.1 christos cmp.l #0xcafedead, @long_dst 1054 1.1 christos beq .Lnext29 1055 1.1 christos fail 1056 1.1 christos .Lnext29: 1057 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 1058 1.1 christos 1059 1.1 christos mov_l_imm32_to_abs32: 1060 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1061 1.1 christos set_ccr_zero 1062 1.1 christos 1063 1.1 christos ;; mov.l #xx:32, @aa:32 1064 1.1 christos mov.l #0xcafedead:32, @long_dst:32 ; 32-bit address-direct operand 1065 1.1 christos ;;; .word 0x7a74 1066 1.1 christos ;;; .long 0xcafedead 1067 1.1 christos ;;; .word 0x4800 1068 1.1 christos ;;; .long @long_dst 1069 1.1 christos 1070 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 1071 1.1 christos test_neg_set 1072 1.1 christos test_zero_clear 1073 1.1 christos test_ovf_clear 1074 1.1 christos test_carry_clear 1075 1.1 christos 1076 1.1 christos test_gr_a5a5 0 ; Make sure _ALL_ general regs not disturbed 1077 1.1 christos test_gr_a5a5 1 ; (first, because on h8/300 we must use one 1078 1.1 christos test_gr_a5a5 2 ; to examine the destination memory). 1079 1.1 christos test_gr_a5a5 3 1080 1.1 christos test_gr_a5a5 4 1081 1.1 christos test_gr_a5a5 5 1082 1.1 christos test_gr_a5a5 6 1083 1.1 christos test_gr_a5a5 7 1084 1.1 christos 1085 1.1 christos ;; Now check the result of the move to memory. 1086 1.1 christos cmp.l #0xcafedead, @long_dst 1087 1.1 christos beq .Lnext30 1088 1.1 christos fail 1089 1.1 christos .Lnext30: 1090 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 1091 1.1 christos 1092 1.1 christos .endif 1093 1.1 christos 1094 1.1 christos ;; 1095 1.1 christos ;; Move long from register source 1096 1.1 christos ;; 1097 1.1 christos 1098 1.1 christos mov_l_reg32_to_reg32: 1099 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1100 1.1 christos set_ccr_zero 1101 1.1 christos 1102 1.1 christos ;; mov.l ers, erd 1103 1.1 christos mov.l #0x12345678, er1 1104 1.1 christos mov.l er1, er0 ; Register 32-bit operand 1105 1.1 christos ;;; .word 0x0f90 1106 1.1 christos 1107 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1108 1.1 christos test_neg_clear 1109 1.1 christos test_zero_clear 1110 1.1 christos test_ovf_clear 1111 1.1 christos test_carry_clear 1112 1.1 christos test_h_gr32 0x12345678 er0 1113 1.1 christos test_h_gr32 0x12345678 er1 ; mov src unchanged 1114 1.1 christos 1115 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1116 1.1 christos test_gr_a5a5 3 1117 1.1 christos test_gr_a5a5 4 1118 1.1 christos test_gr_a5a5 5 1119 1.1 christos test_gr_a5a5 6 1120 1.1 christos test_gr_a5a5 7 1121 1.1 christos 1122 1.1 christos mov_l_reg32_to_indirect: 1123 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1124 1.1 christos set_ccr_zero 1125 1.1 christos 1126 1.1 christos ;; mov.l ers, @erd 1127 1.1 christos mov.l #long_dst, er1 1128 1.1 christos mov.l er0, @er1 ; Register indirect operand 1129 1.1 christos ;;; .word 0x0100 1130 1.1 christos ;;; .word 0x6990 1131 1.1 christos 1132 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 1133 1.1 christos test_neg_set 1134 1.1 christos test_zero_clear 1135 1.1 christos test_ovf_clear 1136 1.1 christos test_carry_clear 1137 1.1 christos 1138 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1139 1.1 christos test_h_gr32 long_dst, er1 1140 1.1 christos test_gr_a5a5 2 1141 1.1 christos test_gr_a5a5 3 1142 1.1 christos test_gr_a5a5 4 1143 1.1 christos test_gr_a5a5 5 1144 1.1 christos test_gr_a5a5 6 1145 1.1 christos test_gr_a5a5 7 1146 1.1 christos 1147 1.1 christos ;; Now check the result of the move to memory. 1148 1.1 christos mov.l #0, er0 1149 1.1 christos mov.l @long_dst, er0 1150 1.1 christos cmp.l er2, er0 1151 1.1 christos beq .Lnext44 1152 1.1 christos fail 1153 1.1 christos .Lnext44: 1154 1.1 christos mov.l #0, er0 1155 1.1 christos mov.l er0, @long_dst ; zero it again for the next use. 1156 1.1 christos 1157 1.1 christos .if (sim_cpu == h8sx) 1158 1.1 christos mov_l_reg32_to_postinc: ; post-increment from register to mem 1159 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1160 1.1 christos set_ccr_zero 1161 1.1 christos 1162 1.1 christos ;; mov.l ers, @erd+ 1163 1.1 christos mov.l #long_dst, er1 1164 1.1 christos mov.l er0, @er1+ ; Register post-incr operand 1165 1.1 christos ;;; .word 0x0103 1166 1.1 christos ;;; .word 0x6d90 1167 1.1 christos 1168 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 1169 1.1 christos test_neg_set 1170 1.1 christos test_zero_clear 1171 1.1 christos test_ovf_clear 1172 1.1 christos test_carry_clear 1173 1.1 christos 1174 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1175 1.1 christos test_h_gr32 long_dst+4, er1 1176 1.1 christos test_gr_a5a5 2 1177 1.1 christos test_gr_a5a5 3 1178 1.1 christos test_gr_a5a5 4 1179 1.1 christos test_gr_a5a5 5 1180 1.1 christos test_gr_a5a5 6 1181 1.1 christos test_gr_a5a5 7 1182 1.1 christos 1183 1.1 christos ;; Now check the result of the move to memory. 1184 1.1 christos cmp.l er2, @long_dst 1185 1.1 christos beq .Lnext49 1186 1.1 christos fail 1187 1.1 christos .Lnext49: 1188 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 1189 1.1 christos 1190 1.1 christos mov_l_reg32_to_postdec: ; post-decrement from register to mem 1191 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1192 1.1 christos set_ccr_zero 1193 1.1 christos 1194 1.1 christos ;; mov.l ers, @erd- 1195 1.1 christos mov.l #long_dst, er1 1196 1.1 christos mov.l er0, @er1- ; Register post-decr operand 1197 1.1 christos ;;; .word 0x0101 1198 1.1 christos ;;; .word 0x6d90 1199 1.1 christos 1200 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 1201 1.1 christos test_neg_set 1202 1.1 christos test_zero_clear 1203 1.1 christos test_ovf_clear 1204 1.1 christos test_carry_clear 1205 1.1 christos 1206 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1207 1.1 christos test_h_gr32 long_dst-4, er1 1208 1.1 christos test_gr_a5a5 2 1209 1.1 christos test_gr_a5a5 3 1210 1.1 christos test_gr_a5a5 4 1211 1.1 christos test_gr_a5a5 5 1212 1.1 christos test_gr_a5a5 6 1213 1.1 christos test_gr_a5a5 7 1214 1.1 christos 1215 1.1 christos ;; Now check the result of the move to memory. 1216 1.1 christos cmp.l er2, @long_dst 1217 1.1 christos beq .Lnext50 1218 1.1 christos fail 1219 1.1 christos .Lnext50: 1220 1.1 christos ;; special case same register 1221 1.1 christos mov.l #long_dst, er0 1222 1.1 christos mov.l er0, er1 1223 1.1 christos subs #4, er1 1224 1.1 christos mov.l er0, @er0- 1225 1.1 christos mov.l @long_dst, er0 1226 1.1 christos cmp.l er0, er1 1227 1.1 christos beq .Lnext54 1228 1.1 christos fail 1229 1.1 christos .Lnext54: 1230 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 1231 1.1 christos 1232 1.1 christos mov_l_reg32_to_preinc: ; pre-increment from register to mem 1233 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1234 1.1 christos set_ccr_zero 1235 1.1 christos 1236 1.1 christos ;; mov.l ers, @+erd 1237 1.1 christos mov.l #long_dst-4, er1 1238 1.1 christos mov.l er0, @+er1 ; Register pre-incr operand 1239 1.1 christos ;;; .word 0x0102 1240 1.1 christos ;;; .word 0x6d90 1241 1.1 christos 1242 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 1243 1.1 christos test_neg_set 1244 1.1 christos test_zero_clear 1245 1.1 christos test_ovf_clear 1246 1.1 christos test_carry_clear 1247 1.1 christos 1248 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1249 1.1 christos test_h_gr32 long_dst, er1 1250 1.1 christos test_gr_a5a5 2 1251 1.1 christos test_gr_a5a5 3 1252 1.1 christos test_gr_a5a5 4 1253 1.1 christos test_gr_a5a5 5 1254 1.1 christos test_gr_a5a5 6 1255 1.1 christos test_gr_a5a5 7 1256 1.1 christos 1257 1.1 christos ;; Now check the result of the move to memory. 1258 1.1 christos cmp.l er2, @long_dst 1259 1.1 christos beq .Lnext51 1260 1.1 christos fail 1261 1.1 christos .Lnext51: 1262 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 1263 1.1 christos .endif ; h8sx 1264 1.1 christos 1265 1.1 christos mov_l_reg32_to_predec: ; pre-decrement from register to mem 1266 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1267 1.1 christos set_ccr_zero 1268 1.1 christos 1269 1.1 christos ;; mov.l ers, @-erd 1270 1.1 christos mov.l #long_dst+4, er1 1271 1.1 christos mov.l er0, @-er1 ; Register pre-decr operand 1272 1.1 christos ;;; .word 0x0100 1273 1.1 christos ;;; .word 0x6d90 1274 1.1 christos 1275 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 1276 1.1 christos test_neg_set 1277 1.1 christos test_zero_clear 1278 1.1 christos test_ovf_clear 1279 1.1 christos test_carry_clear 1280 1.1 christos 1281 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1282 1.1 christos test_h_gr32 long_dst, er1 1283 1.1 christos test_gr_a5a5 2 1284 1.1 christos test_gr_a5a5 3 1285 1.1 christos test_gr_a5a5 4 1286 1.1 christos test_gr_a5a5 5 1287 1.1 christos test_gr_a5a5 6 1288 1.1 christos test_gr_a5a5 7 1289 1.1 christos 1290 1.1 christos ;; Now check the result of the move to memory. 1291 1.1 christos mov.l #0, er0 1292 1.1 christos mov.l @long_dst, er0 1293 1.1 christos cmp.l er2, er0 1294 1.1 christos beq .Lnext48 1295 1.1 christos fail 1296 1.1 christos .Lnext48: 1297 1.1 christos ;; Special case in same register 1298 1.1 christos ;; CCR confirmation omitted 1299 1.1 christos mov.l #long_dst+4, er1 1300 1.1 christos mov.l er1, er0 1301 1.1 christos subs #4, er1 1302 1.1 christos mov.l er0, @-er0 1303 1.1 christos mov.l @long_dst, er0 1304 1.1 christos cmp.l er1, er0 1305 1.1 christos beq .Lnext47 1306 1.1 christos fail 1307 1.1 christos .Lnext47: 1308 1.1 christos mov.l #0, er0 1309 1.1 christos mov.l er0, @long_dst ; zero it again for the next use. 1310 1.1 christos 1311 1.1 christos .if (sim_cpu == h8sx) 1312 1.1 christos mov_l_reg32_to_disp2: 1313 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1314 1.1 christos set_ccr_zero 1315 1.1 christos 1316 1.1 christos ;; mov.l ers, @(dd:2, erd) 1317 1.1 christos mov.l #long_dst-12, er1 1318 1.1 christos mov.l er0, @(12:2, er1) ; Register plus 2-bit disp. operand 1319 1.1 christos ;;; .word 0x0103 1320 1.1 christos ;;; .word 0x6990 1321 1.1 christos 1322 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 1323 1.1 christos test_neg_set 1324 1.1 christos test_zero_clear 1325 1.1 christos test_ovf_clear 1326 1.1 christos test_carry_clear 1327 1.1 christos 1328 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1329 1.1 christos test_h_gr32 long_dst-12, er1 1330 1.1 christos test_gr_a5a5 2 1331 1.1 christos test_gr_a5a5 3 1332 1.1 christos test_gr_a5a5 4 1333 1.1 christos test_gr_a5a5 5 1334 1.1 christos test_gr_a5a5 6 1335 1.1 christos test_gr_a5a5 7 1336 1.1 christos 1337 1.1 christos ;; Now check the result of the move to memory. 1338 1.1 christos cmp.l er2, @long_dst 1339 1.1 christos beq .Lnext52 1340 1.1 christos fail 1341 1.1 christos .Lnext52: 1342 1.1 christos mov.l #0, @long_dst ; zero it again for the next use. 1343 1.1 christos .endif ; h8sx 1344 1.1 christos 1345 1.1 christos mov_l_reg32_to_disp16: 1346 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1347 1.1 christos set_ccr_zero 1348 1.1 christos 1349 1.1 christos ;; mov.l ers, @(dd:16, erd) 1350 1.1 christos mov.l #long_dst-4, er1 1351 1.1 christos mov.l er0, @(4:16, er1) ; Register plus 16-bit disp. operand 1352 1.1 christos ;;; .word 0x0100 1353 1.1 christos ;;; .word 0x6f90 1354 1.1 christos ;;; .word 0x0004 1355 1.1 christos 1356 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 1357 1.1 christos test_neg_set 1358 1.1 christos test_zero_clear 1359 1.1 christos test_ovf_clear 1360 1.1 christos test_carry_clear 1361 1.1 christos 1362 1.1 christos test_h_gr32 long_dst-4, er1 1363 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1364 1.1 christos test_gr_a5a5 2 1365 1.1 christos test_gr_a5a5 3 1366 1.1 christos test_gr_a5a5 4 1367 1.1 christos test_gr_a5a5 5 1368 1.1 christos test_gr_a5a5 6 1369 1.1 christos test_gr_a5a5 7 1370 1.1 christos 1371 1.1 christos ;; Now check the result of the move to memory. 1372 1.1 christos mov.l #0, er0 1373 1.1 christos mov.l @long_dst, er0 1374 1.1 christos cmp.l er2, er0 1375 1.1 christos beq .Lnext45 1376 1.1 christos fail 1377 1.1 christos .Lnext45: 1378 1.1 christos mov.l #0, er0 1379 1.1 christos mov.l er0, @long_dst ; zero it again for the next use. 1380 1.1 christos 1381 1.1 christos mov_l_reg32_to_disp32: 1382 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1383 1.1 christos set_ccr_zero 1384 1.1 christos 1385 1.1 christos ;; mov.l ers, @(dd:32, erd) 1386 1.1 christos mov.l #long_dst-8, er1 1387 1.1 christos mov.l er0, @(8:32, er1) ; Register plus 32-bit disp. operand 1388 1.1 christos ;;; .word 0x7890 1389 1.1 christos ;;; .word 0x6ba0 1390 1.1 christos ;;; .long 8 1391 1.1 christos 1392 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 1393 1.1 christos test_neg_set 1394 1.1 christos test_zero_clear 1395 1.1 christos test_ovf_clear 1396 1.1 christos test_carry_clear 1397 1.1 christos 1398 1.1 christos test_h_gr32 long_dst-8, er1 1399 1.1 christos test_gr_a5a5 0 ; Make sure other general regs not disturbed 1400 1.1 christos test_gr_a5a5 2 1401 1.1 christos test_gr_a5a5 3 1402 1.1 christos test_gr_a5a5 4 1403 1.1 christos test_gr_a5a5 5 1404 1.1 christos test_gr_a5a5 6 1405 1.1 christos test_gr_a5a5 7 1406 1.1 christos 1407 1.1 christos ;; Now check the result of the move to memory. 1408 1.1 christos mov.l #0, er0 1409 1.1 christos mov.l @long_dst, er0 1410 1.1 christos cmp.l er2, er0 1411 1.1 christos beq .Lnext46 1412 1.1 christos fail 1413 1.1 christos .Lnext46: 1414 1.1 christos mov.l #0, er0 1415 1.1 christos mov.l er0, @long_dst ; zero it again for the next use. 1416 1.1 christos 1417 1.1 christos mov_l_reg32_to_abs16: 1418 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1419 1.1 christos set_ccr_zero 1420 1.1 christos 1421 1.1 christos ;; mov.l ers, @aa:16 1422 1.1 christos mov.l er0, @long_dst:16 ; 16-bit address-direct operand 1423 1.1 christos ;;; .word 0x0100 1424 1.1 christos ;;; .word 0x6b80 1425 1.1 christos ;;; .word @long_dst 1426 1.1 christos 1427 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 1428 1.1 christos test_neg_set 1429 1.1 christos test_zero_clear 1430 1.1 christos test_ovf_clear 1431 1.1 christos test_carry_clear 1432 1.1 christos 1433 1.1 christos test_gr_a5a5 0 ; Make sure _ALL_ general regs not disturbed 1434 1.1 christos test_gr_a5a5 1 ; (first, because on h8/300 we must use one 1435 1.1 christos test_gr_a5a5 2 ; to examine the destination memory). 1436 1.1 christos test_gr_a5a5 3 1437 1.1 christos test_gr_a5a5 4 1438 1.1 christos test_gr_a5a5 5 1439 1.1 christos test_gr_a5a5 6 1440 1.1 christos test_gr_a5a5 7 1441 1.1 christos 1442 1.1 christos ;; Now check the result of the move to memory. 1443 1.1 christos mov.l #0, er0 1444 1.1 christos mov.l @long_dst, er0 1445 1.1 christos cmp.l er0, er1 1446 1.1 christos beq .Lnext41 1447 1.1 christos fail 1448 1.1 christos .Lnext41: 1449 1.1 christos mov.l #0, er0 1450 1.1 christos mov.l er0, @long_dst ; zero it again for the next use. 1451 1.1 christos 1452 1.1 christos mov_l_reg32_to_abs32: 1453 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1454 1.1 christos set_ccr_zero 1455 1.1 christos 1456 1.1 christos ;; mov.l ers, @aa:32 1457 1.1 christos mov.l er0, @long_dst:32 ; 32-bit address-direct operand 1458 1.1 christos ;;; .word 0x0100 1459 1.1 christos ;;; .word 0x6ba0 1460 1.1 christos ;;; .long @long_dst 1461 1.1 christos 1462 1.1 christos ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 1463 1.1 christos test_neg_set 1464 1.1 christos test_zero_clear 1465 1.1 christos test_ovf_clear 1466 1.1 christos test_carry_clear 1467 1.1 christos 1468 1.1 christos test_gr_a5a5 0 ; Make sure _ALL_ general regs not disturbed 1469 1.1 christos test_gr_a5a5 1 ; (first, because on h8/300 we must use one 1470 1.1 christos test_gr_a5a5 2 ; to examine the destination memory). 1471 1.1 christos test_gr_a5a5 3 1472 1.1 christos test_gr_a5a5 4 1473 1.1 christos test_gr_a5a5 5 1474 1.1 christos test_gr_a5a5 6 1475 1.1 christos test_gr_a5a5 7 1476 1.1 christos 1477 1.1 christos ;; Now check the result of the move to memory. 1478 1.1 christos mov.l #0, er0 1479 1.1 christos mov.l @long_dst, er0 1480 1.1 christos cmp.l er0, er1 1481 1.1 christos beq .Lnext42 1482 1.1 christos fail 1483 1.1 christos .Lnext42: 1484 1.1 christos mov.l #0, er0 1485 1.1 christos mov.l er0, @long_dst ; zero it again for the next use. 1486 1.1 christos 1487 1.1 christos ;; 1488 1.1 christos ;; Move long to register destination. 1489 1.1 christos ;; 1490 1.1 christos 1491 1.1 christos mov_l_indirect_to_reg32: 1492 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1493 1.1 christos set_ccr_zero 1494 1.1 christos 1495 1.1 christos ;; mov.l @ers, erd 1496 1.1 christos mov.l #long_src, er1 1497 1.1 christos mov.l @er1, er0 ; Register indirect operand 1498 1.1 christos ;;; .word 0x0100 1499 1.1 christos ;;; .word 0x6910 1500 1.1 christos 1501 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1502 1.1 christos test_neg_clear 1503 1.1 christos test_zero_clear 1504 1.1 christos test_ovf_clear 1505 1.1 christos test_carry_clear 1506 1.1 christos 1507 1.1 christos test_h_gr32 0x77777777 er0 1508 1.1 christos 1509 1.1 christos test_h_gr32 long_src, er1 1510 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1511 1.1 christos test_gr_a5a5 3 1512 1.1 christos test_gr_a5a5 4 1513 1.1 christos test_gr_a5a5 5 1514 1.1 christos test_gr_a5a5 6 1515 1.1 christos test_gr_a5a5 7 1516 1.1 christos 1517 1.1 christos mov_l_postinc_to_reg32: ; post-increment from mem to register 1518 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1519 1.1 christos set_ccr_zero 1520 1.1 christos 1521 1.1 christos ;; mov.l @ers+, erd 1522 1.1 christos 1523 1.1 christos mov.l #long_src, er1 1524 1.1 christos mov.l @er1+, er0 ; Register post-incr operand 1525 1.1 christos ;;; .word 0x0100 1526 1.1 christos ;;; .word 0x6d10 1527 1.1 christos 1528 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1529 1.1 christos test_neg_clear 1530 1.1 christos test_zero_clear 1531 1.1 christos test_ovf_clear 1532 1.1 christos test_carry_clear 1533 1.1 christos 1534 1.1 christos test_h_gr32 0x77777777 er0 1535 1.1 christos 1536 1.1 christos test_h_gr32 long_src+4, er1 1537 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1538 1.1 christos test_gr_a5a5 3 1539 1.1 christos test_gr_a5a5 4 1540 1.1 christos test_gr_a5a5 5 1541 1.1 christos test_gr_a5a5 6 1542 1.1 christos test_gr_a5a5 7 1543 1.1 christos 1544 1.1 christos .if (sim_cpu == h8sx) 1545 1.1 christos mov_l_postdec_to_reg32: ; post-decrement from mem to register 1546 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1547 1.1 christos set_ccr_zero 1548 1.1 christos 1549 1.1 christos ;; mov.l @ers-, erd 1550 1.1 christos 1551 1.1 christos mov.l #long_src, er1 1552 1.1 christos mov.l @er1-, er0 ; Register post-decr operand 1553 1.1 christos ;;; .word 0x0102 1554 1.1 christos ;;; .word 0x6d10 1555 1.1 christos 1556 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1557 1.1 christos test_neg_clear 1558 1.1 christos test_zero_clear 1559 1.1 christos test_ovf_clear 1560 1.1 christos test_carry_clear 1561 1.1 christos 1562 1.1 christos test_h_gr32 0x77777777 er0 1563 1.1 christos 1564 1.1 christos test_h_gr32 long_src-4, er1 1565 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1566 1.1 christos test_gr_a5a5 3 1567 1.1 christos test_gr_a5a5 4 1568 1.1 christos test_gr_a5a5 5 1569 1.1 christos test_gr_a5a5 6 1570 1.1 christos test_gr_a5a5 7 1571 1.1 christos 1572 1.1 christos mov_l_preinc_to_reg32: ; pre-increment from mem to register 1573 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1574 1.1 christos set_ccr_zero 1575 1.1 christos 1576 1.1 christos ;; mov.l @+ers, erd 1577 1.1 christos 1578 1.1 christos mov.l #long_src-4, er1 1579 1.1 christos mov.l @+er1, er0 ; Register pre-incr operand 1580 1.1 christos ;;; .word 0x0101 1581 1.1 christos ;;; .word 0x6d10 1582 1.1 christos 1583 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1584 1.1 christos test_neg_clear 1585 1.1 christos test_zero_clear 1586 1.1 christos test_ovf_clear 1587 1.1 christos test_carry_clear 1588 1.1 christos 1589 1.1 christos test_h_gr32 0x77777777 er0 1590 1.1 christos 1591 1.1 christos test_h_gr32 long_src, er1 1592 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1593 1.1 christos test_gr_a5a5 3 1594 1.1 christos test_gr_a5a5 4 1595 1.1 christos test_gr_a5a5 5 1596 1.1 christos test_gr_a5a5 6 1597 1.1 christos test_gr_a5a5 7 1598 1.1 christos 1599 1.1 christos mov_l_predec_to_reg32: ; pre-decrement from mem to register 1600 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1601 1.1 christos set_ccr_zero 1602 1.1 christos 1603 1.1 christos ;; mov.l @-ers, erd 1604 1.1 christos 1605 1.1 christos mov.l #long_src+4, er1 1606 1.1 christos mov.l @-er1, er0 ; Register pre-decr operand 1607 1.1 christos ;;; .word 0x0103 1608 1.1 christos ;;; .word 0x6d10 1609 1.1 christos 1610 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1611 1.1 christos test_neg_clear 1612 1.1 christos test_zero_clear 1613 1.1 christos test_ovf_clear 1614 1.1 christos test_carry_clear 1615 1.1 christos 1616 1.1 christos test_h_gr32 0x77777777 er0 1617 1.1 christos 1618 1.1 christos test_h_gr32 long_src, er1 1619 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1620 1.1 christos test_gr_a5a5 3 1621 1.1 christos test_gr_a5a5 4 1622 1.1 christos test_gr_a5a5 5 1623 1.1 christos test_gr_a5a5 6 1624 1.1 christos test_gr_a5a5 7 1625 1.1 christos 1626 1.1 christos 1627 1.1 christos mov_l_disp2_to_reg32: 1628 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1629 1.1 christos set_ccr_zero 1630 1.1 christos 1631 1.1 christos ;; mov.l @(dd:2, ers), erd 1632 1.1 christos mov.l #long_src-4, er1 1633 1.1 christos mov.l @(4:2, er1), er0 ; Register plus 2-bit disp. operand 1634 1.1 christos ;;; .word 0x0101 1635 1.1 christos ;;; .word 0x6910 1636 1.1 christos 1637 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1638 1.1 christos test_neg_clear 1639 1.1 christos test_zero_clear 1640 1.1 christos test_ovf_clear 1641 1.1 christos test_carry_clear 1642 1.1 christos 1643 1.1 christos test_h_gr32 0x77777777 er0 ; mov result: a5a5 | 7777 1644 1.1 christos 1645 1.1 christos test_h_gr32 long_src-4, er1 1646 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1647 1.1 christos test_gr_a5a5 3 1648 1.1 christos test_gr_a5a5 4 1649 1.1 christos test_gr_a5a5 5 1650 1.1 christos test_gr_a5a5 6 1651 1.1 christos test_gr_a5a5 7 1652 1.1 christos .endif ; h8sx 1653 1.1 christos 1654 1.1 christos mov_l_disp16_to_reg32: 1655 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1656 1.1 christos set_ccr_zero 1657 1.1 christos 1658 1.1 christos ;; mov.l @(dd:16, ers), erd 1659 1.1 christos mov.l #long_src+0x1234, er1 1660 1.1 christos mov.l @(-0x1234:16, er1), er0 ; Register plus 16-bit disp. operand 1661 1.1 christos ;;; .word 0x0100 1662 1.1 christos ;;; .word 0x6f10 1663 1.1 christos ;;; .word -0x1234 1664 1.1 christos 1665 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1666 1.1 christos test_neg_clear 1667 1.1 christos test_zero_clear 1668 1.1 christos test_ovf_clear 1669 1.1 christos test_carry_clear 1670 1.1 christos 1671 1.1 christos test_h_gr32 0x77777777 er0 ; mov result: a5a5 | 7777 1672 1.1 christos 1673 1.1 christos test_h_gr32 long_src+0x1234, er1 1674 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1675 1.1 christos test_gr_a5a5 3 1676 1.1 christos test_gr_a5a5 4 1677 1.1 christos test_gr_a5a5 5 1678 1.1 christos test_gr_a5a5 6 1679 1.1 christos test_gr_a5a5 7 1680 1.1 christos 1681 1.1 christos mov_l_disp32_to_reg32: 1682 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1683 1.1 christos set_ccr_zero 1684 1.1 christos 1685 1.1 christos ;; mov.l @(dd:32, ers), erd 1686 1.1 christos mov.l #long_src+65536, er1 1687 1.1 christos mov.l @(-65536:32, er1), er0 ; Register plus 32-bit disp. operand 1688 1.1 christos ;;; .word 0x7890 1689 1.1 christos ;;; .word 0x6b20 1690 1.1 christos ;;; .long -65536 1691 1.1 christos 1692 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1693 1.1 christos test_neg_clear 1694 1.1 christos test_zero_clear 1695 1.1 christos test_ovf_clear 1696 1.1 christos test_carry_clear 1697 1.1 christos 1698 1.1 christos test_h_gr32 0x77777777 er0 ; mov result: a5a5 | 7777 1699 1.1 christos 1700 1.1 christos test_h_gr32 long_src+65536, er1 1701 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1702 1.1 christos test_gr_a5a5 3 1703 1.1 christos test_gr_a5a5 4 1704 1.1 christos test_gr_a5a5 5 1705 1.1 christos test_gr_a5a5 6 1706 1.1 christos test_gr_a5a5 7 1707 1.1 christos 1708 1.1 christos mov_l_abs16_to_reg32: 1709 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1710 1.1 christos set_ccr_zero 1711 1.1 christos 1712 1.1 christos ;; mov.l @aa:16, erd 1713 1.1 christos mov.l @long_src:16, er0 ; 16-bit address-direct operand 1714 1.1 christos ;;; .word 0x0100 1715 1.1 christos ;;; .word 0x6b00 1716 1.1 christos ;;; .word @long_src 1717 1.1 christos 1718 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1719 1.1 christos test_neg_clear 1720 1.1 christos test_zero_clear 1721 1.1 christos test_ovf_clear 1722 1.1 christos test_carry_clear 1723 1.1 christos 1724 1.1 christos test_h_gr32 0x77777777 er0 1725 1.1 christos 1726 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1727 1.1 christos test_gr_a5a5 2 1728 1.1 christos test_gr_a5a5 3 1729 1.1 christos test_gr_a5a5 4 1730 1.1 christos test_gr_a5a5 5 1731 1.1 christos test_gr_a5a5 6 1732 1.1 christos test_gr_a5a5 7 1733 1.1 christos 1734 1.1 christos mov_l_abs32_to_reg32: 1735 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1736 1.1 christos set_ccr_zero 1737 1.1 christos 1738 1.1 christos ;; mov.l @aa:32, erd 1739 1.1 christos mov.l @long_src:32, er0 ; 32-bit address-direct operand 1740 1.1 christos ;;; .word 0x0100 1741 1.1 christos ;;; .word 0x6b20 1742 1.1 christos ;;; .long @long_src 1743 1.1 christos 1744 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1745 1.1 christos test_neg_clear 1746 1.1 christos test_zero_clear 1747 1.1 christos test_ovf_clear 1748 1.1 christos test_carry_clear 1749 1.1 christos 1750 1.1 christos test_h_gr32 0x77777777 er0 1751 1.1 christos 1752 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1753 1.1 christos test_gr_a5a5 2 1754 1.1 christos test_gr_a5a5 3 1755 1.1 christos test_gr_a5a5 4 1756 1.1 christos test_gr_a5a5 5 1757 1.1 christos test_gr_a5a5 6 1758 1.1 christos test_gr_a5a5 7 1759 1.1 christos 1760 1.1 christos 1761 1.1 christos .if (sim_cpu == h8sx) 1762 1.1 christos 1763 1.1 christos ;; 1764 1.1 christos ;; Move long from memory to memory 1765 1.1 christos ;; 1766 1.1 christos 1767 1.1 christos mov_l_indirect_to_indirect: ; reg indirect, memory to memory 1768 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1769 1.1 christos set_ccr_zero 1770 1.1 christos 1771 1.1 christos ;; mov.l @ers, @erd 1772 1.1 christos 1773 1.1 christos mov.l #long_src, er1 1774 1.1 christos mov.l #long_dst, er0 1775 1.1 christos mov.l @er1, @er0 1776 1.1 christos ;;; .word 0x0108 1777 1.1 christos ;;; .word 0x0100 1778 1.1 christos 1779 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1780 1.1 christos test_neg_clear 1781 1.1 christos test_zero_clear 1782 1.1 christos test_ovf_clear 1783 1.1 christos test_carry_clear 1784 1.1 christos 1785 1.1 christos ;; Verify the affected registers. 1786 1.1 christos 1787 1.1 christos test_h_gr32 long_dst er0 1788 1.1 christos test_h_gr32 long_src er1 1789 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1790 1.1 christos test_gr_a5a5 3 1791 1.1 christos test_gr_a5a5 4 1792 1.1 christos test_gr_a5a5 5 1793 1.1 christos test_gr_a5a5 6 1794 1.1 christos test_gr_a5a5 7 1795 1.1 christos 1796 1.1 christos ;; Now check the result of the move to memory. 1797 1.1 christos cmp.l @long_src, @long_dst 1798 1.1 christos beq .Lnext56 1799 1.1 christos fail 1800 1.1 christos .Lnext56: 1801 1.1 christos ;; Now clear the destination location, and verify that. 1802 1.1 christos mov.l #0, @long_dst 1803 1.1 christos cmp.l @long_src, @long_dst 1804 1.1 christos bne .Lnext57 1805 1.1 christos fail 1806 1.1 christos .Lnext57: ; OK, pass on. 1807 1.1 christos 1808 1.1 christos mov_l_postinc_to_postinc: ; reg post-increment, memory to memory 1809 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1810 1.1 christos set_ccr_zero 1811 1.1 christos 1812 1.1 christos ;; mov.l @ers+, @erd+ 1813 1.1 christos 1814 1.1 christos mov.l #long_src, er1 1815 1.1 christos mov.l #long_dst, er0 1816 1.1 christos mov.l @er1+, @er0+ 1817 1.1 christos ;;; .word 0x0108 1818 1.1 christos ;;; .word 0x8180 1819 1.1 christos 1820 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1821 1.1 christos test_neg_clear 1822 1.1 christos test_zero_clear 1823 1.1 christos test_ovf_clear 1824 1.1 christos test_carry_clear 1825 1.1 christos 1826 1.1 christos ;; Verify the affected registers. 1827 1.1 christos 1828 1.1 christos test_h_gr32 long_dst+4 er0 1829 1.1 christos test_h_gr32 long_src+4 er1 1830 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1831 1.1 christos test_gr_a5a5 3 1832 1.1 christos test_gr_a5a5 4 1833 1.1 christos test_gr_a5a5 5 1834 1.1 christos test_gr_a5a5 6 1835 1.1 christos test_gr_a5a5 7 1836 1.1 christos 1837 1.1 christos ;; Now check the result of the move to memory. 1838 1.1 christos cmp.l @long_src, @long_dst 1839 1.1 christos beq .Lnext65 1840 1.1 christos fail 1841 1.1 christos .Lnext65: 1842 1.1 christos ;; Now clear the destination location, and verify that. 1843 1.1 christos mov.l #0, @long_dst 1844 1.1 christos cmp.l @long_src, @long_dst 1845 1.1 christos bne .Lnext66 1846 1.1 christos fail 1847 1.1 christos .Lnext66: ; OK, pass on. 1848 1.1 christos ;; special case same register 1849 1.1 christos mov.l #long_src, er0 1850 1.1 christos mov.l @er0+, @er0+ ; copying long_src to long_dst 1851 1.1 christos test_h_gr32 long_src+8 er0 1852 1.1 christos cmp.b @long_src, @long_dst 1853 1.1 christos beq .Lnext67 1854 1.1 christos fail 1855 1.1 christos .Lnext67: 1856 1.1 christos ;; Now clear the destination location, and verify that. 1857 1.1 christos mov.l #0, @long_dst 1858 1.1 christos cmp.l @long_src, @long_dst 1859 1.1 christos bne .Lnext68 1860 1.1 christos fail 1861 1.1 christos .Lnext68: 1862 1.1 christos 1863 1.1 christos mov_l_postdec_to_postdec: ; reg post-decrement, memory to memory 1864 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1865 1.1 christos set_ccr_zero 1866 1.1 christos 1867 1.1 christos ;; mov.l @ers-, @erd- 1868 1.1 christos 1869 1.1 christos mov.l #long_src, er1 1870 1.1 christos mov.l #long_dst, er0 1871 1.1 christos mov.l @er1-, @er0- 1872 1.1 christos ;;; .word 0x0108 1873 1.1 christos ;;; .word 0xa1a0 1874 1.1 christos 1875 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1876 1.1 christos test_neg_clear 1877 1.1 christos test_zero_clear 1878 1.1 christos test_ovf_clear 1879 1.1 christos test_carry_clear 1880 1.1 christos 1881 1.1 christos ;; Verify the affected registers. 1882 1.1 christos 1883 1.1 christos test_h_gr32 long_dst-4 er0 1884 1.1 christos test_h_gr32 long_src-4 er1 1885 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1886 1.1 christos test_gr_a5a5 3 1887 1.1 christos test_gr_a5a5 4 1888 1.1 christos test_gr_a5a5 5 1889 1.1 christos test_gr_a5a5 6 1890 1.1 christos test_gr_a5a5 7 1891 1.1 christos 1892 1.1 christos ;; Now check the result of the move to memory. 1893 1.1 christos cmp.l @long_src, @long_dst 1894 1.1 christos beq .Lnext75 1895 1.1 christos fail 1896 1.1 christos .Lnext75: 1897 1.1 christos ;; Now clear the destination location, and verify that. 1898 1.1 christos mov.l #0, @long_dst 1899 1.1 christos cmp.l @long_src, @long_dst 1900 1.1 christos bne .Lnext76 1901 1.1 christos fail 1902 1.1 christos .Lnext76: ; OK, pass on. 1903 1.1 christos ;; special case same register 1904 1.1 christos mov.l #long_src, er0 1905 1.1 christos mov.l @er0-, @er0- ; copying long_src to long_dst_dec 1906 1.1 christos test_h_gr32 long_src-8 er0 1907 1.1 christos cmp.l @long_src, @long_dst_dec 1908 1.1 christos beq .Lnext77 1909 1.1 christos fail 1910 1.1 christos .Lnext77: 1911 1.1 christos ;; Now clear the destination location, and verify that. 1912 1.1 christos mov.l #0, @long_dst_dec 1913 1.1 christos cmp.l @long_src, @long_dst_dec 1914 1.1 christos bne .Lnext78 1915 1.1 christos fail 1916 1.1 christos .Lnext78: 1917 1.1 christos 1918 1.1 christos mov_l_preinc_to_preinc: ; reg pre-increment, memory to memory 1919 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1920 1.1 christos set_ccr_zero 1921 1.1 christos 1922 1.1 christos ;; mov.l @+ers, @+erd 1923 1.1 christos 1924 1.1 christos mov.l #long_src-4, er1 1925 1.1 christos mov.l #long_dst-4, er0 1926 1.1 christos mov.l @+er1, @+er0 1927 1.1 christos ;;; .word 0x0108 1928 1.1 christos ;;; .word 0x9190 1929 1.1 christos 1930 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1931 1.1 christos test_neg_clear 1932 1.1 christos test_zero_clear 1933 1.1 christos test_ovf_clear 1934 1.1 christos test_carry_clear 1935 1.1 christos 1936 1.1 christos ;; Verify the affected registers. 1937 1.1 christos 1938 1.1 christos test_h_gr32 long_dst er0 1939 1.1 christos test_h_gr32 long_src er1 1940 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1941 1.1 christos test_gr_a5a5 3 1942 1.1 christos test_gr_a5a5 4 1943 1.1 christos test_gr_a5a5 5 1944 1.1 christos test_gr_a5a5 6 1945 1.1 christos test_gr_a5a5 7 1946 1.1 christos 1947 1.1 christos ;; Now check the result of the move to memory. 1948 1.1 christos cmp.l @long_src, @long_dst 1949 1.1 christos beq .Lnext85 1950 1.1 christos fail 1951 1.1 christos .Lnext85: 1952 1.1 christos ;; Now clear the destination location, and verify that. 1953 1.1 christos mov.l #0, @long_dst 1954 1.1 christos cmp.l @long_src, @long_dst 1955 1.1 christos bne .Lnext86 1956 1.1 christos fail 1957 1.1 christos .Lnext86: ; OK, pass on. 1958 1.1 christos ;; special case same register 1959 1.1 christos mov.l #long_src-4, er0 1960 1.1 christos mov.l @+er0, @+er0 ; copying long_src to long_dst 1961 1.1 christos test_h_gr32 long_src+4 er0 1962 1.1 christos cmp.b @long_src, @long_dst 1963 1.1 christos beq .Lnext87 1964 1.1 christos fail 1965 1.1 christos .Lnext87: 1966 1.1 christos ;; Now clear the destination location, and verify that. 1967 1.1 christos mov.b #0, @long_dst 1968 1.1 christos cmp.b @long_src, @long_dst 1969 1.1 christos bne .Lnext88 1970 1.1 christos fail 1971 1.1 christos .Lnext88: 1972 1.1 christos 1973 1.1 christos mov_l_predec_to_predec: ; reg pre-decrement, memory to memory 1974 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1975 1.1 christos set_ccr_zero 1976 1.1 christos 1977 1.1 christos ;; mov.l @-ers, @-erd 1978 1.1 christos 1979 1.1 christos mov.l #long_src+4, er1 1980 1.1 christos mov.l #long_dst+4, er0 1981 1.1 christos mov.l @-er1, @-er0 1982 1.1 christos ;;; .word 0x0108 1983 1.1 christos ;;; .word 0xb1b0 1984 1.1 christos 1985 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 1986 1.1 christos test_neg_clear 1987 1.1 christos test_zero_clear 1988 1.1 christos test_ovf_clear 1989 1.1 christos test_carry_clear 1990 1.1 christos 1991 1.1 christos ;; Verify the affected registers. 1992 1.1 christos 1993 1.1 christos test_h_gr32 long_dst er0 1994 1.1 christos test_h_gr32 long_src er1 1995 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 1996 1.1 christos test_gr_a5a5 3 1997 1.1 christos test_gr_a5a5 4 1998 1.1 christos test_gr_a5a5 5 1999 1.1 christos test_gr_a5a5 6 2000 1.1 christos test_gr_a5a5 7 2001 1.1 christos 2002 1.1 christos ;; Now check the result of the move to memory. 2003 1.1 christos cmp.l @long_src, @long_dst 2004 1.1 christos beq .Lnext95 2005 1.1 christos fail 2006 1.1 christos .Lnext95: 2007 1.1 christos ;; Now clear the destination location, and verify that. 2008 1.1 christos mov.l #0, @long_dst 2009 1.1 christos cmp.l @long_src, @long_dst 2010 1.1 christos bne .Lnext96 2011 1.1 christos fail 2012 1.1 christos .Lnext96: ; OK, pass on. 2013 1.1 christos ;; special case same register 2014 1.1 christos mov.l #long_src+4, er0 2015 1.1 christos mov.l @-er0, @-er0 ; copying long_src to long_dst_dec 2016 1.1 christos test_h_gr32 long_src-4 er0 2017 1.1 christos cmp.l @long_src, @long_dst_dec 2018 1.1 christos beq .Lnext97 2019 1.1 christos fail 2020 1.1 christos .Lnext97: 2021 1.1 christos ;; Now clear the destination location, and verify that. 2022 1.1 christos mov.l #0, @long_dst_dec 2023 1.1 christos cmp.l @long_src, @long_dst_dec 2024 1.1 christos bne .Lnext98 2025 1.1 christos fail 2026 1.1 christos .Lnext98: 2027 1.1 christos 2028 1.1 christos mov_l_disp2_to_disp2: ; reg 2-bit disp, memory to memory 2029 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 2030 1.1 christos set_ccr_zero 2031 1.1 christos 2032 1.1 christos ;; mov.l @(dd:2, ers), @(dd:2, erd) 2033 1.1 christos 2034 1.1 christos mov.l #long_src-4, er1 2035 1.1 christos mov.l #long_dst-8, er0 2036 1.1 christos mov.l @(4:2, er1), @(8:2, er0) 2037 1.1 christos ;;; .word 0x0108 2038 1.1 christos ;;; .word 0x1120 2039 1.1 christos 2040 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 2041 1.1 christos test_neg_clear 2042 1.1 christos test_zero_clear 2043 1.1 christos test_ovf_clear 2044 1.1 christos test_carry_clear 2045 1.1 christos 2046 1.1 christos ;; Verify the affected registers. 2047 1.1 christos 2048 1.1 christos test_h_gr32 long_dst-8 er0 2049 1.1 christos test_h_gr32 long_src-4 er1 2050 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 2051 1.1 christos test_gr_a5a5 3 2052 1.1 christos test_gr_a5a5 4 2053 1.1 christos test_gr_a5a5 5 2054 1.1 christos test_gr_a5a5 6 2055 1.1 christos test_gr_a5a5 7 2056 1.1 christos 2057 1.1 christos ;; Now check the result of the move to memory. 2058 1.1 christos cmp.l @long_src, @long_dst 2059 1.1 christos beq .Lnext105 2060 1.1 christos fail 2061 1.1 christos .Lnext105: 2062 1.1 christos ;; Now clear the destination location, and verify that. 2063 1.1 christos mov.l #0, @long_dst 2064 1.1 christos cmp.l @long_src, @long_dst 2065 1.1 christos bne .Lnext106 2066 1.1 christos fail 2067 1.1 christos .Lnext106: ; OK, pass on. 2068 1.1 christos 2069 1.1 christos mov_l_disp16_to_disp16: ; reg 16-bit disp, memory to memory 2070 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 2071 1.1 christos set_ccr_zero 2072 1.1 christos 2073 1.1 christos ;; mov.l @(dd:16, ers), @(dd:16, erd) 2074 1.1 christos 2075 1.1 christos mov.l #long_src-1, er1 2076 1.1 christos mov.l #long_dst-2, er0 2077 1.1 christos mov.l @(1:16, er1), @(2:16, er0) 2078 1.1 christos ;;; .word 0x0108 2079 1.1 christos ;;; .word 0xc1c0 2080 1.1 christos ;;; .word 0x0001 2081 1.1 christos ;;; .word 0x0002 2082 1.1 christos 2083 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 2084 1.1 christos test_neg_clear 2085 1.1 christos test_zero_clear 2086 1.1 christos test_ovf_clear 2087 1.1 christos test_carry_clear 2088 1.1 christos 2089 1.1 christos ;; Verify the affected registers. 2090 1.1 christos 2091 1.1 christos test_h_gr32 long_dst-2 er0 2092 1.1 christos test_h_gr32 long_src-1 er1 2093 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 2094 1.1 christos test_gr_a5a5 3 2095 1.1 christos test_gr_a5a5 4 2096 1.1 christos test_gr_a5a5 5 2097 1.1 christos test_gr_a5a5 6 2098 1.1 christos test_gr_a5a5 7 2099 1.1 christos 2100 1.1 christos ;; Now check the result of the move to memory. 2101 1.1 christos cmp.l @long_src, @long_dst 2102 1.1 christos beq .Lnext115 2103 1.1 christos fail 2104 1.1 christos .Lnext115: 2105 1.1 christos ;; Now clear the destination location, and verify that. 2106 1.1 christos mov.l #0, @long_dst 2107 1.1 christos cmp.l @long_src, @long_dst 2108 1.1 christos bne .Lnext116 2109 1.1 christos fail 2110 1.1 christos .Lnext116: ; OK, pass on. 2111 1.1 christos 2112 1.1 christos mov_l_disp32_to_disp32: ; reg 32-bit disp, memory to memory 2113 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 2114 1.1 christos set_ccr_zero 2115 1.1 christos 2116 1.1 christos ;; mov.l @(dd:32, ers), @(dd:32, erd) 2117 1.1 christos 2118 1.1 christos mov.l #long_src-1, er1 2119 1.1 christos mov.l #long_dst-2, er0 2120 1.1 christos mov.l @(1:32, er1), @(2:32, er0) 2121 1.1 christos ;;; .word 0x0108 2122 1.1 christos ;;; .word 0xc9c8 2123 1.1 christos ;;; .long 1 2124 1.1 christos ;;; .long 2 2125 1.1 christos 2126 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 2127 1.1 christos test_neg_clear 2128 1.1 christos test_zero_clear 2129 1.1 christos test_ovf_clear 2130 1.1 christos test_carry_clear 2131 1.1 christos 2132 1.1 christos ;; Verify the affected registers. 2133 1.1 christos 2134 1.1 christos test_h_gr32 long_dst-2 er0 2135 1.1 christos test_h_gr32 long_src-1 er1 2136 1.1 christos test_gr_a5a5 2 ; Make sure other general regs not disturbed 2137 1.1 christos test_gr_a5a5 3 2138 1.1 christos test_gr_a5a5 4 2139 1.1 christos test_gr_a5a5 5 2140 1.1 christos test_gr_a5a5 6 2141 1.1 christos test_gr_a5a5 7 2142 1.1 christos 2143 1.1 christos ;; Now check the result of the move to memory. 2144 1.1 christos cmp.l @long_src, @long_dst 2145 1.1 christos beq .Lnext125 2146 1.1 christos fail 2147 1.1 christos .Lnext125: 2148 1.1 christos ;; Now clear the destination location, and verify that. 2149 1.1 christos mov.l #0, @long_dst 2150 1.1 christos cmp.l @long_src, @long_dst 2151 1.1 christos bne .Lnext126 2152 1.1 christos fail 2153 1.1 christos .Lnext126: ; OK, pass on. 2154 1.1 christos 2155 1.1 christos mov_l_abs16_to_abs16: ; 16-bit absolute addr, memory to memory 2156 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 2157 1.1 christos set_ccr_zero 2158 1.1 christos 2159 1.1 christos ;; mov.l @aa:16, @aa:16 2160 1.1 christos 2161 1.1 christos mov.l @long_src:16, @long_dst:16 2162 1.1 christos ;;; .word 0x0108 2163 1.1 christos ;;; .word 0x4040 2164 1.1 christos ;;; .word @long_src 2165 1.1 christos ;;; .word @long_dst 2166 1.1 christos 2167 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 2168 1.1 christos test_neg_clear 2169 1.1 christos test_zero_clear 2170 1.1 christos test_ovf_clear 2171 1.1 christos test_carry_clear 2172 1.1 christos 2173 1.1 christos 2174 1.1 christos test_gr_a5a5 0 ; Make sure *NO* general registers are changed 2175 1.1 christos test_gr_a5a5 1 2176 1.1 christos test_gr_a5a5 2 2177 1.1 christos test_gr_a5a5 3 2178 1.1 christos test_gr_a5a5 4 2179 1.1 christos test_gr_a5a5 5 2180 1.1 christos test_gr_a5a5 6 2181 1.1 christos test_gr_a5a5 7 2182 1.1 christos 2183 1.1 christos ;; Now check the result of the move to memory. 2184 1.1 christos cmp.l @long_src, @long_dst 2185 1.1 christos beq .Lnext135 2186 1.1 christos fail 2187 1.1 christos .Lnext135: 2188 1.1 christos ;; Now clear the destination location, and verify that. 2189 1.1 christos mov.l #0, @long_dst 2190 1.1 christos cmp.l @long_src, @long_dst 2191 1.1 christos bne .Lnext136 2192 1.1 christos fail 2193 1.1 christos .Lnext136: ; OK, pass on. 2194 1.1 christos 2195 1.1 christos mov_l_abs32_to_abs32: ; 32-bit absolute addr, memory to memory 2196 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 2197 1.1 christos set_ccr_zero 2198 1.1 christos 2199 1.1 christos ;; mov.l @aa:32, @aa:32 2200 1.1 christos 2201 1.1 christos mov.l @long_src:32, @long_dst:32 2202 1.1 christos ;;; .word 0x0108 2203 1.1 christos ;;; .word 0x4848 2204 1.1 christos ;;; .long @long_src 2205 1.1 christos ;;; .long @long_dst 2206 1.1 christos 2207 1.1 christos ;; test ccr ; H=0 N=0 Z=0 V=0 C=0 2208 1.1 christos test_neg_clear 2209 1.1 christos test_zero_clear 2210 1.1 christos test_ovf_clear 2211 1.1 christos test_carry_clear 2212 1.1 christos 2213 1.1 christos test_gr_a5a5 0 ; Make sure *NO* general registers are changed 2214 1.1 christos test_gr_a5a5 1 2215 1.1 christos test_gr_a5a5 2 2216 1.1 christos test_gr_a5a5 3 2217 1.1 christos test_gr_a5a5 4 2218 1.1 christos test_gr_a5a5 5 2219 1.1 christos test_gr_a5a5 6 2220 1.1 christos test_gr_a5a5 7 2221 1.1 christos 2222 1.1 christos ;; Now check the result of the move to memory. 2223 1.1 christos cmp.l @long_src, @long_dst 2224 1.1 christos beq .Lnext145 2225 1.1 christos fail 2226 1.1 christos .Lnext145: 2227 1.1 christos ;; Now clear the destination location, and verify that. 2228 1.1 christos mov.l #0, @long_dst 2229 1.1 christos cmp.l @long_src, @long_dst 2230 1.1 christos bne .Lnext146 2231 1.1 christos fail 2232 1.1 christos .Lnext146: ; OK, pass on. 2233 1.1 christos 2234 1.1 christos 2235 1.1 christos .endif 2236 1.1 christos 2237 1.1 christos pass 2238 1.1 christos 2239 1.1 christos exit 0 2240