.text
.global _start
_start:
mov r1,#1
mov r2,#2
cmp r1, r2
bgt branch1
add r3,r1,r2
b end
branch1:
sub r3,r1,r2
end:
nop
C 语言:
if(a>b)
a = a- b
else
a = a +b
.text
.global _start
_start:
mov r1,#1
mov r2,#2
cmp r1, r2
bgt branch1
add r3,r1,r2
b end
branch1:
sub r3,r1,r2
end:
nop
C 语言:
if(a>b)
a = a- b
else
a = a +b