mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Fix Clang support
The amalgamated release is now confirmed to be working with Clang, including its integrated assembler. Fixes #41
This commit is contained in:
parent
e06c90fafc
commit
d7733579d3
103 changed files with 384 additions and 359 deletions
|
@ -24,7 +24,7 @@
|
|||
/ @param rdi points to nonempty array
|
||||
/ @param rsi is item count divisible by 16
|
||||
/ @note needs avx2 (haswell+)
|
||||
windex$avx2:
|
||||
windex_avx2:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
|
@ -64,7 +64,7 @@ windex$avx2:
|
|||
5: vzeroupper
|
||||
leave
|
||||
ret
|
||||
.endfn windex$avx2,globl
|
||||
.endfn windex_avx2,globl
|
||||
|
||||
.rodata.cst32
|
||||
.Lidx: .short 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "dsp/tty/tty.h"
|
||||
#include "libc/assert.h"
|
||||
|
||||
unsigned windex$k8(short *a, size_t n) {
|
||||
unsigned windex_k8(short *a, size_t n) {
|
||||
unsigned short min, res, i;
|
||||
res = 0;
|
||||
min = a[0];
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
/ @param rdi points to nonempty array
|
||||
/ @param esi is 16-byte aligned 8+ / 8 multiple array item count
|
||||
/ @note needs sse4 (nehalem+)
|
||||
windex$sse4:
|
||||
windex_sse4:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
|
@ -54,7 +54,7 @@ windex$sse4:
|
|||
movzwl -32(%rbp,%rax,2),%eax
|
||||
leave
|
||||
ret
|
||||
.endfn windex$sse4,globl
|
||||
.endfn windex_sse4,globl
|
||||
|
||||
.rodata.cst16
|
||||
.Lidx: .short 0,1,2,3,4,5,6,7
|
||||
|
|
|
@ -27,14 +27,14 @@ windex: .quad 0
|
|||
.previous
|
||||
|
||||
.init.start 300,_init_windex
|
||||
ezlea windex$avx2,ax
|
||||
ezlea windex_avx2,ax
|
||||
#if !X86_NEED(AVX2)
|
||||
ezlea windex$sse4,dx
|
||||
ezlea windex_sse4,dx
|
||||
testb X86_HAVE(AVX2)+kCpuids(%rip)
|
||||
cmovz %rdx,%rax
|
||||
#endif /* AVX2 */
|
||||
#if !X86_NEED(SSE4_2)
|
||||
ezlea windex$k8,dx
|
||||
ezlea windex_k8,dx
|
||||
testb X86_HAVE(SSE4_2)+kCpuids(%rip)
|
||||
cmovz %rdx,%rax
|
||||
#endif /* SSE4 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue