Vadim Petrochenkov
7f535824f5
Provide an implementation of strlen to be used as a fallback
2022-03-18 21:42:11 +03:00
Nikita Popov
0575846f80
Handle Win64 builtins ABI change in LLVM 14
...
As of https://reviews.llvm.org/D110413 , these no longer use the
unadjusted ABI (and use normal C ABI instead, passing i128
indirectly and returning it as <2 x i64>).
To support both LLVM 14 and older versions, rustc will expose a
"llvm14-builtins-abi" target feature, based on which
compiler-builtins can chose the appropriate ABI.
This is needed for rust-lang/rust#93577 .
2022-02-15 16:29:29 +01:00
Amanieu d'Antras
5bdeade2c4
Fix typo in __aeabi_uldivmod
...
Accidentally introduced in #452
2022-02-09 21:01:07 +00:00
Amanieu d'Antras
f03c7fd6af
Wrap all intrinsics in the intrinsics! macro
...
This ensures that each intrinsic ends up in a separate module, which in
turn (because rustc treats compiler_builtins specially) will result in
each intrinsic ending up in its own object file. This allows the linker
to only pick up object files for intrinsics that are missing and avoids
duplicate symbol definition errors.
2022-02-06 09:20:43 +00:00
Ayrton
9124cdc7ec
Remove truncdfsf2.c from sources in build.rs and add test for __truncdfsf2vfp
...
Also fixed the calling convention for truncdfsf2 on ARM
2021-12-12 21:12:42 -05:00
Ayrton
03b4f62337
Add __truncdfsf2vfp for ARM
2021-12-12 15:36:09 -05:00
Ayrton
39cd6082e4
Add attribute for ARM alias
2021-12-12 15:19:05 -05:00
Ayrton
9e65060184
Add __truncdfsf2 intrinsic
...
This adds the truncdfsf2 intrinsic and a corresponding fuzz test case. The
implementation of trunc is generic to make it easy to add truncdfhs2 and
truncsfhf2 if rust ever gets `f16` support.
2021-12-12 15:01:34 -05:00
Amanieu d'Antras
0928b32141
Fix clippy lints
2021-12-10 00:04:25 +00:00
Amanieu d'Antras
4abfecabef
Import the asm! macro from core::arch
...
It is going to be removed from the prelude due to the decision in
https://github.com/rust-lang/rust/issues/87228
2021-12-09 23:57:26 +00:00
William D. Jones
f275e26e3d
Use fully-qualified syntax for abs_diff to avoid warning, which can trigger a compiler error.
2021-11-27 19:38:43 -05:00
William D. Jones
e6d7983889
Do not use atomic reads on platforms without atomic support in LLVM.
2021-11-27 17:47:46 -05:00
Alex Crichton
9a01750b1b
Use more concise directives
2021-10-28 16:32:30 -07:00
Alex Crichton
b7fb6c594a
Adjust some build directives for wasm64
...
This is still an experimental target but this should get the wasm64
target to behave more like wasm32.
2021-10-28 10:29:37 -07:00
Scott Mabin
3b4d10f6bc
Add xtensa to list of soft math targets.
2021-10-16 15:27:40 +01:00
Georgy Shepelev
29dd109959
expose some math to UEFI envs
2021-10-15 23:18:56 +04:00
Gary Guo
1f0cbb2945
Use atomic_load_unordered for first word load in misaligned case
2021-08-31 00:22:43 +01:00
Gary Guo
709bd6e11c
Add different misaligned path for archs with unaligned support
2021-08-21 03:48:56 +01:00
Gary Guo
45715eb7f7
Implement word-sized copy
2021-08-21 03:03:06 +01:00
Amanieu d'Antras
502370f277
Don't panic if the shift intrinsics receive out-of-range shifts
...
LLVM sometimes emits calls with out-of-range shifts but then discards
the results. We should avoid panics in these cases.
2021-07-30 00:25:36 +02:00
Aaron Kutch
fdcc30c3a3
Add public-test-deps feature for better visibility control
2021-06-02 14:13:54 -05:00
Tilmann Meyer
31e3ae708c
Include Linux atomic emulation on androideabi
...
The old androideabi uses armv5 and thus also needs the atomic emulation
and because Android is basically Linux it can use the same
implementation.
2021-05-31 16:32:46 +02:00
Yuki Okushi
c041104afd
Suppress some warnings
2021-05-31 20:53:15 +09:00
Amanieu d'Antras
fdbeb187ec
Add missing .att_syntax from #414
2021-05-02 21:29:00 +01:00
Amanieu d'Antras
22a1874e5d
Merge pull request #414 from Amanieu/global_asm
...
Mark global_asm! code with .att_syntax
2021-04-11 14:51:56 +01:00
Amanieu d'Antras
68df0eb817
Mark global_asm! code with .att_syntax
...
global_asm! will soon change to use Intel syntax by default.
2021-04-10 19:19:21 +01:00
bjorn3
5dd043525a
Fix typo
2021-04-10 16:03:19 +02:00
Scott Mabin
8c4127d044
Add #[linkage = "weak"] attribute to all mem instrinics.
2021-04-04 19:15:33 +01:00
Amanieu d'Antras
c31c2e0556
Merge pull request #397 from AaronKutch/float_refactor
2021-04-02 23:36:28 +01:00
Aaron Kutch
500c8e0b2c
add clippy to CI
2021-04-02 16:53:09 -05:00
Amanieu d'Antras
2608f8392c
Replace llvm_asm! with asm!
2021-04-02 20:43:11 +01:00
Aaron Kutch
9ae3728e5e
fix CTFE cycle
2021-04-02 09:24:00 -05:00
Aaron Kutch
1cf47804df
Fix all clippy warnings
2021-04-02 08:58:50 -05:00
Aaron Kutch
3871282eee
fix powi
2021-04-02 08:58:50 -05:00
Aaron Kutch
ec4fc5dab5
refactor float conversion
2021-04-02 08:58:50 -05:00
Aaron Kutch
0ce47b3c1f
fix abs_diff bug
2021-04-02 08:57:25 -05:00
Amanieu d'Antras
bffd24076b
Merge pull request #406 from bjorn3/less_rust_intrinsics
...
Remove unused __rust_* shift intrinsics
2021-04-02 12:59:26 +01:00
bjorn3
c75621f12c
Remove unused __rust_* shift intrinsics
...
They are rust specific and used by neither cg_llvm nor cg_clif
2021-02-21 11:36:47 +01:00
est31
57205c0b86
Use the newly stabilized BITS constant on the integer types
2021-02-05 23:40:17 +01:00
Aaron Kutch
e5b667554e
Remove count_ones ( #399 )
2021-01-04 09:17:44 -06:00
Yuki Okushi
7645c0b869
Use the AT&T syntax to support old LLVM on rust-lang/rust
2020-12-11 22:23:00 +09:00
Aaron Kutch
69a3c571f7
Completely overhaul fuzz testing
...
adds testing for almost every numerical intrinsic
2020-12-08 11:42:28 -06:00
Aaron Kutch
f61c411e2b
fix some clippy warnings
2020-12-07 23:26:26 -06:00
Aaron Kutch
26681724f3
replace some transmutes
2020-12-07 23:26:25 -06:00
Aaron Kutch
cb4e9755b8
Remove WideInt
2020-12-07 23:26:13 -06:00
Aaron Kutch
fac884b0c4
Completely replace LargeInt
2020-12-07 23:20:39 -06:00
Aaron Kutch
d5b7e2b6d3
Overhaul overflowing multiplication impls
2020-12-07 23:20:39 -06:00
Aaron Kutch
e049a30964
Introduce the DInt and HInt traits
...
and add various methods that will be used for improved fuzzing
2020-11-27 23:38:30 -06:00
Aaron Kutch
ea7feb2e0f
Remove aapcs_on_arm mistake
2020-11-27 23:38:30 -06:00
Aaron Kutch
a7548bea0d
fix division on SPARC ( #393 )
2020-11-23 09:05:02 -06:00