1 # Hitachi H8 testcase 'ldm', 'stm'
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"
14 _stack: .long 0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0
15 .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
16 .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
17 .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
22 .if (sim_cpu == h8300s || sim_cpu == h8sx) ; Earlier versions, no exr
33 test_gr_a5a5 0 ; Make sure other general regs not disturbed
40 test_h_gr32 _stack_top-8, er7
42 mov @_stack_top-4, er0
46 mov @_stack_top-8, er0
50 mov @_stack_top-12, er0
65 test_gr_a5a5 0 ; Make sure other general regs not disturbed
72 test_h_gr32 _stack_top-12, er7
74 mov @_stack_top-4, er0
78 mov @_stack_top-8, er0
82 mov @_stack_top-12, er0
86 mov @_stack_top-16, er0
106 test_gr_a5a5 4 ; Make sure other general regs not disturbed
109 test_h_gr32 _stack_top-16, er7
111 mov @_stack_top-4, er0
115 mov @_stack_top-8, er0
119 mov @_stack_top-12, er0
123 mov @_stack_top-16, er0
127 mov @_stack_top-20, er0
139 test_gr_a5a5 0 ; Make sure other general regs not disturbed
146 test_h_gr32 _stack+8, er7
156 test_gr_a5a5 0 ; Make sure other general regs not disturbed
163 test_h_gr32 _stack+16, er7
177 test_gr_a5a5 4 ; Make sure other general regs not disturbed
180 test_h_gr32 _stack+20, er7
185 .if (sim_cpu == h8300)
197 test_gr_a5a5 0 ; Make sure other general _reg_ not disturbed
219 test_gr_a5a5 0 ; Make sure other general _reg_ not disturbed
226 test_h_gr32 _stack_top, er7