121 Commits

Author SHA1 Message Date
Madhav Madhusoodanan
add7b2e402 renamed a64_only data member in Intrinsic to arch_tags 2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
f05ffd4a0b Added a macro to simplify <Arch>IntrinsicType definitions 2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
57c357591e introduced generic types and code refactor 2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
a993b4427c Updated Argument::from_c to remove ArgPrep specific argument 2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
9d3c09ed53 added target field within IntrinsicType to perform target level checking cleanly 2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
9927915e58 test commit to check if load_Values_c can be dissociated from target logic 2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
bb1dfa0276 rename struct for naming consistency 2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
8e269afcfe maintaining special list of targets which need different execution command 2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
e15d6fae92 fixed too many files open issue 2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
ca67119d5f chore: added match block in src/main.rs 2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
c862432cfd chore: code consolidation 2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
17277d71e8 chore: separated common logic within file creations, compile_c, compile_rust and compare_outputs 2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
8cb9183221 chore: Added ProcessedCli to extract the logic to pre-process CLI struct args 2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
1d39fd0964 Chore: Added SupportedArchitectureTest trait which must be implemented for different architectures.
Next steps:
Move the existing ARM-specific implementation into one that fits well with this trait.
2025-05-27 23:27:38 +00:00
Madhav Madhusoodanan
d7edb3ea7c Feat: Moved majority of the code to arm module.
Reasoning:
1. Majority of code assumes the usage of `Intrinsic` and related types, which is derived from the JSON structure of the ARM intrinsics JSON source file
2. Further commits will start with extracting common parts of the code (eg: Create C/Rust file, Build C/Rust file, etc)
2025-05-27 23:27:38 +00:00
Folkert de Vries
4f35c02aa0 in intrinsic-test, format f16 like C 2025-05-20 14:26:46 +00:00
James Barford-Evans
206c35a3a2 change how the test is run 2025-05-03 05:06:15 +00:00
James Barford-Evans
052293b092 add printouts for debugging 2025-05-03 05:06:15 +00:00
James Barford-Evans
89c9c8ba9c feat - FEAT_LUT neon instrinsics 2025-03-05 14:54:05 +00:00
James Barford-Evans
5ece6ac059 armV7 does not need faminmax flag 2025-03-04 15:50:04 +00:00
James Barford-Evans
24555b5ac1 Add faminmax intrinsics to the skip list 2025-03-04 15:50:04 +00:00
James Barford-Evans
de7f56ff35 Add aarch64_unstable_target_feature and relax instruction assertion 2025-03-04 15:50:04 +00:00
Kajetan Puchalski
3b58340073 intrinsic-test: Print C++ float16_t in hex
Upstream Rust currently does not support printing f16s in decimal.
For the intrinsics tests to work, make C++ print float16_t in the same
format.

Can be droppen once https://github.com/rust-lang/rust/pull/127013
is merged.
2025-02-24 14:22:42 +00:00
Kajetan Puchalski
f4a31fd609 core-arch: Add NEON fp16 intrinsics 2025-02-24 14:22:42 +00:00
Kajetan Puchalski
ed7bf87061 intrinsic-test: Support testing f16 intrinsics 2025-02-24 14:22:42 +00:00
James Barford-Evans
b95fc44d25 fix up yaml & re-generate 2025-02-24 11:04:20 +00:00
James Barford-Evans
2ab46242f0 remove print statment and correct target name 2025-02-24 11:04:20 +00:00
James Barford-Evans
bec322f990 fix test runner for armv7 2025-02-24 11:04:20 +00:00
James Barford-Evans
f4974ae1ed ensure correct linker gets chosen 2025-02-24 11:04:20 +00:00
James Barford-Evans
7294081fda Update test runner to support big endian 2025-02-24 11:04:20 +00:00
Eric Huss
d9ec0157da Format with style edition 2024 2025-02-09 12:57:14 -08:00
Eric Huss
699a872630 Update all crates to Rust 2024 2025-02-09 12:31:33 -08:00
Jacob Bramley
039f322e18 Consistently use the latest itertools. 2025-02-03 21:15:41 +00:00
Yuri Astrakhan
0760ed6ca7 Minor linting 2024-09-30 13:00:24 -04:00
George Wort
2caf80145b Use #[rustc_intrinsic_const_vector_arg] for Neon intrinsics
This allows the constant vector to be passed directly
to LLVM which fixes a few issues where the LLVM intrinsic
expects a constant vector.
2024-08-21 01:18:59 +01:00
Olasunkanmi Olayinka
da09b47285 feat: stabilization for stdarch_aarch64_crc32 2024-05-14 15:52:07 +02:00
Tony Arcieri
153bde14d1 Remove duplicated allow(dead_code) attribute
Accidentally added in #1552
2024-04-13 02:32:07 +02:00
Tony Arcieri
eab9f2d6d9 Stabilize AArch64 SHA3 intrinsics
See also: rust-lang/rust#117225
2024-04-12 14:08:47 +02:00
Luca Barbato
06495b6f45 intrinsic-test: Suppress a warning about dead code 2024-04-10 01:46:00 +02:00
Daniel Paoliello
a00a70eacb arm64ec 2024-03-13 22:30:36 +00:00
eupn
2e8d4ba8c8 Add missing ARM-v7A CRC intrinsics (#1515)
* Move aarch64 crc into arm shared module

* Add missing 32-bit arm crc intrinsics

On 32-bit ARM, this intrinsic emits two instructions and splits its 64-bit input parameter between them.

https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/ARM-ACLE-Intrinsics.html
2024-01-10 12:44:04 +00:00
Amanieu d'Antras
3ac4ba6670 Revert "Work around CI failures for the ARM target"
This reverts commit 5a748ec5fabcaee29351ac3c90eee4f3e16964e7.
2023-11-30 08:20:47 +00:00
Amanieu d'Antras
4fe088329c Work around CI failures for the ARM target
These seem to have been introduced by recent LLVM changes.

* The instruction limit for vld*/vst* has been raised. This is not a
significant issue, it is only used for testing.
* vld*/vst* instructions are generated with overly strict alignments:
https://github.com/rust-lang/stdarch/issues/1217
* vtbl/vtbx instrinsics are failing intrinsic-test for unknown reasons.
2023-11-30 07:48:09 +00:00
Eduardo Sánchez Muñoz
57479f8c9b Remove unneeded borrows 2023-11-18 20:28:46 -08:00
Jacob Bramley
211a00769c Improve intrinsic-test output formatting.
This change is simple, but makes the generated tests much easier to
follow (and debug).
2023-11-17 23:49:21 -08:00
Jacob Bramley
d2736197f7 Add --generate-only to intrinsic-test.
This is useful for debugging.
2023-11-17 23:49:21 -08:00
Jacob Bramley
7f2a7c09ef Fix intrinsic-test author handling.
CARGO_PKG_AUTHORS is :-separated.

Also add myself to intrinsic-test authors.
2023-11-01 14:33:48 +01:00
Jacob Bramley
05afebca4d Clean up intrinsic-test literals.
- 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.
2023-11-01 14:33:48 +01:00
Jacob Bramley
1970299926 Remove unnecessary unsafety in intrinsic tests.
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.
2023-11-01 14:33:48 +01:00
Jacob Bramley
a76000b6a0 Drop old link from intrinsic-test README.
Now, the README approximately matches the `--help` output.
2023-10-31 02:17:45 +01:00