Skip to content

Commit

Permalink
Merge branch 'rust-lang:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
sbechet authored Sep 2, 2024
2 parents 1122377 + 6bec9db commit 1348a3b
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Jorge Aparicio <[email protected]>"]
name = "compiler_builtins"
version = "0.1.122"
version = "0.1.124"
license = "MIT/Apache-2.0"
readme = "README.md"
repository = "https://github.com/rust-lang/compiler-builtins"
Expand Down
2 changes: 0 additions & 2 deletions src/hexagon/dffma.s
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
.type __hexagon_fmadf4,@function
.global __hexagon_fmadf5
.type __hexagon_fmadf5,@function
.global fma
.type fma,@function
.global __qdsp_fmadf5 ; .set __qdsp_fmadf5, __hexagon_fmadf5
.p2align 5
__hexagon_fmadf4:
Expand Down
6 changes: 0 additions & 6 deletions src/hexagon/dfminmax.s
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
.text
.global __hexagon_mindf3
.global __hexagon_maxdf3
.global fmin
.type fmin,@function
.global fmax
.type fmax,@function
.type __hexagon_mindf3,@function
.type __hexagon_maxdf3,@function
.global __qdsp_mindf3 ; .set __qdsp_mindf3, __hexagon_mindf3
.global __qdsp_maxdf3 ; .set __qdsp_maxdf3, __hexagon_maxdf3
.p2align 5
__hexagon_mindf3:
fmin:
{
p0 = dfclass(r1:0,#0x10)
p1 = dfcmp.gt(r1:0,r3:2)
Expand All @@ -31,7 +26,6 @@ fmin:
.size __hexagon_mindf3,.-__hexagon_mindf3
.falign
__hexagon_maxdf3:
fmax:
{
p0 = dfclass(r1:0,#0x10)
p1 = dfcmp.gt(r3:2,r1:0)
Expand Down
30 changes: 15 additions & 15 deletions src/hexagon/fastmath2_dlib_asm.s
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.text
.global fast2_dadd_asm
.type fast2_dadd_asm, @function
fast2_dadd_asm:
.global __hexagon_fast2_dadd_asm
.type __hexagon_fast2_dadd_asm, @function
__hexagon_fast2_dadd_asm:
.falign
{
R7:6 = VABSDIFFH(R1:0, R3:2)
Expand Down Expand Up @@ -49,9 +49,9 @@ fast2_dadd_asm:
jumpr r31
}
.text
.global fast2_dsub_asm
.type fast2_dsub_asm, @function
fast2_dsub_asm:
.global __hexagon_fast2_dsub_asm
.type __hexagon_fast2_dsub_asm, @function
__hexagon_fast2_dsub_asm:
.falign
{
R7:6 = VABSDIFFH(R1:0, R3:2)
Expand Down Expand Up @@ -99,9 +99,9 @@ fast2_dsub_asm:
jumpr r31
}
.text
.global fast2_dmpy_asm
.type fast2_dmpy_asm, @function
fast2_dmpy_asm:
.global __hexagon_fast2_dmpy_asm
.type __hexagon_fast2_dmpy_asm, @function
__hexagon_fast2_dmpy_asm:
.falign
{
R13= lsr(R2, #16)
Expand Down Expand Up @@ -167,9 +167,9 @@ fast2_dmpy_asm:
jumpr r31
}
.text
.global fast2_qd2f_asm
.type fast2_qd2f_asm, @function
fast2_qd2f_asm:
.global __hexagon_fast2_qd2f_asm
.type __hexagon_fast2_qd2f_asm, @function
__hexagon_fast2_qd2f_asm:
.falign
{
R3 = abs(R1):sat
Expand Down Expand Up @@ -225,9 +225,9 @@ fast2_qd2f_asm:
jumpr r31
}
.text
.global fast2_f2qd_asm
.type fast2_f2qd_asm, @function
fast2_f2qd_asm:
.global __hexagon_fast2_f2qd_asm
.type __hexagon_fast2_f2qd_asm, @function
__hexagon_fast2_f2qd_asm:



Expand Down
18 changes: 9 additions & 9 deletions src/hexagon/fastmath2_ldlib_asm.s
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.text
.global fast2_ldadd_asm
.type fast2_ldadd_asm, @function
fast2_ldadd_asm:
.global __hexagon_fast2ldadd_asm
.type __hexagon_fast2ldadd_asm, @function
__hexagon_fast2ldadd_asm:
.falign
{
R4 = memw(r29+#8)
Expand Down Expand Up @@ -54,9 +54,9 @@ fast2_ldadd_asm:
jumpr r31
}
.text
.global fast2_ldsub_asm
.type fast2_ldsub_asm, @function
fast2_ldsub_asm:
.global __hexagon_fast2ldsub_asm
.type __hexagon_fast2ldsub_asm, @function
__hexagon_fast2ldsub_asm:
.falign
{
R4 = memw(r29+#8)
Expand Down Expand Up @@ -109,9 +109,9 @@ fast2_ldsub_asm:
jumpr r31
}
.text
.global fast2_ldmpy_asm
.type fast2_ldmpy_asm, @function
fast2_ldmpy_asm:
.global __hexagon_fast2ldmpy_asm
.type __hexagon_fast2ldmpy_asm, @function
__hexagon_fast2ldmpy_asm:
.falign
{
R15:14 = memd(r29+#0)
Expand Down
13 changes: 10 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,16 @@ mod macros;
pub mod float;
pub mod int;

// Disabled on x86 without sse2 due to ABI issues
// <https://github.com/rust-lang/rust/issues/114479>
#[cfg(not(all(target_arch = "x86", not(target_feature = "sse2"))))]
// Disable for any of the following:
// - x86 without sse2 due to ABI issues
// - <https://github.com/rust-lang/rust/issues/114479>
// - All unix targets (linux, macos, freebsd, android, etc)
// - wasm with known target_os
#[cfg(not(any(
all(target_arch = "x86", not(target_feature = "sse2")),
unix,
all(target_family = "wasm", not(target_os = "unknown"))
)))]
pub mod math;
pub mod mem;

Expand Down
3 changes: 2 additions & 1 deletion src/math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ macro_rules! no_mangle {
}
}

#[cfg(all(not(windows), not(target_vendor = "apple")))]
#[cfg(not(windows))]
no_mangle! {
fn acos(x: f64) -> f64;
fn asin(x: f64) -> f64;
Expand Down Expand Up @@ -92,6 +92,7 @@ no_mangle! {
fn fmodf(x: f32, y: f32) -> f32;
}

// allow for windows (and other targets)
intrinsics! {
pub extern "C" fn lgamma_r(x: f64, s: &mut i32) -> f64 {
let r = self::libm::lgamma_r(x);
Expand Down

0 comments on commit 1348a3b

Please sign in to comment.