-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test stdarch (only x86 SSE and SSE2 for now) #19
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
## Run stdarch test suite with Miri. | ||
## Assumes Miri to be installed. | ||
## Usage: | ||
## ./run-test.sh TARGET | ||
## Environment variables: | ||
## MIRI_LIB_SRC: The path to the Rust library directory (`library`). | ||
## RUSTFLAGS: rustc flags (optional) | ||
## MIRIFLAGS: Miri flags (optional) | ||
|
||
if [ $# -ne 1 ]; then | ||
echo "Usage: $0 TARGET" | ||
exit 1 | ||
fi | ||
|
||
export TARGET="$1" | ||
|
||
case "$TARGET" in | ||
i586-*|i686-*|x86_64-*) | ||
RUSTFLAGS="-C target-feature=+sse2" | ||
TEST_ARGS=( | ||
core_arch::x86::{sse,sse2}:: | ||
core_arch::x86_64::{sse,sse2}:: | ||
# FIXME add `#[cfg_attr(miri, ignore)]` to those tests in stdarch | ||
# These are nontemporal stores, fences, and CSR (FP env status register) accesses | ||
--skip test_mm_comieq_ss_vs_ucomieq_ss | ||
--skip test_mm_getcsr_setcsr_1 | ||
--skip test_mm_getcsr_setcsr_2 | ||
--skip test_mm_getcsr_setcsr_underflow | ||
--skip test_mm_sfence | ||
--skip test_mm_stream_ps | ||
--skip test_mm_clflush | ||
--skip test_mm_lfence | ||
--skip test_mm_maskmoveu_si128 | ||
--skip test_mm_mfence | ||
--skip test_mm_stream_pd | ||
--skip test_mm_stream_si128 | ||
--skip test_mm_stream_si32 | ||
--skip test_mm_stream_si64 | ||
# FIXME not yet implemented | ||
--skip test_mm_madd_epi16 | ||
# FIXME fix those in stdarch | ||
--skip test_mm_rcp_ss # __m128(0.24997461, 13.0, 16.0, 100.0) != __m128(0.24993896, 13.0, 16.0, 100.0) | ||
--skip test_mm_store1_ps # attempt to subtract with overflow | ||
--skip test_mm_store_ps # attempt to subtract with overflow | ||
--skip test_mm_storer_ps # attempt to subtract with overflow | ||
) | ||
;; | ||
*) | ||
echo "Unknown target $TARGET" | ||
exit 1 | ||
esac | ||
|
||
export RUSTFLAGS="${RUSTFLAGS:-} -Ainternal_features" | ||
|
||
# Make sure all tested target features are enabled | ||
export STDARCH_TEST_EVERYTHING=1 | ||
# Needed to pass the STDARCH_TEST_EVERYTHING environment variable | ||
export MIRIFLAGS="${MIRIFLAGS:-} -Zmiri-disable-isolation" | ||
|
||
cd $MIRI_LIB_SRC/stdarch | ||
cargo miri test \ | ||
--target "$TARGET" \ | ||
--manifest-path=crates/core_arch/Cargo.toml \ | ||
-- "${TEST_ARGS[@]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
nightly-2023-08-16 | ||
nightly-2023-09-28 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.