Skip to content

Conversation

alexcrichton
Copy link
Member

Looks like our tests weren't quite testing compiler-builtins when it was
compiled with unmangled symbols, so update the tests to catch this and
then fix the compilation of the __clzsi2 intrinsic to use the C
version if it's compiled.

Looks like our tests weren't quite testing compiler-builtins when it was
compiled with unmangled symbols, so update the tests to catch this and
then fix the compilation of the `__clzsi2` intrinsic to use the C
version if it's compiled.
@alexcrichton alexcrichton merged commit 4addb9b into rust-lang:master May 2, 2019
@alexcrichton alexcrichton deleted the fix-dupe branch May 2, 2019 22:17
alexcrichton added a commit to alexcrichton/compiler-builtins that referenced this pull request May 14, 2019
This fixes a longstanding bug in compiler-builtins where C code was
compiled for the riscv targets but when distributed in rust-lang/rust
all the C code was actually compiled for x86_64 since there is no
configured C compiler for riscv. This was exposed by rust-lang#286 by accident
but the underlying cause was somewhat unrelated.

For now we forcibly disable C code for riscv targets, and when the C
compiler story is sorted out in rust-lang/rust and with `cc-rs` we can
reenable. For now just use all the Rust definitions.

cc rust-lang/rust#60747
tgross35 pushed a commit to tgross35/compiler-builtins that referenced this pull request Feb 23, 2025
…s related

to detecting underflow/overflow. The functions now match the behavior of the
MUSL implementations these were based on.

Fixes rust-lang#286
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant