Commit Graph

940 Commits

Author SHA1 Message Date
Ralf Jung
4fd5dca27c implement SIMD sqrt and fma 2022-03-16 22:13:43 -04:00
Ralf Jung
1f237b3b7d implement SIMD float rounding functions 2022-03-16 18:53:36 -04:00
Ralf Jung
f338b0229b test integer SIMD min/max 2022-03-14 09:53:49 -04:00
Jubilee Young
61bfa8afe8 Fixup renamed fn for Simd 2022-03-13 19:03:08 -07:00
Ralf Jung
41ffce1145 implement simd_scatter 2022-03-09 19:29:05 -05:00
Ralf Jung
576e2bbed5 implement gather 2022-03-09 19:29:05 -05:00
Ralf Jung
3eba7fcf73 implement simd_shuffle 2022-03-09 19:29:05 -05:00
Ralf Jung
6d3506adef fs: add and test for DirectoryNotEmpty error variant 2022-03-07 18:30:12 -05:00
Tavian Barnes
0886419524 Implement a readdir64() shim for Linux
Partial fix for #1966.
2022-03-07 16:19:03 -05:00
Ralf Jung
735bee2736 implement simd_saturating intrinsics 2022-03-07 14:12:59 -05:00
Ralf Jung
b87a9c90e1 fix handling of NaNs in simd max/min 2022-03-07 09:49:35 -05:00
Ralf Jung
2f97eb68a0 implement simd_fmax/fmin 2022-03-07 09:40:23 -05:00
Ralf Jung
9851b743c1 implement simd_reduce_min/max 2022-03-07 09:40:23 -05:00
Ralf Jung
db06d4998f implement simd_cast, simd_as 2022-03-07 09:40:23 -05:00
bors
a25d905ddf Auto merge of #2003 - RalfJung:simd-reduce-test, r=RalfJung
also test f32/f64 simd_reduce

Forgot to include this in https://github.com/rust-lang/miri/pull/2001
2022-03-06 04:22:12 +00:00
Ralf Jung
21d36ffd04 also test f32/f64 simd_reduce 2022-03-05 23:03:14 -05:00
Ralf Jung
9810a147a7 add extra tests for shifts with negative offsets 2022-03-05 22:59:23 -05:00
Ralf Jung
b491b72673 implement simd_reduce_{add,mul} 2022-03-05 19:02:00 -05:00
Ralf Jung
3ed8ad4423 avoid repeated string matching, and add more simd_reduce intrinsics 2022-03-05 18:46:14 -05:00
bors
3854a76ace Auto merge of #1970 - asquared31415:open_unix_varargs, r=RalfJung
Allow varargs for libc::open when it is allowed by the second argument

This PR allows `libc::open` to be called using two or three arguments as defined in https://man7.org/linux/man-pages/man2/open.2.html

The presence of the third argument depends on the value of the second argument.  If the second argument dictates that the third argument is *required* miri will emit an error if the argument is missing.  If the second argument does *not* require a third argument, then the argument is ignored and passed as 0 internally (it would be ignored by libc anyway)
2022-03-05 22:47:51 +00:00
asquared31415
8e97599af4 allow varargs for libc::open when it is allowed by the second argument 2022-03-05 17:29:48 -05:00
Ralf Jung
ec0e513c64 rustup 2022-03-05 17:26:32 -05:00
bors
926af6493b Auto merge of #1999 - RalfJung:forward-env, r=oli-obk
add flag to forward specific env vars (while isolation remains enabled)

