Commit Graph

18 Commits (0a15c9bdfe97b76f61fdc06626cecc0573aa8269)

Author SHA1 Message Date
Daniel Frampton 0a15c9bdfe Don't modify the intrinsic abi for aarch64 windows (#337) 2020-01-14 15:28:10 -06:00
bjorn3 783430e6ae Replace {u,i}128_* lang items with __rust_{u,i}128_* unmangled functions
The -Zlower-128bit-ops feature is completely broken, as libcore needs
those lang items to compile with this feature, but they are only
provided by compiler_builtins, which itself depends on libcore.
According to rust-lang/rust#58969 the feature never got finished.

This commit removes the associated lang items and replaces them with
normal unmangled functions, when there is no existing intrinsic. This
makes it easier for alternative codegen backends to implement 128bit
integer support.
2019-07-13 11:38:35 +02:00
Alex Crichton cf98161da7 Remove the need for #[cfg] in #[use_c_shim_if]
This commit tweaks the implementation of the synthetic
`#[use_c_shim_if]` attribute, renaming it to
`#[maybe_use_optimized_c_shim]` in the process. This no longer requires
specifying a `#[cfg]` clause indicating when the optimized intrinsic
should be used, but rather this is inferred and printed from the build
script.

The build script will now print out appropriate `#[cfg]` directives for
rustc to indicate what intrinsics it's compiling. This should remove the
need for us to keep the build script and the source in sync, but rather
the build script can simply take care of everything.
2019-05-15 12:59:31 -07:00
Alex Crichton c88c9502b7 Run rustfmt over everything 2019-05-14 14:40:38 -07:00
Tim Neumann 5be54652e9 Fix incorrect names used / generated on ARM 2018-03-27 14:32:01 +02:00
Alex Crichton 2a13475197 Simplify how testing is done
All tests are moved to a separate crate in this repository to enable features by
default. Additionally the test generation is moved to a seprate build script and
simplified to reduce the amount of boilerplate needed per test.

Overall this should still be testing everything, just in a different location!
2018-01-31 11:32:20 -08:00
Alex Crichton a6f7dfd2fd Fix nightly CI
Currently we're getting lots of errors about duplicate lang items so deal with
this by `#[cfg_attr]`'ing off the lang item attribute in tests.
2017-12-08 08:19:28 -08:00
Alex Crichton 45cd956acc Prepare this crate for more wasm32 compatibility
This commit prepares the build script for a wasm32 target that doesn't use
Emcripten, notably forcing the `mem` feature to get activated and forcibly
ignoring the `c` feature, even if activated, for the wasm32 target.
2017-11-01 19:29:41 -07:00
Alex Crichton afe5c717a9 Address review comments 2017-06-24 21:51:34 -07:00
Alex Crichton c193113721 Don't test mangled names on thumb
We are both the "real compiler-rt" and the "to be tested one".
2017-06-24 12:54:35 -07:00
Alex Crichton 734ec3d31c Tweak testing and such:
* Don't run `intrinsics` tests on thumb
* Disable `compiler_builtins` attribute on `feature = "gen-tests"`
* Disable mangling on `feature = "gen-tests"` instead of `cfg(test)`
2017-06-24 10:10:04 -07:00
Alex Crichton eabb6fab4a Shore up docs in the macros module 2017-06-23 16:28:50 -07:00
Alex Crichton 7de57cd4f9 Handle aeabi aliasing
Objects in compiler-rt may have two symbols, so this makes sure that we don't
bring in those objects by accident by defining the aliases ourselves.
2017-06-23 15:55:11 -07:00
Alex Crichton 4c41b5649f Fix use_c_shim_if 2017-06-23 07:54:31 -07:00
Alex Crichton 12a0038250 Fix the abi hack on windows 2017-06-22 23:36:50 -07:00
Alex Crichton 7886ae275b Port sdiv to traits + `intrinsics!`
Enhance `intrinsics!` along the way!
2017-06-22 23:09:28 -07:00
Alex Crichton 275d1032b5 Port mul intrinsics to traits
Also add a few features to the `intrinsics!` macro
2017-06-22 22:36:37 -07:00
Alex Crichton 2f2bb32e40 Use traits instead of macros for shift intrinsics
This is an attempt to tidy up the definition of intrinsics by making them more
rust-like at the definition site and using traits instead of macros for the
definition. Additionally the helper macro, `intrinsics!`, now fills in a
definition for #[cfg]'d off intrinsics when compiling with C code
2017-06-22 22:03:07 -07:00