79 Commits

Author SHA1 Message Date
Trevor Gross
fbd6907358 Add integer to f128 conversions 2024-10-30 12:25:24 -05:00
Trevor Gross
76580a96a7 Upgrade CI LLVM version to 19.1
19.1 is the latest stable release from 2024-09-17. This will match what
is currently being used in rust-lang/rust.
2024-10-03 11:49:45 -04:00
Trevor Gross
606d971958 Add support for f128 integer exponentiation
Create the symbol `__powitf2`.
2024-09-28 11:06:33 -04:00
Trevor Gross
764a177497 Add f128 division
Use the new generic division algorithm to expose `__divtf3` and
`__divkf3`.
2024-09-24 18:32:58 +02:00
Sbstn Bcht
69406c118a
Remove unsupported *vfp functions (#678)
Remove all *vfp functions and related tests since LLVM no longer emits them.

Link: https://github.com/rust-lang/compiler-builtins/pull/626

[ Reword commit message - Trevor ]
2024-09-03 22:55:44 -04:00
Andrey Turkin
adabbe73d9 Implement __ctz*i2 intrinsics 2024-07-25 19:26:02 +03:00
Trevor Gross
6ef2b95d46 Add missing symbols from compiler-rt to the README 2024-07-24 13:06:15 +01:00
Trevor Gross
fb27c7283c Move IBM extended double to the unneeded section 2024-07-24 13:06:15 +01:00
Trevor Gross
a96c82123e Remove a broken link in README 2024-07-24 13:06:15 +01:00
Andrey Turkin
a5c7a17d55 Implement remaining __clz*i2 intrinsics 2024-07-24 12:50:04 +01:00
Andrey Turkin
45465cc488 Implement __bswap[sdt]i2 intrinsics
These can be emitted by gcc, at least if requested specifically via __builtin_bswap{32,64,128}.
2024-07-06 11:51:52 +02:00
Trevor Gross
ec12399470 Update outdated contribution guidelines 2024-05-21 20:13:40 +02:00
Trevor Gross
ccd179b231 Add f128 float to integer conversion functions
Add the following:

- `__fixtfsi`
- `__fixtfdi`
- `__fixtfti`
- `__fixunstfsi`
- `__fixunstfdi`
- `__fixunstfti`
2024-05-20 20:01:33 -04:00
Trevor Gross
aaa5260748 Implement f128 comparison 2024-05-15 07:19:17 -05:00
Trevor Gross
191c1b88cd Implement f128 multiplication 2024-05-15 07:19:17 -05:00
Trevor Gross
2755f457f8 Implement f128 addition and subtraction 2024-05-15 07:19:17 -05:00
beetrees
229babb1d0 Add builtins for f16/f128 float conversions 2024-05-02 13:49:24 +02:00
beetrees
a2587f7b02
Update status of 128-bit integers in README.md 2024-04-28 17:41:35 +01:00
Trevor Gross
a55604fd8c Add a way to run tests on non-linux machines
Allow using the `rust-lang/rust:nightly` docker image to run tests in
cases where the host rust and cargo cannot be used, such as non-linux
hosts.
2024-04-19 11:49:23 -04:00
Kleis Auke Wolthuizen
f04f8a6a9d Sync x86 chkstk intrinsics with LLVM
Incorporates the following commits:
885d7b759b
1f9eff100c
7a5cba8bea
2024-03-29 19:51:56 +01:00
BD103
845f4e75d1
fix: replace travis link with github actions link 2024-01-24 13:57:31 -05:00
kirk
fad0b3a431 change links in README to match reference code version used in CI 2023-06-17 14:35:00 +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
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
Alex Crichton
30bf61039f Remove -nursery from urls 2019-09-25 11:20:14 -07:00
Alex Crichton
0198311a4b Migrate to github actions from Azure Pipelines
Less need to manage users, more concurrency, and interface is all in
one!
2019-09-10 21:57:13 -05:00
Alex Crichton
78d40ed30c
Update azure pipelines badge 2019-04-02 15:41:20 -05:00
Alex Crichton
b51f3d18a3 Configure Azure Pipelines 2019-04-02 08:24:11 -07:00
Alex Crichton
dbdcd66e35 Revert "Conversion from a wider to a narrower IEEE-754 floating-point type"
This reverts commit baab4fd89cdd945e46fed31166e5dcad7224ed87.
2018-10-30 10:51:11 -07:00
Paolo Teti
45a42b5b89 Conversion from a wider to a narrower IEEE-754 floating-point type
Adds generic conversion from a wider to a narrower IEEE-754
floating-point type.

Implement `__truncdfsf2` and `__truncdfsf2vfp` and associated test-cases.
2018-09-17 19:53:04 +02:00
Charles Samborski
cbff830235
Fix link in README.md (Rust operator precedence) 2018-08-28 15:48:58 +02:00
Alex Crichton
6249080093
Merge pull request #234 from ketsuban/master
Add __floatdisf and __floatundisf intrinsics
2018-04-05 10:06:16 -05:00
Thomas Winwood
09d201db35 Add __floatdisf and __floatundisf intrinsics 2018-03-14 14:56:01 +00:00
Paolo Teti
20de84d127 Add __ledf2vfp and __lesf2vfp
Now that `73884ae` is in some nightly release We can add ledf2vfp/leds2vfp
and so these two functions be aliased to aeabi_fcmple/aeabi_dcmple on soft-float targets.
2018-02-25 17:50:56 +01:00
Paolo Teti
347871f7ec Update Progress list
Already implemented, but not marked as done.
2018-02-12 18:23:55 +01:00
Paolo Teti
b2aea631fe Collection of VFP intrinsics
Nothing really exciting here. LLVM on hard-float target use native instructions
for all listed VFP intrinsics and so resulting implementation is really trivial.

Implemented intrinsics:

 __gesf2vfp
 __gedf2vfp
 __gtsf2vfp
 __gtdf2vfp
 __ltsf2vfp
 __ltdf2vfp
 __nesf2vfp
 __nedf2vfp
 __eqsf2vfp
 __eqdf2vfp
 __extendsfdf2vfp
2018-02-11 23:46:56 +01:00
Paolo Teti
0af69177f9 Add generic conversion from a narrower to a wider FP type
Add `extend` module to implement conversion from a narrower to a wider
floating-point type.

This implementation is only intended to support *widening* operations.
Module to convert a *narrower* floating-point will be added in the future.
2018-02-08 18:20:45 +01:00
Paolo Teti
97e6b3712a Add support for sub*f3vfp and add*f3vfp
As done before for mul and div let's use extern "C" to generate `"aapcs"`
or `"aapcs-vfp"` depending on target configuration.
2018-02-04 18:34:31 +01:00
Paolo Teti
9a4e458b48 Add support for mul[s/d]f3vfp and div[s/d]f3vfp
Here using `"C"` the compiler will use `"aapcs"` or `"aapcs-vfp"`
depending on target configuration.

Of course this translates in a call to `__aeabi_fdiv` / `__aeabi_fmul`
on non-HF targets.

On `eabi` targets with +vfpv2/vfpv3 LLVM generate:

   vmov	s0, r1
   vmov	s2, r0
   vdiv.f32	s0, s2, s0
   vmov	r0, s0
   bx	lr

On `eabihf` targets with +vfpv3-d16/d32/f32 +fp-only-sp LLVM generate:

  vdiv.f32	s0, s0, s1
  bx	lr

That's exactly what We need for [div/mul][s/d]f3vfp.S
2018-01-29 20:49:55 +01:00
whitequark
45112fc65f README: update to explain how to run quickcheck-style tests. 2017-12-29 06:36:09 +00:00
whitequark
24175dd6ca Implement comparesf2/comparedf2 intrinsics. 2017-12-28 03:45:32 +00:00
whitequark
c329f6ef75 comparesf2/comparedf2 are called on soft-float targets.
E.g. take a look at the assembly output for:

  pub fn comparesf2(a: f32, b: f32) -> bool { a > b }
  pub fn comparedf2(a: f64, b: f64) -> bool { a > b }

which will include calls to __gtsf2 and __gtdf2.
2017-12-28 02:57:42 +00:00
Oliver Geller
99ea83e095 Implement divsf3 and divdf3 2017-11-13 20:22:27 -05:00
Oliver Geller
5923e278c3 Implement mulsf3 and muldf3 2017-11-08 17:36:34 -05:00
Matt Ickstadt
1f98921e44 Implement x86 chkstk in "rust" 2017-09-15 18:04:59 -05:00
Geoff Yoerger
21c82e419d Fix README relative link. 2017-08-21 16:17:04 -05:00
Alex Crichton
ebcf7fac6a Compile ffsdi2 with rustbuild feature
This is not used by LLVM/Rust, but is apparently used by gcc/C which jemalloc
can require at least.
2017-07-03 15:00:51 -07:00
est31
2aaaa38e25 Mark the functions just implemented in README.md 2017-05-06 15:47:38 +02:00
est31
21db51b3f8 Mark some float related intrinsics as implemented in README.md
They have been implemented since
2017-05-06 00:42:59 +02:00
est31
b1561fc195 u128 sdiv intrinsics 2017-02-02 22:13:28 +01:00