Skip to content

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

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

madhav-madhusoodanan
Copy link
Contributor

No description provided.

@madhav-madhusoodanan madhav-madhusoodanan force-pushed the x86_extension_intrinsic_test branch 3 times, most recently from b2777ac to 7047369 Compare June 8, 2025 17:19
Comment on lines 49 to 60
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",
Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

@madhav-madhusoodanan
Copy link
Contributor Author

Pardon the git history, I will be sorting that out shortly

@madhav-madhusoodanan madhav-madhusoodanan force-pushed the x86_extension_intrinsic_test branch 2 times, most recently from b943e51 to d46a708 Compare June 16, 2025 07:21
a4lg and others added 10 commits June 16, 2025 13:28
It modernizes the coding style of the crate intrinsic-test by fixing
Clippy warnings.

Clippy: rust version 1.89.0-nightly (6f6971078 2025-05-28)
Number of Fixed Warnings: 36/36
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
To make the type names to test correct, this commit replaces occurrences
of `rust_prefix` to `c_prefix` where necessary.
It seems it returns true when *no* constraints are found, opposite to
the expected behavior of the function name.

This commit reverses condition as the name suggests.
@madhav-madhusoodanan madhav-madhusoodanan force-pushed the x86_extension_intrinsic_test branch 2 times, most recently from ca3e872 to ed8dfde Compare June 16, 2025 08:24
@madhav-madhusoodanan madhav-madhusoodanan force-pushed the x86_extension_intrinsic_test branch from ed8dfde to e6ff768 Compare June 16, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants