diff --git a/libraries/libmesosphere/include/mesosphere/kern_select_cpu.hpp b/libraries/libmesosphere/include/mesosphere/kern_select_cpu.hpp index 55e030bdb..58945e6f2 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_select_cpu.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_select_cpu.hpp @@ -70,7 +70,7 @@ namespace ams::kern { static constexpr inline u64 ConvertVirtualCoreMaskToPhysical(u64 v_core_mask) { u64 p_core_mask = 0; while (v_core_mask != 0) { - const u64 next = __builtin_ctzll(v_core_mask); + const u64 next = util::CountTrailingZeros(v_core_mask); v_core_mask &= ~(static_cast(1) << next); p_core_mask |= (static_cast(1) << cpu::VirtualToPhysicalCoreMap[next]); }