-
Notifications
You must be signed in to change notification settings - Fork 291
Adding the x86 part of behavioural testing for std::arch intrinsics #1814
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
base: master
Are you sure you want to change the base?
Adding the x86 part of behavioural testing for std::arch intrinsics #1814
Conversation
b2777ac
to
7047369
Compare
match self { | ||
Self::BFloat => "bfloat", | ||
Self::Float => "float", | ||
Self::Int => "int", | ||
Self::UInt => "uint", | ||
Self::Double => "double", | ||
Self::Int(true) => "int", | ||
Self::Int(false) => "uint", | ||
Self::Poly => "poly", | ||
Self::Void => "void", | ||
Self::Char(true) => "char", | ||
Self::Char(false) => "unsigned char", | ||
Self::Short(true) => "short", | ||
Self::Short(false) => "unsigned short", |
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.
@Amanieu @adamgemmell Are we using this trait (fmt::Display for TypeKind
) anywhere in the crate? I was searching for its usage and I was unable to find any.
If we are not using this trait, may I delete the definition?
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.
I suspect this may be useful for debug output during development. However since it isn't used for functionality then it's fine to make any changes you want to it.
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.
Got it.
Pardon the git history, I will be sorting that out shortly |
ed8dfde
to
e6ff768
Compare
UInt, | ||
|
||
// if signed, then the inner value is true | ||
Int(bool), |
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.
Rather than using a bool
, considering instead something like:
enum Signed {
Signed,
Unsigned,
}
This ends up making the code much more readable.
format!( | ||
"\ | ||
{line_prefix}This is a transient test file, not intended for distribution. Some aspects of the | ||
{line_prefix}test are derived from a JSON specification, published under the same license as the |
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.
x86 uses an XML specification, not JSON.
trait to make the same dyn-compatible.
intrinsic-test's X86IntrinsicType struct
IntrinsicType impl
1. filtered any intrinsic arguments where the only parameter is of type "void" 2. Better parsing for intrinsic return type 3. Filtering intrinsics that are difficult to test (void returns) 4. Reduced the variants in TypeKind (which differed only in bit_len)
necessary. Further notes: 1. IntrinsicType.target -> IntrinsicType.metadata 2. Maintaining a HashMap to support arbitrary data storage for other arch
…ectly instead of constructing it. Further details: 1. moved "type_and_name_from_c" from Argument<T> to Argument<ArmIntrinsicType> 2. removed "from_c" in Argument<T>
470a900
to
e113a61
Compare
e113a61
to
bc5da7d
Compare
The CI is giving me an odd error, even after I rebased from master: Updating crates.io index
Locking 5 packages to latest compatible versions
Adding quick-xml v0.37.5
Adding serde-xml-rs v0.8.1
Adding thiserror v1.0.69
Adding thiserror-impl v1.0.69
Adding xml-rs v0.8.26
Compiling core_arch v0.1.5 (/Users/runner/work/stdarch/stdarch/crates/core_arch)
error: the feature `generic_arg_infer` has been stable since 1.89.0-nightly and no longer requires an attribute to enable
--> crates/core_arch/src/lib.rs:34:5
|
34 | generic_arg_infer,
| ^^^^^^^^^^^^^^^^^
|
= note: `-D stable-features` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(stable_features)]` |
No description provided.