Commit graph

1518 commits

Author SHA1 Message Date
WANG Rui
ec673535f7 ci: add support for loongarch64-unknown-linux-gnu 2024-11-01 05:48:47 -05:00
hev
ca996df5c1
Use f16_enabled/f128_enabled in examples/intrinsics.rs (#724)
Enable conditional compilation for intrinsics with `f16_enabled` and `f128_enabled`
2024-11-01 10:34:51 +00:00
hev
53b3e71bbc
Disable f16 for LoongArch64 (#722)
Disable `f161` for LoongArch64 due to incorrect code generation on LLVM 19,
which causes failures in `testcrate/tests/conv.rs`. This workaround will
remain in place until llvm/llvm-project#109093 is merged or we upgrade to
LLVM 20.
2024-11-01 10:00:00 +00:00
github-actions[bot]
94e6ed373a chore: release v0.1.137 2024-10-31 19:13:38 -05:00
Trevor Gross
717128af3c
Merge pull request #624 from tgross35/f128-int-to-float
Add f128 int to float conversions
2024-10-30 12:36:12 -05:00
Trevor Gross
9818afad7c Remove the unneeded isqrt feature gate
[1] has been stabilized so we no longer need to enable it.

[1]: https://github.com/rust-lang/rust/issues/116226
2024-10-30 12:27:59 -05:00
Trevor Gross
fbd6907358 Add integer to f128 conversions 2024-10-30 12:25:24 -05:00
Trevor Gross
51dd4da053 Refactor integer to float conversion
Extract some common routines to separate functions in order to
deduplicate code and remove some of the magic.
2024-10-30 12:25:22 -05:00
Trevor Gross
1dc50415cd Add an apfloat fallback for int to float tests 2024-10-30 12:22:57 -05:00
Trevor Gross
ad465ce6bd
Merge pull request #719 from rust-lang/release-plz-2024-10-25T19-38-24Z
chore: release v0.1.136
2024-10-26 18:35:41 -05:00
github-actions[bot]
f9914e98b3
chore: release v0.1.136 2024-10-26 23:29:14 +00:00
Trevor Gross
73f1e5b8c2
Merge pull request #720 from tgross35/update-libm
Update the libm submodule
2024-10-26 18:28:48 -05:00
Trevor Gross
01a2a13a01 Update the libm submodule 2024-10-26 18:22:14 -05:00
Trevor Gross
0d241d63ea
Merge pull request #717 from tgross35/update-licensing
Update licensing to Apache-2.0 WITH LLVM-exception AND MIT
2024-10-26 17:43:20 -05:00
Trevor Gross
6399bed36c Update licensing to MIT AND Apache-2.0 WITH LLVM-exception
Currently, Cargo.toml specifies Apache-2.0 OR MIT, but LICENSE.txt
describes MIT OR NCSA. compiler-builtins is derived from LLVM's
compiler-rt. LICENSE.txt correctly reflects the state of compiler-rt
prior to relicensing on 2019-01-19, during which time software was
available for use under either MIT or the University of Illinois NCSA
license. After relicensing, however, compiler-rt is available for use
only under Apache-2.0 with the LLVM exception; this is not reflected
anywhere in the repository.

Update the SPDX license identifier to `MIT AND Apache-2.0 WITH
LLVM-exception AND (MIT OR Apache-2.0)`. Each AND portion covers
something specific:

* Apache-2.0 WITH LLVM-exception: this covers work that is derived from
  the LLVM repository since after the LLVM relicensing.
* MIT: This covers work that is derived from LLVM before the LLVM
  relicensing (under MIT OR NCSA), as well as the vendored `libm`
  components.
* MIT AND Apache-2.0: This ensures that any contributions to this
  repository, in addition to meeting the above required licenses, is
  also released for use under the Rust-standard Apache-2.0 with no LLVM
  exception.

See also the parallel license update in rust-lang/libm [1].

Fixes: https://github.com/rust-lang/compiler-builtins/issues/307
Closes: https://github.com/rust-lang/compiler-builtins/pull/511
Link: https://rust-lang.zulipchat.com/#narrow/channel/335408-foundation/topic/Request.20for.20legal.20team.20input.20on.20crate.20licensing
Link: https://github.com/rust-lang/libm/pull/317 [1]
2024-10-26 17:35:26 -05:00
Trevor Gross
8184473187
Merge pull request #718 from tgross35/float-trait-refactor
Rename Float::repr and Float::from_repr
2024-10-25 14:38:01 -05:00
Trevor Gross
394fb9f2bc Add an abs function to the Float trait
There is no in-crate use for this yet, but we will make use of it in
`libm`.
2024-10-25 14:30:03 -05:00
Trevor Gross
2f7fafd182 Rename Float::repr and Float::from_repr
`to_bits` and `from_bits` are builtin methods on float types. Rename
`repr` to `to_bits` and `from_repr` to `from_bits` so this is consistent
with usage that doesn't go through the trait.
2024-10-25 14:18:53 -05:00
Trevor Gross
e4948d4295
Merge pull request #716 from rust-lang/release-plz-2024-10-23T09-57-02Z
chore: release v0.1.135
2024-10-23 05:06:04 -05:00
github-actions[bot]
ce89a70ae4
chore: release v0.1.135 2024-10-23 09:57:03 +00:00
Trevor Gross
8c26f3dd26
Merge pull request #715 from YtvwlD/math-i686-uefi
Re-enable math module on i686-unknown-uefi
2024-10-23 04:56:30 -05:00
Niklas Sombert
68b820187b Re-enable math module on i686-unknown-uefi
In 9ba77d1583e6de5ab9cf7c9b82827ba8fcb9062f, this was disabled for x86
without sse2. It should be fine to re-enable it for UEFI, as explained at
<https://github.com/rust-lang/rust/issues/128533#issuecomment-2408699671>.
2024-10-23 11:39:33 +02:00
Trevor Gross
8c66edb244
Merge pull request #714 from rust-lang/release-plz-2024-10-17T23-55-24Z
chore: release v0.1.134
2024-10-17 19:03:22 -05:00
github-actions[bot]
3e922da156
chore: release v0.1.134 2024-10-17 23:55:25 +00:00
Trevor Gross
26ca96a2f9
Merge pull request #713 from saethlin/permissive-memcpy
Use wrapping pointer arithmetic in mem/impls.rs
2024-10-17 18:55:02 -05:00
Ben Kimock
2a738c50ab Use wrapping pointer arithmetic in mem/impls.rs
Add a comment (and fix a typo)
2024-10-16 22:37:42 -04:00
Trevor Gross
fff4c16873
Merge pull request #709 from rust-lang/release-plz-2024-10-06T02-07-59Z
chore: release v0.1.133
2024-10-05 22:21:06 -04:00
github-actions[bot]
fedfc6aaab
chore: release 2024-10-06 02:08:00 +00:00
Trevor Gross
a2d66e9869
Merge pull request #708 from tgross35/raskyld/master
fix(int): avoid infinite recursion on left shift #707
2024-10-05 22:07:36 -04:00
Trevor Gross
996799a896 Add a note about avoiding default implemenations in some places
Link: https://github.com/rust-lang/compiler-builtins/pull/707
2024-10-05 20:55:47 -05:00
Enzo "raskyld" Nocera
8153729f91 fix(int): avoid infinite recursion on left shift
Please, see this discussion for the full
context: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.5Bwasm32.5D.20Infinite.20recursion.20.60compiler-builtins.60.20.60__multi3.60

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

We determined that some recursion problems on SPARC and WASM were due to
infinite recusion. This was introduced at 9c6fcb56e8 ("Split Int into
Int and MinInt") when moving the implementation of `widen_hi` from
something on each `impl` block to a default on the trait. The reasoning
is not fully understood, but undoing this portion of the change seems to
resolve the issue.

[ add the above context - Trevor ]

Signed-off-by: Trevor Gross <tmgross@umich.edu>
2024-10-05 20:49:45 -05:00
Trevor Gross
d150d472fe
Merge pull request #705 from rust-lang/release-plz-2024-10-03T15-57-49Z
chore: release v0.1.132
2024-10-04 13:24:32 -04:00
github-actions[bot]
3edc27ef56
chore: release 2024-10-04 17:17:03 +00:00
Trevor Gross
ef4c4f2eb7
Merge pull request #706 from XrXr/limit-fix
Allow implicit function decl on A64
2024-10-04 13:16:32 -04:00
Alan Wu
3f70601e3c Allow implicit function decl on A64
Testing in <https://github.com/rust-lang/rust/pull/131221>, we found
that <https://github.com/rust-lang/compiler-builtins/pull/627> is
unusable with the current LLVM version.
2024-10-04 12:33:16 -04:00
Trevor Gross
f4bde3fdc9
Merge pull request #703 from tgross35/upgrade-llvm-version
Upgrade CI LLVM version to 19.1
2024-10-03 11:57:25 -04: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
0f80e4c91c
Merge pull request #700 from rust-lang/release-plz-2024-09-28T22-28-58Z
chore: release v0.1.131
2024-10-03 11:44:18 -04:00
github-actions[bot]
859e22b4ae
chore: release 2024-10-03 15:37:33 +00:00
Trevor Gross
e34e130081
Merge pull request #627 from XrXr/werror-implicit-function-declaration
Build with `-Werror=implicit-function-declaration`
2024-10-03 11:37:05 -04:00
Alan Wu
edc6f80dcc Build with -Werror=implicit-function-declaration
To prevent fail-fast in situations like
https://github.com/rust-lang/rust/issues/125619, where an upstream
source compiles but creates a link error way downstream.
2024-10-03 11:24:49 -04:00
Amanieu d'Antras
f5010ea4f9
Merge pull request #704 from tgross35/riscv-ci 2024-10-03 10:42:53 -04:00
Trevor Gross
0c97b10dc0 Add riscv64gc to CI
There is a proposal to promote `riscv64gc-unknown-linux-gnu` to tier 1
[1]. We do not currently test RISC-V in CI; add it here.

[1]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Imminent.20RFC.20PR.3A.20riscv64gc-unknown-linux-gnu.20to.20Tier-1
2024-10-02 16:35:28 -04:00
Trevor Gross
601b0d0062
Merge pull request #701 from tgross35/shellcheck-fixes
Fix some warnings from shellcheck
2024-09-28 21:31:47 -04:00
Trevor Gross
85cd4c0660 Fix some warnings from shellcheck 2024-09-28 21:24:44 -04:00
Trevor Gross
6f58073dbf
Merge pull request #699 from tgross35/resolve-macro-fixme
Revert "Temporarily `use define_rust_probestack;`"
2024-09-28 18:28:35 -04:00
Trevor Gross
c6b434e5a3 Revert "Temporarily use define_rust_probestack;"
<https://github.com/rust-lang/rust/issues/126984> has been resolved.
Remove the workaround that was introduced to suppress it.

This reverts commit 254edbcad4cfd6a8af32e3297c1037d7984c3c49.
2024-09-28 18:22:22 -04:00
Trevor Gross
d08a0ce015
Merge pull request #698 from tgross35/skip-asm-checks-fixme
Ungate tests that were skipped due to a broken implementation
2024-09-28 18:21:52 -04:00
Trevor Gross
e226c0dce5 Ungate tests that were skipped due to a broken implementation
The upstream issue [1] has been resolved so we can enable these tests
again.

[1]: https://github.com/rust-lang/compiler-builtins/issues/616
2024-09-28 18:13:34 -04:00
Trevor Gross
ac07aeb2db
Merge pull request #697 from tgross35/f16-asm
Resolve FIXMEs related to `f16` assembly
2024-09-28 18:04:31 -04:00