mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-27 13:00:28 +00:00
Reduce build latency and fix old cpu bugs
This commit is contained in:
parent
df8ab0aa0c
commit
533f3d1ef1
69 changed files with 43069 additions and 43683 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
3741
test/libc/xed/x86ild_popular_i86_2_test.c
Normal file
3741
test/libc/xed/x86ild_popular_i86_2_test.c
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue