This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Fixed-point branch?
- From: Bernd Schmidt <bernds_cb1 at t-online dot de>
- To: "Fu, Chao-Ying" <fu at mips dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Richard Henderson <rth at redhat dot com>, GCC <gcc at gcc dot gnu dot org>, "Stephens, Nigel" <nigel at mips dot com>, "Thekkath, Radhika" <radhika at mips dot com>
- Date: Mon, 18 Jun 2007 13:19:52 +0200
- Subject: Re: Fixed-point branch?
- References: <3CB54817FDF733459B230DD27C690CEC03EE8E96@Exchange.mips.com>
Fu, Chao-Ying 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.
> +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)?
For vectors, we let the targets define the supported modes. Why do we
want something else for fractional support?
> +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.
> +static tree
> +make_or_reuse_fract_type (unsigned size, int unsignedp, int satp)
Comments before functions.
Bernd
--
This footer brought to you by insane German lawmakers.
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif