xref: /openbmc/qemu/tests/tcg/hexagon/test_cmp.S (revision 2f95279a)
1/* Purpose: test a signed and unsigned comparison */
2
3    .text
4    .globl _start
5
6_start:
7    {
8        jump signed
9    }
10
11    .globl signed
12signed:
13    {
14        r0 = #-2
15        r1 = #0
16    }
17    {
18        p0 = cmp.lt(r0, r1); if (p0.new) jump:t unsigned
19        jump fail
20    }
21
22    .globl unsigned
23unsigned:
24    {
25        r0 = #-2
26        r1 = #0
27    }
28    {
29        p0 = cmp.gtu(r0, r1); if (p0.new) jump:t pass
30        jump fail
31    }
32