Advertisement
Garey

Danny Zadachka

Apr 18th, 2019
2,989
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ARM 0.57 KB | None | 0 0
  1. .global getVLQ
  2.  
  3. getVLQ:
  4.         push    {r4, r5, fp}
  5.         add     fp, sp, #8
  6.         mov     r5, #0
  7.         mov     r3, r5
  8.         and     r4, r3, #128
  9.         cmp     r4, #0
  10.         beq     L2
  11.         and     r4, r4, #127
  12. L1:
  13.         lsl     r3, r4, #7
  14.         mov     r2, r5
  15.         add     r3, r3, r2
  16.         and     r4, r3, #127
  17.         lsl     r3, r5, #24
  18.         asr     r3, r3, #24
  19.         cmp     r3, #0
  20.         blt     L1
  21. L2:
  22.         mov     r3, r4
  23.         mov     r0, r3
  24.         sub     sp, fp, #8
  25.         pop     {r4, r5, fp}
  26.         bx      lr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement