Skip to content

Commit 84e29f7

Browse files
shlyakpavelADKaster
authored andcommitted
Revert "AK: Work around Apple Clang __builtin_subc codegen issue"
This reverts commit 9d4dfc1.
1 parent bb20a0d commit 84e29f7

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

AK/BigIntBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ template<typename WordType>
231231
ALWAYS_INLINE constexpr WordType sub_words(WordType word1, WordType word2, bool& carry)
232232
{
233233
if (!is_constant_evaluated()) {
234-
#if __has_builtin(__builtin_subc) && !defined(AK_BUILTIN_SUBC_BROKEN)
234+
#if __has_builtin(__builtin_subc)
235235
WordType ncarry, output;
236236
if constexpr (SameAs<WordType, unsigned int>)
237237
output = __builtin_subc(word1, word2, carry, reinterpret_cast<unsigned int*>(&ncarry));

AK/Platform.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,6 @@
180180
# define VALIDATE_IS_RISCV64() static_assert(false, "Trying to include riscv64 only header on non riscv64 platform");
181181
#endif
182182

183-
// Apple Clang 14.0.3 (shipped in Xcode 14.3) has a bug that causes __builtin_subc{,l,ll}
184-
// to incorrectly return whether a borrow occurred on AArch64. See our writeup for the Qemu
185-
// issue also caused by it: https://gitlab.com/qemu-project/qemu/-/issues/1659#note_1408275831
186-
#if ARCH(AARCH64) && defined(__apple_build_version__) && __clang_major__ == 14
187-
# define AK_BUILTIN_SUBC_BROKEN
188-
#endif
189-
190183
#ifdef ALWAYS_INLINE
191184
# undef ALWAYS_INLINE
192185
#endif

0 commit comments

Comments
 (0)