1 1.1 christos # Hitachi H8 testcase 'shar' 2 1.1 christos # mach(): h8300s h8sx 3 1.1 christos # as(h8300): --defsym sim_cpu=0 4 1.1 christos # as(h8300h): --defsym sim_cpu=1 5 1.1 christos # as(h8300s): --defsym sim_cpu=2 6 1.1 christos # as(h8sx): --defsym sim_cpu=3 7 1.1 christos # ld(h8300h): -m h8300helf 8 1.1 christos # ld(h8300s): -m h8300self 9 1.1 christos # ld(h8sx): -m h8300sxelf 10 1.1 christos 11 1.1 christos .include "testutils.inc" 12 1.1 christos 13 1.1 christos start 14 1.1 christos 15 1.1 christos .data 16 1.1 christos byte_dest: .byte 0xa5 17 1.1 christos .align 2 18 1.1 christos word_dest: .word 0xa5a5 19 1.1 christos .align 4 20 1.1 christos long_dest: .long 0xa5a5a5a5 21 1.1 christos 22 1.1 christos .text 23 1.1 christos 24 1.1 christos shar_b_reg8_1: 25 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 26 1.1 christos set_ccr_zero 27 1.1 christos 28 1.1 christos shar.b r0l ; shift right arithmetic by one 29 1.1 christos ;;; .word 0x1188 30 1.1 christos 31 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 32 1.1 christos test_zero_clear 33 1.1 christos test_ovf_clear 34 1.1 christos test_neg_set 35 1.1 christos 36 1.1 christos test_h_gr16 0xa5d2 r0 ; 1010 0101 -> 1101 0010 37 1.1 christos .if (sim_cpu) 38 1.1 christos test_h_gr32 0xa5a5a5d2 er0 39 1.1 christos .endif 40 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 41 1.1 christos test_gr_a5a5 2 42 1.1 christos test_gr_a5a5 3 43 1.1 christos test_gr_a5a5 4 44 1.1 christos test_gr_a5a5 5 45 1.1 christos test_gr_a5a5 6 46 1.1 christos test_gr_a5a5 7 47 1.1 christos 48 1.1 christos .if (sim_cpu == h8sx) 49 1.1 christos shar_b_ind_1: 50 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 51 1.1 christos set_ccr_zero 52 1.1 christos 53 1.1 christos mov #byte_dest, er0 54 1.1 christos shar.b @er0 ; shift right arithmetic by one, indirect 55 1.1 christos ;;; .word 0x7d00 56 1.1 christos ;;; .word 0x1180 57 1.1 christos 58 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 59 1.1 christos test_zero_clear 60 1.1 christos test_ovf_clear 61 1.1 christos test_neg_set 62 1.1 christos 63 1.1 christos test_h_gr32 byte_dest er0 64 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 65 1.1 christos test_gr_a5a5 2 66 1.1 christos test_gr_a5a5 3 67 1.1 christos test_gr_a5a5 4 68 1.1 christos test_gr_a5a5 5 69 1.1 christos test_gr_a5a5 6 70 1.1 christos test_gr_a5a5 7 71 1.1 christos ; 1010 0101 -> 1101 0010 72 1.1 christos cmp.b #0xd2, @byte_dest 73 1.1 christos beq .Lbind1 74 1.1 christos fail 75 1.1 christos .Lbind1: 76 1.1 christos mov.b #0xa5, @byte_dest 77 1.1 christos 78 1.1 christos shar_b_postinc_1: 79 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 80 1.1 christos set_ccr_zero 81 1.1 christos 82 1.1 christos mov #byte_dest, er0 83 1.1 christos shar.b @er0+ ; shift right arithmetic by one, postinc 84 1.1 christos ;;; .word 0x0174 85 1.1 christos ;;; .word 0x6c08 86 1.1 christos ;;; .word 0x1180 87 1.1 christos 88 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 89 1.1 christos test_zero_clear 90 1.1 christos test_ovf_clear 91 1.1 christos test_neg_set 92 1.1 christos 93 1.1 christos test_h_gr32 byte_dest+1 er0 94 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 95 1.1 christos test_gr_a5a5 2 96 1.1 christos test_gr_a5a5 3 97 1.1 christos test_gr_a5a5 4 98 1.1 christos test_gr_a5a5 5 99 1.1 christos test_gr_a5a5 6 100 1.1 christos test_gr_a5a5 7 101 1.1 christos ; 1010 0101 -> 1101 0010 102 1.1 christos cmp.b #0xd2, @byte_dest 103 1.1 christos beq .Lbpostinc1 104 1.1 christos fail 105 1.1 christos .Lbpostinc1: 106 1.1 christos mov.b #0xa5, @byte_dest 107 1.1 christos 108 1.1 christos shar_b_postdec_1: 109 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 110 1.1 christos set_ccr_zero 111 1.1 christos 112 1.1 christos mov #byte_dest, er0 113 1.1 christos shar.b @er0- ; shift right arithmetic by one, postdec 114 1.1 christos ;;; .word 0x0176 115 1.1 christos ;;; .word 0x6c08 116 1.1 christos ;;; .word 0x1180 117 1.1 christos 118 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 119 1.1 christos test_zero_clear 120 1.1 christos test_ovf_clear 121 1.1 christos test_neg_set 122 1.1 christos 123 1.1 christos test_h_gr32 byte_dest-1 er0 124 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 125 1.1 christos test_gr_a5a5 2 126 1.1 christos test_gr_a5a5 3 127 1.1 christos test_gr_a5a5 4 128 1.1 christos test_gr_a5a5 5 129 1.1 christos test_gr_a5a5 6 130 1.1 christos test_gr_a5a5 7 131 1.1 christos ; 1010 0101 -> 1101 0010 132 1.1 christos cmp.b #0xd2, @byte_dest 133 1.1 christos beq .Lbpostdec1 134 1.1 christos fail 135 1.1 christos .Lbpostdec1: 136 1.1 christos mov.b #0xa5, @byte_dest 137 1.1 christos 138 1.1 christos shar_b_preinc_1: 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 #byte_dest-1, er0 143 1.1 christos shar.b @+er0 ; shift right arithmetic by one, preinc 144 1.1 christos ;;; .word 0x0175 145 1.1 christos ;;; .word 0x6c08 146 1.1 christos ;;; .word 0x1180 147 1.1 christos 148 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 149 1.1 christos test_zero_clear 150 1.1 christos test_ovf_clear 151 1.1 christos test_neg_set 152 1.1 christos 153 1.1 christos test_h_gr32 byte_dest er0 154 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 155 1.1 christos test_gr_a5a5 2 156 1.1 christos test_gr_a5a5 3 157 1.1 christos test_gr_a5a5 4 158 1.1 christos test_gr_a5a5 5 159 1.1 christos test_gr_a5a5 6 160 1.1 christos test_gr_a5a5 7 161 1.1 christos ; 1010 0101 -> 1101 0010 162 1.1 christos cmp.b #0xd2, @byte_dest 163 1.1 christos beq .Lbpreinc1 164 1.1 christos fail 165 1.1 christos .Lbpreinc1: 166 1.1 christos mov.b #0xa5, @byte_dest 167 1.1 christos 168 1.1 christos shar_b_predec_1: 169 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 170 1.1 christos set_ccr_zero 171 1.1 christos 172 1.1 christos mov #byte_dest+1, er0 173 1.1 christos shar.b @-er0 ; shift right arithmetic by one, predec 174 1.1 christos ;;; .word 0x0177 175 1.1 christos ;;; .word 0x6c08 176 1.1 christos ;;; .word 0x1180 177 1.1 christos 178 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 179 1.1 christos test_zero_clear 180 1.1 christos test_ovf_clear 181 1.1 christos test_neg_set 182 1.1 christos 183 1.1 christos test_h_gr32 byte_dest er0 184 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 185 1.1 christos test_gr_a5a5 2 186 1.1 christos test_gr_a5a5 3 187 1.1 christos test_gr_a5a5 4 188 1.1 christos test_gr_a5a5 5 189 1.1 christos test_gr_a5a5 6 190 1.1 christos test_gr_a5a5 7 191 1.1 christos ; 1010 0101 -> 1101 0010 192 1.1 christos cmp.b #0xd2, @byte_dest 193 1.1 christos beq .Lbpredec1 194 1.1 christos fail 195 1.1 christos .Lbpredec1: 196 1.1 christos mov.b #0xa5, @byte_dest 197 1.1 christos 198 1.1 christos shar_b_disp2_1: 199 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 200 1.1 christos set_ccr_zero 201 1.1 christos 202 1.1 christos mov #byte_dest-2, er0 203 1.1 christos shar.b @(2:2, er0) ; shift right arithmetic by one, disp2 204 1.1 christos ;;; .word 0x0176 205 1.1 christos ;;; .word 0x6808 206 1.1 christos ;;; .word 0x1180 207 1.1 christos 208 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 209 1.1 christos test_zero_clear 210 1.1 christos test_ovf_clear 211 1.1 christos test_neg_set 212 1.1 christos 213 1.1 christos test_h_gr32 byte_dest-2 er0 214 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 215 1.1 christos test_gr_a5a5 2 216 1.1 christos test_gr_a5a5 3 217 1.1 christos test_gr_a5a5 4 218 1.1 christos test_gr_a5a5 5 219 1.1 christos test_gr_a5a5 6 220 1.1 christos test_gr_a5a5 7 221 1.1 christos ; 1010 0101 -> 1101 0010 222 1.1 christos cmp.b #0xd2, @byte_dest 223 1.1 christos beq .Lbdisp21 224 1.1 christos fail 225 1.1 christos .Lbdisp21: 226 1.1 christos mov.b #0xa5, @byte_dest 227 1.1 christos 228 1.1 christos shar_b_disp16_1: 229 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 230 1.1 christos set_ccr_zero 231 1.1 christos 232 1.1 christos mov #byte_dest-44, er0 233 1.1 christos shar.b @(44:16, er0) ; shift right arithmetic by one, disp16 234 1.1 christos ;;; .word 0x0174 235 1.1 christos ;;; .word 0x6e08 236 1.1 christos ;;; .word 44 237 1.1 christos ;;; .word 0x1180 238 1.1 christos 239 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 240 1.1 christos test_zero_clear 241 1.1 christos test_ovf_clear 242 1.1 christos test_neg_set 243 1.1 christos 244 1.1 christos test_h_gr32 byte_dest-44 er0 245 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 246 1.1 christos test_gr_a5a5 2 247 1.1 christos test_gr_a5a5 3 248 1.1 christos test_gr_a5a5 4 249 1.1 christos test_gr_a5a5 5 250 1.1 christos test_gr_a5a5 6 251 1.1 christos test_gr_a5a5 7 252 1.1 christos ; 1010 0101 -> 1101 0010 253 1.1 christos cmp.b #0xd2, @byte_dest 254 1.1 christos beq .Lbdisp161 255 1.1 christos fail 256 1.1 christos .Lbdisp161: 257 1.1 christos mov.b #0xa5, @byte_dest 258 1.1 christos 259 1.1 christos shar_b_disp32_1: 260 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 261 1.1 christos set_ccr_zero 262 1.1 christos 263 1.1 christos mov #byte_dest-666, er0 264 1.1 christos shar.b @(666:32, er0) ; shift right arithmetic by one, disp32 265 1.1 christos ;;; .word 0x7884 266 1.1 christos ;;; .word 0x6a28 267 1.1 christos ;;; .long 666 268 1.1 christos ;;; .word 0x1180 269 1.1 christos 270 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 271 1.1 christos test_zero_clear 272 1.1 christos test_ovf_clear 273 1.1 christos test_neg_set 274 1.1 christos 275 1.1 christos test_h_gr32 byte_dest-666 er0 276 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 277 1.1 christos test_gr_a5a5 2 278 1.1 christos test_gr_a5a5 3 279 1.1 christos test_gr_a5a5 4 280 1.1 christos test_gr_a5a5 5 281 1.1 christos test_gr_a5a5 6 282 1.1 christos test_gr_a5a5 7 283 1.1 christos ; 1010 0101 -> 1101 0010 284 1.1 christos cmp.b #0xd2, @byte_dest 285 1.1 christos beq .Lbdisp321 286 1.1 christos fail 287 1.1 christos .Lbdisp321: 288 1.1 christos mov.b #0xa5, @byte_dest 289 1.1 christos 290 1.1 christos shar_b_abs16_1: 291 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 292 1.1 christos set_ccr_zero 293 1.1 christos 294 1.1 christos shar.b @byte_dest:16 ; shift right arithmetic by one, abs16 295 1.1 christos ;;; .word 0x6a18 296 1.1 christos ;;; .word byte_dest 297 1.1 christos ;;; .word 0x1180 298 1.1 christos 299 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 300 1.1 christos test_zero_clear 301 1.1 christos test_ovf_clear 302 1.1 christos test_neg_set 303 1.1 christos 304 1.1 christos test_gr_a5a5 0 ; Make sure ALL general regs not disturbed 305 1.1 christos test_gr_a5a5 2 306 1.1 christos test_gr_a5a5 2 307 1.1 christos test_gr_a5a5 3 308 1.1 christos test_gr_a5a5 4 309 1.1 christos test_gr_a5a5 5 310 1.1 christos test_gr_a5a5 6 311 1.1 christos test_gr_a5a5 7 312 1.1 christos ; 1010 0101 -> 1101 0010 313 1.1 christos cmp.b #0xd2, @byte_dest 314 1.1 christos beq .Lbabs161 315 1.1 christos fail 316 1.1 christos .Lbabs161: 317 1.1 christos mov.b #0xa5, @byte_dest 318 1.1 christos 319 1.1 christos shar_b_abs32_1: 320 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 321 1.1 christos set_ccr_zero 322 1.1 christos 323 1.1 christos shar.b @byte_dest:32 ; shift right arithmetic by one, abs32 324 1.1 christos ;;; .word 0x6a38 325 1.1 christos ;;; .long byte_dest 326 1.1 christos ;;; .word 0x1180 327 1.1 christos 328 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 329 1.1 christos test_zero_clear 330 1.1 christos test_ovf_clear 331 1.1 christos test_neg_set 332 1.1 christos 333 1.1 christos test_gr_a5a5 0 ; Make sure ALL general regs not disturbed 334 1.1 christos test_gr_a5a5 2 335 1.1 christos test_gr_a5a5 2 336 1.1 christos test_gr_a5a5 3 337 1.1 christos test_gr_a5a5 4 338 1.1 christos test_gr_a5a5 5 339 1.1 christos test_gr_a5a5 6 340 1.1 christos test_gr_a5a5 7 341 1.1 christos ; 1010 0101 -> 1101 0010 342 1.1 christos cmp.b #0xd2, @byte_dest 343 1.1 christos beq .Lbabs321 344 1.1 christos fail 345 1.1 christos .Lbabs321: 346 1.1 christos mov.b #0xa5, @byte_dest 347 1.1 christos .endif 348 1.1 christos 349 1.1 christos shar_b_reg8_2: 350 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 351 1.1 christos set_ccr_zero 352 1.1 christos 353 1.1 christos shar.b #2, r0l ; shift right arithmetic by two 354 1.1 christos ;;; .word 0x11c8 355 1.1 christos 356 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 357 1.1 christos test_zero_clear 358 1.1 christos test_ovf_clear 359 1.1 christos test_neg_set 360 1.1 christos test_h_gr16 0xa5e9 r0 ; 1010 0101 -> 1110 1001 361 1.1 christos .if (sim_cpu) 362 1.1 christos test_h_gr32 0xa5a5a5e9 er0 363 1.1 christos .endif 364 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 365 1.1 christos test_gr_a5a5 2 366 1.1 christos test_gr_a5a5 3 367 1.1 christos test_gr_a5a5 4 368 1.1 christos test_gr_a5a5 5 369 1.1 christos test_gr_a5a5 6 370 1.1 christos test_gr_a5a5 7 371 1.1 christos 372 1.1 christos .if (sim_cpu == h8sx) 373 1.1 christos shar_b_ind_2: 374 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 375 1.1 christos set_ccr_zero 376 1.1 christos 377 1.1 christos mov #byte_dest, er0 378 1.1 christos shar.b #2, @er0 ; shift right arithmetic by two, indirect 379 1.1 christos ;;; .word 0x7d00 380 1.1 christos ;;; .word 0x11c0 381 1.1 christos 382 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 383 1.1 christos test_zero_clear 384 1.1 christos test_ovf_clear 385 1.1 christos test_neg_set 386 1.1 christos 387 1.1 christos test_h_gr32 byte_dest er0 388 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 389 1.1 christos test_gr_a5a5 2 390 1.1 christos test_gr_a5a5 3 391 1.1 christos test_gr_a5a5 4 392 1.1 christos test_gr_a5a5 5 393 1.1 christos test_gr_a5a5 6 394 1.1 christos test_gr_a5a5 7 395 1.1 christos ; 1010 0101 -> 1110 1001 396 1.1 christos cmp.b #0xe9, @byte_dest 397 1.1 christos beq .Lbind2 398 1.1 christos fail 399 1.1 christos .Lbind2: 400 1.1 christos mov.b #0xa5, @byte_dest 401 1.1 christos 402 1.1 christos shar_b_postinc_2: 403 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 404 1.1 christos set_ccr_zero 405 1.1 christos 406 1.1 christos mov #byte_dest, er0 407 1.1 christos shar.b #2, @er0+ ; shift right arithmetic by two, postinc 408 1.1 christos ;;; .word 0x0174 409 1.1 christos ;;; .word 0x6c08 410 1.1 christos ;;; .word 0x11c0 411 1.1 christos 412 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 413 1.1 christos test_zero_clear 414 1.1 christos test_ovf_clear 415 1.1 christos test_neg_set 416 1.1 christos 417 1.1 christos test_h_gr32 byte_dest+1 er0 418 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 419 1.1 christos test_gr_a5a5 2 420 1.1 christos test_gr_a5a5 3 421 1.1 christos test_gr_a5a5 4 422 1.1 christos test_gr_a5a5 5 423 1.1 christos test_gr_a5a5 6 424 1.1 christos test_gr_a5a5 7 425 1.1 christos ; 1010 0101 -> 1110 1001 426 1.1 christos cmp.b #0xe9, @byte_dest 427 1.1 christos beq .Lbpostinc2 428 1.1 christos fail 429 1.1 christos .Lbpostinc2: 430 1.1 christos mov.b #0xa5, @byte_dest 431 1.1 christos 432 1.1 christos shar_b_postdec_2: 433 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 434 1.1 christos set_ccr_zero 435 1.1 christos 436 1.1 christos mov #byte_dest, er0 437 1.1 christos shar.b #2, @er0- ; shift right arithmetic by two, postdec 438 1.1 christos ;;; .word 0x0176 439 1.1 christos ;;; .word 0x6c08 440 1.1 christos ;;; .word 0x11c0 441 1.1 christos 442 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 443 1.1 christos test_zero_clear 444 1.1 christos test_ovf_clear 445 1.1 christos test_neg_set 446 1.1 christos 447 1.1 christos test_h_gr32 byte_dest-1 er0 448 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 449 1.1 christos test_gr_a5a5 2 450 1.1 christos test_gr_a5a5 3 451 1.1 christos test_gr_a5a5 4 452 1.1 christos test_gr_a5a5 5 453 1.1 christos test_gr_a5a5 6 454 1.1 christos test_gr_a5a5 7 455 1.1 christos ; 1010 0101 -> 1110 1001 456 1.1 christos cmp.b #0xe9, @byte_dest 457 1.1 christos beq .Lbpostdec2 458 1.1 christos fail 459 1.1 christos .Lbpostdec2: 460 1.1 christos mov.b #0xa5, @byte_dest 461 1.1 christos 462 1.1 christos shar_b_preinc_2: 463 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 464 1.1 christos set_ccr_zero 465 1.1 christos 466 1.1 christos mov #byte_dest-1, er0 467 1.1 christos shar.b #2, @+er0 ; shift right arithmetic by two, preinc 468 1.1 christos ;;; .word 0x0175 469 1.1 christos ;;; .word 0x6c08 470 1.1 christos ;;; .word 0x11c0 471 1.1 christos 472 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 473 1.1 christos test_zero_clear 474 1.1 christos test_ovf_clear 475 1.1 christos test_neg_set 476 1.1 christos 477 1.1 christos test_h_gr32 byte_dest er0 478 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 479 1.1 christos test_gr_a5a5 2 480 1.1 christos test_gr_a5a5 3 481 1.1 christos test_gr_a5a5 4 482 1.1 christos test_gr_a5a5 5 483 1.1 christos test_gr_a5a5 6 484 1.1 christos test_gr_a5a5 7 485 1.1 christos ; 1010 0101 -> 1110 1001 486 1.1 christos cmp.b #0xe9, @byte_dest 487 1.1 christos beq .Lbpreinc2 488 1.1 christos fail 489 1.1 christos .Lbpreinc2: 490 1.1 christos mov.b #0xa5, @byte_dest 491 1.1 christos 492 1.1 christos shar_b_predec_2: 493 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 494 1.1 christos set_ccr_zero 495 1.1 christos 496 1.1 christos mov #byte_dest+1, er0 497 1.1 christos shar.b #2, @-er0 ; shift right arithmetic by two, predec 498 1.1 christos ;;; .word 0x0177 499 1.1 christos ;;; .word 0x6c08 500 1.1 christos ;;; .word 0x11c0 501 1.1 christos 502 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 503 1.1 christos test_zero_clear 504 1.1 christos test_ovf_clear 505 1.1 christos test_neg_set 506 1.1 christos 507 1.1 christos test_h_gr32 byte_dest er0 508 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 509 1.1 christos test_gr_a5a5 2 510 1.1 christos test_gr_a5a5 3 511 1.1 christos test_gr_a5a5 4 512 1.1 christos test_gr_a5a5 5 513 1.1 christos test_gr_a5a5 6 514 1.1 christos test_gr_a5a5 7 515 1.1 christos ; 1010 0101 -> 1110 1001 516 1.1 christos cmp.b #0xe9, @byte_dest 517 1.1 christos beq .Lbpredec2 518 1.1 christos fail 519 1.1 christos .Lbpredec2: 520 1.1 christos mov.b #0xa5, @byte_dest 521 1.1 christos 522 1.1 christos shar_b_disp2_2: 523 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 524 1.1 christos set_ccr_zero 525 1.1 christos 526 1.1 christos mov #byte_dest-2, er0 527 1.1 christos shar.b #2, @(2:2, er0) ; shift right arithmetic by two, disp2 528 1.1 christos ;;; .word 0x0176 529 1.1 christos ;;; .word 0x6808 530 1.1 christos ;;; .word 0x11c0 531 1.1 christos 532 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 533 1.1 christos test_zero_clear 534 1.1 christos test_ovf_clear 535 1.1 christos test_neg_set 536 1.1 christos 537 1.1 christos test_h_gr32 byte_dest-2 er0 538 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 539 1.1 christos test_gr_a5a5 2 540 1.1 christos test_gr_a5a5 3 541 1.1 christos test_gr_a5a5 4 542 1.1 christos test_gr_a5a5 5 543 1.1 christos test_gr_a5a5 6 544 1.1 christos test_gr_a5a5 7 545 1.1 christos ; 1010 0101 -> 1110 1001 546 1.1 christos cmp.b #0xe9, @byte_dest 547 1.1 christos beq .Lbdisp22 548 1.1 christos fail 549 1.1 christos .Lbdisp22: 550 1.1 christos mov.b #0xa5, @byte_dest 551 1.1 christos 552 1.1 christos shar_b_disp16_2: 553 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 554 1.1 christos set_ccr_zero 555 1.1 christos 556 1.1 christos mov #byte_dest-44, er0 557 1.1 christos shar.b #2, @(44:16, er0) ; shift right arithmetic by two, disp16 558 1.1 christos ;;; .word 0x0174 559 1.1 christos ;;; .word 0x6e08 560 1.1 christos ;;; .word 44 561 1.1 christos ;;; .word 0x11c0 562 1.1 christos 563 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 564 1.1 christos test_zero_clear 565 1.1 christos test_ovf_clear 566 1.1 christos test_neg_set 567 1.1 christos 568 1.1 christos test_h_gr32 byte_dest-44 er0 569 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 570 1.1 christos test_gr_a5a5 2 571 1.1 christos test_gr_a5a5 3 572 1.1 christos test_gr_a5a5 4 573 1.1 christos test_gr_a5a5 5 574 1.1 christos test_gr_a5a5 6 575 1.1 christos test_gr_a5a5 7 576 1.1 christos ; 1010 0101 -> 1110 1001 577 1.1 christos cmp.b #0xe9, @byte_dest 578 1.1 christos beq .Lbdisp162 579 1.1 christos fail 580 1.1 christos .Lbdisp162: 581 1.1 christos mov.b #0xa5, @byte_dest 582 1.1 christos 583 1.1 christos shar_b_disp32_2: 584 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 585 1.1 christos set_ccr_zero 586 1.1 christos 587 1.1 christos mov #byte_dest-666, er0 588 1.1 christos shar.b #2, @(666:32, er0) ; shift right arithmetic by two, disp32 589 1.1 christos ;;; .word 0x7884 590 1.1 christos ;;; .word 0x6a28 591 1.1 christos ;;; .long 666 592 1.1 christos ;;; .word 0x11c0 593 1.1 christos 594 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 595 1.1 christos test_zero_clear 596 1.1 christos test_ovf_clear 597 1.1 christos test_neg_set 598 1.1 christos 599 1.1 christos test_h_gr32 byte_dest-666 er0 600 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 601 1.1 christos test_gr_a5a5 2 602 1.1 christos test_gr_a5a5 3 603 1.1 christos test_gr_a5a5 4 604 1.1 christos test_gr_a5a5 5 605 1.1 christos test_gr_a5a5 6 606 1.1 christos test_gr_a5a5 7 607 1.1 christos ; 1010 0101 -> 1110 1001 608 1.1 christos cmp.b #0xe9, @byte_dest 609 1.1 christos beq .Lbdisp322 610 1.1 christos fail 611 1.1 christos .Lbdisp322: 612 1.1 christos mov.b #0xa5, @byte_dest 613 1.1 christos 614 1.1 christos shar_b_abs16_2: 615 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 616 1.1 christos set_ccr_zero 617 1.1 christos 618 1.1 christos shar.b #2, @byte_dest:16 ; shift right arithmetic by two, abs16 619 1.1 christos ;;; .word 0x6a18 620 1.1 christos ;;; .word byte_dest 621 1.1 christos ;;; .word 0x11c0 622 1.1 christos 623 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 624 1.1 christos test_zero_clear 625 1.1 christos test_ovf_clear 626 1.1 christos test_neg_set 627 1.1 christos 628 1.1 christos test_gr_a5a5 0 ; Make sure ALL general regs not disturbed 629 1.1 christos test_gr_a5a5 2 630 1.1 christos test_gr_a5a5 2 631 1.1 christos test_gr_a5a5 3 632 1.1 christos test_gr_a5a5 4 633 1.1 christos test_gr_a5a5 5 634 1.1 christos test_gr_a5a5 6 635 1.1 christos test_gr_a5a5 7 636 1.1 christos ; 1010 0101 -> 1110 1001 637 1.1 christos cmp.b #0xe9, @byte_dest 638 1.1 christos beq .Lbabs162 639 1.1 christos fail 640 1.1 christos .Lbabs162: 641 1.1 christos mov.b #0xa5, @byte_dest 642 1.1 christos 643 1.1 christos shar_b_abs32_2: 644 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 645 1.1 christos set_ccr_zero 646 1.1 christos 647 1.1 christos shar.b #2, @byte_dest:32 ; shift right arithmetic by two, abs32 648 1.1 christos ;;; .word 0x6a38 649 1.1 christos ;;; .long byte_dest 650 1.1 christos ;;; .word 0x11c0 651 1.1 christos 652 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 653 1.1 christos test_zero_clear 654 1.1 christos test_ovf_clear 655 1.1 christos test_neg_set 656 1.1 christos 657 1.1 christos test_gr_a5a5 0 ; Make sure ALL general regs not disturbed 658 1.1 christos test_gr_a5a5 2 659 1.1 christos test_gr_a5a5 2 660 1.1 christos test_gr_a5a5 3 661 1.1 christos test_gr_a5a5 4 662 1.1 christos test_gr_a5a5 5 663 1.1 christos test_gr_a5a5 6 664 1.1 christos test_gr_a5a5 7 665 1.1 christos ; 1010 0101 -> 1110 1001 666 1.1 christos cmp.b #0xe9, @byte_dest 667 1.1 christos beq .Lbabs322 668 1.1 christos fail 669 1.1 christos .Lbabs322: 670 1.1 christos mov.b #0xa5, @byte_dest 671 1.1 christos .endif 672 1.1 christos 673 1.1 christos .if (sim_cpu) ; Not available in h8300 mode 674 1.1 christos shar_w_reg16_1: 675 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 676 1.1 christos set_ccr_zero 677 1.1 christos 678 1.1 christos shar.w r0 ; shift right arithmetic by one 679 1.1 christos ;;; .word 0x1190 680 1.1 christos 681 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 682 1.1 christos test_zero_clear 683 1.1 christos test_ovf_clear 684 1.1 christos test_neg_set 685 1.1 christos test_h_gr16 0xd2d2 r0 ; 1010 0101 1010 0101 -> 1101 0010 1101 0010 686 1.1 christos test_h_gr32 0xa5a5d2d2 er0 687 1.1 christos 688 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 689 1.1 christos test_gr_a5a5 2 690 1.1 christos test_gr_a5a5 3 691 1.1 christos test_gr_a5a5 4 692 1.1 christos test_gr_a5a5 5 693 1.1 christos test_gr_a5a5 6 694 1.1 christos test_gr_a5a5 7 695 1.1 christos 696 1.1 christos .if (sim_cpu == h8sx) 697 1.1 christos shar_w_ind_1: 698 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 699 1.1 christos set_ccr_zero 700 1.1 christos 701 1.1 christos mov #word_dest, er0 702 1.1 christos shar.w @er0 ; shift right arithmetic by one, indirect 703 1.1 christos ;;; .word 0x7d80 704 1.1 christos ;;; .word 0x1190 705 1.1 christos 706 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 707 1.1 christos test_zero_clear 708 1.1 christos test_ovf_clear 709 1.1 christos test_neg_set 710 1.1 christos 711 1.1 christos test_h_gr32 word_dest er0 712 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 713 1.1 christos test_gr_a5a5 2 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 ; 1010 0101 1010 0101 -> 1101 0010 1101 0010 720 1.1 christos cmp.w #0xd2d2, @word_dest 721 1.1 christos beq .Lwind1 722 1.1 christos fail 723 1.1 christos .Lwind1: 724 1.1 christos mov.w #0xa5a5, @word_dest 725 1.1 christos 726 1.1 christos shar_w_postinc_1: 727 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 728 1.1 christos set_ccr_zero 729 1.1 christos 730 1.1 christos mov #word_dest, er0 731 1.1 christos shar.w @er0+ ; shift right arithmetic by one, postinc 732 1.1 christos ;;; .word 0x0154 733 1.1 christos ;;; .word 0x6d08 734 1.1 christos ;;; .word 0x1190 735 1.1 christos 736 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 737 1.1 christos test_zero_clear 738 1.1 christos test_ovf_clear 739 1.1 christos test_neg_set 740 1.1 christos 741 1.1 christos test_h_gr32 word_dest+2 er0 742 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 743 1.1 christos test_gr_a5a5 2 744 1.1 christos test_gr_a5a5 3 745 1.1 christos test_gr_a5a5 4 746 1.1 christos test_gr_a5a5 5 747 1.1 christos test_gr_a5a5 6 748 1.1 christos test_gr_a5a5 7 749 1.1 christos ; 1010 0101 1010 0101 -> 1101 0010 1101 0010 750 1.1 christos cmp.w #0xd2d2, @word_dest 751 1.1 christos beq .Lwpostinc1 752 1.1 christos fail 753 1.1 christos .Lwpostinc1: 754 1.1 christos mov.w #0xa5a5, @word_dest 755 1.1 christos 756 1.1 christos shar_w_postdec_1: 757 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 758 1.1 christos set_ccr_zero 759 1.1 christos 760 1.1 christos mov #word_dest, er0 761 1.1 christos shar.w @er0- ; shift right arithmetic by one, postdec 762 1.1 christos ;;; .word 0x0156 763 1.1 christos ;;; .word 0x6d08 764 1.1 christos ;;; .word 0x1190 765 1.1 christos 766 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 767 1.1 christos test_zero_clear 768 1.1 christos test_ovf_clear 769 1.1 christos test_neg_set 770 1.1 christos 771 1.1 christos test_h_gr32 word_dest-2 er0 772 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 773 1.1 christos test_gr_a5a5 2 774 1.1 christos test_gr_a5a5 3 775 1.1 christos test_gr_a5a5 4 776 1.1 christos test_gr_a5a5 5 777 1.1 christos test_gr_a5a5 6 778 1.1 christos test_gr_a5a5 7 779 1.1 christos ; 1010 0101 1010 0101 -> 1101 0010 1101 0010 780 1.1 christos cmp.w #0xd2d2, @word_dest 781 1.1 christos beq .Lwpostdec1 782 1.1 christos fail 783 1.1 christos .Lwpostdec1: 784 1.1 christos mov.w #0xa5a5, @word_dest 785 1.1 christos 786 1.1 christos shar_w_preinc_1: 787 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 788 1.1 christos set_ccr_zero 789 1.1 christos 790 1.1 christos mov #word_dest-2, er0 791 1.1 christos shar.w @+er0 ; shift right arithmetic by one, preinc 792 1.1 christos ;;; .word 0x0155 793 1.1 christos ;;; .word 0x6d08 794 1.1 christos ;;; .word 0x1190 795 1.1 christos 796 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 797 1.1 christos test_zero_clear 798 1.1 christos test_ovf_clear 799 1.1 christos test_neg_set 800 1.1 christos 801 1.1 christos test_h_gr32 word_dest er0 802 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 803 1.1 christos test_gr_a5a5 2 804 1.1 christos test_gr_a5a5 3 805 1.1 christos test_gr_a5a5 4 806 1.1 christos test_gr_a5a5 5 807 1.1 christos test_gr_a5a5 6 808 1.1 christos test_gr_a5a5 7 809 1.1 christos ; 1010 0101 1010 0101 -> 1101 0010 1101 0010 810 1.1 christos cmp.w #0xd2d2, @word_dest 811 1.1 christos beq .Lwpreinc1 812 1.1 christos fail 813 1.1 christos .Lwpreinc1: 814 1.1 christos mov.w #0xa5a5, @word_dest 815 1.1 christos 816 1.1 christos shar_w_predec_1: 817 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 818 1.1 christos set_ccr_zero 819 1.1 christos 820 1.1 christos mov #word_dest+2, er0 821 1.1 christos shar.w @-er0 ; shift right arithmetic by one, predec 822 1.1 christos ;;; .word 0x0157 823 1.1 christos ;;; .word 0x6d08 824 1.1 christos ;;; .word 0x1190 825 1.1 christos 826 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 827 1.1 christos test_zero_clear 828 1.1 christos test_ovf_clear 829 1.1 christos test_neg_set 830 1.1 christos 831 1.1 christos test_h_gr32 word_dest er0 832 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 833 1.1 christos test_gr_a5a5 2 834 1.1 christos test_gr_a5a5 3 835 1.1 christos test_gr_a5a5 4 836 1.1 christos test_gr_a5a5 5 837 1.1 christos test_gr_a5a5 6 838 1.1 christos test_gr_a5a5 7 839 1.1 christos ; 1010 0101 1010 0101 -> 1101 0010 1101 0010 840 1.1 christos cmp.w #0xd2d2, @word_dest 841 1.1 christos beq .Lwpredec1 842 1.1 christos fail 843 1.1 christos .Lwpredec1: 844 1.1 christos mov.w #0xa5a5, @word_dest 845 1.1 christos 846 1.1 christos shar_w_disp2_1: 847 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 848 1.1 christos set_ccr_zero 849 1.1 christos 850 1.1 christos mov #word_dest-4, er0 851 1.1 christos shar.w @(4:2, er0) ; shift right arithmetic by one, disp2 852 1.1 christos ;;; .word 0x0156 853 1.1 christos ;;; .word 0x6908 854 1.1 christos ;;; .word 0x1190 855 1.1 christos 856 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 857 1.1 christos test_zero_clear 858 1.1 christos test_ovf_clear 859 1.1 christos test_neg_set 860 1.1 christos 861 1.1 christos test_h_gr32 word_dest-4 er0 862 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 863 1.1 christos test_gr_a5a5 2 864 1.1 christos test_gr_a5a5 3 865 1.1 christos test_gr_a5a5 4 866 1.1 christos test_gr_a5a5 5 867 1.1 christos test_gr_a5a5 6 868 1.1 christos test_gr_a5a5 7 869 1.1 christos ; 1010 0101 1010 0101 -> 1101 0010 1101 0010 870 1.1 christos cmp.w #0xd2d2, @word_dest 871 1.1 christos beq .Lwdisp21 872 1.1 christos fail 873 1.1 christos .Lwdisp21: 874 1.1 christos mov.w #0xa5a5, @word_dest 875 1.1 christos 876 1.1 christos shar_w_disp16_1: 877 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 878 1.1 christos set_ccr_zero 879 1.1 christos 880 1.1 christos mov #word_dest-44, er0 881 1.1 christos shar.w @(44:16, er0) ; shift right arithmetic by one, disp16 882 1.1 christos ;;; .word 0x0154 883 1.1 christos ;;; .word 0x6f08 884 1.1 christos ;;; .word 44 885 1.1 christos ;;; .word 0x1190 886 1.1 christos 887 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 888 1.1 christos test_zero_clear 889 1.1 christos test_ovf_clear 890 1.1 christos test_neg_set 891 1.1 christos 892 1.1 christos test_h_gr32 word_dest-44 er0 893 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 894 1.1 christos test_gr_a5a5 2 895 1.1 christos test_gr_a5a5 3 896 1.1 christos test_gr_a5a5 4 897 1.1 christos test_gr_a5a5 5 898 1.1 christos test_gr_a5a5 6 899 1.1 christos test_gr_a5a5 7 900 1.1 christos ; 1010 0101 1010 0101 -> 1101 0010 1101 0010 901 1.1 christos cmp.w #0xd2d2, @word_dest 902 1.1 christos beq .Lwdisp161 903 1.1 christos fail 904 1.1 christos .Lwdisp161: 905 1.1 christos mov.w #0xa5a5, @word_dest 906 1.1 christos 907 1.1 christos shar_w_disp32_1: 908 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 909 1.1 christos set_ccr_zero 910 1.1 christos 911 1.1 christos mov #word_dest-666, er0 912 1.1 christos shar.w @(666:32, er0) ; shift right arithmetic by one, disp32 913 1.1 christos ;;; .word 0x7884 914 1.1 christos ;;; .word 0x6b28 915 1.1 christos ;;; .long 666 916 1.1 christos ;;; .word 0x1190 917 1.1 christos 918 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 919 1.1 christos test_zero_clear 920 1.1 christos test_ovf_clear 921 1.1 christos test_neg_set 922 1.1 christos 923 1.1 christos test_h_gr32 word_dest-666 er0 924 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 925 1.1 christos test_gr_a5a5 2 926 1.1 christos test_gr_a5a5 3 927 1.1 christos test_gr_a5a5 4 928 1.1 christos test_gr_a5a5 5 929 1.1 christos test_gr_a5a5 6 930 1.1 christos test_gr_a5a5 7 931 1.1 christos ; 1010 0101 1010 0101 -> 1101 0010 1101 0010 932 1.1 christos cmp.w #0xd2d2, @word_dest 933 1.1 christos beq .Lwdisp321 934 1.1 christos fail 935 1.1 christos .Lwdisp321: 936 1.1 christos mov.w #0xa5a5, @word_dest 937 1.1 christos 938 1.1 christos shar_w_abs16_1: 939 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 940 1.1 christos set_ccr_zero 941 1.1 christos 942 1.1 christos shar.w @word_dest:16 ; shift right arithmetic by one, abs16 943 1.1 christos ;;; .word 0x6b18 944 1.1 christos ;;; .word word_dest 945 1.1 christos ;;; .word 0x1190 946 1.1 christos 947 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 948 1.1 christos test_zero_clear 949 1.1 christos test_ovf_clear 950 1.1 christos test_neg_set 951 1.1 christos 952 1.1 christos test_gr_a5a5 0 ; Make sure ALL general regs not disturbed 953 1.1 christos test_gr_a5a5 1 954 1.1 christos test_gr_a5a5 2 955 1.1 christos test_gr_a5a5 3 956 1.1 christos test_gr_a5a5 4 957 1.1 christos test_gr_a5a5 5 958 1.1 christos test_gr_a5a5 6 959 1.1 christos test_gr_a5a5 7 960 1.1 christos ; 1010 0101 1010 0101 -> 1101 0010 1101 0010 961 1.1 christos cmp.w #0xd2d2, @word_dest 962 1.1 christos beq .Lwabs161 963 1.1 christos fail 964 1.1 christos .Lwabs161: 965 1.1 christos mov.w #0xa5a5, @word_dest 966 1.1 christos 967 1.1 christos shar_w_abs32_1: 968 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 969 1.1 christos set_ccr_zero 970 1.1 christos 971 1.1 christos shar.w @word_dest:32 ; shift right arithmetic by one, abs32 972 1.1 christos ;;; .word 0x6b38 973 1.1 christos ;;; .long word_dest 974 1.1 christos ;;; .word 0x1190 975 1.1 christos 976 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 977 1.1 christos test_zero_clear 978 1.1 christos test_ovf_clear 979 1.1 christos test_neg_set 980 1.1 christos 981 1.1 christos test_gr_a5a5 0 ; Make sure ALL general regs not disturbed 982 1.1 christos test_gr_a5a5 1 983 1.1 christos test_gr_a5a5 2 984 1.1 christos test_gr_a5a5 3 985 1.1 christos test_gr_a5a5 4 986 1.1 christos test_gr_a5a5 5 987 1.1 christos test_gr_a5a5 6 988 1.1 christos test_gr_a5a5 7 989 1.1 christos ; 1010 0101 1010 0101 -> 1101 0010 1101 0010 990 1.1 christos cmp.w #0xd2d2, @word_dest 991 1.1 christos beq .Lwabs321 992 1.1 christos fail 993 1.1 christos .Lwabs321: 994 1.1 christos mov.w #0xa5a5, @word_dest 995 1.1 christos .endif 996 1.1 christos 997 1.1 christos shar_w_reg16_2: 998 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 999 1.1 christos set_ccr_zero 1000 1.1 christos 1001 1.1 christos shar.w #2, r0 ; shift right arithmetic by two 1002 1.1 christos ;;; .word 0x11d0 1003 1.1 christos 1004 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1005 1.1 christos test_zero_clear 1006 1.1 christos test_ovf_clear 1007 1.1 christos test_neg_set 1008 1.1 christos 1009 1.1 christos test_h_gr16 0xe969 r0 ; 1010 0101 1010 0101 -> 1110 1001 0110 1001 1010 1.1 christos test_h_gr32 0xa5a5e969 er0 1011 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 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 .if (sim_cpu == h8sx) 1020 1.1 christos shar_w_ind_2: 1021 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1022 1.1 christos set_ccr_zero 1023 1.1 christos 1024 1.1 christos mov #word_dest, er0 1025 1.1 christos shar.w #2, @er0 ; shift right arithmetic by two, indirect 1026 1.1 christos ;;; .word 0x7d80 1027 1.1 christos ;;; .word 0x11d0 1028 1.1 christos 1029 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1030 1.1 christos test_zero_clear 1031 1.1 christos test_ovf_clear 1032 1.1 christos test_neg_set 1033 1.1 christos 1034 1.1 christos test_h_gr32 word_dest er0 1035 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1036 1.1 christos test_gr_a5a5 2 1037 1.1 christos test_gr_a5a5 3 1038 1.1 christos test_gr_a5a5 4 1039 1.1 christos test_gr_a5a5 5 1040 1.1 christos test_gr_a5a5 6 1041 1.1 christos test_gr_a5a5 7 1042 1.1 christos ; 1010 0101 1010 0101 -> 1110 1001 0110 1001 1043 1.1 christos cmp.w #0xe969, @word_dest 1044 1.1 christos beq .Lwind2 1045 1.1 christos fail 1046 1.1 christos .Lwind2: 1047 1.1 christos mov.w #0xa5a5, @word_dest 1048 1.1 christos 1049 1.1 christos shar_w_postinc_2: 1050 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1051 1.1 christos set_ccr_zero 1052 1.1 christos 1053 1.1 christos mov #word_dest, er0 1054 1.1 christos shar.w #2, @er0+ ; shift right arithmetic by two, postinc 1055 1.1 christos ;;; .word 0x0154 1056 1.1 christos ;;; .word 0x6d08 1057 1.1 christos ;;; .word 0x11d0 1058 1.1 christos 1059 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1060 1.1 christos test_zero_clear 1061 1.1 christos test_ovf_clear 1062 1.1 christos test_neg_set 1063 1.1 christos 1064 1.1 christos test_h_gr32 word_dest+2 er0 1065 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1066 1.1 christos test_gr_a5a5 2 1067 1.1 christos test_gr_a5a5 3 1068 1.1 christos test_gr_a5a5 4 1069 1.1 christos test_gr_a5a5 5 1070 1.1 christos test_gr_a5a5 6 1071 1.1 christos test_gr_a5a5 7 1072 1.1 christos ; 1010 0101 1010 0101 -> 1110 1001 0110 1001 1073 1.1 christos cmp.w #0xe969, @word_dest 1074 1.1 christos beq .Lwpostinc2 1075 1.1 christos fail 1076 1.1 christos .Lwpostinc2: 1077 1.1 christos mov.w #0xa5a5, @word_dest 1078 1.1 christos 1079 1.1 christos shar_w_postdec_2: 1080 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1081 1.1 christos set_ccr_zero 1082 1.1 christos 1083 1.1 christos mov #word_dest, er0 1084 1.1 christos shar.w #2, @er0- ; shift right arithmetic by two, postdec 1085 1.1 christos ;;; .word 0x0156 1086 1.1 christos ;;; .word 0x6d08 1087 1.1 christos ;;; .word 0x11d0 1088 1.1 christos 1089 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1090 1.1 christos test_zero_clear 1091 1.1 christos test_ovf_clear 1092 1.1 christos test_neg_set 1093 1.1 christos 1094 1.1 christos test_h_gr32 word_dest-2 er0 1095 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1096 1.1 christos test_gr_a5a5 2 1097 1.1 christos test_gr_a5a5 3 1098 1.1 christos test_gr_a5a5 4 1099 1.1 christos test_gr_a5a5 5 1100 1.1 christos test_gr_a5a5 6 1101 1.1 christos test_gr_a5a5 7 1102 1.1 christos ; 1010 0101 1010 0101 -> 1110 1001 0110 1001 1103 1.1 christos cmp.w #0xe969, @word_dest 1104 1.1 christos beq .Lwpostdec2 1105 1.1 christos fail 1106 1.1 christos .Lwpostdec2: 1107 1.1 christos mov.w #0xa5a5, @word_dest 1108 1.1 christos 1109 1.1 christos shar_w_preinc_2: 1110 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1111 1.1 christos set_ccr_zero 1112 1.1 christos 1113 1.1 christos mov #word_dest-2, er0 1114 1.1 christos shar.w #2, @+er0 ; shift right arithmetic by two, preinc 1115 1.1 christos ;;; .word 0x0155 1116 1.1 christos ;;; .word 0x6d08 1117 1.1 christos ;;; .word 0x11d0 1118 1.1 christos 1119 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1120 1.1 christos test_zero_clear 1121 1.1 christos test_ovf_clear 1122 1.1 christos test_neg_set 1123 1.1 christos 1124 1.1 christos test_h_gr32 word_dest er0 1125 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1126 1.1 christos test_gr_a5a5 2 1127 1.1 christos test_gr_a5a5 3 1128 1.1 christos test_gr_a5a5 4 1129 1.1 christos test_gr_a5a5 5 1130 1.1 christos test_gr_a5a5 6 1131 1.1 christos test_gr_a5a5 7 1132 1.1 christos ; 1010 0101 1010 0101 -> 1110 1001 0110 1001 1133 1.1 christos cmp.w #0xe969, @word_dest 1134 1.1 christos beq .Lwpreinc2 1135 1.1 christos fail 1136 1.1 christos .Lwpreinc2: 1137 1.1 christos mov.w #0xa5a5, @word_dest 1138 1.1 christos 1139 1.1 christos shar_w_predec_2: 1140 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1141 1.1 christos set_ccr_zero 1142 1.1 christos 1143 1.1 christos mov #word_dest+2, er0 1144 1.1 christos shar.w #2, @-er0 ; shift right arithmetic by two, predec 1145 1.1 christos ;;; .word 0x0157 1146 1.1 christos ;;; .word 0x6d08 1147 1.1 christos ;;; .word 0x11d0 1148 1.1 christos 1149 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1150 1.1 christos test_zero_clear 1151 1.1 christos test_ovf_clear 1152 1.1 christos test_neg_set 1153 1.1 christos 1154 1.1 christos test_h_gr32 word_dest er0 1155 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1156 1.1 christos test_gr_a5a5 2 1157 1.1 christos test_gr_a5a5 3 1158 1.1 christos test_gr_a5a5 4 1159 1.1 christos test_gr_a5a5 5 1160 1.1 christos test_gr_a5a5 6 1161 1.1 christos test_gr_a5a5 7 1162 1.1 christos ; 1010 0101 1010 0101 -> 1110 1001 0110 1001 1163 1.1 christos cmp.w #0xe969, @word_dest 1164 1.1 christos beq .Lwpredec2 1165 1.1 christos fail 1166 1.1 christos .Lwpredec2: 1167 1.1 christos mov.w #0xa5a5, @word_dest 1168 1.1 christos 1169 1.1 christos shar_w_disp2_2: 1170 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1171 1.1 christos set_ccr_zero 1172 1.1 christos 1173 1.1 christos mov #word_dest-4, er0 1174 1.1 christos shar.w #2, @(4:2, er0) ; shift right arithmetic by two, disp2 1175 1.1 christos ;;; .word 0x0156 1176 1.1 christos ;;; .word 0x6908 1177 1.1 christos ;;; .word 0x11d0 1178 1.1 christos 1179 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1180 1.1 christos test_zero_clear 1181 1.1 christos test_ovf_clear 1182 1.1 christos test_neg_set 1183 1.1 christos 1184 1.1 christos test_h_gr32 word_dest-4 er0 1185 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1186 1.1 christos test_gr_a5a5 2 1187 1.1 christos test_gr_a5a5 3 1188 1.1 christos test_gr_a5a5 4 1189 1.1 christos test_gr_a5a5 5 1190 1.1 christos test_gr_a5a5 6 1191 1.1 christos test_gr_a5a5 7 1192 1.1 christos ; 1010 0101 1010 0101 -> 1110 1001 0110 1001 1193 1.1 christos cmp.w #0xe969, @word_dest 1194 1.1 christos beq .Lwdisp22 1195 1.1 christos fail 1196 1.1 christos .Lwdisp22: 1197 1.1 christos mov.w #0xa5a5, @word_dest 1198 1.1 christos 1199 1.1 christos shar_w_disp16_2: 1200 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1201 1.1 christos set_ccr_zero 1202 1.1 christos 1203 1.1 christos mov #word_dest-44, er0 1204 1.1 christos shar.w #2, @(44:16, er0) ; shift right arithmetic by two, disp16 1205 1.1 christos ;;; .word 0x0154 1206 1.1 christos ;;; .word 0x6f08 1207 1.1 christos ;;; .word 44 1208 1.1 christos ;;; .word 0x11d0 1209 1.1 christos 1210 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1211 1.1 christos test_zero_clear 1212 1.1 christos test_ovf_clear 1213 1.1 christos test_neg_set 1214 1.1 christos 1215 1.1 christos test_h_gr32 word_dest-44 er0 1216 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1217 1.1 christos test_gr_a5a5 2 1218 1.1 christos test_gr_a5a5 3 1219 1.1 christos test_gr_a5a5 4 1220 1.1 christos test_gr_a5a5 5 1221 1.1 christos test_gr_a5a5 6 1222 1.1 christos test_gr_a5a5 7 1223 1.1 christos ; 1010 0101 1010 0101 -> 1110 1001 0110 1001 1224 1.1 christos cmp.w #0xe969, @word_dest 1225 1.1 christos beq .Lwdisp162 1226 1.1 christos fail 1227 1.1 christos .Lwdisp162: 1228 1.1 christos mov.w #0xa5a5, @word_dest 1229 1.1 christos 1230 1.1 christos shar_w_disp32_2: 1231 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1232 1.1 christos set_ccr_zero 1233 1.1 christos 1234 1.1 christos mov #word_dest-666, er0 1235 1.1 christos shar.w #2, @(666:32, er0) ; shift right arithmetic by two, disp32 1236 1.1 christos ;;; .word 0x7884 1237 1.1 christos ;;; .word 0x6b28 1238 1.1 christos ;;; .long 666 1239 1.1 christos ;;; .word 0x11d0 1240 1.1 christos 1241 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1242 1.1 christos test_zero_clear 1243 1.1 christos test_ovf_clear 1244 1.1 christos test_neg_set 1245 1.1 christos 1246 1.1 christos test_h_gr32 word_dest-666 er0 1247 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1248 1.1 christos test_gr_a5a5 2 1249 1.1 christos test_gr_a5a5 3 1250 1.1 christos test_gr_a5a5 4 1251 1.1 christos test_gr_a5a5 5 1252 1.1 christos test_gr_a5a5 6 1253 1.1 christos test_gr_a5a5 7 1254 1.1 christos ; 1010 0101 1010 0101 -> 1110 1001 0110 1001 1255 1.1 christos cmp.w #0xe969, @word_dest 1256 1.1 christos beq .Lwdisp322 1257 1.1 christos fail 1258 1.1 christos .Lwdisp322: 1259 1.1 christos mov.w #0xa5a5, @word_dest 1260 1.1 christos 1261 1.1 christos shar_w_abs16_2: 1262 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1263 1.1 christos set_ccr_zero 1264 1.1 christos 1265 1.1 christos shar.w #2, @word_dest:16 ; shift right arithmetic by two, abs16 1266 1.1 christos ;;; .word 0x6b18 1267 1.1 christos ;;; .word word_dest 1268 1.1 christos ;;; .word 0x11d0 1269 1.1 christos 1270 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1271 1.1 christos test_zero_clear 1272 1.1 christos test_ovf_clear 1273 1.1 christos test_neg_set 1274 1.1 christos 1275 1.1 christos test_gr_a5a5 0 ; Make sure ALL general regs not disturbed 1276 1.1 christos test_gr_a5a5 2 1277 1.1 christos test_gr_a5a5 2 1278 1.1 christos test_gr_a5a5 3 1279 1.1 christos test_gr_a5a5 4 1280 1.1 christos test_gr_a5a5 5 1281 1.1 christos test_gr_a5a5 6 1282 1.1 christos test_gr_a5a5 7 1283 1.1 christos ; 1010 0101 1010 0101 -> 1110 1001 0110 1001 1284 1.1 christos cmp.w #0xe969, @word_dest 1285 1.1 christos beq .Lwabs162 1286 1.1 christos fail 1287 1.1 christos .Lwabs162: 1288 1.1 christos mov.w #0xa5a5, @word_dest 1289 1.1 christos 1290 1.1 christos shar_w_abs32_2: 1291 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1292 1.1 christos set_ccr_zero 1293 1.1 christos 1294 1.1 christos shar.w #2, @word_dest:32 ; shift right arithmetic by two, abs32 1295 1.1 christos ;;; .word 0x6b38 1296 1.1 christos ;;; .long word_dest 1297 1.1 christos ;;; .word 0x11d0 1298 1.1 christos 1299 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1300 1.1 christos test_zero_clear 1301 1.1 christos test_ovf_clear 1302 1.1 christos test_neg_set 1303 1.1 christos 1304 1.1 christos test_gr_a5a5 0 ; Make sure ALL general regs not disturbed 1305 1.1 christos test_gr_a5a5 2 1306 1.1 christos test_gr_a5a5 2 1307 1.1 christos test_gr_a5a5 3 1308 1.1 christos test_gr_a5a5 4 1309 1.1 christos test_gr_a5a5 5 1310 1.1 christos test_gr_a5a5 6 1311 1.1 christos test_gr_a5a5 7 1312 1.1 christos ; 1010 0101 1010 0101 -> 1110 1001 0110 1001 1313 1.1 christos cmp.w #0xe969, @word_dest 1314 1.1 christos beq .Lwabs322 1315 1.1 christos fail 1316 1.1 christos .Lwabs322: 1317 1.1 christos mov.w #0xa5a5, @word_dest 1318 1.1 christos .endif 1319 1.1 christos 1320 1.1 christos shar_l_reg32_1: 1321 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1322 1.1 christos set_ccr_zero 1323 1.1 christos 1324 1.1 christos shar.l er0 ; shift right arithmetic by one, register 1325 1.1 christos ;;; .word 0x11b0 1326 1.1 christos 1327 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 1328 1.1 christos test_zero_clear 1329 1.1 christos test_ovf_clear 1330 1.1 christos test_neg_set 1331 1.1 christos 1332 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1333 1.1 christos ; -> 1101 0010 1101 0010 1101 0010 1101 0010 1334 1.1 christos test_h_gr32 0xd2d2d2d2 er0 1335 1.1 christos 1336 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1337 1.1 christos test_gr_a5a5 2 1338 1.1 christos test_gr_a5a5 3 1339 1.1 christos test_gr_a5a5 4 1340 1.1 christos test_gr_a5a5 5 1341 1.1 christos test_gr_a5a5 6 1342 1.1 christos test_gr_a5a5 7 1343 1.1 christos 1344 1.1 christos .if (sim_cpu == h8sx) 1345 1.1 christos shar_l_ind_1: 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 #long_dest, er0 1350 1.1 christos shar.l @er0 ; shift right arithmetic by one, indirect 1351 1.1 christos ;;; .word 0x0104 1352 1.1 christos ;;; .word 0x6908 1353 1.1 christos ;;; .word 0x11b0 1354 1.1 christos 1355 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 1356 1.1 christos test_zero_clear 1357 1.1 christos test_ovf_clear 1358 1.1 christos test_neg_set 1359 1.1 christos 1360 1.1 christos test_h_gr32 long_dest er0 1361 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1362 1.1 christos test_gr_a5a5 2 1363 1.1 christos test_gr_a5a5 3 1364 1.1 christos test_gr_a5a5 4 1365 1.1 christos test_gr_a5a5 5 1366 1.1 christos test_gr_a5a5 6 1367 1.1 christos test_gr_a5a5 7 1368 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1369 1.1 christos ;; -> 1101 0010 1101 0010 1101 0010 1101 0010 1370 1.1 christos cmp.l #0xd2d2d2d2, @long_dest 1371 1.1 christos beq .Llind1 1372 1.1 christos fail 1373 1.1 christos .Llind1: 1374 1.1 christos mov #0xa5a5a5a5, @long_dest 1375 1.1 christos 1376 1.1 christos shar_l_postinc_1: 1377 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1378 1.1 christos set_ccr_zero 1379 1.1 christos 1380 1.1 christos mov #long_dest, er0 1381 1.1 christos shar.l @er0+ ; shift right arithmetic by one, postinc 1382 1.1 christos ;;; .word 0x0104 1383 1.1 christos ;;; .word 0x6d08 1384 1.1 christos ;;; .word 0x11b0 1385 1.1 christos 1386 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 1387 1.1 christos test_zero_clear 1388 1.1 christos test_ovf_clear 1389 1.1 christos test_neg_set 1390 1.1 christos 1391 1.1 christos test_h_gr32 long_dest+4 er0 1392 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1393 1.1 christos test_gr_a5a5 2 1394 1.1 christos test_gr_a5a5 3 1395 1.1 christos test_gr_a5a5 4 1396 1.1 christos test_gr_a5a5 5 1397 1.1 christos test_gr_a5a5 6 1398 1.1 christos test_gr_a5a5 7 1399 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1400 1.1 christos ;; -> 1101 0010 1101 0010 1101 0010 1101 0010 1401 1.1 christos cmp.l #0xd2d2d2d2, @long_dest 1402 1.1 christos beq .Llpostinc1 1403 1.1 christos fail 1404 1.1 christos .Llpostinc1: 1405 1.1 christos mov #0xa5a5a5a5, @long_dest 1406 1.1 christos 1407 1.1 christos shar_l_postdec_1: 1408 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1409 1.1 christos set_ccr_zero 1410 1.1 christos 1411 1.1 christos mov #long_dest, er0 1412 1.1 christos shar.l @er0- ; shift right arithmetic by one, postdec 1413 1.1 christos ;;; .word 0x0106 1414 1.1 christos ;;; .word 0x6d08 1415 1.1 christos ;;; .word 0x11b0 1416 1.1 christos 1417 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 1418 1.1 christos test_zero_clear 1419 1.1 christos test_ovf_clear 1420 1.1 christos test_neg_set 1421 1.1 christos 1422 1.1 christos test_h_gr32 long_dest-4 er0 1423 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1424 1.1 christos test_gr_a5a5 2 1425 1.1 christos test_gr_a5a5 3 1426 1.1 christos test_gr_a5a5 4 1427 1.1 christos test_gr_a5a5 5 1428 1.1 christos test_gr_a5a5 6 1429 1.1 christos test_gr_a5a5 7 1430 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1431 1.1 christos ;; -> 1101 0010 1101 0010 1101 0010 1101 0010 1432 1.1 christos cmp.l #0xd2d2d2d2, @long_dest 1433 1.1 christos beq .Llpostdec1 1434 1.1 christos fail 1435 1.1 christos .Llpostdec1: 1436 1.1 christos mov #0xa5a5a5a5, @long_dest 1437 1.1 christos 1438 1.1 christos shar_l_preinc_1: 1439 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1440 1.1 christos set_ccr_zero 1441 1.1 christos 1442 1.1 christos mov #long_dest-4, er0 1443 1.1 christos shar.l @+er0 ; shift right arithmetic by one, preinc 1444 1.1 christos ;;; .word 0x0105 1445 1.1 christos ;;; .word 0x6d08 1446 1.1 christos ;;; .word 0x11b0 1447 1.1 christos 1448 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 1449 1.1 christos test_zero_clear 1450 1.1 christos test_ovf_clear 1451 1.1 christos test_neg_set 1452 1.1 christos 1453 1.1 christos test_h_gr32 long_dest er0 1454 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1455 1.1 christos test_gr_a5a5 2 1456 1.1 christos test_gr_a5a5 3 1457 1.1 christos test_gr_a5a5 4 1458 1.1 christos test_gr_a5a5 5 1459 1.1 christos test_gr_a5a5 6 1460 1.1 christos test_gr_a5a5 7 1461 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1462 1.1 christos ;; -> 1101 0010 1101 0010 1101 0010 1101 0010 1463 1.1 christos cmp.l #0xd2d2d2d2, @long_dest 1464 1.1 christos beq .Llpreinc1 1465 1.1 christos fail 1466 1.1 christos .Llpreinc1: 1467 1.1 christos mov #0xa5a5a5a5, @long_dest 1468 1.1 christos 1469 1.1 christos shar_l_predec_1: 1470 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1471 1.1 christos set_ccr_zero 1472 1.1 christos 1473 1.1 christos mov #long_dest+4, er0 1474 1.1 christos shar.l @-er0 ; shift right arithmetic by one, predec 1475 1.1 christos ;;; .word 0x0107 1476 1.1 christos ;;; .word 0x6d08 1477 1.1 christos ;;; .word 0x11b0 1478 1.1 christos 1479 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 1480 1.1 christos test_zero_clear 1481 1.1 christos test_ovf_clear 1482 1.1 christos test_neg_set 1483 1.1 christos 1484 1.1 christos test_h_gr32 long_dest er0 1485 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1486 1.1 christos test_gr_a5a5 2 1487 1.1 christos test_gr_a5a5 3 1488 1.1 christos test_gr_a5a5 4 1489 1.1 christos test_gr_a5a5 5 1490 1.1 christos test_gr_a5a5 6 1491 1.1 christos test_gr_a5a5 7 1492 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1493 1.1 christos ;; -> 1101 0010 1101 0010 1101 0010 1101 0010 1494 1.1 christos cmp.l #0xd2d2d2d2, @long_dest 1495 1.1 christos beq .Llpredec1 1496 1.1 christos fail 1497 1.1 christos .Llpredec1: 1498 1.1 christos mov #0xa5a5a5a5, @long_dest 1499 1.1 christos 1500 1.1 christos shar_l_disp2_1: 1501 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1502 1.1 christos set_ccr_zero 1503 1.1 christos 1504 1.1 christos mov #long_dest-8, er0 1505 1.1 christos shar.l @(8:2, er0) ; shift right arithmetic by one, disp2 1506 1.1 christos ;;; .word 0x0106 1507 1.1 christos ;;; .word 0x6908 1508 1.1 christos ;;; .word 0x11b0 1509 1.1 christos 1510 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 1511 1.1 christos test_zero_clear 1512 1.1 christos test_ovf_clear 1513 1.1 christos test_neg_set 1514 1.1 christos 1515 1.1 christos test_h_gr32 long_dest-8 er0 1516 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1517 1.1 christos test_gr_a5a5 2 1518 1.1 christos test_gr_a5a5 3 1519 1.1 christos test_gr_a5a5 4 1520 1.1 christos test_gr_a5a5 5 1521 1.1 christos test_gr_a5a5 6 1522 1.1 christos test_gr_a5a5 7 1523 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1524 1.1 christos ;; -> 1101 0010 1101 0010 1101 0010 1101 0010 1525 1.1 christos cmp.l #0xd2d2d2d2, @long_dest 1526 1.1 christos beq .Lldisp21 1527 1.1 christos fail 1528 1.1 christos .Lldisp21: 1529 1.1 christos mov #0xa5a5a5a5, @long_dest 1530 1.1 christos 1531 1.1 christos shar_l_disp16_1: 1532 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1533 1.1 christos set_ccr_zero 1534 1.1 christos 1535 1.1 christos mov #long_dest-44, er0 1536 1.1 christos shar.l @(44:16, er0) ; shift right arithmetic by one, disp16 1537 1.1 christos ;;; .word 0x0104 1538 1.1 christos ;;; .word 0x6f08 1539 1.1 christos ;;; .word 44 1540 1.1 christos ;;; .word 0x11b0 1541 1.1 christos 1542 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 1543 1.1 christos test_zero_clear 1544 1.1 christos test_ovf_clear 1545 1.1 christos test_neg_set 1546 1.1 christos 1547 1.1 christos test_h_gr32 long_dest-44 er0 1548 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1549 1.1 christos test_gr_a5a5 2 1550 1.1 christos test_gr_a5a5 3 1551 1.1 christos test_gr_a5a5 4 1552 1.1 christos test_gr_a5a5 5 1553 1.1 christos test_gr_a5a5 6 1554 1.1 christos test_gr_a5a5 7 1555 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1556 1.1 christos ;; -> 1101 0010 1101 0010 1101 0010 1101 0010 1557 1.1 christos cmp.l #0xd2d2d2d2, @long_dest 1558 1.1 christos beq .Lldisp161 1559 1.1 christos fail 1560 1.1 christos .Lldisp161: 1561 1.1 christos mov #0xa5a5a5a5, @long_dest 1562 1.1 christos 1563 1.1 christos shar_l_disp32_1: 1564 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1565 1.1 christos set_ccr_zero 1566 1.1 christos 1567 1.1 christos mov #long_dest-666, er0 1568 1.1 christos shar.l @(666:32, er0) ; shift right arithmetic by one, disp32 1569 1.1 christos ;;; .word 0x7884 1570 1.1 christos ;;; .word 0x6b28 1571 1.1 christos ;;; .long 666 1572 1.1 christos ;;; .word 0x11b0 1573 1.1 christos 1574 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 1575 1.1 christos test_zero_clear 1576 1.1 christos test_ovf_clear 1577 1.1 christos test_neg_set 1578 1.1 christos 1579 1.1 christos test_h_gr32 long_dest-666 er0 1580 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1581 1.1 christos test_gr_a5a5 2 1582 1.1 christos test_gr_a5a5 3 1583 1.1 christos test_gr_a5a5 4 1584 1.1 christos test_gr_a5a5 5 1585 1.1 christos test_gr_a5a5 6 1586 1.1 christos test_gr_a5a5 7 1587 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1588 1.1 christos ;; -> 1101 0010 1101 0010 1101 0010 1101 0010 1589 1.1 christos cmp.l #0xd2d2d2d2, @long_dest 1590 1.1 christos beq .Lldisp321 1591 1.1 christos fail 1592 1.1 christos .Lldisp321: 1593 1.1 christos mov #0xa5a5a5a5, @long_dest 1594 1.1 christos 1595 1.1 christos shar_l_abs16_1: 1596 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1597 1.1 christos set_ccr_zero 1598 1.1 christos 1599 1.1 christos shar.l @long_dest:16 ; shift right arithmetic by one, abs16 1600 1.1 christos ;;; .word 0x0104 1601 1.1 christos ;;; .word 0x6b08 1602 1.1 christos ;;; .word long_dest 1603 1.1 christos ;;; .word 0x11b0 1604 1.1 christos 1605 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 1606 1.1 christos test_zero_clear 1607 1.1 christos test_ovf_clear 1608 1.1 christos test_neg_set 1609 1.1 christos 1610 1.1 christos test_gr_a5a5 0 ; Make sure ALL general regs not disturbed 1611 1.1 christos test_gr_a5a5 1 1612 1.1 christos test_gr_a5a5 2 1613 1.1 christos test_gr_a5a5 3 1614 1.1 christos test_gr_a5a5 4 1615 1.1 christos test_gr_a5a5 5 1616 1.1 christos test_gr_a5a5 6 1617 1.1 christos test_gr_a5a5 7 1618 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1619 1.1 christos ;; -> 1101 0010 1101 0010 1101 0010 1101 0010 1620 1.1 christos cmp.l #0xd2d2d2d2, @long_dest 1621 1.1 christos beq .Llabs161 1622 1.1 christos fail 1623 1.1 christos .Llabs161: 1624 1.1 christos mov #0xa5a5a5a5, @long_dest 1625 1.1 christos 1626 1.1 christos shar_l_abs32_1: 1627 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1628 1.1 christos set_ccr_zero 1629 1.1 christos 1630 1.1 christos shar.l @long_dest:32 ; shift right arithmetic by one, abs32 1631 1.1 christos ;;; .word 0x0104 1632 1.1 christos ;;; .word 0x6b28 1633 1.1 christos ;;; .long long_dest 1634 1.1 christos ;;; .word 0x11b0 1635 1.1 christos 1636 1.1 christos test_carry_set ; H=0 N=1 Z=0 V=0 C=1 1637 1.1 christos test_zero_clear 1638 1.1 christos test_ovf_clear 1639 1.1 christos test_neg_set 1640 1.1 christos 1641 1.1 christos test_gr_a5a5 0 ; Make sure ALL general regs not disturbed 1642 1.1 christos test_gr_a5a5 1 1643 1.1 christos test_gr_a5a5 2 1644 1.1 christos test_gr_a5a5 3 1645 1.1 christos test_gr_a5a5 4 1646 1.1 christos test_gr_a5a5 5 1647 1.1 christos test_gr_a5a5 6 1648 1.1 christos test_gr_a5a5 7 1649 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1650 1.1 christos ;; -> 1101 0010 1101 0010 1101 0010 1101 0010 1651 1.1 christos cmp.l #0xd2d2d2d2, @long_dest 1652 1.1 christos beq .Llabs321 1653 1.1 christos fail 1654 1.1 christos .Llabs321: 1655 1.1 christos mov #0xa5a5a5a5, @long_dest 1656 1.1 christos .endif 1657 1.1 christos 1658 1.1 christos shar_l_reg32_2: 1659 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1660 1.1 christos set_ccr_zero 1661 1.1 christos 1662 1.1 christos shar.l #2, er0 ; shift right arithmetic by two, register 1663 1.1 christos ;;; .word 0x11f0 1664 1.1 christos 1665 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1666 1.1 christos test_zero_clear 1667 1.1 christos test_ovf_clear 1668 1.1 christos test_neg_set 1669 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1670 1.1 christos ; -> 1110 1001 0110 1001 0110 1001 0110 1001 1671 1.1 christos test_h_gr32 0xe9696969 er0 1672 1.1 christos 1673 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1674 1.1 christos test_gr_a5a5 2 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 .if (sim_cpu == h8sx) 1682 1.1 christos 1683 1.1 christos shar_l_ind_2: 1684 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1685 1.1 christos set_ccr_zero 1686 1.1 christos 1687 1.1 christos mov #long_dest, er0 1688 1.1 christos shar.l #2, @er0 ; shift right arithmetic by two, indirect 1689 1.1 christos ;;; .word 0x0104 1690 1.1 christos ;;; .word 0x6908 1691 1.1 christos ;;; .word 0x11f0 1692 1.1 christos 1693 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1694 1.1 christos test_zero_clear 1695 1.1 christos test_ovf_clear 1696 1.1 christos test_neg_set 1697 1.1 christos 1698 1.1 christos test_h_gr32 long_dest er0 1699 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1700 1.1 christos test_gr_a5a5 2 1701 1.1 christos test_gr_a5a5 3 1702 1.1 christos test_gr_a5a5 4 1703 1.1 christos test_gr_a5a5 5 1704 1.1 christos test_gr_a5a5 6 1705 1.1 christos test_gr_a5a5 7 1706 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1707 1.1 christos ;; -> 1110 1001 0110 1001 0110 1001 0110 1001 1708 1.1 christos cmp.l #0xe9696969, @long_dest 1709 1.1 christos beq .Llind2 1710 1.1 christos fail 1711 1.1 christos .Llind2: 1712 1.1 christos mov #0xa5a5a5a5, @long_dest 1713 1.1 christos 1714 1.1 christos shar_l_postinc_2: 1715 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1716 1.1 christos set_ccr_zero 1717 1.1 christos 1718 1.1 christos mov #long_dest, er0 1719 1.1 christos shar.l #2, @er0+ ; shift right arithmetic by two, postinc 1720 1.1 christos ;;; .word 0x0104 1721 1.1 christos ;;; .word 0x6d08 1722 1.1 christos ;;; .word 0x11f0 1723 1.1 christos 1724 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1725 1.1 christos test_zero_clear 1726 1.1 christos test_ovf_clear 1727 1.1 christos test_neg_set 1728 1.1 christos 1729 1.1 christos test_h_gr32 long_dest+4 er0 1730 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1731 1.1 christos test_gr_a5a5 2 1732 1.1 christos test_gr_a5a5 3 1733 1.1 christos test_gr_a5a5 4 1734 1.1 christos test_gr_a5a5 5 1735 1.1 christos test_gr_a5a5 6 1736 1.1 christos test_gr_a5a5 7 1737 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1738 1.1 christos ;; -> 1110 1001 0110 1001 0110 1001 0110 1001 1739 1.1 christos cmp.l #0xe9696969, @long_dest 1740 1.1 christos beq .Llpostinc2 1741 1.1 christos fail 1742 1.1 christos .Llpostinc2: 1743 1.1 christos mov #0xa5a5a5a5, @long_dest 1744 1.1 christos 1745 1.1 christos shar_l_postdec_2: 1746 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1747 1.1 christos set_ccr_zero 1748 1.1 christos 1749 1.1 christos mov #long_dest, er0 1750 1.1 christos shar.l #2, @er0- ; shift right arithmetic by two, postdec 1751 1.1 christos ;;; .word 0x0106 1752 1.1 christos ;;; .word 0x6d08 1753 1.1 christos ;;; .word 0x11f0 1754 1.1 christos 1755 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1756 1.1 christos test_zero_clear 1757 1.1 christos test_ovf_clear 1758 1.1 christos test_neg_set 1759 1.1 christos 1760 1.1 christos test_h_gr32 long_dest-4 er0 1761 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1762 1.1 christos test_gr_a5a5 2 1763 1.1 christos test_gr_a5a5 3 1764 1.1 christos test_gr_a5a5 4 1765 1.1 christos test_gr_a5a5 5 1766 1.1 christos test_gr_a5a5 6 1767 1.1 christos test_gr_a5a5 7 1768 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1769 1.1 christos ;; -> 1110 1001 0110 1001 0110 1001 0110 1001 1770 1.1 christos cmp.l #0xe9696969, @long_dest 1771 1.1 christos beq .Llpostdec2 1772 1.1 christos fail 1773 1.1 christos .Llpostdec2: 1774 1.1 christos mov #0xa5a5a5a5, @long_dest 1775 1.1 christos 1776 1.1 christos shar_l_preinc_2: 1777 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1778 1.1 christos set_ccr_zero 1779 1.1 christos 1780 1.1 christos mov #long_dest-4, er0 1781 1.1 christos shar.l #2, @+er0 ; shift right arithmetic by two, preinc 1782 1.1 christos ;;; .word 0x0105 1783 1.1 christos ;;; .word 0x6d08 1784 1.1 christos ;;; .word 0x11f0 1785 1.1 christos 1786 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1787 1.1 christos test_zero_clear 1788 1.1 christos test_ovf_clear 1789 1.1 christos test_neg_set 1790 1.1 christos 1791 1.1 christos test_h_gr32 long_dest er0 1792 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1793 1.1 christos test_gr_a5a5 2 1794 1.1 christos test_gr_a5a5 3 1795 1.1 christos test_gr_a5a5 4 1796 1.1 christos test_gr_a5a5 5 1797 1.1 christos test_gr_a5a5 6 1798 1.1 christos test_gr_a5a5 7 1799 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1800 1.1 christos ;; -> 1110 1001 0110 1001 0110 1001 0110 1001 1801 1.1 christos cmp.l #0xe9696969, @long_dest 1802 1.1 christos beq .Llpreinc2 1803 1.1 christos fail 1804 1.1 christos .Llpreinc2: 1805 1.1 christos mov #0xa5a5a5a5, @long_dest 1806 1.1 christos 1807 1.1 christos shar_l_predec_2: 1808 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1809 1.1 christos set_ccr_zero 1810 1.1 christos 1811 1.1 christos mov #long_dest+4, er0 1812 1.1 christos shar.l #2, @-er0 ; shift right arithmetic by two, predec 1813 1.1 christos ;;; .word 0x0107 1814 1.1 christos ;;; .word 0x6d08 1815 1.1 christos ;;; .word 0x11f0 1816 1.1 christos 1817 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1818 1.1 christos test_zero_clear 1819 1.1 christos test_ovf_clear 1820 1.1 christos test_neg_set 1821 1.1 christos 1822 1.1 christos test_h_gr32 long_dest er0 1823 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1824 1.1 christos test_gr_a5a5 2 1825 1.1 christos test_gr_a5a5 3 1826 1.1 christos test_gr_a5a5 4 1827 1.1 christos test_gr_a5a5 5 1828 1.1 christos test_gr_a5a5 6 1829 1.1 christos test_gr_a5a5 7 1830 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1831 1.1 christos ;; -> 1110 1001 0110 1001 0110 1001 0110 1001 1832 1.1 christos cmp.l #0xe9696969, @long_dest 1833 1.1 christos beq .Llpredec2 1834 1.1 christos fail 1835 1.1 christos .Llpredec2: 1836 1.1 christos mov #0xa5a5a5a5, @long_dest 1837 1.1 christos 1838 1.1 christos shar_l_disp2_2: 1839 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1840 1.1 christos set_ccr_zero 1841 1.1 christos 1842 1.1 christos mov #long_dest-8, er0 1843 1.1 christos shar.l #2, @(8:2, er0) ; shift right arithmetic by two, disp2 1844 1.1 christos ;;; .word 0x0106 1845 1.1 christos ;;; .word 0x6908 1846 1.1 christos ;;; .word 0x11f0 1847 1.1 christos 1848 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1849 1.1 christos test_zero_clear 1850 1.1 christos test_ovf_clear 1851 1.1 christos test_neg_set 1852 1.1 christos 1853 1.1 christos test_h_gr32 long_dest-8 er0 1854 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1855 1.1 christos test_gr_a5a5 2 1856 1.1 christos test_gr_a5a5 3 1857 1.1 christos test_gr_a5a5 4 1858 1.1 christos test_gr_a5a5 5 1859 1.1 christos test_gr_a5a5 6 1860 1.1 christos test_gr_a5a5 7 1861 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1862 1.1 christos ;; -> 1110 1001 0110 1001 0110 1001 0110 1001 1863 1.1 christos cmp.l #0xe9696969, @long_dest 1864 1.1 christos beq .Lldisp22 1865 1.1 christos fail 1866 1.1 christos .Lldisp22: 1867 1.1 christos mov #0xa5a5a5a5, @long_dest 1868 1.1 christos 1869 1.1 christos shar_l_disp16_2: 1870 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1871 1.1 christos set_ccr_zero 1872 1.1 christos 1873 1.1 christos mov #long_dest-44, er0 1874 1.1 christos shar.l #2, @(44:16, er0) ; shift right arithmetic by two, disp16 1875 1.1 christos ;;; .word 0x0104 1876 1.1 christos ;;; .word 0x6f08 1877 1.1 christos ;;; .word 44 1878 1.1 christos ;;; .word 0x11f0 1879 1.1 christos 1880 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1881 1.1 christos test_zero_clear 1882 1.1 christos test_ovf_clear 1883 1.1 christos test_neg_set 1884 1.1 christos 1885 1.1 christos test_h_gr32 long_dest-44 er0 1886 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1887 1.1 christos test_gr_a5a5 2 1888 1.1 christos test_gr_a5a5 3 1889 1.1 christos test_gr_a5a5 4 1890 1.1 christos test_gr_a5a5 5 1891 1.1 christos test_gr_a5a5 6 1892 1.1 christos test_gr_a5a5 7 1893 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1894 1.1 christos ;; -> 1110 1001 0110 1001 0110 1001 0110 1001 1895 1.1 christos cmp.l #0xe9696969, @long_dest 1896 1.1 christos beq .Lldisp162 1897 1.1 christos fail 1898 1.1 christos .Lldisp162: 1899 1.1 christos mov #0xa5a5a5a5, @long_dest 1900 1.1 christos 1901 1.1 christos shar_l_disp32_2: 1902 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1903 1.1 christos set_ccr_zero 1904 1.1 christos 1905 1.1 christos mov #long_dest-666, er0 1906 1.1 christos shar.l #2, @(666:32, er0) ; shift right arithmetic by two, disp32 1907 1.1 christos ;;; .word 0x7884 1908 1.1 christos ;;; .word 0x6b28 1909 1.1 christos ;;; .long 666 1910 1.1 christos ;;; .word 0x11f0 1911 1.1 christos 1912 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1913 1.1 christos test_zero_clear 1914 1.1 christos test_ovf_clear 1915 1.1 christos test_neg_set 1916 1.1 christos 1917 1.1 christos test_h_gr32 long_dest-666 er0 1918 1.1 christos test_gr_a5a5 1 ; Make sure other general regs not disturbed 1919 1.1 christos test_gr_a5a5 2 1920 1.1 christos test_gr_a5a5 3 1921 1.1 christos test_gr_a5a5 4 1922 1.1 christos test_gr_a5a5 5 1923 1.1 christos test_gr_a5a5 6 1924 1.1 christos test_gr_a5a5 7 1925 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1926 1.1 christos ;; -> 1110 1001 0110 1001 0110 1001 0110 1001 1927 1.1 christos cmp.l #0xe9696969, @long_dest 1928 1.1 christos beq .Lldisp322 1929 1.1 christos fail 1930 1.1 christos .Lldisp322: 1931 1.1 christos mov #0xa5a5a5a5, @long_dest 1932 1.1 christos 1933 1.1 christos shar_l_abs16_2: 1934 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1935 1.1 christos set_ccr_zero 1936 1.1 christos 1937 1.1 christos shar.l #2, @long_dest:16 ; shift right arithmetic by two, abs16 1938 1.1 christos ;;; .word 0x0104 1939 1.1 christos ;;; .word 0x6b08 1940 1.1 christos ;;; .word long_dest 1941 1.1 christos ;;; .word 0x11f0 1942 1.1 christos 1943 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1944 1.1 christos test_zero_clear 1945 1.1 christos test_ovf_clear 1946 1.1 christos test_neg_set 1947 1.1 christos 1948 1.1 christos test_gr_a5a5 0 ; Make sure ALL general regs not disturbed 1949 1.1 christos test_gr_a5a5 1 1950 1.1 christos test_gr_a5a5 2 1951 1.1 christos test_gr_a5a5 3 1952 1.1 christos test_gr_a5a5 4 1953 1.1 christos test_gr_a5a5 5 1954 1.1 christos test_gr_a5a5 6 1955 1.1 christos test_gr_a5a5 7 1956 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1957 1.1 christos ;; -> 1110 1001 0110 1001 0110 1001 0110 1001 1958 1.1 christos cmp.l #0xe9696969, @long_dest 1959 1.1 christos beq .Llabs162 1960 1.1 christos fail 1961 1.1 christos .Llabs162: 1962 1.1 christos mov #0xa5a5a5a5, @long_dest 1963 1.1 christos 1964 1.1 christos shar_l_abs32_2: 1965 1.1 christos set_grs_a5a5 ; Fill all general regs with a fixed pattern 1966 1.1 christos set_ccr_zero 1967 1.1 christos 1968 1.1 christos shar.l #2, @long_dest:32 ; shift right arithmetic by two, abs32 1969 1.1 christos ;;; .word 0x0104 1970 1.1 christos ;;; .word 0x6b28 1971 1.1 christos ;;; .long long_dest 1972 1.1 christos ;;; .word 0x11f0 1973 1.1 christos 1974 1.1 christos test_carry_clear ; H=0 N=1 Z=0 V=0 C=0 1975 1.1 christos test_zero_clear 1976 1.1 christos test_ovf_clear 1977 1.1 christos test_neg_set 1978 1.1 christos 1979 1.1 christos test_gr_a5a5 0 ; Make sure ALL general regs not disturbed 1980 1.1 christos test_gr_a5a5 1 1981 1.1 christos test_gr_a5a5 2 1982 1.1 christos test_gr_a5a5 3 1983 1.1 christos test_gr_a5a5 4 1984 1.1 christos test_gr_a5a5 5 1985 1.1 christos test_gr_a5a5 6 1986 1.1 christos test_gr_a5a5 7 1987 1.1 christos ; 1010 0101 1010 0101 1010 0101 1010 0101 1988 1.1 christos ;; -> 1110 1001 0110 1001 0110 1001 0110 1001 1989 1.1 christos cmp.l #0xe9696969, @long_dest 1990 1.1 christos beq .Llabs322 1991 1.1 christos fail 1992 1.1 christos .Llabs322: 1993 1.1 christos mov #0xa5a5a5a5, @long_dest 1994 1.1 christos 1995 1.1 christos .endif 1996 1.1 christos .endif 1997 1.1 christos pass 1998 1.1 christos 1999 1.1 christos exit 0 2000 1.1 christos 2001