<commit_before>namespace factor {

inline cell log2(cell x) {
  cell n;
#if defined(FACTOR_X86)
#if defined(_MSC_VER)
  _BitScanReverse((unsigned long*)&n, x);
#else
  asm("bsr %1, %0;" : "=r"(n) : "r"(x));
#endif

#elif defined(FACTOR_AMD64)
#if defined(_MSC_VER)
  n = 0;
  _BitScanReverse64((unsigned long*)&n, x);
#else
  asm("bsr %1, %0;" : "=r"(n) : "r"(x));
#endif

#elif defined(FACTOR_ARM64)
#if defined(_MSC_VER)
  n = 0;
  _BitScanReverse64((unsigned long*)&n, x);
#else
  asm("bsr %1, %0;" : "=r"(n) : "r"(x));
#endif

#elif defined(FACTOR_PPC64)
#if defined(__GNUC__)
  n = (63 - __builtin_clzll(x));
#else
#error Unsupported compiler
#endif

#elif defined(FACTOR_PPC32)
#if defined(__GNUC__)
  n = (31 - __builtin_clz(x));
#else
#error Unsupported compiler
#endif

#else
#error Unsupported CPU
#endif
  return n;
}<commit_msg>vm: fix log2 for arm64.<commit_after>namespace factor {

inline cell log2(cell x) {
  cell n;
#if defined(FACTOR_X86)
#if defined(_MSC_VER)
  _BitScanReverse((unsigned long*)&n, x);
#else
  asm("bsr %1, %0;" : "=r"(n) : "r"(x));
#endif

#elif defined(FACTOR_AMD64)
#if defined(_MSC_VER)
  n = 0;
  _BitScanReverse64((unsigned long*)&n, x);
#else
  asm("bsr %1, %0;" : "=r"(n) : "r"(x));
#endif

#elif defined(FACTOR_ARM)
#if defined(_MSC_VER)
  _BitScanReverse((unsigned long*)&n, x);
#else
  n = (31 - __builtin_clz(x));
#endif

#elif defined(FACTOR_ARM64)
#if defined(_MSC_VER)
  n = 0;
  _BitScanReverse64((unsigned long*)&n, x);
#else
  n = (63 - __builtin_clzll(x));
#endif

#elif defined(FACTOR_PPC32)
#if defined(__GNUC__)
  n = (31 - __builtin_clz(x));
#else
#error Unsupported compiler
#endif

#elif defined(FACTOR_PPC64)
#if defined(__GNUC__)
  n = (63 - __builtin_clzll(x));
#else
#error Unsupported compiler
#endif

#else
#error Unsupported CPU
#endif
  return n;
}
{'fraction_non_alphanumeric': 0.1794166208035223, 'fraction_numerical': 0.032471106219042374, 'mean_word_length': 5.334494773519164, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7446944', 'n_tokens_mistral': 838, 'n_tokens_neox': 782, 'n_words': 184}