[libc-commits] [PATCH] D106386: [libc] Exclude few unused bits from x86 state for Windows
Hedin GarcĂa via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Jul 20 12:31:27 PDT 2021
hedingarcia updated this revision to Diff 360234.
hedingarcia added a comment.
Change macro directives to only evaluate if __WIN32 is undefined.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106386/new/
https://reviews.llvm.org/D106386
Files:
libc/utils/FPUtil/x86_64/FEnv.h
Index: libc/utils/FPUtil/x86_64/FEnv.h
===================================================================
--- libc/utils/FPUtil/x86_64/FEnv.h
+++ libc/utils/FPUtil/x86_64/FEnv.h
@@ -91,12 +91,16 @@
uint16_t StatusWord;
uint16_t Unused2;
// TODO: Elaborate the remaining 20 bytes as required.
+#if !(defined(_WIN32))
uint32_t _[5];
+#endif
};
struct FPState {
X87StateDescriptor X87Status;
+#if !(defined(_WIN32))
uint32_t MXCSR;
+#endif
};
static_assert(
@@ -346,6 +350,7 @@
return 0;
}
+#if !(defined(_WIN32))
static inline int getEnv(fenv_t *envp) {
internal::FPState *state = reinterpret_cast<internal::FPState *>(envp);
internal::getX87StateDescriptor(state->X87Status);
@@ -360,6 +365,7 @@
internal::writeMXCSR(state->MXCSR);
return 0;
}
+#endif
} // namespace fputil
} // namespace __llvm_libc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106386.360234.patch
Type: text/x-patch
Size: 851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20210720/486c4656/attachment.bin>
More information about the libc-commits
mailing list