root / tests / tcg / cris / check_jsr.s @ c09015dd
History | View | Annotate | Download (919 Bytes)
1 | dd43edf4 | ths | # mach: crisv3 crisv8 crisv10 crisv32 |
---|---|---|---|
2 | dd43edf4 | ths | # output: 0\n0\n0\n0\n0\n0\n |
3 | dd43edf4 | ths | |
4 | dd43edf4 | ths | # Test that jsr Rn and jsr [PC+] work. |
5 | dd43edf4 | ths | |
6 | dd43edf4 | ths | .include "testutils.inc" |
7 | dd43edf4 | ths | start |
8 | dd43edf4 | ths | x: |
9 | dd43edf4 | ths | move.d 0f,r6 |
10 | dd43edf4 | ths | setf nzvc |
11 | dd43edf4 | ths | jsr r6 |
12 | dd43edf4 | ths | .if 1; ..asm.arch.cris.v32 |
13 | dd43edf4 | ths | nop |
14 | dd43edf4 | ths | .endif |
15 | dd43edf4 | ths | 0: |
16 | dd43edf4 | ths | test_move_cc 1 1 1 1 |
17 | dd43edf4 | ths | move srp,r3 |
18 | dd43edf4 | ths | sub.d 0b,r3 |
19 | dd43edf4 | ths | checkr3 0 |
20 | dd43edf4 | ths | |
21 | dd43edf4 | ths | move.d 1f,r0 |
22 | dd43edf4 | ths | setf nzvc |
23 | dd43edf4 | ths | jsr r0 |
24 | dd43edf4 | ths | .if 1 ; ..asm.arch.cris.v32 |
25 | dd43edf4 | ths | moveq 0,r0 |
26 | dd43edf4 | ths | .endif |
27 | dd43edf4 | ths | 6: |
28 | dd43edf4 | ths | nop |
29 | dd43edf4 | ths | quit |
30 | dd43edf4 | ths | |
31 | dd43edf4 | ths | 2: |
32 | dd43edf4 | ths | test_move_cc 0 0 0 0 |
33 | dd43edf4 | ths | move srp,r3 |
34 | dd43edf4 | ths | sub.d 3f,r3 |
35 | dd43edf4 | ths | checkr3 0 |
36 | dd43edf4 | ths | jsr 4f |
37 | dd43edf4 | ths | .if 1 ; ..asm.arch.cris.v32 |
38 | dd43edf4 | ths | nop |
39 | dd43edf4 | ths | .endif |
40 | dd43edf4 | ths | 7: |
41 | dd43edf4 | ths | nop |
42 | dd43edf4 | ths | quit |
43 | dd43edf4 | ths | |
44 | dd43edf4 | ths | 8: |
45 | dd43edf4 | ths | move srp,r3 |
46 | dd43edf4 | ths | sub.d 7b,r3 |
47 | dd43edf4 | ths | checkr3 0 |
48 | dd43edf4 | ths | quit |
49 | dd43edf4 | ths | |
50 | dd43edf4 | ths | 4: |
51 | dd43edf4 | ths | move srp,r3 |
52 | dd43edf4 | ths | sub.d 7b,r3 |
53 | dd43edf4 | ths | checkr3 0 |
54 | dd43edf4 | ths | move.d 5f,r3 |
55 | dd43edf4 | ths | jump r3 |
56 | dd43edf4 | ths | .if 1; ..asm.arch.cris.v32 |
57 | dd43edf4 | ths | moveq 0,r3 |
58 | dd43edf4 | ths | .endif |
59 | dd43edf4 | ths | quit |
60 | dd43edf4 | ths | |
61 | dd43edf4 | ths | .space 32770,0 |
62 | dd43edf4 | ths | 1: |
63 | dd43edf4 | ths | test_move_cc 1 1 1 1 |
64 | dd43edf4 | ths | move srp,r3 |
65 | dd43edf4 | ths | sub.d 6b,r3 |
66 | dd43edf4 | ths | checkr3 0 |
67 | dd43edf4 | ths | |
68 | dd43edf4 | ths | clearf cznv |
69 | dd43edf4 | ths | jsr 2b |
70 | dd43edf4 | ths | .if 1; ..asm.arch.cris.v32 |
71 | dd43edf4 | ths | nop |
72 | dd43edf4 | ths | .endif |
73 | dd43edf4 | ths | 3: |
74 | dd43edf4 | ths | |
75 | dd43edf4 | ths | quit |
76 | dd43edf4 | ths | |
77 | dd43edf4 | ths | 5: |
78 | dd43edf4 | ths | move srp,r3 |
79 | dd43edf4 | ths | sub.d 7b,r3 |
80 | dd43edf4 | ths | checkr3 0 |
81 | dd43edf4 | ths | jump 8b |
82 | dd43edf4 | ths | .if 1 ; ..asm.arch.cris.v32 |
83 | dd43edf4 | ths | nop |
84 | dd43edf4 | ths | .endif |
85 | dd43edf4 | ths | quit |