| Age | Commit message (Collapse) | Author | Lines |
|
|
|
018616e78b ("Always have math functions but with `weak` linking
attribute if we can") made all math symbols available on platforms that
support weak linkage. This caused some unexpected regressions, however,
because our less accurate and sometimes slow routines were being
selected over the system `libm`, which also tends to be weak [1]. Thus,
0fab77e8d7 ("Don't include `math` for `unix` and `wasi` targets") was
applied to undo these changes on many platforms.
Now that some improvements have been made to `libm`, add back a subset
of these functions:
* cbrt
* ceil
* copysign
* fabs
* fdim
* floor
* fma
* fmax
* fmaximum
* fmin
* fminimum
* fmod
* rint
* round
* roundeven
* sqrt
* trunc
This list includes only functions that produce exact results (verified
with exhaustive / extensive tests, and also required by IEEE in most
cases), and for which benchmarks indicate performance similar to or
better than Musl's soft float math routines [^1]. All except `cbrt` also
have `f16` and `f128` implementations. Once more routines meet these
criteria, we can move them from platform-specific availability to always
available.
Once this change makes it to rust-lang/rust, we will also be able to
move the relevant functions from `std` to `core`.
[^1]: We still rely on the backend to provide optimized assmebly
routines when available.
[1]: https://github.com/rust-lang/rust/issues/128386
|
|
|
|
using core::ptr::copy_nonoverlapping for memory operations
changes core::ptr::coopy_nonoverlapping to crate::ptr::
|
|
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
|
|
Update `compiler-builtins` to 0.1.148
Includes `f16` symbols on MIPS [1], updates for `libm` [2], and reapplies the patch that drops the `public_test_deps!` macro [3].
[1]: https://github.com/rust-lang/compiler-builtins/pull/762
[2]: https://github.com/rust-lang/compiler-builtins/pull/765
[3]: https://github.com/rust-lang/compiler-builtins/pull/766
try-job: aarch64-gnu
try-job: i686-mingw-1
try-job: i686-mingw-2
try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: x86_64-rust-for-linux
|
|
|
|
Don't doc-comment BTreeMap<K, SetValZST, A>
This otherwise shows up in documentation as an empty impl block (worse, at the *top* of the docs above the public impls).
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #134655 (Stabilize `hash_extract_if`)
- #135933 (Explain how Vec::with_capacity is faithful)
- #136668 (Stabilize `core::str::from_utf8_mut` as `const`)
- #136775 (Update `String::from_raw_parts` safety requirements)
- #137109 (stabilize extract_if)
- #137349 (Implement `read_buf` for zkVM stdin)
- #137493 (configure.py: don't instruct user to run nonexistent program)
- #137516 (remove some unnecessary rustc_const_unstable)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
|
|
|
|
|
|
examples
|
|
std: Fix another new symlink test on Windows
Checking for `got_symlink_permission` first is a standard procedure for such tests.
|
|
RalfJung:no-more-rustc_intrinsic_must_be_overridden, r=oli-obk
remove `#[rustc_intrinsic_must_be_overridde]`
In https://github.com/rust-lang/rust/pull/135031, we gained support for just leaving away the body. Now that the bootstrap compiler got bumped, stop using the old style and remove support for it.
r? `@oli-obk`
There are a few more mentions of this attribute in RA code that I didn't touch; Cc `@rust-lang/rust-analyzer`
|
|
Correct doc about `temp_dir()` behavior on Android
Since commit https://github.com/aosp-mirror/platform_frameworks_base/commit/d5ccb038f69193fb63b5169d7adc5da19859c9d8, `TMPDIR` will be set to application's cache dir when app starts.
|
|
remove some unnecessary rustc_const_unstable
If the function is anyway unstable, it doesn't need to be `rustc_const_unstable`.
`copy_from_slice` turns out to not do anything const-unstable itself, we just haven't stably committed to it being available in const yet. See [here](https://rustc-dev-guide.rust-lang.org/stability.html?highlight=rustc_const_stable_indirect) for more details on the `rustc_const_stable_indirect` attribute.
|
|
Implement `read_buf` for zkVM stdin
For the zkVM, even when a guest buffer is uninitialized, from the host's perspective it is just a normal piece of memory which was initialized before letting the guest write into it. This makes `sys_read` safe to use with an uninitialized buffer. See https://github.com/risc0/risc0/issues/2853.
cc `@bobbobbio,` `@flaub`
r? `@Noratrieb`
Tracked in https://github.com/rust-lang/rust/issues/136756
|
|
stabilize extract_if
Tracking issue: #43244
Closes: #43244
FCP completed: https://github.com/rust-lang/rust/issues/43244#issuecomment-2523595704
|
|
Update `String::from_raw_parts` safety requirements
These have become out of sync with `Vec::from_raw_part`'s safety requirements, and are likely to diverge again. I think it's safest to just point at `Vec`'s requirements.
https://github.com/rust-lang/rust/issues/119206#issuecomment-2180116680
|
|
Stabilize `core::str::from_utf8_mut` as `const`
cc #91006 (tracking issue)
r? libs-api
|
|
Explain how Vec::with_capacity is faithful
This is a revival of https://github.com/rust-lang/rust/pull/99790 building on the prose of `@workingjubilee` and edits of `@jmaargh.` Closes https://github.com/rust-lang/rust/issues/99385.
|
|
Stabilize `hash_extract_if`
FCP complete: https://github.com/rust-lang/rust/issues/59618#issuecomment-2674880530
Tracking issue: #59618
Closes #59618
|
|
|
|
|
|
Closes: #137490
|
|
It's hard to implement edition migrations without having a perma-unstable
"future" edition to target.
|
|
|
|
|
|
|
|
|
|
Mark all AVX512 & AVXNECONVERT SIMD-computing intrinsics as safe, except for those involving memory operations.
|
|
Mark all PCLMULQDQ intrinsics as safe.
|
|
Mark all AES intrinsics as safe.
|
|
Mark all SHA intrinsics as safe.
|
|
Mark all AVX2 SIMD-computing intrinsics as safe, except for those involving memory operations.
|
|
Mark all FMA intrinsics as safe.
|
|
Mark all F16C intrinsics as safe.
|
|
Mark all AVX SIMD-computing intrinsics as safe, except for those involving memory operations and register operations.
`AVX+SHA512`, `AVX+SM3` and `AVX+SM4` intrinsics are missing.
|
|
Mark all BMI2 intrinsics as safe.
`_mulx_u32` and `_mulx_u64` accepts a reference instead of a pointer.
|
|
Mark all BMI1 intrinsics as safe.
|
|
Mark all LZCNT intrinsics as safe.
|
|
Mark all POPCNT intrinsics as safe.
`_mm_popcnt_u32` and `_mm_popcnt_u64` are missing.
|
|
Mark all SSE4a SIMD-computing intrinsics as safe, except for those involving memory operations.
|
|
Mark all SSE4.2 intrinsics as safe.
|
|
Mark all SSE4.1 SIMD-computing intrinsics as safe, except for those involving memory operations.
|
|
Mark all SSSE3 intrinsics as safe.
|
|
Mark all SSE3 SIMD-computing intrinsics as safe, except for those involving memory operations.
|
|
Mark all SSE2 SIMD-computing intrinsics as safe, except for those involving memory operations.
|