[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:38 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: None (W-50243)
<details>
<summary>Changes</summary>
'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.
---
Full diff: https://github.com/llvm/llvm-project/pull/73200.diff
1 Files Affected:
- (modified) libcxx/include/__locale (+1-1)
``````````diff
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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/73200
More information about the libcxx-commits
mailing list