[libcxx-commits] [PATCH] D118930: [SystemZ]:[z/OS]:[libcxx]: fix the mask in stage2_float_loop function

Muiez Ahmed via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 18 12:57:12 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG8266eefd91da: [SystemZ][z/OS][libcxx]: fix the mask in stage2_float_loop function (authored by NancyWang2222, committed by muiez).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118930/new/

https://reviews.llvm.org/D118930

Files:
  libcxx/include/locale


Index: libcxx/include/locale
===================================================================
--- libcxx/include/locale
+++ libcxx/include/locale
@@ -553,7 +553,7 @@
     char __x = __src[__f];
     if (__x == '-' || __x == '+')
     {
-        if (__a_end == __a || (__a_end[-1] & 0x5F) == (__exp & 0x7F))
+        if (__a_end == __a || (std::toupper(__a_end[-1]) == std::toupper(__exp)))
         {
             *__a_end++ = __x;
             return 0;
@@ -562,9 +562,9 @@
     }
     if (__x == 'x' || __x == 'X')
         __exp = 'P';
-    else if ((__x & 0x5F) == __exp)
+    else if (std::toupper(__x) == __exp)
     {
-        __exp |= (char) 0x80;
+        __exp = std::tolower(__exp);
         if (__in_units)
         {
             __in_units = false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118930.468672.patch
Type: text/x-patch
Size: 766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221018/1cc6ba83/attachment.bin>


More information about the libcxx-commits mailing list