aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/hexagon/test_packet.S
blob: 9ec9d8d6fb73412ec5518fca219bc62382fc7bc4 (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
/*
 * Purpose: test that writes of a register in a packet are performed only after
 * that packet has finished its execution.
 */

    .text
    .globl _start

_start:
    {
        allocframe(#8)
    }
    {
        r2 = #4
        r3 = #6
    }
    {
        memw(sp+#0) = r2
    }
    {
        r3 = memw(sp+#0)
        r0 = add(r2, r3)
    }
    {
        deallocframe
        p0 = cmp.eq(r3, #4)
        p0 = cmp.eq(r0, #10); if (p0.new) jump:t pass
        jump fail
    }