The flag is called `-Zmiri-env-forward=<var>`, but I am open to bikeshedding. ;)
2022-03-05 19:36:10 +00:00
Ralf Jung
90207a5484 implement missing SIMD comparison operators, simd_xor, and simd_reduce_all 2022-03-05 13:45:13 -05:00
Ralf Jung
3adc203c1c add flag to forward specific env vars (while isolation remains enabled) 2022-03-05 11:14:37 -05:00
Ralf Jung
0d4902f12f implement simd_neg and simd_fabs 2022-03-03 14:54:54 -05:00
Ralf Jung
97ddcf1f6b adjust for div/rem overflow being UB 2022-03-03 12:14:24 -05:00
Ralf Jung
363236e2d4 test overflowing Div/Rem 2022-03-01 18:44:37 -05:00
Ralf Jung
aa4f82ea48 implement simd_select 2022-03-01 18:40:40 -05:00
Ralf Jung
c347b04e82 add test for rust issue 94371 2022-02-27 15:27:34 -05:00
Ralf Jung
e9b140b4a5 update fn ptr tests 2022-02-25 12:06:10 -05:00
Ralf Jung
444396d620 rustup 2022-02-24 10:55:40 -05:00
Ralf Jung
1ac1e55f3b implement simd_eq and simd_reduce_any 2022-02-21 21:41:52 -05:00
Ralf Jung
6b8baee339 rustup; implement simd_and/or 2022-02-04 17:56:08 +01:00
Ralf Jung
3d5eb52cbd rustup: disable read_dir test for now 2022-02-04 17:17:28 +01:00
Miguel Ojeda
922962f662 Remove spurious maybe_uninit_extra
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-01-11 16:17:52 +01:00
bors
deb9bfd246 Auto merge of #1952 - RalfJung:self-referential, r=RalfJung
exclude mutable references to !Unpin types from uniqueness guarantees

This basically works around https://github.com/rust-lang/unsafe-code-guidelines/issues/148 by not requiring uniqueness any more for mutable references to self-referential generators. That corresponds to [the same work-around that was applied in rustc itself](b815532674/compiler/rustc_middle/src/ty/layout.rs (L2482)).

I am not entirely sure if this is a good idea since it might hide too many errors in case types are "accidentally" `!Unpin`. OTOH, our test suite still passes, and to my knowledge the vast majority of types is `Unpin`. (`place.layout.ty` is monomorphic, we should always exactly know which type this is.)
2022-01-09 14:10:00 +00:00
Ralf Jung
9376bf5d4d rustup 2022-01-08 17:27:48 +01:00
Ralf Jung
77cec811b4 exclude mutable references to !Unpin types from uniqueness guarantees 2022-01-01 19:01:46 +01:00
Ralf Jung
d8f7b831e7 add regression test 2021-12-15 19:11:08 +01:00
bors
dadcbebfbd Auto merge of #1934 - RalfJung:rustup, r=RalfJung
rustup

Cc https://github.com/rust-lang/rust/issues/91649
2021-12-08 15:19:55 +00:00
Ralf Jung
50b9b701ab rustup 2021-12-08 10:01:51 -05:00
bors
23a9d02748 Auto merge of #1933 - 5225225:1931-condvar-false-positive, r=RalfJung
Fix false positive use of uninit bytes when calling `libc::pthread_condattr_destroy`

Fixes: #1931
2021-12-08 14:51:53 +00:00
5225225
a4b2fc0c5a Adjust pthread tests 2021-12-06 21:50:14 +00:00
bors
81e59e6b92 Auto merge of #1930 - tavianator:avoid-adjacent-allocations, r=RalfJung
intptrcast: Never allocate two objects directly adjecent

When two objects directly follow each other in memory, what is the
provenance of an integer cast to a pointer that points directly between
them?  For a zero-size region, it could point into the end of the first
object, or the start of the second.

We can avoid answering this difficult question by simply never
allocating two objects directly beside each other.  This fixes some of
the false positives from #1866.
2021-12-06 01:33:55 +00:00
Ralf Jung
6a98c64c8b
final tweaks 2021-12-05 20:33:20 -05:00
5225225
eadeedde42 Handle uninit data in pthread_condattr_destroy 2021-12-05 19:47:29 +00:00
Ralf Jung
d537ed401d rustup 2021-12-05 11:02:20 -05:00
Tavian Barnes
b0a463334c intptrcast: Never allocate two objects directly adjecent
When two objects directly follow each other in memory, what is the
provenance of an integer cast to a pointer that points directly between
them?  For a zero-size region, it could point into the end of the first
object, or the start of the second.

We can avoid answering this difficult question by simply never
allocating two objects directly beside each other.  This fixes some of
the false positives from #1866.
2021-12-03 17:00:06 -05:00
Ralf Jung
ee666d8987 add tests for alignment on array initialization 2021-11-28 10:07:31 -05:00