aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/xtensa/test_flix.S
blob: 7c259e7018977951dcca77944eeee35a21b4db88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include "macros.inc"

test_suite flix

#if XCHAL_HAVE_FLIX3

test misc
    {
        mov     a3, a4
        mov     a2, a3
        nop
    }
    {
        nop
        bne.w18 a2, a3, 1f
    }
    movi    a2, 1f
    {
        mov     a2, a3
        mov     a3, a2
        nop
    }
    {
        l32i    a2, a3, 0
        add     a4, a4, a2
        nop
    }
    {
        mov     a3, a4
        jx      a3
        nop
    }
1:
test_end

test sum

    movi    a2, 0
    movi    a3, 2f
    movi    a4, 0
    movi    a5, 4

    loop    a5, 1f
    {
        l32i    a2, a3, 0
        addi    a3, a3, 4
        add     a4, a4, a2
    }
1:
    add     a4, a4, a2
    assert  eqi, a4, 10
    .data
2:
    .word   1, 2, 3, 4
    .previous
test_end

#endif

test_suite_end