1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00

Revert "AK: Work around Apple Clang __builtin_subc codegen issue"

This reverts commit 9d4dfc1061.
This commit is contained in:
Pavel Shliak 2024-12-13 14:24:20 +04:00 committed by Andrew Kaster
parent bb20a0d8f8
commit 84e29f791c
Notes: github-actions[bot] 2025-04-23 04:32:29 +00:00
2 changed files with 1 additions and 8 deletions

View file

@ -231,7 +231,7 @@ template<typename WordType>
ALWAYS_INLINE constexpr WordType sub_words(WordType word1, WordType word2, bool& carry)
{
if (!is_constant_evaluated()) {
#if __has_builtin(__builtin_subc) && !defined(AK_BUILTIN_SUBC_BROKEN)
#if __has_builtin(__builtin_subc)
WordType ncarry, output;
if constexpr (SameAs<WordType, unsigned int>)
output = __builtin_subc(word1, word2, carry, reinterpret_cast<unsigned int*>(&ncarry));

View file

@ -180,13 +180,6 @@
# define VALIDATE_IS_RISCV64() static_assert(false, "Trying to include riscv64 only header on non riscv64 platform");
#endif
// Apple Clang 14.0.3 (shipped in Xcode 14.3) has a bug that causes __builtin_subc{,l,ll}
// to incorrectly return whether a borrow occurred on AArch64. See our writeup for the Qemu
// issue also caused by it: https://gitlab.com/qemu-project/qemu/-/issues/1659#note_1408275831
#if ARCH(AARCH64) && defined(__apple_build_version__) && __clang_major__ == 14
# define AK_BUILTIN_SUBC_BROKEN
#endif
#ifdef ALWAYS_INLINE
# undef ALWAYS_INLINE
#endif