On Tue, 20 Jun 2017, Segher Boessenkool wrote:

> > And as you see see below the gcc.target tests have to be duplicated
> > anyway. Even if the C code is common there will many differences in
> > dg-options and dg-require-effective-target. Trying to common these
> > implementations only creates more small files to manage.
> 
> So somewhere in the near future we'll have to pull things apart again,
> if we go with merging things now.

The common part in the intrinsics implementation should be exactly the 
parts that can be implemented in GNU C without target-specific intrinsics 
being needed.  There should be nothing to pull apart if you start with the 
right things in the common header.  If a particular header has some 
functions that can be implemented in GNU C and some that need 
target-specific code, the generic GNU C functions should be in a common 
header, #included by the target-specific header.  The common header should 
have no conditionals on target architectures whatever (it might have 
conditionals on things like endianness).

I don't expect many different effective-target / dg-add-options keywords 
to be needed for common tests (obviously, duplicating tests for each 
architecture wanting these intrinsics is generally a bad idea).

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to