[libc-commits] [PATCH] D120914: [libc] Initial support for darwin-aarch64.
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Mar 3 09:36:12 PST 2022
michaelrj added a comment.
LGTM but Siva should probably approve.
================
Comment at: libc/test/src/fenv/feclearexcept_test.cpp:27
__llvm_libc::fputil::raise_except(FE_ALL_EXCEPT);
- for (uint16_t e : excepts) {
- // We clear one exception and test to verify that it was cleared.
- __llvm_libc::feclearexcept(e);
- ASSERT_EQ(uint16_t(__llvm_libc::fputil::test_except(FE_ALL_EXCEPT)),
- uint16_t(FE_ALL_EXCEPT & ~e));
- // After clearing, we raise the exception again.
- __llvm_libc::fputil::raise_except(e);
- }
-
- for (uint16_t e1 : excepts) {
- for (uint16_t e2 : excepts) {
- __llvm_libc::feclearexcept(e1 | e2);
- ASSERT_EQ(uint16_t(__llvm_libc::fputil::test_except(FE_ALL_EXCEPT)),
- uint16_t(FE_ALL_EXCEPT & ~(e1 | e2)));
- __llvm_libc::fputil::raise_except(e1 | e2);
- }
- }
-
- for (uint16_t e1 : excepts) {
- for (uint16_t e2 : excepts) {
- for (uint16_t e3 : excepts) {
- __llvm_libc::feclearexcept(e1 | e2 | e3);
- ASSERT_EQ(uint16_t(__llvm_libc::fputil::test_except(FE_ALL_EXCEPT)),
- uint16_t(FE_ALL_EXCEPT & ~(e1 | e2 | e3)));
- __llvm_libc::fputil::raise_except(e1 | e2 | e3);
- }
- }
- }
-
- for (uint16_t e1 : excepts) {
- for (uint16_t e2 : excepts) {
- for (uint16_t e3 : excepts) {
- for (uint16_t e4 : excepts) {
- __llvm_libc::feclearexcept(e1 | e2 | e3 | e4);
- ASSERT_EQ(uint16_t(__llvm_libc::fputil::test_except(FE_ALL_EXCEPT)),
- uint16_t(FE_ALL_EXCEPT & ~(e1 | e2 | e3 | e4)));
- __llvm_libc::fputil::raise_except(e1 | e2 | e3 | e4);
- }
- }
- }
- }
-
for (uint16_t e1 : excepts) {
for (uint16_t e2 : excepts) {
----------------
I think removing the other tests is okay, but probably copy the comments that used to be on the first test into the new only test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120914/new/
https://reviews.llvm.org/D120914
More information about the libc-commits
mailing list