Discussion:
Not supporting fpgetmask(3) on aarch64
Matt Thomas
2014-03-24 05:23:29 UTC
Permalink
My aarch64 (arm 64-bit) userland doesn't currently include support for

fpgetmask, fpgetprec, fpgetround, fpgetsticky,
fpsetmask, fpsetprec, fpsetround, fpsetsticky

since it has fenv(3) support instead. Does anyone think this is a problem?
ольга крыжановская
2014-03-24 06:30:31 UTC
Permalink
Yes, if you wish to run, scientific software on it.

Olga
Post by Matt Thomas
My aarch64 (arm 64-bit) userland doesn't currently include support for
fpgetmask, fpgetprec, fpgetround, fpgetsticky,
fpsetmask, fpsetprec, fpsetround, fpsetsticky
since it has fenv(3) support instead. Does anyone think this is a problem?
--
, _ _ ,
{ \/`o;====- Olga Kryzhanovska -====;o`\/ }
.----'-/`-/ ***@gmail.com \-`\-'----.
`'-..-| / http://twitter.com/fleyta \ |-..-'`
/\/\ Solaris/BSD//C/C++ programmer /\/\
`--` `--`
Joerg Sonnenberger
2014-03-24 10:11:14 UTC
Permalink
Post by ольга крыжановская
Yes, if you wish to run, scientific software on it.
Scientific software can and should use fenv(3) too...

Joerg
Ignatios Souvatzis
2014-03-24 15:40:02 UTC
Permalink
Post by Joerg Sonnenberger
Post by ольга крыжановская
Yes, if you wish to run, scientific software on it.
Scientific software can and should use fenv(3) too...
What about the precision part in fpget...(3)'s BUGS section?

" These interfaces are deprecated and the ones in
fenv(3) should be used, although the interfaces in fenv(3) don't support
getting or setting the precision."
Matt Thomas
2014-03-24 16:43:53 UTC
Permalink
Post by Ignatios Souvatzis
Post by Joerg Sonnenberger
Post by ольга крыжановская
Yes, if you wish to run, scientific software on it.
Scientific software can and should use fenv(3) too...
What about the precision part in fpget...(3)'s BUGS section?
" These interfaces are deprecated and the ones in
fenv(3) should be used, although the interfaces in fenv(3) don't support
getting or setting the precision."
except setting the precision is only valid for x86 (and anything else
supporting 80-bit FP).
Joerg Sonnenberger
2014-03-24 19:21:16 UTC
Permalink
Post by Matt Thomas
Post by Ignatios Souvatzis
Post by Joerg Sonnenberger
Post by ольга крыжановская
Yes, if you wish to run, scientific software on it.
Scientific software can and should use fenv(3) too...
What about the precision part in fpget...(3)'s BUGS section?
" These interfaces are deprecated and the ones in
fenv(3) should be used, although the interfaces in fenv(3) don't support
getting or setting the precision."
except setting the precision is only valid for x86 (and anything else
supporting 80-bit FP).
...and likely to give unexpected results at least for amd64.

Joerg
David Laight
2014-03-25 21:14:08 UTC
Permalink
Post by Joerg Sonnenberger
Post by Matt Thomas
Post by Ignatios Souvatzis
Post by Joerg Sonnenberger
Post by ольга крыжановская
Yes, if you wish to run, scientific software on it.
Scientific software can and should use fenv(3) too...
What about the precision part in fpget...(3)'s BUGS section?
" These interfaces are deprecated and the ones in
fenv(3) should be used, although the interfaces in fenv(3) don't support
getting or setting the precision."
except setting the precision is only valid for x86 (and anything else
supporting 80-bit FP).
Well, probably aimed at controlling the x86 fpu.
Other hardware could easily support 80+bit by using different opcodes
(like some vax), so not have a settable precision.
Post by Joerg Sonnenberger
...and likely to give unexpected results at least for amd64.
amd64 is 'interesting'.
'long double' uses the x87 FP stack and instructions, so is subject
to the precision being set to less than 80bits - so it could the same
precision as 'float'.

However some instructions (like fscale and the trig/log ones) are
not in the SSE2 set - so the values have to be moved between the xmm
and x87 registers. If you need 2 (or more) x87 instructions it is best
to use 'long double' for the intermediate values to avoid the memory
accesses and long instruction sequences.

David
--
David Laight: ***@l8s.co.uk
Loading...