Support macos#1120
Conversation
|
Alternatively instead of removing the avx and sse versions of ceil/floor, you might want to update the dispatch tables in libpgmath/lib/x86_64/math_tables/mth*.h to use the SSE and AVX entry points so that SSE/AVX transition penalties can be avoided when running on AVX systems (although newer Intel processors do not suffer from large transition penalties). |
|
@d-parks, I've taken a stab in the dark. Please have a look. |
24b2134 to
d699efa
Compare
|
@isuruf Can you share the build instructions on Mac? |
|
@kiranchandramohan, it's the same as https://github.com/flang-compiler/flang/wiki/Building-Flang, but with |
pawosm-arm
left a comment
There was a problem hiding this comment.
mix of everything in one PR. I'm giving +1 to this, let's see what others think.
|
I would suggest rebasing the branch to get rid of the merge commit, and to organize the changes into two commits, one for the MacOS-related changes, and one for the libpgmath changes. |
- Check for clock_settime before using it - use __fenv_feenableexcept() from flt_env.c instead of feenableexcept() since it doesn't exist on macOS - Use POSIX limits.h - no rt for macos - Enable macos support - don't declare bzero() as it's likely a macro - Remove bad strcpy declaration
|
Done |
| excepts |= FE_UNDERFLOW; | ||
| if (bv & 0x100) | ||
| excepts |= FE_INEXACT; | ||
| #ifdef TARGET_OSX |
There was a problem hiding this comment.
Tried this on my mac. Neither of __fenv_feenableexcept() or feenableexcept() could be found...
There was a problem hiding this comment.
Looks like the function was moved from flangrti to libpgmath. https://github.com/flang-compiler/flang/blob/master/runtime/libpgmath/lib/common/fltfenv.c
|
I've tried to build classic flang on my mac for the first time. Some changes were needed: Also, just in case I've applied this: 8340731 and bunch of my PRs: #135 #546 and #1220 |
Replaces #592