diff --git a/compiler-builtins/src/math.rs b/compiler-builtins/src/math.rs index bd52a749e..722374f8e 100644 --- a/compiler-builtins/src/math.rs +++ b/compiler-builtins/src/math.rs @@ -2,7 +2,7 @@ #[allow(dead_code)] #[allow(unused_imports)] #[allow(clippy::all)] -#[path = "../../libm/libm/src/math/mod.rs"] +#[path = "../../libm/src/math/mod.rs"] pub(crate) mod libm; macro_rules! libm_intrinsics { diff --git a/libm/crates/libm-macros/Cargo.toml b/crates/libm-macros/Cargo.toml similarity index 100% rename from libm/crates/libm-macros/Cargo.toml rename to crates/libm-macros/Cargo.toml diff --git a/libm/crates/libm-macros/src/enums.rs b/crates/libm-macros/src/enums.rs similarity index 100% rename from libm/crates/libm-macros/src/enums.rs rename to crates/libm-macros/src/enums.rs diff --git a/libm/crates/libm-macros/src/lib.rs b/crates/libm-macros/src/lib.rs similarity index 100% rename from libm/crates/libm-macros/src/lib.rs rename to crates/libm-macros/src/lib.rs diff --git a/libm/crates/libm-macros/src/parse.rs b/crates/libm-macros/src/parse.rs similarity index 100% rename from libm/crates/libm-macros/src/parse.rs rename to crates/libm-macros/src/parse.rs diff --git a/libm/crates/libm-macros/src/shared.rs b/crates/libm-macros/src/shared.rs similarity index 100% rename from libm/crates/libm-macros/src/shared.rs rename to crates/libm-macros/src/shared.rs diff --git a/libm/crates/libm-macros/tests/basic.rs b/crates/libm-macros/tests/basic.rs similarity index 100% rename from libm/crates/libm-macros/tests/basic.rs rename to crates/libm-macros/tests/basic.rs diff --git a/libm/crates/libm-macros/tests/enum.rs b/crates/libm-macros/tests/enum.rs similarity index 100% rename from libm/crates/libm-macros/tests/enum.rs rename to crates/libm-macros/tests/enum.rs diff --git a/libm/crates/musl-math-sys/Cargo.toml b/crates/musl-math-sys/Cargo.toml similarity index 100% rename from libm/crates/musl-math-sys/Cargo.toml rename to crates/musl-math-sys/Cargo.toml diff --git a/libm/crates/musl-math-sys/build.rs b/crates/musl-math-sys/build.rs similarity index 100% rename from libm/crates/musl-math-sys/build.rs rename to crates/musl-math-sys/build.rs diff --git a/libm/crates/musl-math-sys/c_patches/alias.c b/crates/musl-math-sys/c_patches/alias.c similarity index 100% rename from libm/crates/musl-math-sys/c_patches/alias.c rename to crates/musl-math-sys/c_patches/alias.c diff --git a/libm/crates/musl-math-sys/c_patches/features.h b/crates/musl-math-sys/c_patches/features.h similarity index 100% rename from libm/crates/musl-math-sys/c_patches/features.h rename to crates/musl-math-sys/c_patches/features.h diff --git a/libm/crates/musl-math-sys/src/lib.rs b/crates/musl-math-sys/src/lib.rs similarity index 100% rename from libm/crates/musl-math-sys/src/lib.rs rename to crates/musl-math-sys/src/lib.rs diff --git a/libm/crates/util/Cargo.toml b/crates/util/Cargo.toml similarity index 100% rename from libm/crates/util/Cargo.toml rename to crates/util/Cargo.toml diff --git a/libm/crates/util/build.rs b/crates/util/build.rs similarity index 100% rename from libm/crates/util/build.rs rename to crates/util/build.rs diff --git a/libm/crates/util/src/main.rs b/crates/util/src/main.rs similarity index 100% rename from libm/crates/util/src/main.rs rename to crates/util/src/main.rs diff --git a/libm/etc/function-definitions.json b/etc/function-definitions.json similarity index 100% rename from libm/etc/function-definitions.json rename to etc/function-definitions.json diff --git a/libm/etc/function-list.txt b/etc/function-list.txt similarity index 100% rename from libm/etc/function-list.txt rename to etc/function-list.txt diff --git a/libm/.editorconfig b/etc/libm/.editorconfig similarity index 100% rename from libm/.editorconfig rename to etc/libm/.editorconfig diff --git a/libm/.github/workflows/main.yaml b/etc/libm/.github/workflows/main.yaml similarity index 100% rename from libm/.github/workflows/main.yaml rename to etc/libm/.github/workflows/main.yaml diff --git a/libm/.github/workflows/publish.yaml b/etc/libm/.github/workflows/publish.yaml similarity index 100% rename from libm/.github/workflows/publish.yaml rename to etc/libm/.github/workflows/publish.yaml diff --git a/libm/.gitignore b/etc/libm/.gitignore similarity index 100% rename from libm/.gitignore rename to etc/libm/.gitignore diff --git a/etc/libm/Cargo.toml b/etc/libm/Cargo.toml new file mode 100644 index 000000000..268b6fb0e --- /dev/null +++ b/etc/libm/Cargo.toml @@ -0,0 +1,37 @@ +[workspace] +resolver = "2" +members = [ + "libm", + "crates/libm-macros", + "crates/libm-test", + "crates/musl-math-sys", + "crates/util", +] +default-members = [ + "libm", + "crates/libm-macros", + "crates/libm-test" +] +exclude = [ + # Requires `panic = abort` so can't be a member of the workspace + "crates/compiler-builtins-smoke-test", +] + +# The default release profile is unchanged. + +# Release mode with debug assertions +[profile.release-checked] +inherits = "release" +debug-assertions = true +overflow-checks = true + +# Release with maximum optimizations, which is very slow to build. This is also +# what is needed to check `no-panic`. +[profile.release-opt] +inherits = "release" +codegen-units = 1 +lto = "fat" + +[profile.bench] +# Required for iai-callgrind +debug = true diff --git a/libm/ci/bench-icount.sh b/etc/libm/ci/bench-icount.sh similarity index 100% rename from libm/ci/bench-icount.sh rename to etc/libm/ci/bench-icount.sh diff --git a/libm/ci/ci-util.py b/etc/libm/ci/ci-util.py similarity index 100% rename from libm/ci/ci-util.py rename to etc/libm/ci/ci-util.py diff --git a/libm/ci/docker/aarch64-unknown-linux-gnu/Dockerfile b/etc/libm/ci/docker/aarch64-unknown-linux-gnu/Dockerfile similarity index 100% rename from libm/ci/docker/aarch64-unknown-linux-gnu/Dockerfile rename to etc/libm/ci/docker/aarch64-unknown-linux-gnu/Dockerfile diff --git a/libm/ci/docker/arm-unknown-linux-gnueabi/Dockerfile b/etc/libm/ci/docker/arm-unknown-linux-gnueabi/Dockerfile similarity index 100% rename from libm/ci/docker/arm-unknown-linux-gnueabi/Dockerfile rename to etc/libm/ci/docker/arm-unknown-linux-gnueabi/Dockerfile diff --git a/libm/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile b/etc/libm/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile similarity index 100% rename from libm/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile rename to etc/libm/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile diff --git a/libm/ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile b/etc/libm/ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile similarity index 100% rename from libm/ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile rename to etc/libm/ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile diff --git a/libm/ci/docker/i586-unknown-linux-gnu/Dockerfile b/etc/libm/ci/docker/i586-unknown-linux-gnu/Dockerfile similarity index 100% rename from libm/ci/docker/i586-unknown-linux-gnu/Dockerfile rename to etc/libm/ci/docker/i586-unknown-linux-gnu/Dockerfile diff --git a/libm/ci/docker/i686-unknown-linux-gnu/Dockerfile b/etc/libm/ci/docker/i686-unknown-linux-gnu/Dockerfile similarity index 100% rename from libm/ci/docker/i686-unknown-linux-gnu/Dockerfile rename to etc/libm/ci/docker/i686-unknown-linux-gnu/Dockerfile diff --git a/libm/ci/docker/loongarch64-unknown-linux-gnu/Dockerfile b/etc/libm/ci/docker/loongarch64-unknown-linux-gnu/Dockerfile similarity index 100% rename from libm/ci/docker/loongarch64-unknown-linux-gnu/Dockerfile rename to etc/libm/ci/docker/loongarch64-unknown-linux-gnu/Dockerfile diff --git a/libm/ci/docker/mips-unknown-linux-gnu/Dockerfile b/etc/libm/ci/docker/mips-unknown-linux-gnu/Dockerfile similarity index 100% rename from libm/ci/docker/mips-unknown-linux-gnu/Dockerfile rename to etc/libm/ci/docker/mips-unknown-linux-gnu/Dockerfile diff --git a/libm/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile b/etc/libm/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile similarity index 100% rename from libm/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile rename to etc/libm/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile diff --git a/libm/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile b/etc/libm/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile similarity index 100% rename from libm/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile rename to etc/libm/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile diff --git a/libm/ci/docker/mipsel-unknown-linux-gnu/Dockerfile b/etc/libm/ci/docker/mipsel-unknown-linux-gnu/Dockerfile similarity index 100% rename from libm/ci/docker/mipsel-unknown-linux-gnu/Dockerfile rename to etc/libm/ci/docker/mipsel-unknown-linux-gnu/Dockerfile diff --git a/libm/ci/docker/powerpc-unknown-linux-gnu/Dockerfile b/etc/libm/ci/docker/powerpc-unknown-linux-gnu/Dockerfile similarity index 100% rename from libm/ci/docker/powerpc-unknown-linux-gnu/Dockerfile rename to etc/libm/ci/docker/powerpc-unknown-linux-gnu/Dockerfile diff --git a/libm/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile b/etc/libm/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile similarity index 100% rename from libm/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile rename to etc/libm/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile diff --git a/libm/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile b/etc/libm/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile similarity index 100% rename from libm/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile rename to etc/libm/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile diff --git a/libm/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile b/etc/libm/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile similarity index 100% rename from libm/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile rename to etc/libm/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile diff --git a/libm/ci/docker/thumbv6m-none-eabi/Dockerfile b/etc/libm/ci/docker/thumbv6m-none-eabi/Dockerfile similarity index 100% rename from libm/ci/docker/thumbv6m-none-eabi/Dockerfile rename to etc/libm/ci/docker/thumbv6m-none-eabi/Dockerfile diff --git a/libm/ci/docker/thumbv7em-none-eabi/Dockerfile b/etc/libm/ci/docker/thumbv7em-none-eabi/Dockerfile similarity index 100% rename from libm/ci/docker/thumbv7em-none-eabi/Dockerfile rename to etc/libm/ci/docker/thumbv7em-none-eabi/Dockerfile diff --git a/libm/ci/docker/thumbv7em-none-eabihf/Dockerfile b/etc/libm/ci/docker/thumbv7em-none-eabihf/Dockerfile similarity index 100% rename from libm/ci/docker/thumbv7em-none-eabihf/Dockerfile rename to etc/libm/ci/docker/thumbv7em-none-eabihf/Dockerfile diff --git a/libm/ci/docker/thumbv7m-none-eabi/Dockerfile b/etc/libm/ci/docker/thumbv7m-none-eabi/Dockerfile similarity index 100% rename from libm/ci/docker/thumbv7m-none-eabi/Dockerfile rename to etc/libm/ci/docker/thumbv7m-none-eabi/Dockerfile diff --git a/libm/ci/docker/x86_64-unknown-linux-gnu/Dockerfile b/etc/libm/ci/docker/x86_64-unknown-linux-gnu/Dockerfile similarity index 100% rename from libm/ci/docker/x86_64-unknown-linux-gnu/Dockerfile rename to etc/libm/ci/docker/x86_64-unknown-linux-gnu/Dockerfile diff --git a/libm/ci/run-docker.sh b/etc/libm/ci/run-docker.sh similarity index 100% rename from libm/ci/run-docker.sh rename to etc/libm/ci/run-docker.sh diff --git a/libm/ci/run.sh b/etc/libm/ci/run.sh similarity index 100% rename from libm/ci/run.sh rename to etc/libm/ci/run.sh diff --git a/libm/etc/update-api-list.py b/etc/update-api-list.py similarity index 100% rename from libm/etc/update-api-list.py rename to etc/update-api-list.py diff --git a/libm/crates/libm-test/Cargo.toml b/libm-test/Cargo.toml similarity index 100% rename from libm/crates/libm-test/Cargo.toml rename to libm-test/Cargo.toml diff --git a/libm/crates/libm-test/benches/icount.rs b/libm-test/benches/icount.rs similarity index 100% rename from libm/crates/libm-test/benches/icount.rs rename to libm-test/benches/icount.rs diff --git a/libm/crates/libm-test/benches/random.rs b/libm-test/benches/random.rs similarity index 100% rename from libm/crates/libm-test/benches/random.rs rename to libm-test/benches/random.rs diff --git a/libm/crates/libm-test/build.rs b/libm-test/build.rs similarity index 100% rename from libm/crates/libm-test/build.rs rename to libm-test/build.rs diff --git a/libm/crates/libm-test/examples/plot_domains.rs b/libm-test/examples/plot_domains.rs similarity index 100% rename from libm/crates/libm-test/examples/plot_domains.rs rename to libm-test/examples/plot_domains.rs diff --git a/libm/crates/libm-test/examples/plot_file.jl b/libm-test/examples/plot_file.jl similarity index 100% rename from libm/crates/libm-test/examples/plot_file.jl rename to libm-test/examples/plot_file.jl diff --git a/libm/crates/libm-test/src/domain.rs b/libm-test/src/domain.rs similarity index 100% rename from libm/crates/libm-test/src/domain.rs rename to libm-test/src/domain.rs diff --git a/libm/crates/libm-test/src/f8_impl.rs b/libm-test/src/f8_impl.rs similarity index 100% rename from libm/crates/libm-test/src/f8_impl.rs rename to libm-test/src/f8_impl.rs diff --git a/libm/crates/libm-test/src/generate.rs b/libm-test/src/generate.rs similarity index 100% rename from libm/crates/libm-test/src/generate.rs rename to libm-test/src/generate.rs diff --git a/libm/crates/libm-test/src/generate/case_list.rs b/libm-test/src/generate/case_list.rs similarity index 100% rename from libm/crates/libm-test/src/generate/case_list.rs rename to libm-test/src/generate/case_list.rs diff --git a/libm/crates/libm-test/src/generate/edge_cases.rs b/libm-test/src/generate/edge_cases.rs similarity index 100% rename from libm/crates/libm-test/src/generate/edge_cases.rs rename to libm-test/src/generate/edge_cases.rs diff --git a/libm/crates/libm-test/src/generate/random.rs b/libm-test/src/generate/random.rs similarity index 100% rename from libm/crates/libm-test/src/generate/random.rs rename to libm-test/src/generate/random.rs diff --git a/libm/crates/libm-test/src/generate/spaced.rs b/libm-test/src/generate/spaced.rs similarity index 100% rename from libm/crates/libm-test/src/generate/spaced.rs rename to libm-test/src/generate/spaced.rs diff --git a/libm/crates/libm-test/src/lib.rs b/libm-test/src/lib.rs similarity index 100% rename from libm/crates/libm-test/src/lib.rs rename to libm-test/src/lib.rs diff --git a/libm/crates/libm-test/src/mpfloat.rs b/libm-test/src/mpfloat.rs similarity index 100% rename from libm/crates/libm-test/src/mpfloat.rs rename to libm-test/src/mpfloat.rs diff --git a/libm/crates/libm-test/src/num.rs b/libm-test/src/num.rs similarity index 100% rename from libm/crates/libm-test/src/num.rs rename to libm-test/src/num.rs diff --git a/libm/crates/libm-test/src/op.rs b/libm-test/src/op.rs similarity index 100% rename from libm/crates/libm-test/src/op.rs rename to libm-test/src/op.rs diff --git a/libm/crates/libm-test/src/precision.rs b/libm-test/src/precision.rs similarity index 100% rename from libm/crates/libm-test/src/precision.rs rename to libm-test/src/precision.rs diff --git a/libm/crates/libm-test/src/run_cfg.rs b/libm-test/src/run_cfg.rs similarity index 100% rename from libm/crates/libm-test/src/run_cfg.rs rename to libm-test/src/run_cfg.rs diff --git a/libm/crates/libm-test/src/test_traits.rs b/libm-test/src/test_traits.rs similarity index 100% rename from libm/crates/libm-test/src/test_traits.rs rename to libm-test/src/test_traits.rs diff --git a/libm/crates/libm-test/tests/check_coverage.rs b/libm-test/tests/check_coverage.rs similarity index 100% rename from libm/crates/libm-test/tests/check_coverage.rs rename to libm-test/tests/check_coverage.rs diff --git a/libm/crates/libm-test/tests/compare_built_musl.rs b/libm-test/tests/compare_built_musl.rs similarity index 100% rename from libm/crates/libm-test/tests/compare_built_musl.rs rename to libm-test/tests/compare_built_musl.rs diff --git a/libm/crates/libm-test/tests/multiprecision.rs b/libm-test/tests/multiprecision.rs similarity index 100% rename from libm/crates/libm-test/tests/multiprecision.rs rename to libm-test/tests/multiprecision.rs diff --git a/libm/crates/libm-test/tests/standalone.rs b/libm-test/tests/standalone.rs similarity index 100% rename from libm/crates/libm-test/tests/standalone.rs rename to libm-test/tests/standalone.rs diff --git a/libm/crates/libm-test/tests/u256.rs b/libm-test/tests/u256.rs similarity index 100% rename from libm/crates/libm-test/tests/u256.rs rename to libm-test/tests/u256.rs diff --git a/libm/crates/libm-test/tests/z_extensive/main.rs b/libm-test/tests/z_extensive/main.rs similarity index 100% rename from libm/crates/libm-test/tests/z_extensive/main.rs rename to libm-test/tests/z_extensive/main.rs diff --git a/libm/crates/libm-test/tests/z_extensive/run.rs b/libm-test/tests/z_extensive/run.rs similarity index 100% rename from libm/crates/libm-test/tests/z_extensive/run.rs rename to libm-test/tests/z_extensive/run.rs diff --git a/libm/Cargo.toml b/libm/Cargo.toml index 268b6fb0e..44154c1a8 100644 --- a/libm/Cargo.toml +++ b/libm/Cargo.toml @@ -1,37 +1,49 @@ -[workspace] -resolver = "2" -members = [ - "libm", - "crates/libm-macros", - "crates/libm-test", - "crates/musl-math-sys", - "crates/util", -] -default-members = [ - "libm", - "crates/libm-macros", - "crates/libm-test" -] -exclude = [ - # Requires `panic = abort` so can't be a member of the workspace - "crates/compiler-builtins-smoke-test", -] - -# The default release profile is unchanged. - -# Release mode with debug assertions -[profile.release-checked] -inherits = "release" -debug-assertions = true -overflow-checks = true - -# Release with maximum optimizations, which is very slow to build. This is also -# what is needed to check `no-panic`. -[profile.release-opt] -inherits = "release" -codegen-units = 1 -lto = "fat" - -[profile.bench] -# Required for iai-callgrind -debug = true +[package] +authors = ["Jorge Aparicio "] +categories = ["no-std"] +description = "libm in pure Rust" +documentation = "https://docs.rs/libm" +keywords = ["libm", "math"] +license = "MIT" +name = "libm" +readme = "README.md" +repository = "https://github.com/rust-lang/libm" +version = "0.2.11" +edition = "2021" +rust-version = "1.63" + +[features] +default = ["arch"] + +# Enable architecture-specific features such as SIMD or assembly routines. +arch = [] + +# This tells the compiler to assume that a Nightly toolchain is being used and +# that it should activate any useful Nightly things accordingly. +unstable = ["unstable-intrinsics", "unstable-float"] + +# Enable calls to functions in `core::intrinsics` +unstable-intrinsics = [] + +# Make some internal things public for testing. +unstable-public-internals = [] + +# Enable the nightly-only `f16` and `f128`. +unstable-float = [] + +# Used to prevent using any intrinsics or arch-specific code. +# +# HACK: this is a negative feature which is generally a bad idea in Cargo, but +# we need it to be able to forbid other features when this crate is used in +# Rust dependencies. Setting this overrides all features that may enable +# hard float operations. +force-soft-floats = [] + +[dev-dependencies] +no-panic = "0.1.35" + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = [ + # compiler-builtins sets this feature, but we use it in `libm` + 'cfg(feature, values("compiler-builtins"))', +] } diff --git a/libm/libm/build.rs b/libm/build.rs similarity index 100% rename from libm/libm/build.rs rename to libm/build.rs diff --git a/libm/libm/configure.rs b/libm/configure.rs similarity index 100% rename from libm/libm/configure.rs rename to libm/configure.rs diff --git a/libm/crates/compiler-builtins-smoke-test/Cargo.toml b/libm/crates/compiler-builtins-smoke-test/Cargo.toml deleted file mode 100644 index 38a511669..000000000 --- a/libm/crates/compiler-builtins-smoke-test/Cargo.toml +++ /dev/null @@ -1,38 +0,0 @@ -[package] -name = "cb" -version = "0.1.0" -authors = ["Jorge Aparicio "] -edition = "2021" -publish = false - -[lib] -crate-type = ["staticlib"] -test = false -bench = false - -[features] -default = ["arch", "compiler-builtins", "unstable-float"] - -# Copied from `libm`'s root `Cargo.toml`' -arch = [] -compiler-builtins = [] -unstable-float = [] - -[lints.rust] -unexpected_cfgs = { level = "warn", check-cfg = [ - "cfg(arch_enabled)", - "cfg(assert_no_panic)", - "cfg(intrinsics_enabled)", - 'cfg(feature, values("force-soft-floats"))', - 'cfg(feature, values("unstable"))', - 'cfg(feature, values("unstable-intrinsics"))', - 'cfg(feature, values("unstable-public-internals"))', -] } - -[profile.dev] -panic = "abort" - -[profile.release] -panic = "abort" -codegen-units = 1 -lto = "fat" diff --git a/libm/crates/compiler-builtins-smoke-test/build.rs b/libm/crates/compiler-builtins-smoke-test/build.rs deleted file mode 100644 index ef8d613c9..000000000 --- a/libm/crates/compiler-builtins-smoke-test/build.rs +++ /dev/null @@ -1,8 +0,0 @@ -#[path = "../../libm/configure.rs"] -mod configure; - -fn main() { - println!("cargo:rerun-if-changed=../../libm/configure.rs"); - let cfg = configure::Config::from_env(); - configure::emit_libm_config(&cfg); -} diff --git a/libm/crates/compiler-builtins-smoke-test/src/lib.rs b/libm/crates/compiler-builtins-smoke-test/src/lib.rs deleted file mode 100644 index e70f6d9e0..000000000 --- a/libm/crates/compiler-builtins-smoke-test/src/lib.rs +++ /dev/null @@ -1,17 +0,0 @@ -//! Fake compiler-builtins crate -//! -//! This is used to test that we can source import `libm` into the compiler-builtins crate. -//! Additionally, it provides a `#[no_mangle]` C API that can be easier to inspect than the -//! default `.rlib`. - -#![compiler_builtins] -#![feature(core_intrinsics)] -#![feature(compiler_builtins)] -#![feature(f16)] -#![feature(f128)] -#![allow(internal_features)] -#![no_std] - -mod math; -// Required for macro paths. -use math::libm::support; diff --git a/libm/crates/compiler-builtins-smoke-test/src/math.rs b/libm/crates/compiler-builtins-smoke-test/src/math.rs deleted file mode 100644 index 58a5bfbb9..000000000 --- a/libm/crates/compiler-builtins-smoke-test/src/math.rs +++ /dev/null @@ -1,182 +0,0 @@ -use core::ffi::c_int; - -#[allow(dead_code)] -#[allow(clippy::all)] // We don't get `libm`'s list of `allow`s, so just ignore Clippy. -#[allow(unused_imports)] -#[path = "../../../libm/src/math/mod.rs"] -pub mod libm; - -/// Mark functions `#[no_mangle]` and with the C ABI. -macro_rules! no_mangle { - ($( $name:ident( $($tt:tt)+ ) -> $ret:ty; )+) => { - $( no_mangle!(@inner $name( $($tt)+ ) -> $ret); )+ - }; - - // Handle simple functions with single return types - (@inner $name:ident( $($arg:ident: $aty:ty),+ ) -> $ret:ty) => { - #[unsafe(no_mangle)] - extern "C" fn $name($($arg: $aty),+) -> $ret { - libm::$name($($arg),+) - } - }; - - - // Functions with `&mut` return values need to be handled differently, use `|` to - // separate inputs vs. outputs. - ( - @inner $name:ident( $($arg:ident: $aty:ty),+ | $($rarg:ident: $rty:ty),+) -> $ret:ty - ) => { - #[unsafe(no_mangle)] - extern "C" fn $name($($arg: $aty,)+ $($rarg: $rty),+) -> $ret { - let ret; - (ret, $(*$rarg),+) = libm::$name($($arg),+); - ret - } - }; -} - -no_mangle! { - frexp(x: f64 | y: &mut c_int) -> f64; - frexpf(x: f32 | y: &mut c_int) -> f32; - acos(x: f64) -> f64; - acosf(x: f32) -> f32; - acosh(x: f64) -> f64; - acoshf(x: f32) -> f32; - asin(x: f64) -> f64; - asinf(x: f32) -> f32; - asinh(x: f64) -> f64; - asinhf(x: f32) -> f32; - atan(x: f64) -> f64; - atan2(x: f64, y: f64) -> f64; - atan2f(x: f32, y: f32) -> f32; - atanf(x: f32) -> f32; - atanh(x: f64) -> f64; - atanhf(x: f32) -> f32; - cbrt(x: f64) -> f64; - cbrtf(x: f32) -> f32; - ceil(x: f64) -> f64; - ceilf(x: f32) -> f32; - ceilf128(x: f128) -> f128; - ceilf16(x: f16) -> f16; - copysign(x: f64, y: f64) -> f64; - copysignf(x: f32, y: f32) -> f32; - copysignf128(x: f128, y: f128) -> f128; - copysignf16(x: f16, y: f16) -> f16; - cos(x: f64) -> f64; - cosf(x: f32) -> f32; - cosh(x: f64) -> f64; - coshf(x: f32) -> f32; - erf(x: f64) -> f64; - erfc(x: f64) -> f64; - erfcf(x: f32) -> f32; - erff(x: f32) -> f32; - exp(x: f64) -> f64; - exp10(x: f64) -> f64; - exp10f(x: f32) -> f32; - exp2(x: f64) -> f64; - exp2f(x: f32) -> f32; - expf(x: f32) -> f32; - expm1(x: f64) -> f64; - expm1f(x: f32) -> f32; - fabs(x: f64) -> f64; - fabsf(x: f32) -> f32; - fabsf128(x: f128) -> f128; - fabsf16(x: f16) -> f16; - fdim(x: f64, y: f64) -> f64; - fdimf(x: f32, y: f32) -> f32; - fdimf128(x: f128, y: f128) -> f128; - fdimf16(x: f16, y: f16) -> f16; - floor(x: f64) -> f64; - floorf(x: f32) -> f32; - floorf128(x: f128) -> f128; - floorf16(x: f16) -> f16; - fma(x: f64, y: f64, z: f64) -> f64; - fmaf(x: f32, y: f32, z: f32) -> f32; - fmax(x: f64, y: f64) -> f64; - fmaxf(x: f32, y: f32) -> f32; - fmin(x: f64, y: f64) -> f64; - fminf(x: f32, y: f32) -> f32; - fmod(x: f64, y: f64) -> f64; - fmodf(x: f32, y: f32) -> f32; - hypot(x: f64, y: f64) -> f64; - hypotf(x: f32, y: f32) -> f32; - ilogb(x: f64) -> c_int; - ilogbf(x: f32) -> c_int; - j0(x: f64) -> f64; - j0f(x: f32) -> f32; - j1(x: f64) -> f64; - j1f(x: f32) -> f32; - jn(x: c_int, y: f64) -> f64; - jnf(x: c_int, y: f32) -> f32; - ldexp(x: f64, y: c_int) -> f64; - ldexpf(x: f32, y: c_int) -> f32; - lgamma(x: f64) -> f64; - lgamma_r(x: f64 | r: &mut c_int) -> f64; - lgammaf(x: f32) -> f32; - lgammaf_r(x: f32 | r: &mut c_int) -> f32; - log(x: f64) -> f64; - log10(x: f64) -> f64; - log10f(x: f32) -> f32; - log1p(x: f64) -> f64; - log1pf(x: f32) -> f32; - log2(x: f64) -> f64; - log2f(x: f32) -> f32; - logf(x: f32) -> f32; - modf(x: f64 | r: &mut f64) -> f64; - modff(x: f32 | r: &mut f32) -> f32; - nextafter(x: f64, y: f64) -> f64; - nextafterf(x: f32, y: f32) -> f32; - pow(x: f64, y: f64) -> f64; - powf(x: f32, y: f32) -> f32; - remainder(x: f64, y: f64) -> f64; - remainderf(x: f32, y: f32) -> f32; - remquo(x: f64, y: f64 | q: &mut c_int) -> f64; - remquof(x: f32, y: f32 | q: &mut c_int) -> f32; - rint(x: f64) -> f64; - rintf(x: f32) -> f32; - rintf128(x: f128) -> f128; - rintf16(x: f16) -> f16; - round(x: f64) -> f64; - roundf(x: f32) -> f32; - scalbn(x: f64, y: c_int) -> f64; - scalbnf(x: f32, y: c_int) -> f32; - sin(x: f64) -> f64; - sinf(x: f32) -> f32; - sinh(x: f64) -> f64; - sinhf(x: f32) -> f32; - sqrt(x: f64) -> f64; - sqrtf(x: f32) -> f32; - tan(x: f64) -> f64; - tanf(x: f32) -> f32; - tanh(x: f64) -> f64; - tanhf(x: f32) -> f32; - tgamma(x: f64) -> f64; - tgammaf(x: f32) -> f32; - trunc(x: f64) -> f64; - truncf(x: f32) -> f32; - truncf128(x: f128) -> f128; - truncf16(x: f16) -> f16; - y0(x: f64) -> f64; - y0f(x: f32) -> f32; - y1(x: f64) -> f64; - y1f(x: f32) -> f32; - yn(x: c_int, y: f64) -> f64; - ynf(x: c_int, y: f32) -> f32; -} - -/* sincos has no direct return type, not worth handling in the macro */ - -#[unsafe(no_mangle)] -extern "C" fn sincos(x: f64, s: &mut f64, c: &mut f64) { - (*s, *c) = libm::sincos(x); -} - -#[unsafe(no_mangle)] -extern "C" fn sincosf(x: f32, s: &mut f32, c: &mut f32) { - (*s, *c) = libm::sincosf(x); -} - -#[panic_handler] -fn panic(_info: &core::panic::PanicInfo) -> ! { - loop {} -} diff --git a/libm/crates/musl-math-sys/musl b/libm/crates/musl-math-sys/musl deleted file mode 160000 index 61399d4bd..000000000 --- a/libm/crates/musl-math-sys/musl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 61399d4bd02ae1ec03068445aa7ffe9174466bfd diff --git a/libm/libm/Cargo.toml b/libm/libm/Cargo.toml deleted file mode 100644 index 44154c1a8..000000000 --- a/libm/libm/Cargo.toml +++ /dev/null @@ -1,49 +0,0 @@ -[package] -authors = ["Jorge Aparicio "] -categories = ["no-std"] -description = "libm in pure Rust" -documentation = "https://docs.rs/libm" -keywords = ["libm", "math"] -license = "MIT" -name = "libm" -readme = "README.md" -repository = "https://github.com/rust-lang/libm" -version = "0.2.11" -edition = "2021" -rust-version = "1.63" - -[features] -default = ["arch"] - -# Enable architecture-specific features such as SIMD or assembly routines. -arch = [] - -# This tells the compiler to assume that a Nightly toolchain is being used and -# that it should activate any useful Nightly things accordingly. -unstable = ["unstable-intrinsics", "unstable-float"] - -# Enable calls to functions in `core::intrinsics` -unstable-intrinsics = [] - -# Make some internal things public for testing. -unstable-public-internals = [] - -# Enable the nightly-only `f16` and `f128`. -unstable-float = [] - -# Used to prevent using any intrinsics or arch-specific code. -# -# HACK: this is a negative feature which is generally a bad idea in Cargo, but -# we need it to be able to forbid other features when this crate is used in -# Rust dependencies. Setting this overrides all features that may enable -# hard float operations. -force-soft-floats = [] - -[dev-dependencies] -no-panic = "0.1.35" - -[lints.rust] -unexpected_cfgs = { level = "warn", check-cfg = [ - # compiler-builtins sets this feature, but we use it in `libm` - 'cfg(feature, values("compiler-builtins"))', -] } diff --git a/libm/libm/LICENSE.txt b/libm/libm/LICENSE.txt deleted file mode 120000 index 4ab43736a..000000000 --- a/libm/libm/LICENSE.txt +++ /dev/null @@ -1 +0,0 @@ -../LICENSE.txt \ No newline at end of file diff --git a/libm/libm/README.md b/libm/libm/README.md deleted file mode 120000 index 32d46ee88..000000000 --- a/libm/libm/README.md +++ /dev/null @@ -1 +0,0 @@ -../README.md \ No newline at end of file diff --git a/libm/libm/src/lib.rs b/libm/src/lib.rs similarity index 100% rename from libm/libm/src/lib.rs rename to libm/src/lib.rs diff --git a/libm/libm/src/libm_helper.rs b/libm/src/libm_helper.rs similarity index 100% rename from libm/libm/src/libm_helper.rs rename to libm/src/libm_helper.rs diff --git a/libm/libm/src/math/acos.rs b/libm/src/math/acos.rs similarity index 100% rename from libm/libm/src/math/acos.rs rename to libm/src/math/acos.rs diff --git a/libm/libm/src/math/acosf.rs b/libm/src/math/acosf.rs similarity index 100% rename from libm/libm/src/math/acosf.rs rename to libm/src/math/acosf.rs diff --git a/libm/libm/src/math/acosh.rs b/libm/src/math/acosh.rs similarity index 100% rename from libm/libm/src/math/acosh.rs rename to libm/src/math/acosh.rs diff --git a/libm/libm/src/math/acoshf.rs b/libm/src/math/acoshf.rs similarity index 100% rename from libm/libm/src/math/acoshf.rs rename to libm/src/math/acoshf.rs diff --git a/libm/libm/src/math/arch/aarch64.rs b/libm/src/math/arch/aarch64.rs similarity index 100% rename from libm/libm/src/math/arch/aarch64.rs rename to libm/src/math/arch/aarch64.rs diff --git a/libm/libm/src/math/arch/i586.rs b/libm/src/math/arch/i586.rs similarity index 100% rename from libm/libm/src/math/arch/i586.rs rename to libm/src/math/arch/i586.rs diff --git a/libm/libm/src/math/arch/i686.rs b/libm/src/math/arch/i686.rs similarity index 100% rename from libm/libm/src/math/arch/i686.rs rename to libm/src/math/arch/i686.rs diff --git a/libm/libm/src/math/arch/mod.rs b/libm/src/math/arch/mod.rs similarity index 100% rename from libm/libm/src/math/arch/mod.rs rename to libm/src/math/arch/mod.rs diff --git a/libm/libm/src/math/arch/wasm32.rs b/libm/src/math/arch/wasm32.rs similarity index 100% rename from libm/libm/src/math/arch/wasm32.rs rename to libm/src/math/arch/wasm32.rs diff --git a/libm/libm/src/math/asin.rs b/libm/src/math/asin.rs similarity index 100% rename from libm/libm/src/math/asin.rs rename to libm/src/math/asin.rs diff --git a/libm/libm/src/math/asinf.rs b/libm/src/math/asinf.rs similarity index 100% rename from libm/libm/src/math/asinf.rs rename to libm/src/math/asinf.rs diff --git a/libm/libm/src/math/asinh.rs b/libm/src/math/asinh.rs similarity index 100% rename from libm/libm/src/math/asinh.rs rename to libm/src/math/asinh.rs diff --git a/libm/libm/src/math/asinhf.rs b/libm/src/math/asinhf.rs similarity index 100% rename from libm/libm/src/math/asinhf.rs rename to libm/src/math/asinhf.rs diff --git a/libm/libm/src/math/atan.rs b/libm/src/math/atan.rs similarity index 100% rename from libm/libm/src/math/atan.rs rename to libm/src/math/atan.rs diff --git a/libm/libm/src/math/atan2.rs b/libm/src/math/atan2.rs similarity index 100% rename from libm/libm/src/math/atan2.rs rename to libm/src/math/atan2.rs diff --git a/libm/libm/src/math/atan2f.rs b/libm/src/math/atan2f.rs similarity index 100% rename from libm/libm/src/math/atan2f.rs rename to libm/src/math/atan2f.rs diff --git a/libm/libm/src/math/atanf.rs b/libm/src/math/atanf.rs similarity index 100% rename from libm/libm/src/math/atanf.rs rename to libm/src/math/atanf.rs diff --git a/libm/libm/src/math/atanh.rs b/libm/src/math/atanh.rs similarity index 100% rename from libm/libm/src/math/atanh.rs rename to libm/src/math/atanh.rs diff --git a/libm/libm/src/math/atanhf.rs b/libm/src/math/atanhf.rs similarity index 100% rename from libm/libm/src/math/atanhf.rs rename to libm/src/math/atanhf.rs diff --git a/libm/libm/src/math/cbrt.rs b/libm/src/math/cbrt.rs similarity index 100% rename from libm/libm/src/math/cbrt.rs rename to libm/src/math/cbrt.rs diff --git a/libm/libm/src/math/cbrtf.rs b/libm/src/math/cbrtf.rs similarity index 100% rename from libm/libm/src/math/cbrtf.rs rename to libm/src/math/cbrtf.rs diff --git a/libm/libm/src/math/ceil.rs b/libm/src/math/ceil.rs similarity index 100% rename from libm/libm/src/math/ceil.rs rename to libm/src/math/ceil.rs diff --git a/libm/libm/src/math/copysign.rs b/libm/src/math/copysign.rs similarity index 100% rename from libm/libm/src/math/copysign.rs rename to libm/src/math/copysign.rs diff --git a/libm/libm/src/math/copysignf.rs b/libm/src/math/copysignf.rs similarity index 100% rename from libm/libm/src/math/copysignf.rs rename to libm/src/math/copysignf.rs diff --git a/libm/libm/src/math/copysignf128.rs b/libm/src/math/copysignf128.rs similarity index 100% rename from libm/libm/src/math/copysignf128.rs rename to libm/src/math/copysignf128.rs diff --git a/libm/libm/src/math/copysignf16.rs b/libm/src/math/copysignf16.rs similarity index 100% rename from libm/libm/src/math/copysignf16.rs rename to libm/src/math/copysignf16.rs diff --git a/libm/libm/src/math/cos.rs b/libm/src/math/cos.rs similarity index 100% rename from libm/libm/src/math/cos.rs rename to libm/src/math/cos.rs diff --git a/libm/libm/src/math/cosf.rs b/libm/src/math/cosf.rs similarity index 100% rename from libm/libm/src/math/cosf.rs rename to libm/src/math/cosf.rs diff --git a/libm/libm/src/math/cosh.rs b/libm/src/math/cosh.rs similarity index 100% rename from libm/libm/src/math/cosh.rs rename to libm/src/math/cosh.rs diff --git a/libm/libm/src/math/coshf.rs b/libm/src/math/coshf.rs similarity index 100% rename from libm/libm/src/math/coshf.rs rename to libm/src/math/coshf.rs diff --git a/libm/libm/src/math/erf.rs b/libm/src/math/erf.rs similarity index 100% rename from libm/libm/src/math/erf.rs rename to libm/src/math/erf.rs diff --git a/libm/libm/src/math/erff.rs b/libm/src/math/erff.rs similarity index 100% rename from libm/libm/src/math/erff.rs rename to libm/src/math/erff.rs diff --git a/libm/libm/src/math/exp.rs b/libm/src/math/exp.rs similarity index 100% rename from libm/libm/src/math/exp.rs rename to libm/src/math/exp.rs diff --git a/libm/libm/src/math/exp10.rs b/libm/src/math/exp10.rs similarity index 100% rename from libm/libm/src/math/exp10.rs rename to libm/src/math/exp10.rs diff --git a/libm/libm/src/math/exp10f.rs b/libm/src/math/exp10f.rs similarity index 100% rename from libm/libm/src/math/exp10f.rs rename to libm/src/math/exp10f.rs diff --git a/libm/libm/src/math/exp2.rs b/libm/src/math/exp2.rs similarity index 100% rename from libm/libm/src/math/exp2.rs rename to libm/src/math/exp2.rs diff --git a/libm/libm/src/math/exp2f.rs b/libm/src/math/exp2f.rs similarity index 100% rename from libm/libm/src/math/exp2f.rs rename to libm/src/math/exp2f.rs diff --git a/libm/libm/src/math/expf.rs b/libm/src/math/expf.rs similarity index 100% rename from libm/libm/src/math/expf.rs rename to libm/src/math/expf.rs diff --git a/libm/libm/src/math/expm1.rs b/libm/src/math/expm1.rs similarity index 100% rename from libm/libm/src/math/expm1.rs rename to libm/src/math/expm1.rs diff --git a/libm/libm/src/math/expm1f.rs b/libm/src/math/expm1f.rs similarity index 100% rename from libm/libm/src/math/expm1f.rs rename to libm/src/math/expm1f.rs diff --git a/libm/libm/src/math/expo2.rs b/libm/src/math/expo2.rs similarity index 100% rename from libm/libm/src/math/expo2.rs rename to libm/src/math/expo2.rs diff --git a/libm/libm/src/math/fabs.rs b/libm/src/math/fabs.rs similarity index 100% rename from libm/libm/src/math/fabs.rs rename to libm/src/math/fabs.rs diff --git a/libm/libm/src/math/fabsf.rs b/libm/src/math/fabsf.rs similarity index 100% rename from libm/libm/src/math/fabsf.rs rename to libm/src/math/fabsf.rs diff --git a/libm/libm/src/math/fabsf128.rs b/libm/src/math/fabsf128.rs similarity index 100% rename from libm/libm/src/math/fabsf128.rs rename to libm/src/math/fabsf128.rs diff --git a/libm/libm/src/math/fabsf16.rs b/libm/src/math/fabsf16.rs similarity index 100% rename from libm/libm/src/math/fabsf16.rs rename to libm/src/math/fabsf16.rs diff --git a/libm/libm/src/math/fdim.rs b/libm/src/math/fdim.rs similarity index 100% rename from libm/libm/src/math/fdim.rs rename to libm/src/math/fdim.rs diff --git a/libm/libm/src/math/fdimf.rs b/libm/src/math/fdimf.rs similarity index 100% rename from libm/libm/src/math/fdimf.rs rename to libm/src/math/fdimf.rs diff --git a/libm/libm/src/math/fdimf128.rs b/libm/src/math/fdimf128.rs similarity index 100% rename from libm/libm/src/math/fdimf128.rs rename to libm/src/math/fdimf128.rs diff --git a/libm/libm/src/math/fdimf16.rs b/libm/src/math/fdimf16.rs similarity index 100% rename from libm/libm/src/math/fdimf16.rs rename to libm/src/math/fdimf16.rs diff --git a/libm/libm/src/math/floor.rs b/libm/src/math/floor.rs similarity index 100% rename from libm/libm/src/math/floor.rs rename to libm/src/math/floor.rs diff --git a/libm/libm/src/math/floorf.rs b/libm/src/math/floorf.rs similarity index 100% rename from libm/libm/src/math/floorf.rs rename to libm/src/math/floorf.rs diff --git a/libm/libm/src/math/floorf128.rs b/libm/src/math/floorf128.rs similarity index 100% rename from libm/libm/src/math/floorf128.rs rename to libm/src/math/floorf128.rs diff --git a/libm/libm/src/math/floorf16.rs b/libm/src/math/floorf16.rs similarity index 100% rename from libm/libm/src/math/floorf16.rs rename to libm/src/math/floorf16.rs diff --git a/libm/libm/src/math/fma.rs b/libm/src/math/fma.rs similarity index 100% rename from libm/libm/src/math/fma.rs rename to libm/src/math/fma.rs diff --git a/libm/libm/src/math/fma_wide.rs b/libm/src/math/fma_wide.rs similarity index 100% rename from libm/libm/src/math/fma_wide.rs rename to libm/src/math/fma_wide.rs diff --git a/libm/libm/src/math/fmin_fmax.rs b/libm/src/math/fmin_fmax.rs similarity index 100% rename from libm/libm/src/math/fmin_fmax.rs rename to libm/src/math/fmin_fmax.rs diff --git a/libm/libm/src/math/fminimum_fmaximum.rs b/libm/src/math/fminimum_fmaximum.rs similarity index 100% rename from libm/libm/src/math/fminimum_fmaximum.rs rename to libm/src/math/fminimum_fmaximum.rs diff --git a/libm/libm/src/math/fminimum_fmaximum_num.rs b/libm/src/math/fminimum_fmaximum_num.rs similarity index 100% rename from libm/libm/src/math/fminimum_fmaximum_num.rs rename to libm/src/math/fminimum_fmaximum_num.rs diff --git a/libm/libm/src/math/fmod.rs b/libm/src/math/fmod.rs similarity index 100% rename from libm/libm/src/math/fmod.rs rename to libm/src/math/fmod.rs diff --git a/libm/libm/src/math/fmodf.rs b/libm/src/math/fmodf.rs similarity index 100% rename from libm/libm/src/math/fmodf.rs rename to libm/src/math/fmodf.rs diff --git a/libm/libm/src/math/fmodf128.rs b/libm/src/math/fmodf128.rs similarity index 100% rename from libm/libm/src/math/fmodf128.rs rename to libm/src/math/fmodf128.rs diff --git a/libm/libm/src/math/fmodf16.rs b/libm/src/math/fmodf16.rs similarity index 100% rename from libm/libm/src/math/fmodf16.rs rename to libm/src/math/fmodf16.rs diff --git a/libm/libm/src/math/frexp.rs b/libm/src/math/frexp.rs similarity index 100% rename from libm/libm/src/math/frexp.rs rename to libm/src/math/frexp.rs diff --git a/libm/libm/src/math/frexpf.rs b/libm/src/math/frexpf.rs similarity index 100% rename from libm/libm/src/math/frexpf.rs rename to libm/src/math/frexpf.rs diff --git a/libm/libm/src/math/generic/ceil.rs b/libm/src/math/generic/ceil.rs similarity index 100% rename from libm/libm/src/math/generic/ceil.rs rename to libm/src/math/generic/ceil.rs diff --git a/libm/libm/src/math/generic/copysign.rs b/libm/src/math/generic/copysign.rs similarity index 100% rename from libm/libm/src/math/generic/copysign.rs rename to libm/src/math/generic/copysign.rs diff --git a/libm/libm/src/math/generic/fabs.rs b/libm/src/math/generic/fabs.rs similarity index 100% rename from libm/libm/src/math/generic/fabs.rs rename to libm/src/math/generic/fabs.rs diff --git a/libm/libm/src/math/generic/fdim.rs b/libm/src/math/generic/fdim.rs similarity index 100% rename from libm/libm/src/math/generic/fdim.rs rename to libm/src/math/generic/fdim.rs diff --git a/libm/libm/src/math/generic/floor.rs b/libm/src/math/generic/floor.rs similarity index 100% rename from libm/libm/src/math/generic/floor.rs rename to libm/src/math/generic/floor.rs diff --git a/libm/libm/src/math/generic/fmax.rs b/libm/src/math/generic/fmax.rs similarity index 100% rename from libm/libm/src/math/generic/fmax.rs rename to libm/src/math/generic/fmax.rs diff --git a/libm/libm/src/math/generic/fmaximum.rs b/libm/src/math/generic/fmaximum.rs similarity index 100% rename from libm/libm/src/math/generic/fmaximum.rs rename to libm/src/math/generic/fmaximum.rs diff --git a/libm/libm/src/math/generic/fmaximum_num.rs b/libm/src/math/generic/fmaximum_num.rs similarity index 100% rename from libm/libm/src/math/generic/fmaximum_num.rs rename to libm/src/math/generic/fmaximum_num.rs diff --git a/libm/libm/src/math/generic/fmin.rs b/libm/src/math/generic/fmin.rs similarity index 100% rename from libm/libm/src/math/generic/fmin.rs rename to libm/src/math/generic/fmin.rs diff --git a/libm/libm/src/math/generic/fminimum.rs b/libm/src/math/generic/fminimum.rs similarity index 100% rename from libm/libm/src/math/generic/fminimum.rs rename to libm/src/math/generic/fminimum.rs diff --git a/libm/libm/src/math/generic/fminimum_num.rs b/libm/src/math/generic/fminimum_num.rs similarity index 100% rename from libm/libm/src/math/generic/fminimum_num.rs rename to libm/src/math/generic/fminimum_num.rs diff --git a/libm/libm/src/math/generic/fmod.rs b/libm/src/math/generic/fmod.rs similarity index 100% rename from libm/libm/src/math/generic/fmod.rs rename to libm/src/math/generic/fmod.rs diff --git a/libm/libm/src/math/generic/mod.rs b/libm/src/math/generic/mod.rs similarity index 100% rename from libm/libm/src/math/generic/mod.rs rename to libm/src/math/generic/mod.rs diff --git a/libm/libm/src/math/generic/rint.rs b/libm/src/math/generic/rint.rs similarity index 100% rename from libm/libm/src/math/generic/rint.rs rename to libm/src/math/generic/rint.rs diff --git a/libm/libm/src/math/generic/round.rs b/libm/src/math/generic/round.rs similarity index 100% rename from libm/libm/src/math/generic/round.rs rename to libm/src/math/generic/round.rs diff --git a/libm/libm/src/math/generic/scalbn.rs b/libm/src/math/generic/scalbn.rs similarity index 100% rename from libm/libm/src/math/generic/scalbn.rs rename to libm/src/math/generic/scalbn.rs diff --git a/libm/libm/src/math/generic/sqrt.rs b/libm/src/math/generic/sqrt.rs similarity index 100% rename from libm/libm/src/math/generic/sqrt.rs rename to libm/src/math/generic/sqrt.rs diff --git a/libm/libm/src/math/generic/trunc.rs b/libm/src/math/generic/trunc.rs similarity index 100% rename from libm/libm/src/math/generic/trunc.rs rename to libm/src/math/generic/trunc.rs diff --git a/libm/libm/src/math/hypot.rs b/libm/src/math/hypot.rs similarity index 100% rename from libm/libm/src/math/hypot.rs rename to libm/src/math/hypot.rs diff --git a/libm/libm/src/math/hypotf.rs b/libm/src/math/hypotf.rs similarity index 100% rename from libm/libm/src/math/hypotf.rs rename to libm/src/math/hypotf.rs diff --git a/libm/libm/src/math/ilogb.rs b/libm/src/math/ilogb.rs similarity index 100% rename from libm/libm/src/math/ilogb.rs rename to libm/src/math/ilogb.rs diff --git a/libm/libm/src/math/ilogbf.rs b/libm/src/math/ilogbf.rs similarity index 100% rename from libm/libm/src/math/ilogbf.rs rename to libm/src/math/ilogbf.rs diff --git a/libm/libm/src/math/j0.rs b/libm/src/math/j0.rs similarity index 100% rename from libm/libm/src/math/j0.rs rename to libm/src/math/j0.rs diff --git a/libm/libm/src/math/j0f.rs b/libm/src/math/j0f.rs similarity index 100% rename from libm/libm/src/math/j0f.rs rename to libm/src/math/j0f.rs diff --git a/libm/libm/src/math/j1.rs b/libm/src/math/j1.rs similarity index 100% rename from libm/libm/src/math/j1.rs rename to libm/src/math/j1.rs diff --git a/libm/libm/src/math/j1f.rs b/libm/src/math/j1f.rs similarity index 100% rename from libm/libm/src/math/j1f.rs rename to libm/src/math/j1f.rs diff --git a/libm/libm/src/math/jn.rs b/libm/src/math/jn.rs similarity index 100% rename from libm/libm/src/math/jn.rs rename to libm/src/math/jn.rs diff --git a/libm/libm/src/math/jnf.rs b/libm/src/math/jnf.rs similarity index 100% rename from libm/libm/src/math/jnf.rs rename to libm/src/math/jnf.rs diff --git a/libm/libm/src/math/k_cos.rs b/libm/src/math/k_cos.rs similarity index 100% rename from libm/libm/src/math/k_cos.rs rename to libm/src/math/k_cos.rs diff --git a/libm/libm/src/math/k_cosf.rs b/libm/src/math/k_cosf.rs similarity index 100% rename from libm/libm/src/math/k_cosf.rs rename to libm/src/math/k_cosf.rs diff --git a/libm/libm/src/math/k_expo2.rs b/libm/src/math/k_expo2.rs similarity index 100% rename from libm/libm/src/math/k_expo2.rs rename to libm/src/math/k_expo2.rs diff --git a/libm/libm/src/math/k_expo2f.rs b/libm/src/math/k_expo2f.rs similarity index 100% rename from libm/libm/src/math/k_expo2f.rs rename to libm/src/math/k_expo2f.rs diff --git a/libm/libm/src/math/k_sin.rs b/libm/src/math/k_sin.rs similarity index 100% rename from libm/libm/src/math/k_sin.rs rename to libm/src/math/k_sin.rs diff --git a/libm/libm/src/math/k_sinf.rs b/libm/src/math/k_sinf.rs similarity index 100% rename from libm/libm/src/math/k_sinf.rs rename to libm/src/math/k_sinf.rs diff --git a/libm/libm/src/math/k_tan.rs b/libm/src/math/k_tan.rs similarity index 100% rename from libm/libm/src/math/k_tan.rs rename to libm/src/math/k_tan.rs diff --git a/libm/libm/src/math/k_tanf.rs b/libm/src/math/k_tanf.rs similarity index 100% rename from libm/libm/src/math/k_tanf.rs rename to libm/src/math/k_tanf.rs diff --git a/libm/libm/src/math/ldexp.rs b/libm/src/math/ldexp.rs similarity index 100% rename from libm/libm/src/math/ldexp.rs rename to libm/src/math/ldexp.rs diff --git a/libm/libm/src/math/ldexpf.rs b/libm/src/math/ldexpf.rs similarity index 100% rename from libm/libm/src/math/ldexpf.rs rename to libm/src/math/ldexpf.rs diff --git a/libm/libm/src/math/ldexpf128.rs b/libm/src/math/ldexpf128.rs similarity index 100% rename from libm/libm/src/math/ldexpf128.rs rename to libm/src/math/ldexpf128.rs diff --git a/libm/libm/src/math/ldexpf16.rs b/libm/src/math/ldexpf16.rs similarity index 100% rename from libm/libm/src/math/ldexpf16.rs rename to libm/src/math/ldexpf16.rs diff --git a/libm/libm/src/math/lgamma.rs b/libm/src/math/lgamma.rs similarity index 100% rename from libm/libm/src/math/lgamma.rs rename to libm/src/math/lgamma.rs diff --git a/libm/libm/src/math/lgamma_r.rs b/libm/src/math/lgamma_r.rs similarity index 100% rename from libm/libm/src/math/lgamma_r.rs rename to libm/src/math/lgamma_r.rs diff --git a/libm/libm/src/math/lgammaf.rs b/libm/src/math/lgammaf.rs similarity index 100% rename from libm/libm/src/math/lgammaf.rs rename to libm/src/math/lgammaf.rs diff --git a/libm/libm/src/math/lgammaf_r.rs b/libm/src/math/lgammaf_r.rs similarity index 100% rename from libm/libm/src/math/lgammaf_r.rs rename to libm/src/math/lgammaf_r.rs diff --git a/libm/libm/src/math/log.rs b/libm/src/math/log.rs similarity index 100% rename from libm/libm/src/math/log.rs rename to libm/src/math/log.rs diff --git a/libm/libm/src/math/log10.rs b/libm/src/math/log10.rs similarity index 100% rename from libm/libm/src/math/log10.rs rename to libm/src/math/log10.rs diff --git a/libm/libm/src/math/log10f.rs b/libm/src/math/log10f.rs similarity index 100% rename from libm/libm/src/math/log10f.rs rename to libm/src/math/log10f.rs diff --git a/libm/libm/src/math/log1p.rs b/libm/src/math/log1p.rs similarity index 100% rename from libm/libm/src/math/log1p.rs rename to libm/src/math/log1p.rs diff --git a/libm/libm/src/math/log1pf.rs b/libm/src/math/log1pf.rs similarity index 100% rename from libm/libm/src/math/log1pf.rs rename to libm/src/math/log1pf.rs diff --git a/libm/libm/src/math/log2.rs b/libm/src/math/log2.rs similarity index 100% rename from libm/libm/src/math/log2.rs rename to libm/src/math/log2.rs diff --git a/libm/libm/src/math/log2f.rs b/libm/src/math/log2f.rs similarity index 100% rename from libm/libm/src/math/log2f.rs rename to libm/src/math/log2f.rs diff --git a/libm/libm/src/math/logf.rs b/libm/src/math/logf.rs similarity index 100% rename from libm/libm/src/math/logf.rs rename to libm/src/math/logf.rs diff --git a/libm/libm/src/math/mod.rs b/libm/src/math/mod.rs similarity index 100% rename from libm/libm/src/math/mod.rs rename to libm/src/math/mod.rs diff --git a/libm/libm/src/math/modf.rs b/libm/src/math/modf.rs similarity index 100% rename from libm/libm/src/math/modf.rs rename to libm/src/math/modf.rs diff --git a/libm/libm/src/math/modff.rs b/libm/src/math/modff.rs similarity index 100% rename from libm/libm/src/math/modff.rs rename to libm/src/math/modff.rs diff --git a/libm/libm/src/math/nextafter.rs b/libm/src/math/nextafter.rs similarity index 100% rename from libm/libm/src/math/nextafter.rs rename to libm/src/math/nextafter.rs diff --git a/libm/libm/src/math/nextafterf.rs b/libm/src/math/nextafterf.rs similarity index 100% rename from libm/libm/src/math/nextafterf.rs rename to libm/src/math/nextafterf.rs diff --git a/libm/libm/src/math/pow.rs b/libm/src/math/pow.rs similarity index 100% rename from libm/libm/src/math/pow.rs rename to libm/src/math/pow.rs diff --git a/libm/libm/src/math/powf.rs b/libm/src/math/powf.rs similarity index 100% rename from libm/libm/src/math/powf.rs rename to libm/src/math/powf.rs diff --git a/libm/libm/src/math/rem_pio2.rs b/libm/src/math/rem_pio2.rs similarity index 100% rename from libm/libm/src/math/rem_pio2.rs rename to libm/src/math/rem_pio2.rs diff --git a/libm/libm/src/math/rem_pio2_large.rs b/libm/src/math/rem_pio2_large.rs similarity index 100% rename from libm/libm/src/math/rem_pio2_large.rs rename to libm/src/math/rem_pio2_large.rs diff --git a/libm/libm/src/math/rem_pio2f.rs b/libm/src/math/rem_pio2f.rs similarity index 100% rename from libm/libm/src/math/rem_pio2f.rs rename to libm/src/math/rem_pio2f.rs diff --git a/libm/libm/src/math/remainder.rs b/libm/src/math/remainder.rs similarity index 100% rename from libm/libm/src/math/remainder.rs rename to libm/src/math/remainder.rs diff --git a/libm/libm/src/math/remainderf.rs b/libm/src/math/remainderf.rs similarity index 100% rename from libm/libm/src/math/remainderf.rs rename to libm/src/math/remainderf.rs diff --git a/libm/libm/src/math/remquo.rs b/libm/src/math/remquo.rs similarity index 100% rename from libm/libm/src/math/remquo.rs rename to libm/src/math/remquo.rs diff --git a/libm/libm/src/math/remquof.rs b/libm/src/math/remquof.rs similarity index 100% rename from libm/libm/src/math/remquof.rs rename to libm/src/math/remquof.rs diff --git a/libm/libm/src/math/rint.rs b/libm/src/math/rint.rs similarity index 100% rename from libm/libm/src/math/rint.rs rename to libm/src/math/rint.rs diff --git a/libm/libm/src/math/round.rs b/libm/src/math/round.rs similarity index 100% rename from libm/libm/src/math/round.rs rename to libm/src/math/round.rs diff --git a/libm/libm/src/math/roundeven.rs b/libm/src/math/roundeven.rs similarity index 100% rename from libm/libm/src/math/roundeven.rs rename to libm/src/math/roundeven.rs diff --git a/libm/libm/src/math/roundf.rs b/libm/src/math/roundf.rs similarity index 100% rename from libm/libm/src/math/roundf.rs rename to libm/src/math/roundf.rs diff --git a/libm/libm/src/math/roundf128.rs b/libm/src/math/roundf128.rs similarity index 100% rename from libm/libm/src/math/roundf128.rs rename to libm/src/math/roundf128.rs diff --git a/libm/libm/src/math/roundf16.rs b/libm/src/math/roundf16.rs similarity index 100% rename from libm/libm/src/math/roundf16.rs rename to libm/src/math/roundf16.rs diff --git a/libm/libm/src/math/scalbn.rs b/libm/src/math/scalbn.rs similarity index 100% rename from libm/libm/src/math/scalbn.rs rename to libm/src/math/scalbn.rs diff --git a/libm/libm/src/math/scalbnf.rs b/libm/src/math/scalbnf.rs similarity index 100% rename from libm/libm/src/math/scalbnf.rs rename to libm/src/math/scalbnf.rs diff --git a/libm/libm/src/math/scalbnf128.rs b/libm/src/math/scalbnf128.rs similarity index 100% rename from libm/libm/src/math/scalbnf128.rs rename to libm/src/math/scalbnf128.rs diff --git a/libm/libm/src/math/scalbnf16.rs b/libm/src/math/scalbnf16.rs similarity index 100% rename from libm/libm/src/math/scalbnf16.rs rename to libm/src/math/scalbnf16.rs diff --git a/libm/libm/src/math/sin.rs b/libm/src/math/sin.rs similarity index 100% rename from libm/libm/src/math/sin.rs rename to libm/src/math/sin.rs diff --git a/libm/libm/src/math/sincos.rs b/libm/src/math/sincos.rs similarity index 100% rename from libm/libm/src/math/sincos.rs rename to libm/src/math/sincos.rs diff --git a/libm/libm/src/math/sincosf.rs b/libm/src/math/sincosf.rs similarity index 100% rename from libm/libm/src/math/sincosf.rs rename to libm/src/math/sincosf.rs diff --git a/libm/libm/src/math/sinf.rs b/libm/src/math/sinf.rs similarity index 100% rename from libm/libm/src/math/sinf.rs rename to libm/src/math/sinf.rs diff --git a/libm/libm/src/math/sinh.rs b/libm/src/math/sinh.rs similarity index 100% rename from libm/libm/src/math/sinh.rs rename to libm/src/math/sinh.rs diff --git a/libm/libm/src/math/sinhf.rs b/libm/src/math/sinhf.rs similarity index 100% rename from libm/libm/src/math/sinhf.rs rename to libm/src/math/sinhf.rs diff --git a/libm/libm/src/math/sqrt.rs b/libm/src/math/sqrt.rs similarity index 100% rename from libm/libm/src/math/sqrt.rs rename to libm/src/math/sqrt.rs diff --git a/libm/libm/src/math/sqrtf.rs b/libm/src/math/sqrtf.rs similarity index 100% rename from libm/libm/src/math/sqrtf.rs rename to libm/src/math/sqrtf.rs diff --git a/libm/libm/src/math/sqrtf128.rs b/libm/src/math/sqrtf128.rs similarity index 100% rename from libm/libm/src/math/sqrtf128.rs rename to libm/src/math/sqrtf128.rs diff --git a/libm/libm/src/math/sqrtf16.rs b/libm/src/math/sqrtf16.rs similarity index 100% rename from libm/libm/src/math/sqrtf16.rs rename to libm/src/math/sqrtf16.rs diff --git a/libm/libm/src/math/support/big.rs b/libm/src/math/support/big.rs similarity index 100% rename from libm/libm/src/math/support/big.rs rename to libm/src/math/support/big.rs diff --git a/libm/libm/src/math/support/big/tests.rs b/libm/src/math/support/big/tests.rs similarity index 100% rename from libm/libm/src/math/support/big/tests.rs rename to libm/src/math/support/big/tests.rs diff --git a/libm/libm/src/math/support/env.rs b/libm/src/math/support/env.rs similarity index 100% rename from libm/libm/src/math/support/env.rs rename to libm/src/math/support/env.rs diff --git a/libm/libm/src/math/support/float_traits.rs b/libm/src/math/support/float_traits.rs similarity index 100% rename from libm/libm/src/math/support/float_traits.rs rename to libm/src/math/support/float_traits.rs diff --git a/libm/libm/src/math/support/hex_float.rs b/libm/src/math/support/hex_float.rs similarity index 100% rename from libm/libm/src/math/support/hex_float.rs rename to libm/src/math/support/hex_float.rs diff --git a/libm/libm/src/math/support/int_traits.rs b/libm/src/math/support/int_traits.rs similarity index 100% rename from libm/libm/src/math/support/int_traits.rs rename to libm/src/math/support/int_traits.rs diff --git a/libm/libm/src/math/support/macros.rs b/libm/src/math/support/macros.rs similarity index 100% rename from libm/libm/src/math/support/macros.rs rename to libm/src/math/support/macros.rs diff --git a/libm/libm/src/math/support/mod.rs b/libm/src/math/support/mod.rs similarity index 100% rename from libm/libm/src/math/support/mod.rs rename to libm/src/math/support/mod.rs diff --git a/libm/libm/src/math/tan.rs b/libm/src/math/tan.rs similarity index 100% rename from libm/libm/src/math/tan.rs rename to libm/src/math/tan.rs diff --git a/libm/libm/src/math/tanf.rs b/libm/src/math/tanf.rs similarity index 100% rename from libm/libm/src/math/tanf.rs rename to libm/src/math/tanf.rs diff --git a/libm/libm/src/math/tanh.rs b/libm/src/math/tanh.rs similarity index 100% rename from libm/libm/src/math/tanh.rs rename to libm/src/math/tanh.rs diff --git a/libm/libm/src/math/tanhf.rs b/libm/src/math/tanhf.rs similarity index 100% rename from libm/libm/src/math/tanhf.rs rename to libm/src/math/tanhf.rs diff --git a/libm/libm/src/math/tgamma.rs b/libm/src/math/tgamma.rs similarity index 100% rename from libm/libm/src/math/tgamma.rs rename to libm/src/math/tgamma.rs diff --git a/libm/libm/src/math/tgammaf.rs b/libm/src/math/tgammaf.rs similarity index 100% rename from libm/libm/src/math/tgammaf.rs rename to libm/src/math/tgammaf.rs diff --git a/libm/libm/src/math/trunc.rs b/libm/src/math/trunc.rs similarity index 100% rename from libm/libm/src/math/trunc.rs rename to libm/src/math/trunc.rs diff --git a/libm/libm/src/math/truncf.rs b/libm/src/math/truncf.rs similarity index 100% rename from libm/libm/src/math/truncf.rs rename to libm/src/math/truncf.rs diff --git a/libm/libm/src/math/truncf128.rs b/libm/src/math/truncf128.rs similarity index 100% rename from libm/libm/src/math/truncf128.rs rename to libm/src/math/truncf128.rs diff --git a/libm/libm/src/math/truncf16.rs b/libm/src/math/truncf16.rs similarity index 100% rename from libm/libm/src/math/truncf16.rs rename to libm/src/math/truncf16.rs