From ec5784c1e80717407fe9d79eb7b3d4e6ed812233 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 12 Jul 2018 12:43:25 -0500 Subject: [PATCH] update the README --- library/compiler-builtins/libm/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/library/compiler-builtins/libm/README.md b/library/compiler-builtins/libm/README.md index fe384e118e98..ba82123460c2 100644 --- a/library/compiler-builtins/libm/README.md +++ b/library/compiler-builtins/libm/README.md @@ -28,11 +28,18 @@ $ TARGET=armv7-unknown-linux-gnueabihf bash ci/script.sh - Look for the C implementation of the function in the [MUSL source code][src]. - Copy paste the C code into a Rust file in the `src` directory and adjust `src/lib.rs` accordingly. - Run `cargo watch check` and fix the compiler errors. +- Tweak the bottom of `test-generator/src/main.rs` to add your function to the test suite. - If you can, run the test suite locally. If you can't, no problem! Your PR will be tested automatically. - Send us a pull request! - :tada: +[src]: https://git.musl-libc.org/cgit/musl/tree/src/math + +Check [PR #2] for an example. + +[PR #2]: https://github.com/japaric/libm/pull/2 + ### Notes - To reinterpret a float as an integer use the `to_bits` method. The MUSL code uses the @@ -44,7 +51,6 @@ $ TARGET=armv7-unknown-linux-gnueabihf bash ci/script.sh - Rust code panics on arithmetic overflows when not optimized. You may need to use the [`Wrapping`] newtype to avoid this problem. -[src]: https://git.musl-libc.org/cgit/musl/tree/src/math [`Wrapping`]: https://doc.rust-lang.org/std/num/struct.Wrapping.html ## Progress