This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implement C11 _Atomic


On Thu, 7 Nov 2013, Uros Bizjak wrote:

> [uros@localhost test]$ gcc -lm -g fpex.c
> [uros@localhost test]$ ./a.out
> Floating point exception (core dumped)
> [uros@localhost test]$ gcc -lm -g -m32 fpex.c
> [uros@localhost test]$ ./a.out
> [uros@localhost test]$

I see code of the form (testing compilation rather than execution):

        flds    4(%esp)
        flds    8(%esp)
        fmulp   %st, %st(1)
        fstps   12(%esp)

where the fstps should result in the exception, and glibc uses volatile in 
several places, conditional on __FLT_EVAL_METHOD__ != 0, to force a 
conversion to the semantic type (whether for correct results, or to ensure 
exceptions).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]