Skip to content

Commit

Permalink
Switch to optimized ffsl supported on more platforms
Browse files Browse the repository at this point in the history
In file included from Source/GmmLib/TranslationTable/GmmAuxTable.cpp:30:
Source/GmmLib/TranslationTable/../TranslationTable/GmmUmdTranslationTable.h: In function ‘int _BitScanForward(uint32_t*, uint32_t)’:
Source/GmmLib/TranslationTable/../TranslationTable/GmmUmdTranslationTable.h:63:9: error: ‘ffsl’ was not declared in this scope
     i = ffsl(mask);
         ^~~~
Source/GmmLib/TranslationTable/../TranslationTable/GmmUmdTranslationTable.h:63:9: note: suggested alternative: ‘ffs’
     i = ffsl(mask);
         ^~~~
         ffs
  • Loading branch information
jbeich committed May 23, 2020
1 parent 3583357 commit edd48cc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Source/GmmLib/TranslationTable/GmmUmdTranslationTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ static inline int _BitScanForward(uint32_t *index, uint32_t mask)
{
int i;

#ifdef __ANDROID__
i = ffs(mask);
#else
i = ffsl(mask);
#endif

i = __builtin_ffsl(mask);
if(i > 0)
{
*index = (uint32_t)(i - 1);
Expand Down

0 comments on commit edd48cc

Please sign in to comment.