mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 11:18:30 +00:00
Work on magic numbers for aarch64
This commit is contained in:
parent
59766efd3e
commit
5a455eaa0b
2070 changed files with 4567 additions and 4200 deletions
|
@ -39,13 +39,13 @@ typedef long long v2di __attribute__((__vector_size__(16), __aligned__(1)));
|
|||
void *GetZipCdir(const uint8_t *p, size_t n) {
|
||||
v2di x;
|
||||
size_t i, j;
|
||||
v8hi pk = {READ16LE("PK"), READ16LE("PK"), READ16LE("PK"), READ16LE("PK"),
|
||||
READ16LE("PK"), READ16LE("PK"), READ16LE("PK"), READ16LE("PK")};
|
||||
uint32_t magic;
|
||||
i = n - 4;
|
||||
asm("" : "+x"(pk));
|
||||
do {
|
||||
#ifdef __x86_64__
|
||||
v8hi pk = {READ16LE("PK"), READ16LE("PK"), READ16LE("PK"), READ16LE("PK"),
|
||||
READ16LE("PK"), READ16LE("PK"), READ16LE("PK"), READ16LE("PK")};
|
||||
asm("" : "+x"(pk));
|
||||
if (i >= 14) {
|
||||
x = *(const v2di *)(p + i - 14);
|
||||
if (!(__builtin_ia32_pmovmskb128(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue