Advertisement
Guest User

ffs.s diff

a guest
Aug 7th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. diff --git a/firmware/asm/arm/ffs.S b/firmware/asm/arm/ffs.S
  2. index 4e912c5..3bc73f6 100644
  3. --- a/firmware/asm/arm/ffs.S
  4. +++ b/firmware/asm/arm/ffs.S
  5. @@ -32,6 +32,11 @@
  6. * 31 - bit 31 is set
  7. * 32 - no bits set
  8. ****************************************************************************/
  9. +#if (ARCH_PROFILE == arch_profile_m)
  10. + .syntax unified
  11. + .thumb
  12. +#endif //(ARCH_PROFILE == arch_profile_m)
  13. +
  14. .align 2
  15. .global find_first_set_bit
  16. .type find_first_set_bit,%function
  17. @@ -44,6 +49,9 @@ find_first_set_bit:
  18.  
  19. #if ARM_ARCH >= 5
  20. clz r0, r1 @ Get lead 0's count
  21. +#if (ARCH_PROFILE == arch_profile_m)
  22. + it ne
  23. +#endif //(ARCH_PROFILE == arch_profile_m)
  24. rsbne r0, r0, #31 @ lead 0's -> bit index
  25. bx lr @
  26. #else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement