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: Fixed-point branch?


Bernd Schmidt wrote:

> >   I attached a diff file for 14 files of the new structures
> > and documents.  You and other maintainers are welcome to
> > check it.  Thanks a lot!
> > 
> > Note: 14 files are =>
> > genmodes.c mode-classes.def machmode.def machmode.h tree.def tree.h
> > tree.c rtl.def rtl.h rtl.c fixed-value.h fixed-value.c
> > doc/extend.texi doc/rtl.texi doc/c-tree.texi doc/md.texi
> 
> Random comments..
> 
> > +  unsigned saturating_flag : 1; /* FIXME.  This new flag 
> increases the size of
> > +                                  tree_common by a full word.  */
> 
> Sounds undesirable.  We need to look hard for a way to avoid this.

  Yes, we can get one of 24 spare bits for this flag.  We just fixed this
issue last week.

> 
> > +ACCUM_MODE (HA, 2, 8, 7); /* s8.7 */
> > +ACCUM_MODE (SA, 4, 16, 15); /* s16.15 */
> > +ACCUM_MODE (DA, 8, 32, 31); /* s32.31 */
> > +ACCUM_MODE (TA, 16, 64, 63); /* s64.63 */
> 
> Lots of predefined types and modes in this patch.  What about targets
> with other requirements (the Blackfin has 40 bit (8 + 32) 
> accumulators)?

  In "bfin-modes.def", we can adjust the DA mode to (s7.32) by using
ADJUST_IBIT(DA, 7)
ADJUST_FBIT(DA, 32)

> 
> For vectors, we let the targets define the supported modes.  Why do we
> want something else for fractional support?

  I am not clear about this question.  The new modes (FRACT, UFRACT, ACCUM,
and UACCUM) enables GCC to recognize the formats of the underlying values
to perform constant folding (e.g., + - * /).
  To use the DA mode for vector, we can use:
VECTOR_MODE (ACCUM, DA, 2);

> 
> > +int
> > +fixed_zerop (tree expr)
> > +{
> > +  return TREE_CODE (expr) == FIXED_CST
> > +        && double_int_zero_p (TREE_FIXED_CST (expr).data);
> > +}
> 
> Formatting - this needs parentheses.  Elsewhere too.

  Ok.

> 
> > +static tree
> > +make_or_reuse_fract_type (unsigned size, int unsignedp, int satp)
> 
> Comments before functions.

  Ok.  Thanks!

Regards,
Chao-ying


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]