mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Initial import
This commit is contained in:
commit
c91b3c5006
14915 changed files with 590219 additions and 0 deletions
23
libc/intrin/psraw.h
Normal file
23
libc/intrin/psraw.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_INTRIN_PSRAW_H_
|
||||
#define COSMOPOLITAN_LIBC_INTRIN_PSRAW_H_
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/intrin/macros.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
/**
|
||||
* Divides shorts by two power.
|
||||
*
|
||||
* @note c needs to be a literal, asmconstexpr, or linkconstsym
|
||||
* @mayalias
|
||||
*/
|
||||
static void psraw(short a[8], const short b[8], char c) {
|
||||
int i;
|
||||
for (i = 0; i < 8; ++i) {
|
||||
a[i] = SAR(b[i], c);
|
||||
}
|
||||
}
|
||||
|
||||
#define psraw(A, B, I) INTRIN_SSEVEX_X_X_I_(psraw, SSE2, "psraw", A, B, I)
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_INTRIN_PSRAW_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue