example/nested_paging/x64/intel/arch_support.hpp
[[nodiscard]] constexpr auto
    mask_enabled_and_disabled(bsl::safe_umx const &val) noexcept -> bsl::safe_u32
    {
        constexpr bsl::safe_umx ctls_mask{bsl::to_umx(0x00000000FFFFFFFFU)};
        constexpr bsl::safe_umx ctls_shift{bsl::to_umx(32)};
        return bsl::to_u32_unsafe((val & ctls_mask) & (val >> ctls_shift));
    }
/// <!-- description -->
///   @brief Returns the controls as their masked versions using the
///     conversion rules defined in the Intel Manual for determining
///     which controls must be enabled, and which controls are not
///     allowed to be enabled.
///
/// <!-- inputs/outputs -->
///   @param val the control to mask
///   @return Returns the masked version of the control
///

@brief Returns the controls as their masked versions using the
conversion rules defined in the Intel Manual for determining
which controls must be enabled, and which controls are not
allowed to be enabled.


@param val the control to mask
@return Returns the masked version of the control
@brief Returns the controls as their masked versions using the conversion rules defined in the Intel Manual for determining which controls must be enabled and which controls are not allowed to be enabled . @param val the control to mask @return Returns the masked version of the control
[[nodiscard]] constexpr auto
    mask_enabled_and_disabled(bsl::safe_umx const &val) noexcept -> bsl::safe_u32
    {
        constexpr bsl::safe_umx ctls_mask{bsl::to_umx(0x00000000FFFFFFFFU)};
        constexpr bsl::safe_umx ctls_shift{bsl::to_umx(32)};
        return bsl::to_u32_unsafe((val & ctls_mask) & (val >> ctls_shift));
    }
[[ nodiscard ]] constexpr auto mask_enabled_and_disabled ( bsl :: safe_umx const & val ) noexcept -> bsl :: safe_u32 { constexpr bsl :: safe_umx ctls_mask { bsl :: to_umx ( 0x00000000FFFFFFFFU ) } ; constexpr bsl :: safe_umx ctls_shift { bsl :: to_umx ( 32 ) } ; return bsl :: to_u32_unsafe ( ( val & ctls_mask ) & ( val >> ctls_shift ) ) ; }
<!-- description -->
@brief Returns the controls as their masked versions using the
conversion rules defined in the Intel Manual for determining
which controls must be enabled, and which controls are not
allowed to be enabled.
<! -- description -- > @brief Returns the controls as their masked versions using the conversion rules defined in the Intel Manual for determining which controls must be enabled and which controls are not allowed to be enabled .