xref: /openbmc/qemu/tests/tcg/hexagon/test_packet.S (revision 7c08eefc)
1/*
2 * Purpose: test that writes of a register in a packet are performed only after
3 * that packet has finished its execution.
4 */
5
6    .text
7    .globl _start
8
9_start:
10    {
11        allocframe(#8)
12    }
13    {
14        r2 = #4
15        r3 = #6
16    }
17    {
18        memw(sp+#0) = r2
19    }
20    {
21        r3 = memw(sp+#0)
22        r0 = add(r2, r3)
23    }
24    {
25        deallocframe
26        p0 = cmp.eq(r3, #4)
27        p0 = cmp.eq(r0, #10); if (p0.new) jump:t pass
28        jump fail
29    }
30