Skip to content
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

Implement f{32,64}.neg instructions #477

Merged
merged 3 commits into from
Aug 12, 2020
Merged

Implement f{32,64}.neg instructions #477

merged 3 commits into from
Aug 12, 2020

Conversation

gumb0
Copy link
Collaborator

@gumb0 gumb0 commented Aug 12, 2020

image

@gumb0 gumb0 marked this pull request as ready for review August 12, 2020 13:31
@codecov
Copy link

codecov bot commented Aug 12, 2020

Codecov Report

Merging #477 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #477   +/-   ##
=======================================
  Coverage   99.54%   99.54%           
=======================================
  Files          54       54           
  Lines       16196    16226   +30     
=======================================
+ Hits        16122    16152   +30     
  Misses         74       74           

@gumb0 gumb0 requested review from chfast and axic August 12, 2020 13:34
@gumb0 gumb0 force-pushed the fabs branch 2 times, most recently from 3f0373e to 64ca4c3 Compare August 12, 2020 13:55
Base automatically changed from fabs to master August 12, 2020 14:06
{
// fneg(+-p) = -+p
EXPECT_THAT(exec(p), Result(-p));
EXPECT_THAT(exec(-p), Result(p));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't in these tests practically trusting the compiler compared to the others where we have explicit constants?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We trust that negation work everywhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we wanted to be pedantic we'd always test against the encoded representation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible in the future... i.e. we would need to extend FP to do some software floating-point operations.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like wast2wasm4cpp script could work, which evaluates the C++ code and puts in the hard constants. We could manually verify that when committed and at every change.

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.

3 participants