Files
linux-kernel-module-cheat/userland/arch/arm/cond.S
Ciro Santilli 六四事件 法轮功 64855767b4 arm assembly: move some more in
2019-05-12 00:00:06 +00:00

17 lines
347 B
ArmAsm

/* https://github.com/cirosantilli/linux-kernel-module-cheat#conditional-execution */
#include "common.h"
ENTRY
mov r0, 0
mov r1, 1
cmp r0, 1
/* Previous cmp failed, skip this operation. */
addeq r1, 1
ASSERT_EQ(r1, 1)
cmp r0, 0
/* Previous passed, do this operation. */
addeq r1, 1
ASSERT_EQ(r1, 2)
EXIT