xref: /qemu/tests/tcg/hexagon/test_reorder.S (revision 29b62a10)
1/*
2 * Purpose: demonstrate handling of .new uses appearing before the associated
3 * definition.
4 * Here we perform a jump that skips the code resetting R2 from 0xDEADBEEF to 0,
5 * only if P0.new is true, but P0 is assigned to 1 (R4) in the next instruction
6 * in the packet.
7 */
8
9    .text
10    .globl _start
11
12_start:
13    {
14        r2 = #-559038737
15    }
16    {
17        r4 = #1
18    }
19    {
20        if (p0.new) jump:nt skip
21        p0 = r4;
22    }
23
24fallthrough:
25    {
26        r2 = #0
27    }
28
29skip:
30    {
31        p0 = cmp.eq(r2, #-559038737); if (p0.new) jump:t pass
32        jump fail
33    }
34