aboutsummaryrefslogtreecommitdiffstats
path: root/libc/bionic/wctype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/bionic/wctype.cpp')
-rw-r--r--libc/bionic/wctype.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/bionic/wctype.cpp b/libc/bionic/wctype.cpp
index 061f55a90..082dadaf4 100644
--- a/libc/bionic/wctype.cpp
+++ b/libc/bionic/wctype.cpp
@@ -129,7 +129,9 @@ wint_t towlower(wint_t wc) {
wint_t towupper(wint_t wc) {
if (wc < 0x80) {
- if (wc >= 'a' && wc <= 'z') return wc & 0xdf;
+ // Using EOR rather than AND makes no difference on arm, but saves an
+ // instruction on arm64.
+ if (wc >= 'a' && wc <= 'z') return wc ^ 0x20;
return wc;
}