Re: [PATCH v2] Add i386 and x86_64 fenv support from Cygwin.

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On Sep  4 15:10, Joel Sherrill wrote:
> Hi
> 
> I thought I was close to wrapping this up but I have run into a couple of issues
> with this implementation being a single file and the stub being a collection
> of files. After my most recent rebuild, I am getting linking conflicts because
> the implementation doesn't override the stubs.
> 
> This means that each implementation needs to be multiple files with the
> same names as the stub implementation. The riscv does this.but the x86
> does not.
> 
> (1) Do you all agree that I need split the single fenv.c file into
> multiple files?
> Or should I provide empty versions of each file in libm/fenv so an
> implementation
> can be one file but just override the other files with common files. I
> ask because
> I suspect other architecture implementations will also be one file or inline the
> implementation in sys/fenv.h. This would make it easy to merge those.
> 
> Suggestions?

Ideally all targets define one function per file.  Cygwin is probably
the only target here which does not care for space, but it doesn't hurt
if the functions are split for Cygwin either.  So if only the actually
required functions are linked into an executable, you won't find anybody
complaining.

> (1a) If I do split, do I provide a file like fenvimpl.h for the constants at the
> top of the file? And place it as a local file in libm/machine/i386 and x86_64?

In theory this should not be necessary.  sys/fenv.h is getting overridden
by the target-specific implementation, that should be sufficient.

> (2) Independent of splitting the file, I noticed use_sse is used in multiple
> methods but only set by _feinitialize(). I THINK the solution is to turn
> use_sse into a method which dynamically checks the cpuid feature flag.
> We can't rely on that always being called.

Makes sense.  Please note that Jeff will take over from here.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1w+rUACgkQ9TYGna5E
T6AZQg/6Ah2RyGmPS1cL8QAkljtuq4hdrB+9P3HHCMrQuDHY6+ooUwOr20S19y2c
abkbutRxURKCMsLG/QP7UzfAbJwBTDy+OwJDynx8XgyHN7xDouANg/ZOuiAK1khM
rXjNAdgKwSdkWNLvNyxfnmxu3cHGc9YXT9YPp5YaVN9twlY4Om4omBOrmtHR9z5G
x1sp/UmNi+b4mxDaq3nCSrAsnzu6pxjpZvSfqYATOgea/V5YR/xQYDC5h567N3Xd
VgKauVlOsnaWBzkr3JcO/A/Q99lz9NTfayi1A60lQJHD5rq2KQOTbOXK4vh11Mqo
g0eN3lBxDZcu7nYjQ6wWa83RUQ6umy81QKpBSIvPt9g4+BlQbKxaOtEV4W0XlhBo
NkeJTSUtCVxyeip5zk+aq1D9tVD9HOgnl9Ld0lnf5R8vx/igXbF1cYS8nMjUpuJL
I8gsRA0fIJENxow9zssEzGdWIckLKiGqE86fyFT1+L82Omk2E5GpqWD/7jR5V/kG
6RcxNbnhAn1qgTBV+LzV9EJ+SDw67V4P+E0ssDBUnm1AG4Z/W79dnRNKictP0fol
DWZMQSWnK37dN++Np9WRjoBwsJfwVIh8XE+gzn6b9dNHdsmp9GlaJhoKeXf+pHAr
YQohkS11N8BXHz429c7usrqBTgASZb/8da02qkySop4DTDTIKcY=
=pQ+t
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.