[libcxx-commits] [libcxx] [FIX] Fix the function isctype failed in arm64-big-endian (PR #73200)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 22 19:07:09 PST 2023
https://github.com/W-50243 created https://github.com/llvm/llvm-project/pull/73200
'isctype' failes in arm64-big-endian, this is because the __regex_word involved in the type mask operation is not changed based on big-endian or little-endian, while the character mask that participates in the budget changes accordingly.
>From eef5709f3776e491687c379f3be8e51763c61391 Mon Sep 17 00:00:00 2001
From: W-50243 <wanghao636 at huawei.com>
Date: Thu, 23 Nov 2023 11:02:24 +0800
Subject: [PATCH] [FIX] Fix the function isctype failed in arm64-big-endian
---
libcxx/include/__locale | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/include/__locale b/libcxx/include/__locale
index b1502dd71edadf6..ef56135f2f1d45e 100644
--- a/libcxx/include/__locale
+++ b/libcxx/include/__locale
@@ -384,7 +384,7 @@ public:
static const mask punct = _ISpunct;
static const mask xdigit = _ISxdigit;
static const mask blank = _ISblank;
-#if defined(__mips__)
+#if defined(__mips__) || (BYTE_ORDER == BIG_ENDIAN)
static const mask __regex_word = static_cast<mask>(_ISbit(15));
#else
static const mask __regex_word = 0x80;
More information about the libcxx-commits
mailing list