Skip to content

Commit 346785c

Browse files
committed
benchmark: disable 128-bit math on Windows
Windows does not support 128-bit division, disable the support for now. One option is to statically link compiler-rt to provide `__udivti3`.
1 parent 766d647 commit 346785c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/benchmark.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ _dispatch_benchmark_init(void *context)
4141
register size_t cnt = bdata->count;
4242
size_t i = 0;
4343
uint64_t start, delta;
44-
#if DISPATCH_SIZEOF_PTR == 8
44+
#if DISPATCH_SIZEOF_PTR == 8 && !defined(_WIN32)
4545
__uint128_t lcost;
4646
#else
4747
long double lcost;
@@ -93,7 +93,7 @@ dispatch_benchmark_f(size_t count, register void *ctxt,
9393
};
9494
static dispatch_once_t pred;
9595
uint64_t ns, start, delta;
96-
#if DISPATCH_SIZEOF_PTR == 8
96+
#if DISPATCH_SIZEOF_PTR == 8 && !defined(_WIN32)
9797
__uint128_t conversion, big_denom;
9898
#else
9999
long double conversion, big_denom;

0 commit comments

Comments
 (0)