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
9b4a79c5d4
Re-implement some AVX functions without LLVM intrinsics
2023-11-18 20:30:18 -08:00
Eduardo Sánchez Muñoz
40237e7f83
Use char constants for single-character patterns
2023-11-18 20:28:46 -08:00
Eduardo Sánchez Muñoz
6bde860207
Silence clippy::if_same_then_else
in a specific location
2023-11-18 20:28:46 -08:00
Eduardo Sánchez Muñoz
5fb5ff2ba3
Use str::strip_prefix
instead of str::starts_with
+ manual strip
2023-11-18 20:28:46 -08:00
Eduardo Sánchez Muñoz
dfcf46890d
Use is_empty
instead of comparing len
to zero
2023-11-18 20:28:46 -08: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
Ralf Jung
ef6263d968
do not use const stability attribute when we don't even need to call the intrinsic in const
2023-11-16 15:53:11 -08:00
Jake Goulding
e01a7c2408
Fix copy-paste typos for the _x2 and _x3 vector types
2023-11-16 15:52:37 -08:00
Ralf Jung
3bc20dc71c
riscv: remove intrinsics that cannot be used from Rust
2023-11-05 18:28:04 +01: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
Eduardo Sánchez Muñoz
5a4a732762
Avoid unneeded transmutes in generated ARM tests
2023-10-31 17:58:01 +01:00
Eduardo Sánchez Muñoz
84979543bd
Reduce code that handles number of parameters in stdarch-gen gen_test
2023-10-31 17:58:01 +01:00
Eduardo Sánchez Muñoz
c808ba4722
Remove unneeded transmutes in ARM code, except generated tests
2023-10-31 17:58:01 +01:00
ZHAI Xiang
5625c8bf49
std_detect: Add support for LoongArch
...
Co-authored-by: WANG Rui <wangrui@loongson.cn>
2023-10-31 14:37:10 +01:00
Eduardo Sánchez Muñoz
3b2a5e2866
Refactor some loops to avoid indexing
2023-10-31 02:20:17 +01:00
Eduardo Sánchez Muñoz
9f741c5986
Simplify some expressions with pointers and references
2023-10-31 02:20:17 +01:00
Eduardo Sánchez Muñoz
02156819c9
Avoid constans that are too close to PI
or TAU
2023-10-31 02:20:17 +01:00
Eduardo Sánchez Muñoz
fd9370dd44
Fuse multiple str::replace
invocations into a single one
2023-10-31 02:20:17 +01:00
Eduardo Sánchez Muñoz
5cdd9f81ce
Convert while
loop to for
2023-10-31 02:20:17 +01:00
Eduardo Sánchez Muñoz
eaa7298694
Derive Default
for Initializer
in std_detect
2023-10-31 02:20:17 +01:00
Eduardo Sánchez Muñoz
4bfd9935f7
Simplify a cfg
2023-10-31 02:20:17 +01:00
Eduardo Sánchez Muñoz
936583f12c
Do not deny clippy::missing_inline_in_public_items
in std_detect
2023-10-31 02:20:17 +01:00
Eduardo Sánchez Muñoz
d2674ea2fe
Replace some x >= LO && x <= HI
with matches!(x, LO..=HI)
2023-10-31 02:20:17 +01:00
Eduardo Sánchez Muñoz
db57b42188
Change x <= y - 1
to x < y
in static_assert_{u,s}imm_bits
2023-10-31 02:20:17 +01:00
Eduardo Sánchez Muñoz
438d00e891
Silence four additional clippy warnings and sort them alphabetically
2023-10-31 02:20:17 +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
Eduardo Sánchez Muñoz
fa766fe954
Add #[cfg_attr(miri, ignore)]
to tests of functions that cannot be supported by Miri
...
This includes functions that use inline assemby or that do certains operations such as saving/restoring the processor state.
2023-10-30 00:01:33 +01:00
Eduardo Sánchez Muñoz
8b88fb87b7
Improve _mm_round_ss/_mm_round_sd tests
...
* Do not use deprecated CSR access functions
* Test different rounding modes
2023-10-30 00:00:49 +01:00
Eduardo Sánchez Muñoz
4f52b00597
Extend _mm_minpos_epu16 test to check case where minimum value is repeated
2023-10-30 00:00:49 +01:00
Eduardo Sánchez Muñoz
46c6fee14e
Extend _mm_insert_ps test to check zeroing priority over copying
2023-10-30 00:00:49 +01:00
Eduardo Sánchez Muñoz
88cf134226
Extend _mm_mulhrs_epi16 test to check large values
2023-10-30 00:00:49 +01:00
Eduardo Sánchez Muñoz
e8d5cbd60f
Extend _mm_maddubs_epi16 test to check widening and saturating behavior
2023-10-30 00:00:49 +01:00
Eduardo Sánchez Muñoz
c07535ca79
Extend SSSE3 hadd/hsub tests to check overflow behavior (wrapping or saturating)
2023-10-30 00:00:49 +01:00
Eduardo Sánchez Muñoz
0d09b65521
Extend _mm_shuffle_epi8 test to check index wrapping
2023-10-30 00:00:49 +01:00
Eduardo Sánchez Muñoz
d2970f4514
Extend _mm_madd_epi16 test to check cases with large values.
2023-10-30 00:00:49 +01:00
Amanieu d'Antras
ea27e5cfcb
Fix various compilation errors
2023-10-29 20:39:50 +01:00
Amanieu d'Antras
3e5850284a
Fix more missing/incorrect feature specifications
2023-10-29 20:39:50 +01:00
Amanieu d'Antras
b8ba57f310
Cleanup last uses of the stdsimd feature
2023-10-29 20:39:50 +01:00
Amanieu d'Antras
941d609570
Add tracking issue for 32-bit ARM DSP instrinsics
2023-10-29 20:39:50 +01:00
Amanieu d'Antras
0352c542d1
Remove ARM udf and dbg intrinsics
...
These have already been removed for AArch64
2023-10-29 20:39:50 +01:00
Amanieu d'Antras
7de980e124
Add tracking issue for all remaining unstable NEON intrinsics
2023-10-29 20:39:50 +01:00
Amanieu d'Antras
736da66780
Add tracking issue for ARM barrier intrinsics
2023-10-29 20:39:50 +01:00
Amanieu d'Antras
bd54f94098
Add tracking issue for ARM hint intrinsics
2023-10-29 20:39:50 +01:00
Amanieu d'Antras
6bde701fe3
Add tracking issue for AArch64 prefetch intrinsic
2023-10-29 20:39:50 +01:00
Amanieu d'Antras
a70d90d17a
Add tracking issue for AArch64 TME intrinsics
2023-10-29 20:39:50 +01:00