xref: /openbmc/qemu/tests/tcg/hexagon/test_vmaxh.S (revision 2f95279a)
1/*
2 * Purpose: test example, verify the soundness of the vrmaxh operation.
3 *
4 * The maximum between  0x0002000300010005 and 0x0003000200020007 is
5 * 0x0003000300020007.
6 *
7 *      input:  r1 = 0x00010003 r0 = 0x00010005 r3 = 0x00030002 r2 = 0x00020007
8 *     output:  r1 = 0x00030003 r0 = 0x00020007
9 */
10
11    .text
12    .globl _start
13
14_start:
15    {
16        r0 = #65541
17        r1 = #65539
18    }
19    {
20        r2 = #131079
21        r3 = #196610
22    }
23    {
24        r1:0 = vmaxh(r1:0, r3:2)
25    }
26    {
27        p0 = cmp.eq(r0, #131079); if (p0.new) jump:t test2
28        jump fail
29    }
30
31test2:
32    {
33        p0 = cmp.eq(r1, #196611); if (p0.new) jump:t pass
34        jump fail
35    }
36