585a86b104
Signed-off-by: Alessandro Di Federico <ale@rev.ng> Signed-off-by: Niccolò Izzo <nizzo@rev.ng> Signed-off-by: Anton Johansson <anjo@rev.ng> Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Reviewed-by: Taylor Simpson <tsimpson@quicinc.com> Message-Id: <20220923173831.227551-12-anjo@rev.ng>
32 lines
442 B
ArmAsm
32 lines
442 B
ArmAsm
/* 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
|
|
}
|