Reduce build latency and fix old cpu bugs

This commit is contained in:
Justine Tunney 2021-08-05 14:43:53 -07:00
parent df8ab0aa0c
commit 533f3d1ef1
69 changed files with 43069 additions and 43683 deletions

View file

@ -172,13 +172,12 @@ void *MemCpy(void *, const void *, size_t);
free(s); \
} while (0)
#define BB(N) \
do { \
B(memmove_pure, N); \
B(memcpy, N); \
B(MemCpy, N); \
(fprintf)(stderr, "\n"); \
} while (0)
void BB(size_t N) {
B(memmove_pure, N);
B(memcpy, N);
B(MemCpy, N);
(fprintf)(stderr, "\n");
}
BENCH(memcpy, bench) {
BB(0);

View file

@ -20,10 +20,6 @@
#include "test/libc/xed/lib.h"
#include "third_party/xed/x86.h"
/**
* @fileoverview GCC's popular i186+ instruction w/ NexGen32e encoding.
*/
TEST(x86ild, test_C0E800) {
/*
ICLASS: SHR

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -678,6 +678,7 @@ BENCH(inv_mod, bench3) {
}
TEST(ShiftRightAvx, test1) {
if (!X86_HAVE(AVX)) return;
int i;
for (i = 0; i < 10; ++i) {
uint64_t mem[1] = {rand64()};
@ -692,6 +693,7 @@ TEST(ShiftRightAvx, test1) {
}
TEST(ShiftRightAvx, test2) {
if (!X86_HAVE(AVX)) return;
int i;
for (i = 0; i < 10; ++i) {
uint64_t mem[2] = {rand64(), rand64()};
@ -707,6 +709,7 @@ TEST(ShiftRightAvx, test2) {
}
TEST(ShiftRightAvx, test3) {
if (!X86_HAVE(AVX)) return;
int i;
for (i = 0; i < 10; ++i) {
uint64_t mem[3] = {rand64(), rand64(), rand64()};
@ -723,6 +726,7 @@ TEST(ShiftRightAvx, test3) {
}
TEST(ShiftRightAvx, test4) {
if (!X86_HAVE(AVX)) return;
int i;
for (i = 0; i < 10; ++i) {
uint64_t mem[4] = {rand64(), rand64(), rand64(), rand64()};
@ -740,6 +744,7 @@ TEST(ShiftRightAvx, test4) {
}
TEST(ShiftRightAvx, test8) {
if (!X86_HAVE(AVX)) return;
int i;
for (i = 0; i < 10; ++i) {
uint64_t mem[8] = {rand64(), rand64(), rand64(), rand64(),
@ -762,6 +767,7 @@ TEST(ShiftRightAvx, test8) {
}
TEST(ShiftRightAvx, test9) {
if (!X86_HAVE(AVX)) return;
int i;
for (i = 0; i < 10; ++i) {
uint64_t mem[9] = {rand64(), rand64(), rand64(), rand64(), rand64(),
@ -780,6 +786,7 @@ TEST(ShiftRightAvx, test9) {
}
BENCH(ShiftRight, bench) {
if (!X86_HAVE(AVX)) return;
uint64_t x[64];
rngset(x, sizeof(x), rand64, -1);
EZBENCH2("ShiftRight", donothing, ShiftRight(x, 64, 1));