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}.copysign instructions #471

Merged
merged 2 commits into from
Aug 13, 2020
Merged

Implement f{32,64}.copysign instructions #471

merged 2 commits into from
Aug 13, 2020

Conversation

chfast
Copy link
Collaborator

@chfast chfast commented Aug 11, 2020

image

@@ -1470,6 +1470,16 @@ ExecutionResult execute(Instance& instance, FuncIdx func_idx, span<const Value>
binary_op(stack, std::divides<float>{});
break;
}
case Instr::f32_copysign:
{
// TODO: This is not optimal implementation. The std::copysign() is inlined, but
Copy link
Member

Choose a reason for hiding this comment

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

Why not implement it then? Is that planned after merging this? Did you only see this for copysign?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Only for copysign and abs. Also theoretical UB will be involved, so I prefer to have all spec tests passed before doing that.

lib/fizzy/execute.cpp Outdated Show resolved Hide resolved
@chfast chfast force-pushed the fp_div branch 2 times, most recently from 5636fa9 to 69fdd36 Compare August 12, 2020 16:06
Base automatically changed from fp_div to master August 12, 2020 18:47
@chfast chfast force-pushed the fp_copysign branch 2 times, most recently from 782518d to ef1f54c Compare August 12, 2020 18:58
@codecov
Copy link

codecov bot commented Aug 12, 2020

Codecov Report

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

@@           Coverage Diff           @@
##           master     #471   +/-   ##
=======================================
  Coverage   99.54%   99.54%           
=======================================
  Files          54       54           
  Lines       16324    16364   +40     
=======================================
+ Hits        16250    16290   +40     
  Misses         74       74           

@axic axic merged commit a893c74 into master Aug 13, 2020
@axic axic deleted the fp_copysign branch August 13, 2020 16:23
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