Commit | Line | Data |
---|---|---|
27c634e0 FN |
1 | .text |
2 | ||
3 | .ent test_mfix_r5900 | |
4 | test_mfix_r5900: | |
5 | # Test the short loop fix with 3 loop instructions. | |
6 | li $3, 300 | |
7 | short_loop3: | |
8 | addi $3, -1 | |
9 | addi $4, -1 | |
10 | # A NOP will be inserted in the branch delay slot. | |
11 | bne $3, $0, short_loop3 | |
12 | ||
13 | # Test the short loop fix with 6 loop instructions. | |
14 | li $3, 300 | |
15 | short_loop6: | |
16 | addi $3, -1 | |
17 | addi $4, -1 | |
18 | addi $5, -1 | |
19 | addi $6, -1 | |
20 | addi $7, -1 | |
21 | # A NOP will be inserted in the branch delay slot. | |
22 | bne $3, $0, short_loop6 | |
23 | ||
24 | # Test the short loop fix with 7 loop instructions. | |
25 | li $3, 300 | |
26 | short_loop7: | |
27 | addi $3, -1 | |
28 | addi $4, -1 | |
29 | addi $5, -1 | |
30 | addi $6, -1 | |
31 | addi $7, -1 | |
32 | addi $8, -1 | |
33 | # The short loop fix does not apply for loops with | |
34 | # more than 6 instructions. | |
35 | bne $3, $0, short_loop7 | |
36 | ||
37 | li $4, 3 | |
38 | ||
39 | .space 8 | |
40 | .end test_mfix_r5900 |