Automatic date update in version.in
[binutils-gdb.git] / sim / testsuite / frv / branch.pcgs
blob013b0badad262fbb41cdcdddef9ee4e5cd9ae88c
1 # frv parallel testcase for branching
2 # mach: fr500 fr550 frv
4         .include "testutils.inc"
6         start
8         .global branch
9 branch: ; All insns in VLIW execute
10         setlos.p        1,gr1
11         setlos          0,gr2
12         setlos.p        0,gr3
13         bra             ok1
14         setlos.p        2,gr2
15         setlos          3,gr3
16         fail
17 ok1:
18         test_gr_immed   1,gr1
19         test_gr_immed   0,gr2
20         test_gr_immed   0,gr3
22         ; 1st branch is taken
23         bra.p           ok5
24         bra             ok4
25         bra.p           ok3
26         bra             ok2
27         fail
28 ok2:
29         fail
30 ok3:
31         fail
32 ok4:
33         fail
34 ok5:
35         ; 1st true branch is taken
36         set_icc         0x4 1
37         bne.p           icc1,1,ok6
38         blt             icc1,1,ok7
39         beq.p           icc1,1,ok9
40         ble             icc1,1,ok8
41         fail
42 ok6:
43         fail
44 ok7:
45         fail
46 ok8:
47         fail
48 ok9:
49         ; combination of the above
50         set_icc         0x4 1
51         setlos.p        4,gr4
52         setlos.p        0,gr5
53         bne.p           icc1,1,oka
54         beq             icc1,1,okb
55         setlos          5,gr5
56         fail
57 oka:
58         fail
59 okb:
60         test_gr_immed   4,gr4
61         test_gr_immed   0,gr5
63         pass