1 # Hitachi H8 testcase 'adds'
2 # mach(): h8300h h8300s h8sx
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"
13 # Instructions tested:
14 # adds #1, erd ; 0 b 0 xerd
15 # adds #2, erd ; 0 b 8 xerd
16 # adds #4, erd ; 0 b 9 xerd
20 .if (sim_cpu) ; 32 bit only
27 test_cc_clear ; adds should
not affect any condition codes
28 test_h_gr32
0xa5a5a5a6 er0 ; result of adds
#1
30 test_gr_a5a5
1 ; Make sure other general regs
not disturbed
44 test_cc_clear ; adds should
not affect any condition codes
45 test_h_gr32
0xa5a5a5a7 er0 ; result of adds
#2
47 test_gr_a5a5
1 ; Make sure other general regs
not disturbed
61 test_cc_clear ; adds should
not affect any condition codes
62 test_h_gr32
0xa5a5a5a9 er0 ; result of adds
#4
64 test_gr_a5a5
1 ; Make sure other general regs
not disturbed