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>
30 lines
549 B
ArmAsm
30 lines
549 B
ArmAsm
/*
|
|
* Purpose: demonstrate the succesful operation of the register save mechanism,
|
|
* in which the caller saves the registers that will be clobbered, and restores
|
|
* them after the call.
|
|
*/
|
|
|
|
.text
|
|
.globl _start
|
|
|
|
_start:
|
|
allocframe(#8)
|
|
{
|
|
r16 = #47
|
|
r17 = #155
|
|
}
|
|
memd(sp+#0) = r17:16
|
|
{
|
|
r16 = #255
|
|
r17 = #42
|
|
}
|
|
{
|
|
deallocframe
|
|
r17:16 = memd(sp+#0)
|
|
}
|
|
{
|
|
p0 = cmp.eq(r16, #47)
|
|
p0 = cmp.eq(r17, #155); if (p0.new) jump:t pass
|
|
jump fail
|
|
}
|