Explicit binary op order for both gcc and clang/llvm.
* gcc assembler parses (1 << n - 1) as ((1 << n) - 1)
* llvm assembler parses (1 << n - 1) as (1 << (n - 1))
BUG: 26289334
Change-Id: Iaaa3d07f59c0f87cb1b80b9a1c4e765b66846791
diff --git a/libc/arch-x86/atom/string/sse2-wcsrchr-atom.S b/libc/arch-x86/atom/string/sse2-wcsrchr-atom.S
index e30779d..1a55df2 100644
--- a/libc/arch-x86/atom/string/sse2-wcsrchr-atom.S
+++ b/libc/arch-x86/atom/string/sse2-wcsrchr-atom.S
@@ -280,7 +280,7 @@
.p2align 4
L(find_zero_in_second_wchar):
- and $1 << 5 - 1, %eax
+ and $(1 << 5) - 1, %eax
jz L(return_value)
POP (%esi)
@@ -296,7 +296,7 @@
L(find_zero_in_third_or_fourth_wchar):
test $15, %ch
jz L(find_zero_in_fourth_wchar)
- and $1 << 9 - 1, %eax
+ and $(1 << 9) - 1, %eax
jz L(return_value)
POP (%esi)
@@ -368,7 +368,7 @@
.p2align 4
L(prolog_find_zero_in_second_wchar):
- and $1 << 5 - 1, %eax
+ and $(1 << 5) - 1, %eax
jz L(return_null)
test $15 << 4, %al
@@ -380,7 +380,7 @@
L(prolog_find_zero_in_third_or_fourth_wchar):
test $15, %ch
jz L(prolog_find_zero_in_fourth_wchar)
- and $1 << 9 - 1, %eax
+ and $(1 << 9) - 1, %eax
jz L(return_null)
test %ah, %ah