xref: /openbmc/qemu/tests/tcg/hexagon/test_vavgw.S (revision c79aa350)
1/*
2 * Purpose: test example, verify the soundness of the vavgw operation.
3 *
4 * 0x00030001 averaged with 0x00010003 results 0x00020002.
5 */
6
7    .text
8    .globl _start
9
10_start:
11    {
12        r0 = #3
13        r1 = #1
14    }
15    {
16        r2 = #1
17        r3 = #3
18    }
19    {
20        r1:0 = vavgw(r1:0, r3:2):crnd
21    }
22    {
23        p0 = cmp.eq(r0, #2); if (p0.new) jump:t test2
24        jump fail
25    }
26
27test2:
28    {
29        p0 = cmp.eq(r1, #2); if (p0.new) jump:t pass
30        jump fail
31    }
32