New files: Testcases for cr16 instruction set.
[external/binutils.git] / sim / testsuite / sim / cr16 / jal.cgs
1 # cr16 testcase for jal $sr
2 # mach(): cr16
3
4         .include "testutils.inc"
5
6         start
7
8         .global jal
9 jal:
10         movd $ok1, (r5, r4)
11         lshd $-1, (r5,r4)
12         jal (ra), (r5,r4)
13 not_ok:
14         fail
15 ok1:
16         movd $not_ok, (r7, r6)
17         lshd $-1, (r7,r6)
18         cmpd (r7,r6), (ra)
19         beq ok2
20         br not_ok
21 ok2:
22         movd $ok3, (r5, r4)
23         lshd $-1, (r5,r4)
24         jal (r1,r0), (r5,r4)
25 not_ok1:
26         br not_ok
27 ok3:
28         movd $not_ok1, (r7, r6)
29         lshd $-1, (r7,r6)
30         cmpd (r7,r6), (r1,r0)
31         beq ok4
32         br not_ok
33 ok4:
34
35         pass