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:
parent
bb20a0d8f8
commit
84e29f791c
Notes:
github-actions[bot]
2025-04-23 04:32:29 +00:00
Author: https://github.com/shlyakpavel
Commit: 84e29f791c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2896
Reviewed-by: https://github.com/BertalanD ✅
2 changed files with 1 additions and 8 deletions
|
@ -231,7 +231,7 @@ template<typename WordType>
|
||||||
ALWAYS_INLINE constexpr WordType sub_words(WordType word1, WordType word2, bool& carry)
|
ALWAYS_INLINE constexpr WordType sub_words(WordType word1, WordType word2, bool& carry)
|
||||||
{
|
{
|
||||||
if (!is_constant_evaluated()) {
|
if (!is_constant_evaluated()) {
|
||||||
#if __has_builtin(__builtin_subc) && !defined(AK_BUILTIN_SUBC_BROKEN)
|
#if __has_builtin(__builtin_subc)
|
||||||
WordType ncarry, output;
|
WordType ncarry, output;
|
||||||
if constexpr (SameAs<WordType, unsigned int>)
|
if constexpr (SameAs<WordType, unsigned int>)
|
||||||
output = __builtin_subc(word1, word2, carry, reinterpret_cast<unsigned int*>(&ncarry));
|
output = __builtin_subc(word1, word2, carry, reinterpret_cast<unsigned int*>(&ncarry));
|
||||||
|
|
|
@ -180,13 +180,6 @@
|
||||||
# define VALIDATE_IS_RISCV64() static_assert(false, "Trying to include riscv64 only header on non riscv64 platform");
|
# define VALIDATE_IS_RISCV64() static_assert(false, "Trying to include riscv64 only header on non riscv64 platform");
|
||||||
#endif
|
#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
|
#ifdef ALWAYS_INLINE
|
||||||
# undef ALWAYS_INLINE
|
# undef ALWAYS_INLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue