1 # Hitachi H8 testcase 'shlr'
3 # as(h8300): --defsym sim_cpu=0
4 # as(h8300h): --defsym sim_cpu=1
5 # as(h8300s): --defsym sim_cpu=2
6 # as(h8sx): --defsym sim_cpu=3
7 # ld(h8300h): -m h8300helf
8 # ld(h8300s): -m h8300self
9 # ld(h8sx): -m h8300sxelf
11 .include "testutils.inc"
18 word_dest: .word 0xa5a5
20 long_dest: .long 0xa5a5a5a5
25 set_grs_a5a5 ; Fill all general regs with a fixed pattern
28 shlr.b r0l ; shift right logical by one
31 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
36 test_h_gr16 0xa552 r0 ; 1010 0101 -> 0101 0010
38 test_h_gr32 0xa5a5a552 er0
40 test_gr_a5a5 1 ; Make sure other general regs not disturbed
50 set_grs_a5a5 ; Fill all general regs with a fixed pattern
54 shlr.b @er0 ; shift right logical by one, indirect
58 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
63 test_h_gr32 byte_dest er0
64 test_gr_a5a5 1 ; Make sure other general regs not disturbed
71 ; 1010 0101 -> 0101 0010
72 cmp.b #0x52, @byte_dest
76 mov.b #0xa5, @byte_dest
79 set_grs_a5a5 ; Fill all general regs with a fixed pattern
83 shlr.b @er0+ ; shift right logical by one, postinc
88 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
93 test_h_gr32 byte_dest+1 er0
94 test_gr_a5a5 1 ; Make sure other general regs not disturbed
101 ; 1010 0101 -> 0101 0010
102 cmp.b #0x52, @byte_dest
106 mov.b #0xa5, @byte_dest
109 set_grs_a5a5 ; Fill all general regs with a fixed pattern
113 shlr.b @er0- ; shift right logical by one, postdec
118 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
123 test_h_gr32 byte_dest-1 er0
124 test_gr_a5a5 1 ; Make sure other general regs not disturbed
131 ; 1010 0101 -> 0101 0010
132 cmp.b #0x52, @byte_dest
136 mov.b #0xa5, @byte_dest
139 set_grs_a5a5 ; Fill all general regs with a fixed pattern
142 mov #byte_dest-1, er0
143 shlr.b @+er0 ; shift right logical by one, preinc
148 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
153 test_h_gr32 byte_dest er0
154 test_gr_a5a5 1 ; Make sure other general regs not disturbed
161 ; 1010 0101 -> 0101 0010
162 cmp.b #0x52, @byte_dest
166 mov.b #0xa5, @byte_dest
169 set_grs_a5a5 ; Fill all general regs with a fixed pattern
172 mov #byte_dest+1, er0
173 shlr.b @-er0 ; shift right logical by one, predec
178 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
183 test_h_gr32 byte_dest er0
184 test_gr_a5a5 1 ; Make sure other general regs not disturbed
191 ; 1010 0101 -> 0101 0010
192 cmp.b #0x52, @byte_dest
196 mov.b #0xa5, @byte_dest
199 set_grs_a5a5 ; Fill all general regs with a fixed pattern
202 mov #byte_dest-2, er0
203 shlr.b @(2:2, er0) ; shift right logical by one, disp2
208 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
213 test_h_gr32 byte_dest-2 er0
214 test_gr_a5a5 1 ; Make sure other general regs not disturbed
221 ; 1010 0101 -> 0101 0010
222 cmp.b #0x52, @byte_dest
226 mov.b #0xa5, @byte_dest
229 set_grs_a5a5 ; Fill all general regs with a fixed pattern
232 mov #byte_dest-44, er0
233 shlr.b @(44:16, er0) ; shift right logical by one, disp16
239 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
244 test_h_gr32 byte_dest-44 er0
245 test_gr_a5a5 1 ; Make sure other general regs not disturbed
252 ; 1010 0101 -> 0101 0010
253 cmp.b #0x52, @byte_dest
257 mov.b #0xa5, @byte_dest
260 set_grs_a5a5 ; Fill all general regs with a fixed pattern
263 mov #byte_dest-666, er0
264 shlr.b @(666:32, er0) ; shift right logical by one, disp32
270 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
275 test_h_gr32 byte_dest-666 er0
276 test_gr_a5a5 1 ; Make sure other general regs not disturbed
283 ; 1010 0101 -> 0101 0010
284 cmp.b #0x52, @byte_dest
288 mov.b #0xa5, @byte_dest
291 set_grs_a5a5 ; Fill all general regs with a fixed pattern
294 shlr.b @byte_dest:16 ; shift right logical by one, abs16
299 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
304 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
312 ; 1010 0101 -> 0101 0010
313 cmp.b #0x52, @byte_dest
317 mov.b #0xa5, @byte_dest
320 set_grs_a5a5 ; Fill all general regs with a fixed pattern
323 shlr.b @byte_dest:32 ; shift right logical by one, abs32
328 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
333 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
341 ; 1010 0101 -> 0101 0010
342 cmp.b #0x52, @byte_dest
346 mov.b #0xa5, @byte_dest
350 set_grs_a5a5 ; Fill all general regs with a fixed pattern
353 shlr.b #2, r0l ; shift right logical by two
356 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
360 test_h_gr16 0xa529 r0 ; 1010 0101 -> 0010 1001
362 test_h_gr32 0xa5a5a529 er0
364 test_gr_a5a5 1 ; Make sure other general regs not disturbed
372 .if (sim_cpu == h8sx)
374 set_grs_a5a5 ; Fill all general regs with a fixed pattern
378 shlr.b #2, @er0 ; shift right logical by two, indirect
382 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
387 test_h_gr32 byte_dest er0
388 test_gr_a5a5 1 ; Make sure other general regs not disturbed
395 ; 1010 0101 -> 0010 1001
396 cmp.b #0x29, @byte_dest
400 mov.b #0xa5, @byte_dest
403 set_grs_a5a5 ; Fill all general regs with a fixed pattern
407 shlr.b #2, @er0+ ; shift right logical by two, postinc
412 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
417 test_h_gr32 byte_dest+1 er0
418 test_gr_a5a5 1 ; Make sure other general regs not disturbed
425 ; 1010 0101 -> 0010 1001
426 cmp.b #0x29, @byte_dest
430 mov.b #0xa5, @byte_dest
433 set_grs_a5a5 ; Fill all general regs with a fixed pattern
437 shlr.b #2, @er0- ; shift right logical by two, postdec
442 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
447 test_h_gr32 byte_dest-1 er0
448 test_gr_a5a5 1 ; Make sure other general regs not disturbed
455 ; 1010 0101 -> 0010 1001
456 cmp.b #0x29, @byte_dest
460 mov.b #0xa5, @byte_dest
463 set_grs_a5a5 ; Fill all general regs with a fixed pattern
466 mov #byte_dest-1, er0
467 shlr.b #2, @+er0 ; shift right logical by two, preinc
472 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
477 test_h_gr32 byte_dest er0
478 test_gr_a5a5 1 ; Make sure other general regs not disturbed
485 ; 1010 0101 -> 0010 1001
486 cmp.b #0x29, @byte_dest
490 mov.b #0xa5, @byte_dest
493 set_grs_a5a5 ; Fill all general regs with a fixed pattern
496 mov #byte_dest+1, er0
497 shlr.b #2, @-er0 ; shift right logical by two, predec
502 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
507 test_h_gr32 byte_dest er0
508 test_gr_a5a5 1 ; Make sure other general regs not disturbed
515 ; 1010 0101 -> 0010 1001
516 cmp.b #0x29, @byte_dest
520 mov.b #0xa5, @byte_dest
523 set_grs_a5a5 ; Fill all general regs with a fixed pattern
526 mov #byte_dest-2, er0
527 shlr.b #2, @(2:2, er0) ; shift right logical by two, disp2
532 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
537 test_h_gr32 byte_dest-2 er0
538 test_gr_a5a5 1 ; Make sure other general regs not disturbed
545 ; 1010 0101 -> 0010 1001
546 cmp.b #0x29, @byte_dest
550 mov.b #0xa5, @byte_dest
553 set_grs_a5a5 ; Fill all general regs with a fixed pattern
556 mov #byte_dest-44, er0
557 shlr.b #2, @(44:16, er0) ; shift right logical by two, disp16
563 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
568 test_h_gr32 byte_dest-44 er0
569 test_gr_a5a5 1 ; Make sure other general regs not disturbed
576 ; 1010 0101 -> 0010 1001
577 cmp.b #0x29, @byte_dest
581 mov.b #0xa5, @byte_dest
584 set_grs_a5a5 ; Fill all general regs with a fixed pattern
587 mov #byte_dest-666, er0
588 shlr.b #2, @(666:32, er0) ; shift right logical by two, disp32
594 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
599 test_h_gr32 byte_dest-666 er0
600 test_gr_a5a5 1 ; Make sure other general regs not disturbed
607 ; 1010 0101 -> 0010 1001
608 cmp.b #0x29, @byte_dest
612 mov.b #0xa5, @byte_dest
615 set_grs_a5a5 ; Fill all general regs with a fixed pattern
618 shlr.b #2, @byte_dest:16 ; shift right logical by two, abs16
623 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
628 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
636 ; 1010 0101 -> 0010 1001
637 cmp.b #0x29, @byte_dest
641 mov.b #0xa5, @byte_dest
644 set_grs_a5a5 ; Fill all general regs with a fixed pattern
647 shlr.b #2, @byte_dest:32 ; shift right logical by two, abs32
652 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
657 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
665 ; 1010 0101 -> 0010 1001
666 cmp.b #0x29, @byte_dest
670 mov.b #0xa5, @byte_dest
673 set_grs_a5a5 ; Fill all general regs with a fixed pattern
676 shlr.b #4, r0l ; shift right logical by four
679 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
684 test_h_gr16 0xa50a r0 ; 1010 0101 -> 0000 1010
685 test_h_gr32 0xa5a5a50a er0
686 test_gr_a5a5 1 ; Make sure other general regs not disturbed
695 set_grs_a5a5 ; Fill all general regs with a fixed pattern
699 shlr.b r0h, r0l ; shift right logical by register value
701 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
706 test_h_gr16 0x0505 r0 ; 1010 0101 -> 0000 0101
707 test_h_gr32 0xa5a50505 er0
708 test_gr_a5a5 1 ; Make sure other general regs not disturbed
717 set_grs_a5a5 ; Fill all general regs with a fixed pattern
721 shlr.b #4, @er0 ; shift right logical by four, indirect
725 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
730 test_h_gr32 byte_dest er0
731 test_gr_a5a5 1 ; Make sure other general regs not disturbed
738 ; 1010 0101 -> 0000 1010
739 cmp.b #0x0a, @byte_dest
743 mov.b #0xa5, @byte_dest
746 set_grs_a5a5 ; Fill all general regs with a fixed pattern
750 shlr.b #4, @er0+ ; shift right logical by four, postinc
755 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
760 test_h_gr32 byte_dest+1 er0
761 test_gr_a5a5 1 ; Make sure other general regs not disturbed
768 ; 1010 0101 -> 0000 1010
769 cmp.b #0x0a, @byte_dest
773 mov.b #0xa5, @byte_dest
776 set_grs_a5a5 ; Fill all general regs with a fixed pattern
780 shlr.b #4, @er0- ; shift right logical by four, postdec
785 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
790 test_h_gr32 byte_dest-1 er0
791 test_gr_a5a5 1 ; Make sure other general regs not disturbed
798 ; 1010 0101 -> 0000 1010
799 cmp.b #0x0a, @byte_dest
803 mov.b #0xa5, @byte_dest
806 set_grs_a5a5 ; Fill all general regs with a fixed pattern
809 mov #byte_dest-1, er0
810 shlr.b #4, @+er0 ; shift right logical by four, preinc
815 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
820 test_h_gr32 byte_dest er0
821 test_gr_a5a5 1 ; Make sure other general regs not disturbed
828 ; 1010 0101 -> 0000 1010
829 cmp.b #0x0a, @byte_dest
833 mov.b #0xa5, @byte_dest
836 set_grs_a5a5 ; Fill all general regs with a fixed pattern
839 mov #byte_dest+1, er0
840 shlr.b #4, @-er0 ; shift right logical by four, predec
845 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
850 test_h_gr32 byte_dest er0
851 test_gr_a5a5 1 ; Make sure other general regs not disturbed
858 ; 1010 0101 -> 0000 1010
859 cmp.b #0x0a, @byte_dest
863 mov.b #0xa5, @byte_dest
866 set_grs_a5a5 ; Fill all general regs with a fixed pattern
869 mov #byte_dest-2, er0
870 shlr.b #4, @(2:2, er0) ; shift right logical by four, disp2
875 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
880 test_h_gr32 byte_dest-2 er0
881 test_gr_a5a5 1 ; Make sure other general regs not disturbed
888 ; 1010 0101 -> 0000 1010
889 cmp.b #0x0a, @byte_dest
893 mov.b #0xa5, @byte_dest
896 set_grs_a5a5 ; Fill all general regs with a fixed pattern
899 mov #byte_dest-44, er0
900 shlr.b #4, @(44:16, er0) ; shift right logical by four, disp16
906 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
911 test_h_gr32 byte_dest-44 er0
912 test_gr_a5a5 1 ; Make sure other general regs not disturbed
919 ; 1010 0101 -> 0000 1010
920 cmp.b #0x0a, @byte_dest
924 mov.b #0xa5, @byte_dest
927 set_grs_a5a5 ; Fill all general regs with a fixed pattern
930 mov #byte_dest-666, er0
931 shlr.b #4, @(666:32, er0) ; shift right logical by four, disp32
937 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
942 test_h_gr32 byte_dest-666 er0
943 test_gr_a5a5 1 ; Make sure other general regs not disturbed
950 ; 1010 0101 -> 0000 1010
951 cmp.b #0x0a, @byte_dest
955 mov.b #0xa5, @byte_dest
958 set_grs_a5a5 ; Fill all general regs with a fixed pattern
961 shlr.b #4, @byte_dest:16 ; shift right logical by four, abs16
966 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
971 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
979 ; 1010 0101 -> 0000 1010
980 cmp.b #0x0a, @byte_dest
984 mov.b #0xa5, @byte_dest
987 set_grs_a5a5 ; Fill all general regs with a fixed pattern
990 shlr.b #4, @byte_dest:32 ; shift right logical by four, abs32
995 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1000 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
1008 ; 1010 0101 -> 0000 1010
1009 cmp.b #0x0a, @byte_dest
1013 mov.b #0xa5, @byte_dest
1016 .if (sim_cpu == h8sx)
1018 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1021 shlr.w #15:5, r0 ; shift right logical by 5-bit immediate
1025 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1030 ; 1010 0101 1010 0101 -> 0000 0000 0000 0001
1031 test_h_gr32 0xa5a50001 er0
1033 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1042 .if (sim_cpu) ; Not available in h8300 mode
1044 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1047 shlr.w r0 ; shift right logical by one
1050 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
1054 test_h_gr16 0x52d2 r0 ; 1010 0101 1010 0101 -> 0101 0010 1101 0010
1055 test_h_gr32 0xa5a552d2 er0
1057 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1065 .if (sim_cpu == h8sx)
1067 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1071 shlr.w @er0 ; shift right logical by one, indirect
1075 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
1080 test_h_gr32 word_dest er0
1081 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1088 ; 1010 0101 1010 0101 -> 0101 0010 1101 0010
1089 cmp.w #0x52d2, @word_dest
1093 mov.w #0xa5a5, @word_dest
1096 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1100 shlr.w @er0+ ; shift right logical by one, postinc
1105 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
1110 test_h_gr32 word_dest+2 er0
1111 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1118 ; 1010 0101 1010 0101 -> 0101 0010 1101 0010
1119 cmp.w #0x52d2, @word_dest
1123 mov.w #0xa5a5, @word_dest
1126 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1130 shlr.w @er0- ; shift right logical by one, postdec
1135 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
1140 test_h_gr32 word_dest-2 er0
1141 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1148 ; 1010 0101 1010 0101 -> 0101 0010 1101 0010
1149 cmp.w #0x52d2, @word_dest
1153 mov.w #0xa5a5, @word_dest
1156 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1159 mov #word_dest-2, er0
1160 shlr.w @+er0 ; shift right logical by one, preinc
1165 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
1170 test_h_gr32 word_dest er0
1171 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1178 ; 1010 0101 1010 0101 -> 0101 0010 1101 0010
1179 cmp.w #0x52d2, @word_dest
1183 mov.w #0xa5a5, @word_dest
1186 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1189 mov #word_dest+2, er0
1190 shlr.w @-er0 ; shift right logical by one, predec
1195 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
1200 test_h_gr32 word_dest er0
1201 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1208 ; 1010 0101 1010 0101 -> 0101 0010 1101 0010
1209 cmp.w #0x52d2, @word_dest
1213 mov.w #0xa5a5, @word_dest
1216 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1219 mov #word_dest-4, er0
1220 shlr.w @(4:2, er0) ; shift right logical by one, disp2
1225 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
1230 test_h_gr32 word_dest-4 er0
1231 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1238 ; 1010 0101 1010 0101 -> 0101 0010 1101 0010
1239 cmp.w #0x52d2, @word_dest
1243 mov.w #0xa5a5, @word_dest
1246 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1249 mov #word_dest-44, er0
1250 shlr.w @(44:16, er0) ; shift right logical by one, disp16
1256 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
1261 test_h_gr32 word_dest-44 er0
1262 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1269 ; 1010 0101 1010 0101 -> 0101 0010 1101 0010
1270 cmp.w #0x52d2, @word_dest
1274 mov.w #0xa5a5, @word_dest
1277 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1280 mov #word_dest-666, er0
1281 shlr.w @(666:32, er0) ; shift right logical by one, disp32
1287 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
1292 test_h_gr32 word_dest-666 er0
1293 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1300 ; 1010 0101 1010 0101 -> 0101 0010 1101 0010
1301 cmp.w #0x52d2, @word_dest
1305 mov.w #0xa5a5, @word_dest
1308 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1311 shlr.w @word_dest:16 ; shift right logical by one, abs16
1316 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
1321 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
1329 ; 1010 0101 1010 0101 -> 0101 0010 1101 0010
1330 cmp.w #0x52d2, @word_dest
1334 mov.w #0xa5a5, @word_dest
1337 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1340 shlr.w @word_dest:32 ; shift right logical by one, abs32
1345 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
1350 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
1358 ; 1010 0101 1010 0101 -> 0101 0010 1101 0010
1359 cmp.w #0x52d2, @word_dest
1363 mov.w #0xa5a5, @word_dest
1367 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1370 shlr.w #2, r0 ; shift right logical by two
1373 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1378 test_h_gr16 0x2969 r0 ; 1010 0101 1010 0101 -> 0010 1001 0110 1001
1379 test_h_gr32 0xa5a52969 er0
1380 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1388 .if (sim_cpu == h8sx)
1390 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1394 shlr.w #2, @er0 ; shift right logical by two, indirect
1398 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1403 test_h_gr32 word_dest er0
1404 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1411 ; 1010 0101 1010 0101 -> 0010 1001 0110 1001
1412 cmp.w #0x2969, @word_dest
1416 mov.w #0xa5a5, @word_dest
1419 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1423 shlr.w #2, @er0+ ; shift right logical by two, postinc
1428 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1433 test_h_gr32 word_dest+2 er0
1434 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1441 ; 1010 0101 1010 0101 -> 0010 1001 0110 1001
1442 cmp.w #0x2969, @word_dest
1446 mov.w #0xa5a5, @word_dest
1449 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1453 shlr.w #2, @er0- ; shift right logical by two, postdec
1458 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1463 test_h_gr32 word_dest-2 er0
1464 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1471 ; 1010 0101 1010 0101 -> 0010 1001 0110 1001
1472 cmp.w #0x2969, @word_dest
1476 mov.w #0xa5a5, @word_dest
1479 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1482 mov #word_dest-2, er0
1483 shlr.w #2, @+er0 ; shift right logical by two, preinc
1488 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1493 test_h_gr32 word_dest er0
1494 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1501 ; 1010 0101 1010 0101 -> 0010 1001 0110 1001
1502 cmp.w #0x2969, @word_dest
1506 mov.w #0xa5a5, @word_dest
1509 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1512 mov #word_dest+2, er0
1513 shlr.w #2, @-er0 ; shift right logical by two, predec
1518 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1523 test_h_gr32 word_dest er0
1524 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1531 ; 1010 0101 1010 0101 -> 0010 1001 0110 1001
1532 cmp.w #0x2969, @word_dest
1536 mov.w #0xa5a5, @word_dest
1539 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1542 mov #word_dest-4, er0
1543 shlr.w #2, @(4:2, er0) ; shift right logical by two, disp2
1548 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1553 test_h_gr32 word_dest-4 er0
1554 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1561 ; 1010 0101 1010 0101 -> 0010 1001 0110 1001
1562 cmp.w #0x2969, @word_dest
1566 mov.w #0xa5a5, @word_dest
1569 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1572 mov #word_dest-44, er0
1573 shlr.w #2, @(44:16, er0) ; shift right logical by two, disp16
1579 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1584 test_h_gr32 word_dest-44 er0
1585 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1592 ; 1010 0101 1010 0101 -> 0010 1001 0110 1001
1593 cmp.w #0x2969, @word_dest
1597 mov.w #0xa5a5, @word_dest
1600 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1603 mov #word_dest-666, er0
1604 shlr.w #2, @(666:32, er0) ; shift right logical by two, disp32
1610 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1615 test_h_gr32 word_dest-666 er0
1616 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1623 ; 1010 0101 1010 0101 -> 0010 1001 0110 1001
1624 cmp.w #0x2969, @word_dest
1628 mov.w #0xa5a5, @word_dest
1631 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1634 shlr.w #2, @word_dest:16 ; shift right logical by two, abs16
1639 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1644 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
1652 ; 1010 0101 1010 0101 -> 0010 1001 0110 1001
1653 cmp.w #0x2969, @word_dest
1657 mov.w #0xa5a5, @word_dest
1660 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1663 shlr.w #2, @word_dest:32 ; shift right logical by two, abs32
1668 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1673 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
1681 ; 1010 0101 1010 0101 -> 0010 1001 0110 1001
1682 cmp.w #0x2969, @word_dest
1686 mov.w #0xa5a5, @word_dest
1689 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1692 shlr.w #4, r0 ; shift right logical by four
1695 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1700 test_h_gr16 0x0a5a r0 ; 1010 0101 1010 0101 -> 0000 1010 0101 1010
1701 test_h_gr32 0xa5a50a5a er0
1702 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1711 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1715 shlr.w r1l, r0 ; shift right logical by register value
1717 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1722 test_h_gr16 0x052d r0 ; 1010 0101 1010 0101 -> 0000 0101 0010 1101
1723 test_h_gr32 0xa5a5052d er0
1724 test_h_gr32 0xa5a5a505 er1
1725 test_gr_a5a5 2 ; Make sure other general regs not disturbed
1733 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1737 shlr.w #4, @er0 ; shift right logical by four, indirect
1741 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1746 test_h_gr32 word_dest er0
1747 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1754 ; 1010 0101 1010 0101 -> 0000 1010 0101 1010
1755 cmp.w #0x0a5a, @word_dest
1759 mov.w #0xa5a5, @word_dest
1762 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1766 shlr.w #4, @er0+ ; shift right logical by four, postinc
1771 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1776 test_h_gr32 word_dest+2 er0
1777 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1784 ; 1010 0101 1010 0101 -> 0000 1010 0101 1010
1785 cmp.w #0x0a5a, @word_dest
1789 mov.w #0xa5a5, @word_dest
1792 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1796 shlr.w #4, @er0- ; shift right logical by four, postdec
1801 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1806 test_h_gr32 word_dest-2 er0
1807 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1814 ; 1010 0101 1010 0101 -> 0000 1010 0101 1010
1815 cmp.w #0x0a5a, @word_dest
1819 mov.w #0xa5a5, @word_dest
1822 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1825 mov #word_dest-2, er0
1826 shlr.w #4, @+er0 ; shift right logical by four, preinc
1831 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1836 test_h_gr32 word_dest er0
1837 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1844 ; 1010 0101 1010 0101 -> 0000 1010 0101 1010
1845 cmp.w #0x0a5a, @word_dest
1849 mov.w #0xa5a5, @word_dest
1852 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1855 mov #word_dest+2, er0
1856 shlr.w #4, @-er0 ; shift right logical by four, predec
1861 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1866 test_h_gr32 word_dest er0
1867 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1874 ; 1010 0101 1010 0101 -> 0000 1010 0101 1010
1875 cmp.w #0x0a5a, @word_dest
1879 mov.w #0xa5a5, @word_dest
1882 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1885 mov #word_dest-4, er0
1886 shlr.w #4, @(4:2, er0) ; shift right logical by four, disp2
1891 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1896 test_h_gr32 word_dest-4 er0
1897 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1904 ; 1010 0101 1010 0101 -> 0000 1010 0101 1010
1905 cmp.w #0x0a5a, @word_dest
1909 mov.w #0xa5a5, @word_dest
1912 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1915 mov #word_dest-44, er0
1916 shlr.w #4, @(44:16, er0) ; shift right logical by four, disp16
1922 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1927 test_h_gr32 word_dest-44 er0
1928 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1935 ; 1010 0101 1010 0101 -> 0000 1010 0101 1010
1936 cmp.w #0x0a5a, @word_dest
1940 mov.w #0xa5a5, @word_dest
1943 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1946 mov #word_dest-666, er0
1947 shlr.w #4, @(666:32, er0) ; shift right logical by four, disp32
1953 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1958 test_h_gr32 word_dest-666 er0
1959 test_gr_a5a5 1 ; Make sure other general regs not disturbed
1966 ; 1010 0101 1010 0101 -> 0000 1010 0101 1010
1967 cmp.w #0x0a5a, @word_dest
1971 mov.w #0xa5a5, @word_dest
1974 set_grs_a5a5 ; Fill all general regs with a fixed pattern
1977 shlr.w #4, @word_dest:16 ; shift right logical by four, abs16
1982 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
1987 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
1995 ; 1010 0101 1010 0101 -> 0000 1010 0101 1010
1996 cmp.w #0x0a5a, @word_dest
2000 mov.w #0xa5a5, @word_dest
2003 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2006 shlr.w #4, @word_dest:32 ; shift right logical by four, abs32
2011 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
2016 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
2024 ; 1010 0101 1010 0101 -> 0000 1010 0101 1010
2025 cmp.w #0x0a5a, @word_dest
2029 mov.w #0xa5a5, @word_dest
2032 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2035 shlr.w #8, r0 ; shift right logical by eight
2038 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2043 test_h_gr16 0x00a5 r0 ; 1010 0101 1010 0101 -> 0000 0000 1010 0101
2044 test_h_gr32 0xa5a500a5 er0
2045 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2054 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2058 shlr.w #8, @er0 ; shift right logical by eight, indirect
2062 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2067 test_h_gr32 word_dest er0
2068 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2075 ; 1010 0101 1010 0101 -> 0000 0000 1010 0101
2076 cmp.w #0x00a5, @word_dest
2080 mov.w #0xa5a5, @word_dest
2083 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2087 shlr.w #8, @er0+ ; shift right logical by eight, postinc
2092 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2097 test_h_gr32 word_dest+2 er0
2098 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2105 ; 1010 0101 1010 0101 -> 0000 0000 1010 0101
2106 cmp.w #0x00a5, @word_dest
2110 mov.w #0xa5a5, @word_dest
2113 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2117 shlr.w #8, @er0- ; shift right logical by eight, postdec
2122 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2127 test_h_gr32 word_dest-2 er0
2128 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2135 ; 1010 0101 1010 0101 -> 0000 0000 1010 0101
2136 cmp.w #0x00a5, @word_dest
2140 mov.w #0xa5a5, @word_dest
2143 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2146 mov #word_dest-2, er0
2147 shlr.w #8, @+er0 ; shift right logical by eight, preinc
2152 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2157 test_h_gr32 word_dest er0
2158 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2165 ; 1010 0101 1010 0101 -> 0000 0000 1010 0101
2166 cmp.w #0x00a5, @word_dest
2170 mov.w #0xa5a5, @word_dest
2173 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2176 mov #word_dest+2, er0
2177 shlr.w #8, @-er0 ; shift right logical by eight, predec
2182 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2187 test_h_gr32 word_dest er0
2188 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2195 ; 1010 0101 1010 0101 -> 0000 0000 1010 0101
2196 cmp.w #0x00a5, @word_dest
2200 mov.w #0xa5a5, @word_dest
2203 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2206 mov #word_dest-4, er0
2207 shlr.w #8, @(4:2, er0) ; shift right logical by eight, disp2
2212 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2217 test_h_gr32 word_dest-4 er0
2218 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2225 ; 1010 0101 1010 0101 -> 0000 0000 1010 0101
2226 cmp.w #0x00a5, @word_dest
2230 mov.w #0xa5a5, @word_dest
2233 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2236 mov #word_dest-44, er0
2237 shlr.w #8, @(44:16, er0) ; shift right logical by eight, disp16
2243 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2248 test_h_gr32 word_dest-44 er0
2249 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2256 ; 1010 0101 1010 0101 -> 0000 0000 1010 0101
2257 cmp.w #0x00a5, @word_dest
2261 mov.w #0xa5a5, @word_dest
2264 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2267 mov #word_dest-666, er0
2268 shlr.w #8, @(666:32, er0) ; shift right logical by eight, disp32
2274 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2279 test_h_gr32 word_dest-666 er0
2280 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2287 ; 1010 0101 1010 0101 -> 0000 0000 1010 0101
2288 cmp.w #0x00a5, @word_dest
2292 mov.w #0xa5a5, @word_dest
2295 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2298 shlr.w #8, @word_dest:16 ; shift right logical by eight, abs16
2303 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2308 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
2316 ; 1010 0101 1010 0101 -> 0000 0000 1010 0101
2317 cmp.w #0x00a5, @word_dest
2321 mov.w #0xa5a5, @word_dest
2324 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2327 shlr.w #8, @word_dest:32 ; shift right logical by eight, abs32
2332 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2337 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
2345 ; 1010 0101 1010 0101 -> 0000 0000 1010 0101
2346 cmp.w #0x00a5, @word_dest
2350 mov.w #0xa5a5, @word_dest
2353 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2356 shlr.l #31:5, er0 ; shift right logical by 5-bit immediate
2360 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
2365 ; 1010 0101 1010 0101 1010 0101 1010 0101
2366 ; -> 0000 0000 0000 0000 0000 0000 0000 0001
2369 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2379 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2382 shlr.l er0 ; shift right logical by one, register
2385 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2390 ; 1010 0101 1010 0101 1010 0101 1010 0101
2391 ; -> 0101 0010 1101 0010 1101 0010 1101 0010
2392 test_h_gr32 0x52d2d2d2 er0
2394 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2402 .if (sim_cpu == h8sx)
2404 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2408 shlr.l @er0 ; shift right logical by one, indirect
2413 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2418 test_h_gr32 long_dest er0
2419 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2426 ; 1010 0101 1010 0101 1010 0101 1010 0101
2427 ;; -> 0101 0010 1101 0010 1101 0010 1101 0010
2428 cmp.l #0x52d2d2d2, @long_dest
2432 mov #0xa5a5a5a5, @long_dest
2435 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2439 shlr.l @er0+ ; shift right logical by one, postinc
2444 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2449 test_h_gr32 long_dest+4 er0
2450 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2457 ; 1010 0101 1010 0101 1010 0101 1010 0101
2458 ;; -> 0101 0010 1101 0010 1101 0010 1101 0010
2459 cmp.l #0x52d2d2d2, @long_dest
2463 mov #0xa5a5a5a5, @long_dest
2466 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2470 shlr.l @er0- ; shift right logical by one, postdec
2475 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2480 test_h_gr32 long_dest-4 er0
2481 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2488 ; 1010 0101 1010 0101 1010 0101 1010 0101
2489 ;; -> 0101 0010 1101 0010 1101 0010 1101 0010
2490 cmp.l #0x52d2d2d2, @long_dest
2494 mov #0xa5a5a5a5, @long_dest
2497 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2500 mov #long_dest-4, er0
2501 shlr.l @+er0 ; shift right logical by one, preinc
2506 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2511 test_h_gr32 long_dest er0
2512 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2519 ; 1010 0101 1010 0101 1010 0101 1010 0101
2520 ;; -> 0101 0010 1101 0010 1101 0010 1101 0010
2521 cmp.l #0x52d2d2d2, @long_dest
2525 mov #0xa5a5a5a5, @long_dest
2528 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2531 mov #long_dest+4, er0
2532 shlr.l @-er0 ; shift right logical by one, predec
2537 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2542 test_h_gr32 long_dest er0
2543 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2550 ; 1010 0101 1010 0101 1010 0101 1010 0101
2551 ;; -> 0101 0010 1101 0010 1101 0010 1101 0010
2552 cmp.l #0x52d2d2d2, @long_dest
2556 mov #0xa5a5a5a5, @long_dest
2559 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2562 mov #long_dest-8, er0
2563 shlr.l @(8:2, er0) ; shift right logical by one, disp2
2568 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2573 test_h_gr32 long_dest-8 er0
2574 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2581 ; 1010 0101 1010 0101 1010 0101 1010 0101
2582 ;; -> 0101 0010 1101 0010 1101 0010 1101 0010
2583 cmp.l #0x52d2d2d2, @long_dest
2587 mov #0xa5a5a5a5, @long_dest
2590 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2593 mov #long_dest-44, er0
2594 shlr.l @(44:16, er0) ; shift right logical by one, disp16
2600 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2605 test_h_gr32 long_dest-44 er0
2606 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2613 ; 1010 0101 1010 0101 1010 0101 1010 0101
2614 ;; -> 0101 0010 1101 0010 1101 0010 1101 0010
2615 cmp.l #0x52d2d2d2, @long_dest
2619 mov #0xa5a5a5a5, @long_dest
2622 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2625 mov #long_dest-666, er0
2626 shlr.l @(666:32, er0) ; shift right logical by one, disp32
2632 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2637 test_h_gr32 long_dest-666 er0
2638 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2645 ; 1010 0101 1010 0101 1010 0101 1010 0101
2646 ;; -> 0101 0010 1101 0010 1101 0010 1101 0010
2647 cmp.l #0x52d2d2d2, @long_dest
2651 mov #0xa5a5a5a5, @long_dest
2654 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2657 shlr.l @long_dest:16 ; shift right logical by one, abs16
2663 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2668 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
2676 ; 1010 0101 1010 0101 1010 0101 1010 0101
2677 ;; -> 0101 0010 1101 0010 1101 0010 1101 0010
2678 cmp.l #0x52d2d2d2, @long_dest
2682 mov #0xa5a5a5a5, @long_dest
2685 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2688 shlr.l @long_dest:32 ; shift right logical by one, abs32
2694 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
2699 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
2707 ; 1010 0101 1010 0101 1010 0101 1010 0101
2708 ;; -> 0101 0010 1101 0010 1101 0010 1101 0010
2709 cmp.l #0x52d2d2d2, @long_dest
2713 mov #0xa5a5a5a5, @long_dest
2717 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2720 shlr.l #2, er0 ; shift right logical by two, register
2723 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
2727 ; 1010 0101 1010 0101 1010 0101 1010 0101
2728 ; -> 0010 1001 0110 1001 0110 1001 0110 1001
2729 test_h_gr32 0x29696969 er0
2731 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2739 .if (sim_cpu == h8sx)
2742 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2746 shlr.l #2, @er0 ; shift right logical by two, indirect
2751 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
2756 test_h_gr32 long_dest er0
2757 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2764 ; 1010 0101 1010 0101 1010 0101 1010 0101
2765 ;; -> 0010 1001 0110 1001 0110 1001 0110 1001
2766 cmp.l #0x29696969, @long_dest
2770 mov #0xa5a5a5a5, @long_dest
2773 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2777 shlr.l #2, @er0+ ; shift right logical by two, postinc
2782 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
2787 test_h_gr32 long_dest+4 er0
2788 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2795 ; 1010 0101 1010 0101 1010 0101 1010 0101
2796 ;; -> 0010 1001 0110 1001 0110 1001 0110 1001
2797 cmp.l #0x29696969, @long_dest
2801 mov #0xa5a5a5a5, @long_dest
2804 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2808 shlr.l #2, @er0- ; shift right logical by two, postdec
2813 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
2818 test_h_gr32 long_dest-4 er0
2819 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2826 ; 1010 0101 1010 0101 1010 0101 1010 0101
2827 ;; -> 0010 1001 0110 1001 0110 1001 0110 1001
2828 cmp.l #0x29696969, @long_dest
2832 mov #0xa5a5a5a5, @long_dest
2835 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2838 mov #long_dest-4, er0
2839 shlr.l #2, @+er0 ; shift right logical by two, preinc
2844 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
2849 test_h_gr32 long_dest er0
2850 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2857 ; 1010 0101 1010 0101 1010 0101 1010 0101
2858 ;; -> 0010 1001 0110 1001 0110 1001 0110 1001
2859 cmp.l #0x29696969, @long_dest
2863 mov #0xa5a5a5a5, @long_dest
2866 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2869 mov #long_dest+4, er0
2870 shlr.l #2, @-er0 ; shift right logical by two, predec
2875 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
2880 test_h_gr32 long_dest er0
2881 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2888 ; 1010 0101 1010 0101 1010 0101 1010 0101
2889 ;; -> 0010 1001 0110 1001 0110 1001 0110 1001
2890 cmp.l #0x29696969, @long_dest
2894 mov #0xa5a5a5a5, @long_dest
2897 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2900 mov #long_dest-8, er0
2901 shlr.l #2, @(8:2, er0) ; shift right logical by two, disp2
2906 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
2911 test_h_gr32 long_dest-8 er0
2912 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2919 ; 1010 0101 1010 0101 1010 0101 1010 0101
2920 ;; -> 0010 1001 0110 1001 0110 1001 0110 1001
2921 cmp.l #0x29696969, @long_dest
2925 mov #0xa5a5a5a5, @long_dest
2928 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2931 mov #long_dest-44, er0
2932 shlr.l #2, @(44:16, er0) ; shift right logical by two, disp16
2938 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
2943 test_h_gr32 long_dest-44 er0
2944 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2951 ; 1010 0101 1010 0101 1010 0101 1010 0101
2952 ;; -> 0010 1001 0110 1001 0110 1001 0110 1001
2953 cmp.l #0x29696969, @long_dest
2957 mov #0xa5a5a5a5, @long_dest
2960 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2963 mov #long_dest-666, er0
2964 shlr.l #2, @(666:32, er0) ; shift right logical by two, disp32
2970 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
2975 test_h_gr32 long_dest-666 er0
2976 test_gr_a5a5 1 ; Make sure other general regs not disturbed
2983 ; 1010 0101 1010 0101 1010 0101 1010 0101
2984 ;; -> 0010 1001 0110 1001 0110 1001 0110 1001
2985 cmp.l #0x29696969, @long_dest
2989 mov #0xa5a5a5a5, @long_dest
2992 set_grs_a5a5 ; Fill all general regs with a fixed pattern
2995 shlr.l #2, @long_dest:16 ; shift right logical by two, abs16
3001 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3006 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
3014 ; 1010 0101 1010 0101 1010 0101 1010 0101
3015 ;; -> 0010 1001 0110 1001 0110 1001 0110 1001
3016 cmp.l #0x29696969, @long_dest
3020 mov #0xa5a5a5a5, @long_dest
3023 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3026 shlr.l #2, @long_dest:32 ; shift right logical by two, abs32
3032 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3037 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
3045 ; 1010 0101 1010 0101 1010 0101 1010 0101
3046 ;; -> 0010 1001 0110 1001 0110 1001 0110 1001
3047 cmp.l #0x29696969, @long_dest
3051 mov #0xa5a5a5a5, @long_dest
3054 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3057 shlr.l #4, er0 ; shift right logical by four, register
3060 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3064 ; 1010 0101 1010 0101 1010 0101 1010 0101
3065 ; -> 0000 1010 0101 1010 0101 1010 0101 1010
3066 test_h_gr32 0x0a5a5a5a er0
3068 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3077 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3081 shlr.l r1l, er0 ; shift right logical by value of register
3083 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3087 ; 1010 0101 1010 0101 1010 0101 1010 0101
3088 ; -> 0000 0101 0010 1101 0010 1101 0010 1101
3089 test_h_gr32 0x052d2d2d er0
3090 test_h_gr32 0xa5a5a505 er1
3092 test_gr_a5a5 2 ; Make sure other general regs not disturbed
3100 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3104 shlr.l #4, @er0 ; shift right logical by four, indirect
3109 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3114 test_h_gr32 long_dest er0
3115 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3122 ; 1010 0101 1010 0101 1010 0101 1010 0101
3123 ;; -> 0000 1010 0101 1010 0101 1010 0101 1010
3124 cmp.l #0x0a5a5a5a, @long_dest
3128 mov #0xa5a5a5a5, @long_dest
3131 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3135 shlr.l #4, @er0+ ; shift right logical by four, postinc
3140 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3145 test_h_gr32 long_dest+4 er0
3146 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3153 ; 1010 0101 1010 0101 1010 0101 1010 0101
3154 ;; -> 0000 1010 0101 1010 0101 1010 0101 1010
3155 cmp.l #0x0a5a5a5a, @long_dest
3159 mov #0xa5a5a5a5, @long_dest
3162 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3166 shlr.l #4, @er0- ; shift right logical by four, postdec
3171 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3176 test_h_gr32 long_dest-4 er0
3177 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3184 ; 1010 0101 1010 0101 1010 0101 1010 0101
3185 ;; -> 0000 1010 0101 1010 0101 1010 0101 1010
3186 cmp.l #0x0a5a5a5a, @long_dest
3190 mov #0xa5a5a5a5, @long_dest
3193 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3196 mov #long_dest-4, er0
3197 shlr.l #4, @+er0 ; shift right logical by four, preinc
3202 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3207 test_h_gr32 long_dest er0
3208 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3215 ; 1010 0101 1010 0101 1010 0101 1010 0101
3216 ;; -> 0000 1010 0101 1010 0101 1010 0101 1010
3217 cmp.l #0x0a5a5a5a, @long_dest
3221 mov #0xa5a5a5a5, @long_dest
3224 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3227 mov #long_dest+4, er0
3228 shlr.l #4, @-er0 ; shift right logical by four, predec
3233 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3238 test_h_gr32 long_dest er0
3239 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3246 ; 1010 0101 1010 0101 1010 0101 1010 0101
3247 ;; -> 0000 1010 0101 1010 0101 1010 0101 1010
3248 cmp.l #0x0a5a5a5a, @long_dest
3252 mov #0xa5a5a5a5, @long_dest
3255 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3258 mov #long_dest-8, er0
3259 shlr.l #4, @(8:2, er0) ; shift right logical by four, disp2
3264 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3269 test_h_gr32 long_dest-8 er0
3270 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3277 ; 1010 0101 1010 0101 1010 0101 1010 0101
3278 ;; -> 0000 1010 0101 1010 0101 1010 0101 1010
3279 cmp.l #0x0a5a5a5a, @long_dest
3283 mov #0xa5a5a5a5, @long_dest
3286 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3289 mov #long_dest-44, er0
3290 shlr.l #4, @(44:16, er0) ; shift right logical by four, disp16
3296 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3301 test_h_gr32 long_dest-44 er0
3302 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3309 ; 1010 0101 1010 0101 1010 0101 1010 0101
3310 ;; -> 0000 1010 0101 1010 0101 1010 0101 1010
3311 cmp.l #0x0a5a5a5a, @long_dest
3315 mov #0xa5a5a5a5, @long_dest
3318 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3321 mov #long_dest-666, er0
3322 shlr.l #4, @(666:32, er0) ; shift right logical by four, disp32
3328 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3333 test_h_gr32 long_dest-666 er0
3334 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3341 ; 1010 0101 1010 0101 1010 0101 1010 0101
3342 ;; -> 0000 1010 0101 1010 0101 1010 0101 1010
3343 cmp.l #0x0a5a5a5a, @long_dest
3347 mov #0xa5a5a5a5, @long_dest
3350 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3353 shlr.l #4, @long_dest:16 ; shift right logical by four, abs16
3359 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3364 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
3372 ; 1010 0101 1010 0101 1010 0101 1010 0101
3373 ;; -> 0000 1010 0101 1010 0101 1010 0101 1010
3374 cmp.l #0x0a5a5a5a, @long_dest
3378 mov #0xa5a5a5a5, @long_dest
3381 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3384 shlr.l #4, @long_dest:32 ; shift right logical by four, abs32
3390 test_carry_clear ; H=0 N=0 Z=0 V=0 C=0
3395 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
3403 ; 1010 0101 1010 0101 1010 0101 1010 0101
3404 ;; -> 0000 1010 0101 1010 0101 1010 0101 1010
3405 cmp.l #0x0a5a5a5a, @long_dest
3409 mov #0xa5a5a5a5, @long_dest
3412 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3415 shlr.l #8, er0 ; shift right logical by eight, register
3418 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3422 ; 1010 0101 1010 0101 1010 0101 1010 0101
3423 ; -> 0000 0000 1010 0101 1010 0101 1010 0101
3424 test_h_gr32 0x00a5a5a5 er0
3426 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3435 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3439 shlr.l #8, @er0 ; shift right logical by eight, indirect
3444 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3449 test_h_gr32 long_dest er0
3450 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3457 ; 1010 0101 1010 0101 1010 0101 1010 0101
3458 ;; -> 0000 0000 1010 0101 1010 0101 1010 0101
3459 cmp.l #0x00a5a5a5, @long_dest
3463 mov #0xa5a5a5a5, @long_dest
3466 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3470 shlr.l #8, @er0+ ; shift right logical by eight, postinc
3475 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3480 test_h_gr32 long_dest+4 er0
3481 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3488 ; 1010 0101 1010 0101 1010 0101 1010 0101
3489 ;; -> 0000 0000 1010 0101 1010 0101 1010 0101
3490 cmp.l #0x00a5a5a5, @long_dest
3494 mov #0xa5a5a5a5, @long_dest
3497 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3501 shlr.l #8, @er0- ; shift right logical by eight, postdec
3506 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3511 test_h_gr32 long_dest-4 er0
3512 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3519 ; 1010 0101 1010 0101 1010 0101 1010 0101
3520 ;; -> 0000 0000 1010 0101 1010 0101 1010 0101
3521 cmp.l #0x00a5a5a5, @long_dest
3525 mov #0xa5a5a5a5, @long_dest
3528 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3531 mov #long_dest-4, er0
3532 shlr.l #8, @+er0 ; shift right logical by eight, preinc
3537 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3542 test_h_gr32 long_dest er0
3543 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3550 ; 1010 0101 1010 0101 1010 0101 1010 0101
3551 ;; -> 0000 0000 1010 0101 1010 0101 1010 0101
3552 cmp.l #0x00a5a5a5, @long_dest
3556 mov #0xa5a5a5a5, @long_dest
3559 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3562 mov #long_dest+4, er0
3563 shlr.l #8, @-er0 ; shift right logical by eight, predec
3568 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3573 test_h_gr32 long_dest er0
3574 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3581 ; 1010 0101 1010 0101 1010 0101 1010 0101
3582 ;; -> 0000 0000 1010 0101 1010 0101 1010 0101
3583 cmp.l #0x00a5a5a5, @long_dest
3587 mov #0xa5a5a5a5, @long_dest
3590 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3593 mov #long_dest-8, er0
3594 shlr.l #8, @(8:2, er0) ; shift right logical by eight, disp2
3599 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3604 test_h_gr32 long_dest-8 er0
3605 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3612 ; 1010 0101 1010 0101 1010 0101 1010 0101
3613 ;; -> 0000 0000 1010 0101 1010 0101 1010 0101
3614 cmp.l #0x00a5a5a5, @long_dest
3618 mov #0xa5a5a5a5, @long_dest
3621 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3624 mov #long_dest-44, er0
3625 shlr.l #8, @(44:16, er0) ; shift right logical by eight, disp16
3631 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3636 test_h_gr32 long_dest-44 er0
3637 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3644 ; 1010 0101 1010 0101 1010 0101 1010 0101
3645 ;; -> 0000 0000 1010 0101 1010 0101 1010 0101
3646 cmp.l #0x00a5a5a5, @long_dest
3650 mov #0xa5a5a5a5, @long_dest
3653 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3656 mov #long_dest-666, er0
3657 shlr.l #8, @(666:32, er0) ; shift right logical by eight, disp32
3663 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3668 test_h_gr32 long_dest-666 er0
3669 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3676 ; 1010 0101 1010 0101 1010 0101 1010 0101
3677 ;; -> 0000 0000 1010 0101 1010 0101 1010 0101
3678 cmp.l #0x00a5a5a5, @long_dest
3682 mov #0xa5a5a5a5, @long_dest
3685 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3688 shlr.l #8, @long_dest:16 ; shift right logical by eight, abs16
3694 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3699 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
3707 ; 1010 0101 1010 0101 1010 0101 1010 0101
3708 ;; -> 0000 0000 1010 0101 1010 0101 1010 0101
3709 cmp.l #0x00a5a5a5, @long_dest
3713 mov #0xa5a5a5a5, @long_dest
3716 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3719 shlr.l #8, @long_dest:32 ; shift right logical by eight, abs32
3725 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3730 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
3738 ; 1010 0101 1010 0101 1010 0101 1010 0101
3739 ;; -> 0000 0000 1010 0101 1010 0101 1010 0101
3740 cmp.l #0x00a5a5a5, @long_dest
3744 mov #0xa5a5a5a5, @long_dest
3747 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3750 shlr.l #16, er0 ; shift right logical by sixteen, register
3753 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3757 ; 1010 0101 1010 0101 1010 0101 1010 0101
3758 ;; -> 0000 0000 0000 0000 1010 0101 1010 0101
3759 test_h_gr32 0x0000a5a5 er0
3761 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3770 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3774 shlr.l #16, @er0 ; shift right logical by sixteen, indirect
3779 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3784 test_h_gr32 long_dest er0
3785 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3792 ; 1010 0101 1010 0101 1010 0101 1010 0101
3793 ;; -> 0000 0000 0000 0000 1010 0101 1010 0101
3794 cmp.l #0x0000a5a5, @long_dest
3798 mov #0xa5a5a5a5, @long_dest
3801 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3805 shlr.l #16, @er0+ ; shift right logical by sixteen, postinc
3810 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3815 test_h_gr32 long_dest+4 er0
3816 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3823 ; 1010 0101 1010 0101 1010 0101 1010 0101
3824 ;; -> 0000 0000 0000 0000 1010 0101 1010 0101
3825 cmp.l #0x0000a5a5, @long_dest
3829 mov #0xa5a5a5a5, @long_dest
3832 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3836 shlr.l #16, @er0- ; shift right logical by sixteen, postdec
3841 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3846 test_h_gr32 long_dest-4 er0
3847 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3854 ; 1010 0101 1010 0101 1010 0101 1010 0101
3855 ;; -> 0000 0000 0000 0000 1010 0101 1010 0101
3856 cmp.l #0x0000a5a5, @long_dest
3860 mov #0xa5a5a5a5, @long_dest
3863 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3866 mov #long_dest-4, er0
3867 shlr.l #16, @+er0 ; shift right logical by sixteen, preinc
3872 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3877 test_h_gr32 long_dest er0
3878 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3885 ; 1010 0101 1010 0101 1010 0101 1010 0101
3886 ;; -> 0000 0000 0000 0000 1010 0101 1010 0101
3887 cmp.l #0x0000a5a5, @long_dest
3891 mov #0xa5a5a5a5, @long_dest
3894 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3897 mov #long_dest+4, er0
3898 shlr.l #16, @-er0 ; shift right logical by sixteen, predec
3903 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3908 test_h_gr32 long_dest er0
3909 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3916 ; 1010 0101 1010 0101 1010 0101 1010 0101
3917 ;; -> 0000 0000 0000 0000 1010 0101 1010 0101
3918 cmp.l #0x0000a5a5, @long_dest
3922 mov #0xa5a5a5a5, @long_dest
3925 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3928 mov #long_dest-8, er0
3929 shlr.l #16, @(8:2, er0) ; shift right logical by 16, dest2
3934 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3939 test_h_gr32 long_dest-8 er0
3940 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3947 ; 1010 0101 1010 0101 1010 0101 1010 0101
3948 ;; -> 0000 0000 0000 0000 1010 0101 1010 0101
3949 cmp.l #0x0000a5a5, @long_dest
3953 mov #0xa5a5a5a5, @long_dest
3956 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3959 mov #long_dest-44, er0
3960 shlr.l #16, @(44:16, er0) ; shift right logical by 16, disp16
3966 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
3971 test_h_gr32 long_dest-44 er0
3972 test_gr_a5a5 1 ; Make sure other general regs not disturbed
3979 ; 1010 0101 1010 0101 1010 0101 1010 0101
3980 ;; -> 0000 0000 0000 0000 1010 0101 1010 0101
3981 cmp.l #0x0000a5a5, @long_dest
3985 mov #0xa5a5a5a5, @long_dest
3988 set_grs_a5a5 ; Fill all general regs with a fixed pattern
3991 mov #long_dest-666, er0
3992 shlr.l #16, @(666:32, er0) ; shift right logical by 16, disp32
3998 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
4003 test_h_gr32 long_dest-666 er0
4004 test_gr_a5a5 1 ; Make sure other general regs not disturbed
4011 ; 1010 0101 1010 0101 1010 0101 1010 0101
4012 ;; -> 0000 0000 0000 0000 1010 0101 1010 0101
4013 cmp.l #0x0000a5a5, @long_dest
4017 mov #0xa5a5a5a5, @long_dest
4020 set_grs_a5a5 ; Fill all general regs with a fixed pattern
4023 shlr.l #16, @long_dest:16 ; shift right logical by 16, abs16
4029 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
4034 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
4042 ; 1010 0101 1010 0101 1010 0101 1010 0101
4043 ;; -> 0000 0000 0000 0000 1010 0101 1010 0101
4044 cmp.l #0x0000a5a5, @long_dest
4048 mov #0xa5a5a5a5, @long_dest
4051 set_grs_a5a5 ; Fill all general regs with a fixed pattern
4054 shlr.l #16, @long_dest:32 ; shift right logical by 16, abs32
4060 test_carry_set ; H=0 N=0 Z=0 V=0 C=1
4065 test_gr_a5a5 0 ; Make sure ALL general regs not disturbed
4073 ; 1010 0101 1010 0101 1010 0101 1010 0101
4074 ;; -> 0000 0000 0000 0000 1010 0101 1010 0101
4075 cmp.l #0x0000a5a5, @long_dest
4079 mov #0xa5a5a5a5, @long_dest