[patch] Fix pr23046

Richard Henderson rth@redhat.com
Mon Sep 19 19:17:00 GMT 2005


On Mon, Sep 19, 2005 at 02:37:44PM -0400, Richard Kenner wrote:
> Suppose the base type is signed SImode with precision of 32.  The subtype has
> a range of 2-7, so is QImode, unsigned, and precision of 3.
> 
> So you are suggesting making a new type with what?  Unsigned QImode,
> precision 8 and range 0-255?

That's one option, yes.  Another would be an unsigned QImode precision 3.

> How local would that type be?

Not local at all, I expect.  lang_hooks.type_for_size could certainly
find the precision 8 type.

> Do we make one of such for each subtype
> (meaning we'd likely have to find a place to stick it) or do we make a new
> such type every time we need to do the operation?

Or stick it in a global cache.  The types are only interesting in their
width and signedness, so we don't need anything particularly tied to the
subtype in question.


r~



More information about the Gcc-patches mailing list