aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/hexagon/test_cmp.S
blob: 1db87d3db52712fa939134699c45be33e2e7f3e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* Purpose: test a signed and unsigned comparison */

    .text
    .globl _start

_start:
    {
        jump signed
    }

    .globl signed
signed:
    {
        r0 = #-2
        r1 = #0
    }
    {
        p0 = cmp.lt(r0, r1); if (p0.new) jump:t unsigned
        jump fail
    }

    .globl unsigned
unsigned:
    {
        r0 = #-2
        r1 = #0
    }
    {
        p0 = cmp.gtu(r0, r1); if (p0.new) jump:t pass
        jump fail
    }