mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-04 03:32:27 +00:00
Make more code aarch64 friendly
This commit is contained in:
parent
ca2860947f
commit
2b73e72d59
568 changed files with 2197 additions and 1061 deletions
|
@ -60,6 +60,7 @@ noasan bool _isutf8(const void *data, size_t size) {
|
|||
p = data;
|
||||
e = p + size;
|
||||
while (p < e) {
|
||||
#ifdef __x86_64__
|
||||
if (!((intptr_t)p & 15)) {
|
||||
for (;;) {
|
||||
if ((m = __builtin_ia32_pmovmskb128(*(xmm_t *)p >= (xmm_t){0}) ^
|
||||
|
@ -75,6 +76,7 @@ noasan bool _isutf8(const void *data, size_t size) {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (LIKELY((c = *p++ & 255) < 0200)) continue;
|
||||
if (UNLIKELY(c < 0300)) return false;
|
||||
switch (kUtf8Dispatch[c - 0300]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue