< prev index next >

src/hotspot/share/utilities/count_trailing_zeros.hpp

Print this page
rev 59103 : imported patch hotspot


  70   return index;
  71 }
  72 
  73 /*****************************************************************************
  74  * IBM XL C/C++
  75  *****************************************************************************/
  76 #elif defined(TARGET_COMPILER_xlc)
  77 
  78 #include <builtins.h>
  79 
  80 inline unsigned count_trailing_zeros(uintx x) {
  81   assert(x != 0, "precondition");
  82 #ifdef _LP64
  83   return __cnttz8(x);
  84 #else
  85   return __cnttz4(x);
  86 #endif
  87 }
  88 
  89 /*****************************************************************************
  90  * Oracle Studio
  91  *****************************************************************************/
  92 #elif defined(TARGET_COMPILER_solstudio)
  93 
  94 // No compiler built-in / intrinsic, so use inline assembler.
  95 
  96 #include "utilities/macros.hpp"
  97 
  98 #include OS_CPU_HEADER(count_trailing_zeros)
  99 
 100 /*****************************************************************************
 101  * Unknown toolchain
 102  *****************************************************************************/
 103 #else
 104 #error Unknown TARGET_COMPILER
 105 
 106 #endif // Toolchain dispatch
 107 
 108 #endif // SHARE_UTILITIES_COUNT_TRAILING_ZEROS_HPP


  70   return index;
  71 }
  72 
  73 /*****************************************************************************
  74  * IBM XL C/C++
  75  *****************************************************************************/
  76 #elif defined(TARGET_COMPILER_xlc)
  77 
  78 #include <builtins.h>
  79 
  80 inline unsigned count_trailing_zeros(uintx x) {
  81   assert(x != 0, "precondition");
  82 #ifdef _LP64
  83   return __cnttz8(x);
  84 #else
  85   return __cnttz4(x);
  86 #endif
  87 }
  88 
  89 /*****************************************************************************











  90  * Unknown toolchain
  91  *****************************************************************************/
  92 #else
  93 #error Unknown TARGET_COMPILER
  94 
  95 #endif // Toolchain dispatch
  96 
  97 #endif // SHARE_UTILITIES_COUNT_TRAILING_ZEROS_HPP
< prev index next >