-
Notifications
You must be signed in to change notification settings - Fork 230
Add float quickcheck #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add float quickcheck #111
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had already review this but there are some changes that are needed to not include the intrinsics that are failing their tests (for the arm-unknown-linux-gnueabi target only).
a: F32, | ||
b: F32) | ||
-> Option<F32> { | ||
if option_env!("TARGET") != Some("arm-unknown-linux-gnueabi") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be working; Travis is still failing this test.
Could you instead #[cfg]
away the addsf3
and adddf3
symbols along with these too tests for the arm-unknown-linux-gnueabi
? And please add a comment about the problem and point to the issue that's tracking it #90
// just avoid testing against gcc_s on those targets. Do note that our | ||
// implementation matches the output of the FPU instruction on *hard* float targets | ||
// and matches its gcc_s counterpart on *soft* float targets. | ||
if cfg!(gnueabihf) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still necessary? There's now a FRepr
struct wrapper for this logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was meant to replace FRepr, but I forgot to do that when rebasing.
fee97fa
to
585d6ed
Compare
I hope you don't have build failure emails turned on 😉. I think I fixed everything now... |
Oh, they are enabled but they aren't reaching my mailbox which probably means they are being sent to the rust-lang org mailbox 😄. |
585d6ed
to
3e7fb1f
Compare
@@ -181,117 +181,30 @@ macro_rules! add { | |||
} | |||
} | |||
|
|||
// NOTE(cfg) These are disabled for gnueabihf due to | |||
// https://github.com/rust-lang-nursery/compiler-builtins/issues/90 | |||
#[cfg(not(gnueabi))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, cfg(gnueabihf) works but cfg(gnueabi) doesn't. You'll have to update the build.rs to make Cargo pass this cfg when the target is arm-unknown-linux-gnueabi. See https://github.com/rust-lang-nursery/compiler-builtins/blob/master/build.rs#L428
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So should the addsf3.c files be enabled for arm-unknown-linux-gnueabi
since we're disabling the rust version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
Oops, I've been neglecting this. Will update. |
3e01b2e
to
6d6dbdc
Compare
📌 Commit 6504950 has been approved by |
💥 Test timed out |
@alexcrichton The tests seemed to pass (they are "green") but bors/homu didn't merge it. |
@bors: retry force clean Your guess is as good as mine... |
@bors: retry clean |
💥 Test timed out |
@alexcrichton Time out again. Maybe something got misconfigured (the webhook?). |
Hm so recently I reclassified the appveyor repo to run under a different account, and I've been seeing these same timeout problems on the libc repo as well. Unfortunately I have no idea why they're happening... Appveyor/Travis are green though, so want to merge? |
Perhaps you should try removing the existing appveyor webhooks (this repo > settings > webhooks) and re-adding the projects on appveyor.
👍 from me. |
Let's try that one more time... @bors: retry |
Hm, looking at this now I think I should unify the handling of
If this PR gets merged before you see this, I'll just make a follow-up PR. |
This probably won't work but: |
@bors r- |
I think bors is not listening to me either... |
but it seems bors got stuck again anyway so this won't get merged. |
6504950
to
655f642
Compare
Ok this is much better now. It's simpler, and now the powi tests will still run on gnueabi. |
if llvm_target.last() == Some(&"gnueabihf") { | ||
println!("cargo:rustc-cfg=gnueabihf") | ||
if llvm_target.last().unwrap().contains("gnueabi") { | ||
println!("cargo:rustc-cfg=gnueabi") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use two cfgs here, gnueabi and gnueabihf, instead of overloading the word "gnueabi" to mean both ABIs? I think it would be less error prone that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. Good point. This also accidentally disables the tests on armv7-* which doesn't seem to have this issue (does it?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, armv7-* also has this issue.
println!("cargo:rustc-cfg=gnueabi") | ||
if llvm_target[0].starts_with("arm") && | ||
llvm_target.last().unwrap().contains("gnueabi") { | ||
println!("cargo:rustc-cfg=arm-linux") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@japaric is this better?
691782d
to
f68475e
Compare
📌 Commit f68475e has been approved by |
🍀 |
Stuck again but I'm going to merge manually. |
111: Implement tanh r=japaric a=porglezomp Closes rust-lang#37 Co-authored-by: C Jones <code@calebjones.net>
No description provided.