[libcxx-commits] [clang] [llvm] [libcxx] [clang-tools-extra] [FIX] Fix the function isctype failed in arm64-big-endian (PR #73200)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 7 00:42:55 PST 2023


================
@@ -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)
----------------
W-50243 wrote:

Yes, that's it. Getting the character mask on arm64be and arm64le will run this function`_LIBCPP_GET_C_LOCALE->__ctype_b`. The character mask obtained from this is dependent on the endianness of current platform. For example,  "-', it's character mask is 0000010011000000 on arm64e while on arm64le is 1100000000000100

https://github.com/llvm/llvm-project/pull/73200


More information about the libcxx-commits mailing list