search for: feclearexcept

Displaying 10 results from an estimated 10 matches for "feclearexcept".

2006 Apr 19
0
[LLVMdev] floating point exception and SSE2 instructions
...hat I remember, this is a bug in debian libc: > some floating point flags are set incorrectly causing SIGFPE. > Can't find the bug report ATM. Oh, it just showed up on numpy-discussion: http://sources.redhat.com/bugzilla/show_bug.cgi?id=10 """ #include <fenv.h> void feclearexcept(int ex) This function should clear the specified exception status bits in the FPU status register. For CPUs with SSE support it should also clear the MXCSR status register bits. The problem is that feclearexcept() clears the status control bits also, causing future floating-point errors to genera...
2006 Apr 19
2
[LLVMdev] floating point exception and SSE2 instructions
On Tue, 18 Apr 2006 23:27:39 -0700 Evan Cheng <evan.cheng at apple.com> wrote: > Hi Simon, > > The x86 backend does generate scalar SSE2 instructions. For your > example, it should emit something like: Oh, how did you get this ? [...] > > There is nothing here that should cause an exception. Are you using a > release or cvs? CVS. >From what I remember,
2012 Apr 27
3
[LLVMdev] Odd PPC inline asm constraint
Hello, I am not sure whether this is a clang issue, an LLVM issue, or both; but clang chokes when parsing expanded macros from the glibc /usr/include/bits/fenvinline.h with an error like: ./boost/math/tools/config.hpp:279:10: error: invalid input constraint 'i#*X' in asm feclearexcept(FE_ALL_EXCEPT); ^ /usr/include/bits/fenvinline.h:56:11: note: expanded from macro 'feclearexcept' : : "i#*X"(__builtin_ffs (__excepts))); \ ^ 1 error generated. There is a comment in the file which reads: /* The weird 'i#*X&...
2006 Apr 19
2
[LLVMdev] floating point exception and SSE2 instructions
...ibc: >> some floating point flags are set incorrectly causing SIGFPE. >> Can't find the bug report ATM. > > Oh, it just showed up on numpy-discussion: > http://sources.redhat.com/bugzilla/show_bug.cgi?id=10 > > """ > #include <fenv.h> > void feclearexcept(int ex) > > This function should clear the specified exception status bits in the > FPU status register. For CPUs with SSE support it should also clear the > MXCSR status register bits. > > The problem is that feclearexcept() clears the status control bits also, > causing fut...
2016 Aug 18
5
fenv.h vs the optimizer
...{ fesetround(FE_DOWNWARD); printf("foo downward: %f\n", rint(0.5)); fesetround(FE_UPWARD); printf("foo upward: %f\n", rint(0.5)); } If compiled with optimization, only one call to rint() is made and the result is reused. void bar(double a, double b) { feclearexcept(FE_INEXACT); a / b; printf("bar %f / %f is %sexact\n", a, b, fetestexcept(FE_INEXACT)? "in": ""); } The compiler omits the divide as the result is unused. And so on. Presumably this has never worked? And perhaps LLVM is no worse than other compilers in...
2020 Jan 18
2
Combining fast math flags with constrained intrinsics
...le Y, double Z) { // Some operation that doesn't need to be precise. if (X/Y > SomeThreshold) return doSomethingPrecise(X, Y); else return Z; } #pragma STDC FENV_ACCESS ON double doSomethingPrecise(double X, double Y) { int SaveRM = fegetround(); fesetround(FE_DOWNWARD); feclearexcept(FE_ALL_EXCEPT); double Temp = X * Y + Z; if (fetestexcept(FE_ALL_EXCEPT)) std::cerr << "Something happened.\n"; fesetround(SaveRM); return Temp; } -=-=-=-=-=-=-=-= Now suppose I compile that with "-O2 -ffp-contract=fast". We will need to generate constrained...
2017 Apr 19
3
[cfe-dev] FE_INEXACT being set for an exact conversion from float to unsigned long long
Changing the list from cfe-dev to llvm-dev > On 20 Apr 2017, at 4:52 AM, Michael Clark <michaeljclark at mac.com> wrote: > > I’m getting close. I think it may be an issue with an individual intrinsic. I’m looking for the X86 lowering of Instruction::FPToUI. > > I found a comment around the rationale for using a conditional move versus a branch. I believe the predicate logic
2016 Jan 04
2
R, AIX 64-bit builds - trying to understand root cause for message: "Error: Line starting 'Package: tools ...' is malformed!"
The bulk is on my forums - the final post for today is: Results to date: A. It looks like I am going to need a newer compiler for C - xlc/xlC V11 apparently does not understand this code: "/data/prj/cran/R-3.2.3/src/main/memory.c", line 2149.31: 1506-046 (S) Syntax error. I will have to check if R-devel has different code before asking for assistence. +2139 #ifdef
2017 Jan 23
2
undefined symbols during linking LLDB 4.0 RC1
....5 read 0000000000000000 DF *UND* 00000000000000a9 Base _ZNSt3__117__assoc_sub_state4waitEv 0000000000000000 DF *UND* 0000000000000035 Base wgetch 0000000000000000 DF *UND* 000000000000005e GLIBC_2.2.5 open 0000000000000000 DF *UND* 0000000000000028 GLIBC_2.2.5 feclearexcept 0000000000000000 DF *UND* 0000000000000093 GLIBC_2.2.5 wait 0000000000000000 DF *UND* 0000000000000025 GLIBC_2.2.5 getsid 0000000000000000 DF *UND* 0000000000000428 Base init_pair 0000000000000000 DF *UND* 000000000000008d GLIBC_2.2.5 statvfs 0000000000000000 DF...
2017 Jan 19
2
undefined symbols during linking LLDB 4.0 RC1
Hello, I update my building scripts to build LLVM 4.0 RC1 (with clang, lldb, libc++, libc++abi, lld) on CentOS 6 and I got a lot of undefined symbols during linking LLDB. I'm using clang-3.9 and this configuration: -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++