Commit Graph

52 Commits

Author SHA1 Message Date
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
est31
37a62269dc u128 udiv intrinsics 2017-02-02 22:11:14 +01:00
est31
a38eee9ea1 i128 shift intrinsics 2017-02-02 22:02:51 +01:00
est31
19700fb03d i128 mul intrinsics 2017-02-02 21:36:56 +01:00
Jorge Aparicio
1074677eb0 mention that 'extern crate compiler_builtins' must be used
in some crate that's part of the dependency graph of the crate one's
building.
2016-10-19 11:25:16 -05:00
Phaiax
f511f67752 Fix url in readme 2016-10-15 19:21:23 +02:00
Jorge Aparicio
04639c2f54 update the title as well 2016-10-14 19:59:00 -05:00
Alex Crichton
b92c6caa06 More small updates to the README 2016-10-14 15:50:50 -07:00
Jorge Aparicio
b4f4913e6b README: remove the Contribution sub-section
which still referred to the Apache-2 license and is now deprecated by
the updated License section

cc @brson
2016-10-13 20:51:50 -05:00
Brian Anderson
7928431aea Correct the license to that of upstream compiler-rt
As this is a derivative work we must maintain the same license terms.
2016-10-12 17:50:39 +00:00
Matt Ickstadt
e6bc8007dd Implement powi_f2 2016-10-03 11:20:42 -05:00
Alex Crichton
e7c804a9b0 Expand and refactor teting infrastructure
This commit moves over most of the testing infrastructure to in-tree docker
images that are all dispatched to from Travis (no other test configuration).
This allows versioning modifications to the test infrastructure as well as the
code itself. Additionally separate docker images allows for easy modification of
one without worrying about tampering of others as well as easy addition of new
targets by simply adding a new `Dockerfile`.

Additionally this commit bundles the master version of the `compiler-rt` source
repository from `llvm-mirror/compiler-rt` to test against. The compiler-rt
library itself is compiled as a `cdylib` which is then dynamically located at
runtime and we look for symbols in. There's a few hoops here, but they currently
get the job done.

All tests now execute against both gcc_s and compiler-rt, and this
testing strategy is now all hidden behind a macro as well (refactoring
all existing tests along the way).
2016-09-28 22:09:55 -07:00
Jorge Aparicio
152f5150f6 homu test 2016-09-10 19:12:50 -05:00
Jorge Aparicio
74459fdf12 test for homu 2016-09-10 18:37:35 -05:00
Jorge Aparicio
ff17cfaa46 README: when and how to use this crate 2016-08-23 20:35:30 -05:00
Jorge Aparicio
72db6febd0 README: add AppVeyor badge 2016-08-23 20:23:28 -05:00
Jorge Aparicio
bcf5a641df README: fix link 2016-08-23 20:17:39 -05:00
Matt Ickstadt
6a96cf52b6 Add a Porting Reminders section to the README 2016-08-21 15:49:32 -05:00
Matt Ickstadt
fe3c35131f Implement soft float add builtins 2016-08-20 16:06:02 -05:00
Jorge Aparicio
f96d56dc37 Merge pull request #44 from Amanieu/sdiv
Add signed division functions
2016-08-19 09:16:53 -05:00
Amanieu d'Antras
161234b8b3 Add signed division functions 2016-08-19 12:13:02 +01:00
Matt Ickstadt
f9c8ca854a Check off x86_64 builtins in README
[ci ignore]
2016-08-17 14:35:48 -05:00
Amanieu d'Antras
1a60c3d52f Various changes 2016-08-13 09:56:40 +01:00
Jorge Aparicio
f22f7cdd86 README: cross out a few intrinsics for the TODO list 2016-08-11 02:12:01 -05:00
Amanieu d'Antras
68e0b7657c Remove the x86-specific floating-point builtins 2016-08-08 08:36:59 +01:00
Amanieu d'Antras
6f22c85b25 Remove builtins that are not called by LLVM 2016-08-08 08:25:11 +01:00
Amanieu d'Antras
1b0cfdc477 Clean up function list in README 2016-08-08 06:54:00 +01:00
Jorge Aparicio
c691a4e475 README: add Contributing and Progress sections 2016-08-07 21:05:42 -05:00