Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__emulu() is not available on arm #927

Closed
liubing opened this issue Aug 11, 2023 · 3 comments · Fixed by #928
Closed

__emulu() is not available on arm #927

liubing opened this issue Aug 11, 2023 · 3 comments · Fixed by #928

Comments

@liubing
Copy link

liubing commented Aug 11, 2023

Version of Boost

boost 1.83beta

Steps necessary to reproduce the problem

Compile the library on arm64 / windows platform.

All relevant compiler information

Error message:

D:\Projects\pts\pts\include\boost\json\detail\charconv\detail\emulated128.hpp(62): error C3861: '__emulu': identifier not found

It can be fixed changing

static inline std::uint64_t umul64(std::uint32_t x, std::uint32_t y) noexcept
{
#if defined(BOOST_JSON_HAS_MSVC_32BIT_INTRINSICS)
    return __emulu(x, y);
#else
    return x * static_cast<std::uint64_t>(y);
#endif
}

to

static inline std::uint64_t umul64(std::uint32_t x, std::uint32_t y) noexcept
{
#if defined(BOOST_JSON_HAS_MSVC_32BIT_INTRINSICS) && !defined(_M_ARM)
    return __emulu(x, y);
#else
    return x * static_cast<std::uint64_t>(y);
#endif
}
@liubing
Copy link
Author

liubing commented Aug 16, 2023

#928 doesn't really fix this problem. It should be

#if defined(BOOST_JSON_HAS_MSVC_32BIT_INTRINSICS) && !defined(_M_ARM)

not

#if defined(BOOST_JSON_HAS_MSVC_32BIT_INTRINSICS) && !defined(_M_ARM64)

@mborland
Copy link
Member

That's my mistake. The PR has been updated.

@liubing
Copy link
Author

liubing commented Aug 17, 2023

Thank you.

@liubing liubing closed this as completed Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants