-
Notifications
You must be signed in to change notification settings - Fork 38
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}.div instructions #468
Conversation
chfast
commented
Aug 10, 2020
•
edited by gumb0
Loading
edited by gumb0
0ee2182
to
c6547b9
Compare
4abda86
to
74a1c1c
Compare
403e427
to
e8c2b15
Compare
6435f60
to
717a89a
Compare
Some UBSan errors on macOS |
Codecov Report
@@ Coverage Diff @@
## master #468 +/- ##
=======================================
Coverage 99.54% 99.54%
=======================================
Files 54 54
Lines 16123 16196 +73
=======================================
+ Hits 16049 16122 +73
Misses 74 74 |
@@ -510,6 +510,13 @@ inline uint64_t popcnt64(uint64_t value) noexcept | |||
return static_cast<uint64_t>(__builtin_popcountll(value)); | |||
} | |||
|
|||
template <typename T> | |||
__attribute__((no_sanitize("float-divide-by-zero"))) inline constexpr T fdiv(T a, T b) noexcept |
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.
The attribute disables UBSan check in both GCC and Clang. Using C++ attributes ([[gnu::no_sanitize("")]]
) is also possible but requires some changes to compiler's warning options. So I think it is fine to leave it as is for now.
@axic, I added spec annotations in tests. |