Date: Sat, 13 May 2017 11:44:41 +1000 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Bruce Evans <brde@optusnet.com.au> Cc: Steve Kargl <sgk@troutmask.apl.washington.edu>, numerics@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: catrig[fl].c and inexact Message-ID: <20170513113852.M1045@besplex.bde.org> In-Reply-To: <20170513103208.M845@besplex.bde.org> References: <20170512215654.GA82545@troutmask.apl.washington.edu> <20170513103208.M845@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 13 May 2017, Bruce Evans wrote: > clang-3.9.0 seems to be only partly broken here. Volatile works correctly > for v = huge*huge and also for v = 1+tiny provided v is static instead of > auto. It also works to declare 'junk' as __unused. PS: only __unused on an auto volatile variable gives the intended but not quite wanted behaviour, by reminding the compiler than assignments to volatile variables are used, by spelling 'used' as __unused. This results in assigning to a variable on the stack in most cases, so there is no wastage of static space. Normal FP operations like this are usually the fastest way to set FP exception flags (50-100 times faster than an fenv access on i386). The only sub-optimal part is assigning the result to memory. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170513113852.M1045>