root / tests / test-arm-iwmmxt.s @ f97572e5
History | View | Annotate | Download (779 Bytes)
1 | 18c9b560 | balrog | @ Checks whether iwMMXt is functional. |
---|---|---|---|
2 | 18c9b560 | balrog | .code 32 |
3 | 18c9b560 | balrog | .globl main |
4 | 18c9b560 | balrog | |
5 | 18c9b560 | balrog | main: |
6 | 18c9b560 | balrog | ldr r0, =data0 |
7 | 18c9b560 | balrog | ldr r1, =data1 |
8 | 18c9b560 | balrog | ldr r2, =data2 |
9 | 18c9b560 | balrog | #ifndef FPA |
10 | 18c9b560 | balrog | wldrd wr0, [r0, #0] |
11 | 18c9b560 | balrog | wldrd wr1, [r0, #8] |
12 | 18c9b560 | balrog | wldrd wr2, [r1, #0] |
13 | 18c9b560 | balrog | wldrd wr3, [r1, #8] |
14 | 18c9b560 | balrog | wsubb wr2, wr2, wr0 |
15 | 18c9b560 | balrog | wsubb wr3, wr3, wr1 |
16 | 18c9b560 | balrog | wldrd wr0, [r2, #0] |
17 | 18c9b560 | balrog | wldrd wr1, [r2, #8] |
18 | 18c9b560 | balrog | waddb wr0, wr0, wr2 |
19 | 18c9b560 | balrog | waddb wr1, wr1, wr3 |
20 | 18c9b560 | balrog | wstrd wr0, [r2, #0] |
21 | 18c9b560 | balrog | wstrd wr1, [r2, #8] |
22 | 18c9b560 | balrog | #else |
23 | 18c9b560 | balrog | ldfe f0, [r0, #0] |
24 | 18c9b560 | balrog | ldfe f1, [r0, #8] |
25 | 18c9b560 | balrog | ldfe f2, [r1, #0] |
26 | 18c9b560 | balrog | ldfe f3, [r1, #8] |
27 | 18c9b560 | balrog | adfdp f2, f2, f0 |
28 | 18c9b560 | balrog | adfdp f3, f3, f1 |
29 | 18c9b560 | balrog | ldfe f0, [r2, #0] |
30 | 18c9b560 | balrog | ldfe f1, [r2, #8] |
31 | 18c9b560 | balrog | adfd f0, f0, f2 |
32 | 18c9b560 | balrog | adfd f1, f1, f3 |
33 | 18c9b560 | balrog | stfe f0, [r2, #0] |
34 | 18c9b560 | balrog | stfe f1, [r2, #8] |
35 | 18c9b560 | balrog | #endif |
36 | 18c9b560 | balrog | mov r0, #1 |
37 | 18c9b560 | balrog | mov r1, r2 |
38 | 18c9b560 | balrog | mov r2, #0x11 |
39 | 18c9b560 | balrog | swi #0x900004 |
40 | 18c9b560 | balrog | mov r0, #0 |
41 | 18c9b560 | balrog | swi #0x900001 |
42 | 18c9b560 | balrog | |
43 | 18c9b560 | balrog | .data |
44 | 18c9b560 | balrog | data0: |
45 | 18c9b560 | balrog | .string "aaaabbbbccccdddd" |
46 | 18c9b560 | balrog | data1: |
47 | 18c9b560 | balrog | .string "bbbbccccddddeeee" |
48 | 18c9b560 | balrog | data2: |
49 | 18c9b560 | balrog | .string "hvLLWs\x1fsdrs9\x1fNJ-\n" |