diff options
author | Connor Abbott <cwabbott0@gmail.com> | 2019-03-29 15:08:17 +0100 |
---|---|---|
committer | Connor Abbott <cwabbott0@gmail.com> | 2019-05-31 19:14:27 +0200 |
commit | b87817871b615af960c2d84e35d41b88602c4186 (patch) | |
tree | 519a15d65aada0f193a5bcdbc1adfe2d6b4817df /meson.build | |
parent | 983b001c77c6c9e9aa436c3252fafe34edfe6738 (diff) |
util: Add a helper for faster remainders
This should be at least as fast as using fast_idiv_by_const, and has the
advantage that the precomputation is simple enough to be evaluated at
Mesa-compile time for hash tables and sets which have a fixed table of
possible divisors.
Acked-by: Eric Anholt <eric@anholt.net>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 2cefbb3f204..cd994c73b72 100644 --- a/meson.build +++ b/meson.build @@ -834,6 +834,10 @@ if cc.compiles('int foo(void) __attribute__((__noreturn__));', name : '__attribute__((__noreturn__))') pre_args += '-DHAVE_FUNC_ATTRIBUTE_NORETURN' endif +if cc.compiles('__uint128_t foo(void) { return 0; }', + name : '__uint128_t') + pre_args += '-DHAVE_UINT128' +endif # TODO: this is very incomplete if ['linux', 'cygwin', 'gnu'].contains(host_machine.system()) |