mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-11 21:49:12 +00:00
Make improvements
This commit is contained in:
parent
3e4fd4b0ad
commit
e44a0cf6f8
256 changed files with 23100 additions and 2294 deletions
|
@ -44,6 +44,8 @@
|
|||
#include "libc/intrin/pcmpgtb.h"
|
||||
#include "libc/intrin/pcmpgtd.h"
|
||||
#include "libc/intrin/pcmpgtw.h"
|
||||
#include "libc/intrin/pdep.h"
|
||||
#include "libc/intrin/pext.h"
|
||||
#include "libc/intrin/phaddd.h"
|
||||
#include "libc/intrin/phaddsw.h"
|
||||
#include "libc/intrin/phaddw.h"
|
||||
|
@ -101,7 +103,7 @@
|
|||
#include "libc/limits.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/nexgen32e/kcpuids.h"
|
||||
#include "libc/rand/lcg.h"
|
||||
#include "libc/rand/lcg.internal.h"
|
||||
#include "libc/rand/rand.h"
|
||||
#include "libc/runtime/gc.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
|
@ -2062,6 +2064,26 @@ TEST(pcmpeqw, test2) {
|
|||
}
|
||||
}
|
||||
|
||||
TEST(pdep, fuzz) {
|
||||
int i;
|
||||
uint64_t x, y;
|
||||
for (i = 0; i < 1000; ++i) {
|
||||
x = rand64();
|
||||
y = rand64();
|
||||
ASSERT_EQ(pdep(x, y), (pdep)(x, y));
|
||||
}
|
||||
}
|
||||
|
||||
TEST(pext, fuzz) {
|
||||
int i;
|
||||
uint64_t x, y;
|
||||
for (i = 0; i < 1000; ++i) {
|
||||
x = rand64();
|
||||
y = rand64();
|
||||
ASSERT_EQ(pext(x, y), (pext)(x, y));
|
||||
}
|
||||
}
|
||||
|
||||
BENCH(psrldq, bench) {
|
||||
volatile uint8_t A[16];
|
||||
volatile uint8_t B[16];
|
||||
|
|
|
@ -30,6 +30,7 @@ TEST_LIBC_INTRIN_DIRECTDEPS = \
|
|||
LIBC_RAND \
|
||||
LIBC_LOG \
|
||||
LIBC_STUBS \
|
||||
LIBC_STR \
|
||||
LIBC_TESTLIB \
|
||||
LIBC_TINYMATH \
|
||||
LIBC_RUNTIME \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue