This is the mail archive of the gcc@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: proposal to make SIZE_TYPE more flexible


On Fri, 22 Nov 2013, DJ Delorie wrote:

> > Does the target with __int20 actually have __int128 (i.e. pass 
> > targetm.scalar_mode_supported_p (TImode))?  But you should indeed be able 
> > to have an arbitrary number of such types.
> 
> It doesn't support it, but it does *have* it.  In that the compiler
> correcly parses the __int128 keyword and knows to tell you it isn't
> supported.  So, it needs at least two keywords.  Which implies "it
> needs two..." in other places.

Making __int20 and __int128 exactly similar indicates __int128 *not* being 
a keyword on targets not supporting it.

> And it's reasonable to expect that *someone* will want int16, int32,
> etc types once a general solution is in place.

As previously noted, it's best only to define such types where (a) there 
is an integer mode passing targetm.scalar_mode_supported_p and (b) no 
standard C type matches, to avoid issues with whether __int32 is the same 
as int or not.

> > (d) I don't think the standard C types are particularly relevant to your 
> > project.
> 
> Should we be pulling the int128 support out of the integer_types[]
> list and put it in the global_trees[] (or some table) list?  Because
> most of the int128 support is tied in with the standard C type
> handling, not the target-specific handling.

My guess is that the int128 support doesn't belong in any of the existing 
global arrays, but in some new arrays supporting whatever set of intN 
types the target has.  That's just a guess; whether you follow or don't 
follow it, your analysis of the code needs to justify your choice.

-- 
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]