Provide platform-specific x87 FPU definitions and operations
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/src/__support/FPUtil/x86_64/FEnvImpl.h | ||
---|---|---|
624–640 | Do you mind combining the #ifdef to make it a bit easier to read: #ifdef __APPLE__ x87_status.status_word |= (fpstate->status_word & 0x3F); // We can set the x87 control word as is as there no sensitive bits. x87_status.control_word = fpstate->control_word; #else x87_status.status_word |= (fpstate->x87_status.status_word & 0x3F); // Copy other non-sensitive parts of the status word. for (int i = 0; i < 5; i++) { x87_status._[i] = fpstate->x87_status._[i]; // We can set the x87 control word as is as there no sensitive bits. x87_status.control_word = fpstate->x87_status.control_word; #endif // __APPLE__ |
libc/src/__support/FPUtil/x86_64/FEnvImpl.h | ||
---|---|---|
220–221 | Just wanted to point out that this change will affect all x86_64 platforms. But based on the comment, I believe this function is supposed to have been fetching the exception status bits from bot hteh x87 FPU and the SSE unit anyway? |
libc/src/__support/FPUtil/x86_64/FEnvImpl.h | ||
---|---|---|
220–221 | Thanks for catching this! If the tests are passing, go ahead and submit. If you can actually craft a test case to catch regressions, even better. |
libc/src/__support/FPUtil/x86_64/FEnvImpl.h | ||
---|---|---|
220–221 | Do you know if the pre-merge checks run the tests at all? I don't have a non-Apple x86_64 machine easily accessible |
libc/src/__support/FPUtil/x86_64/FEnvImpl.h | ||
---|---|---|
220–221 | I think the pre-merge checks are run on a Linux x86_64 machine, probably in overlay mode. Post-commit bots will run them in full build mode. |
libc/src/__support/FPUtil/x86_64/FEnvImpl.h | ||
---|---|---|
220–221 | Ok, ran the tests in overlay mode locally on a Linux machine, and all passed. |
Just wanted to point out that this change will affect all x86_64 platforms. But based on the comment, I believe this function is supposed to have been fetching the exception status bits from bot hteh x87 FPU and the SSE unit anyway?