[PATCH] D69870: [builtins] Implement rounding mode support for i386/x86_64
Yi Kong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 14:31:26 PST 2019
kongyi marked 3 inline comments as done.
kongyi added inline comments.
================
Comment at: compiler-rt/lib/builtins/i386/fp_mode.c:61
+ env.__status_word |= X87_INEXACT;
+ __asm__ __volatile__ ("fnclex");
+ __asm__ __volatile__ ("fldenv %0": : "m" (env));
----------------
craig.topper wrote:
> Why do we need fnclex here?
Android's feraiseexecept has this, but it is indeed unnecessary. Removed.
================
Comment at: compiler-rt/lib/builtins/i386/fp_mode.c:62
+ __asm__ __volatile__ ("fnclex");
+ __asm__ __volatile__ ("fldenv %0": : "m" (env));
+
----------------
craig.topper wrote:
> Do we need an fwait after this to trigger the exception interrupt?
Yes. Added.
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69870/new/
https://reviews.llvm.org/D69870
More information about the llvm-commits
mailing list