1 # Hitachi H8 testcase 'tas'
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 tas_ind
: ; test
and set instruction
23 tas @er4 ; should set zero flag
29 tas @er4 ; should clear zero
, set
neg
35 test_gr_a5a5
0 ; general regs have
not been modified
39 test_h_gr32 byte_dst
, er4
44 mov.
b @byte_dst
, r0l ; test variable has MSB set?
47 .if (sim_cpu == h8sx) ; h8sx can use any register for tas
48 tas_h8sx
: ; test
and set instruction
54 tas @er3 ; should set zero flag
60 tas @er3 ; should clear zero
, set
neg
66 test_gr_a5a5
0 ; general regs have
not been modified
69 test_h_gr32 byte_dst
, er3
75 mov.
b @byte_dst
, r0l ; test variable has MSB set?