qemu/tests/tcg/hexagon/test_reorder.S
Niccolò Izzo 585a86b104 target/hexagon: import additional tests
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>
2022-12-16 12:30:28 -08:00

34 lines
585 B
ArmAsm

/*
* Purpose: demonstrate handling of .new uses appearing before the associated
* definition.
* Here we perform a jump that skips the code resetting R2 from 0xDEADBEEF to 0,
* only if P0.new is true, but P0 is assigned to 1 (R4) in the next instruction
* in the packet.
*/
.text
.globl _start
_start:
{
r2 = #-559038737
}
{
r4 = #1
}
{
if (p0.new) jump:nt skip
p0 = r4;
}
fallthrough:
{
r2 = #0
}
skip:
{
p0 = cmp.eq(r2, #-559038737); if (p0.new) jump:t pass
jump fail
}