-
Notifications
You must be signed in to change notification settings - Fork 269
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
Fix some minor intrinsic-test issues. #1490
Conversation
r? @Amanieu (rustbot has picked a reviewer for you, use r? to override) |
0d7123e
to
92180b8
Compare
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.
LGTM with the minor typo in the comment fixed.
crates/intrinsic-test/src/types.rs
Outdated
/// This is determistic based on the pass number. | ||
/// | ||
/// * `loads`: The number of values that need to be loaded from the argument array | ||
/// * e.g for argument type uint32x2, loads=2 results in a string representing 4 32-bit values | ||
/// | ||
/// Returns a string such as | ||
/// * `0x1, 0x7F, 0xFF` if `language` is `Language::C` | ||
/// * `0x1 as _, 0x7F as _, 0xFF as _` if `language` is `Language::Rust` | ||
/// * `[0x1, 0x7F, 0xFF]` if `language` is `Language::C` |
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.
Should this be {}
instead?
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.
Fixed in (force-pushed) 326fe6f.
This fixes "unnecessary `unsafe` block" warnings encountered when building the generated rust_programs. The only pattern that actually required `unsafe` was transmuting bit patterns into floats. This patch uses the safe `from_bits` instead, but because that isn't const, we have to make them local let-bound variables.
- Ensure that C literals don't rely on undefined overflow behaviour. - We don't need to use 'as' casts, so remove them. - We weren't using allow(overflowing_literals), so remove it. - Format FP bit values as hex. This simplifies the test input initialisers in the generated files, making them shorter and easier to debug.
CARGO_PKG_AUTHORS is :-separated. Also add myself to intrinsic-test authors.
This avoids a flood of warnings when testing the armv7-unknown-linux-gnueabihf target. Under this target, we would pass -Ctarget-features=+neon when building intrinsic-test, but it is compiled for the host (and this tool doesn't need Neon even if the host _is_ Armv7). This also sets --target when running the 'hex' example, since that seems more appropriate than always building it for the host.
92180b8
to
326fe6f
Compare
Notably, fix some warnings that flood the console, making it awkward to debug Arm tests.