Tags: X86 ARM MIPS ARM64 ASM L1 .
What does this code do?
_a$ = 8
_f PROC
mov ecx, DWORD PTR _a$[esp-4]
lea eax, DWORD PTR [ecx*8]
sub eax, ecx
ret 0
_f ENDP
f PROC
RSB r0,r0,r0,LSL #3
BX lr
ENDP
f PROC
LSLS r1,r0,#3
SUBS r0,r1,r0
BX lr
ENDP
f:
lsl w1, w0, 3
sub w0, w1, w0
ret
f:
sll $v0, $a0, 3
jr $ra
subu $v0, $a0
More challenges: challenges.re; about solutions: challenges.re/#Solutions.