Commit Graph

6 Commits

Author SHA1 Message Date
Peter Huene
9f506692c2 Fix clippy warnings.
This commit fixes the current set of (stable) clippy warnings in the repo.
2019-10-24 17:20:12 -07:00
Joshua Nelson
a1f6457e8a Allow building without std (#1069)
Closes https://github.com/CraneStation/cranelift/issues/1067
2019-09-26 18:00:03 +02:00
Julian Seward
91ec44acbf Add extensive test cases for integer division-by-constant magic number generation.
This adds test cases to ensure, to a reasonably high degree of certainty, that
the magic-number generators `magic_u32`, `magic_s32`, `magic_u64` and
`magic_s64` work correctly.  This is done by iterating through a large number
of `(n, d)` pairs, generating the magic numbers for `d`, interpreting the
magic numbers so as to perform the division, and comparing against the result
produced directly by the hardware.  The distribution of numbers is arranged so
that particular emphasis is given to corner cases -- the range ends and
midpoints -- but also so that there is at least some cover for values away
from those areas.  In total 50,148,000 tests are performed.
2019-05-17 12:33:07 +02:00
Benjamin Bouvier
efdb7d86b3 Fixes #607: Use a wrapping multiply when computing div/rem magic numbers; (#757) 2019-04-30 11:46:54 +02:00
Benjamin Bouvier
b7dfe8aaa6 Fix build warnings for cranelift-codegen tests; 2019-03-12 09:53:36 +01:00
lazypassion
747ad3c4c5 moved crates in lib/ to src/, renamed crates, modified some files' text (#660)
moved crates in lib/ to src/, renamed crates, modified some files' text (#660)
2019-01-28 15:56:54 -08:00