arm.c (arm_init_iwmmxt_builtins, [...]): Use ARRAY_SIZE.

* config/arm/arm.c (arm_init_iwmmxt_builtins, arm_expand_builtin):
	Use ARRAY_SIZE.
	* config/frv/frv.c (frv_expand_builtin): Likewise.
	* config/sh/sh.c (sh_media_init_builtins): Likewise.

From-SVN: r69194
This commit is contained in:
Kaveh R. Ghazi 2003-07-10 18:04:25 +00:00 committed by Kaveh Ghazi
parent 4a3864984c
commit e97a46ce6c
4 changed files with 28 additions and 36 deletions

View File

@ -1,3 +1,10 @@
2003-07-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* config/arm/arm.c (arm_init_iwmmxt_builtins, arm_expand_builtin):
Use ARRAY_SIZE.
* config/frv/frv.c (frv_expand_builtin): Likewise.
* config/sh/sh.c (sh_media_init_builtins): Likewise.
2003-07-09 Mark Mitchell <mark@codesourcery.com>
PR c++/10032

View File

@ -10715,7 +10715,7 @@ arm_init_iwmmxt_builtins (void)
/* Add all builtins that are more or less simple operations on two
operands. */
for (i = 0, d = bdesc_2arg; i < sizeof (bdesc_2arg) / sizeof *d; i++, d++)
for (i = 0, d = bdesc_2arg; i < ARRAY_SIZE (bdesc_2arg); i++, d++)
{
/* Use one of the operands; the target can have a different mode for
mask-generating compares. */
@ -11155,11 +11155,11 @@ arm_expand_builtin (tree exp,
break;
}
for (i = 0, d = bdesc_2arg; i < sizeof (bdesc_2arg) / sizeof *d; i++, d++)
for (i = 0, d = bdesc_2arg; i < ARRAY_SIZE (bdesc_2arg); i++, d++)
if (d->code == (const enum arm_builtins) fcode)
return arm_expand_binop_builtin (d->icode, arglist, target);
for (i = 0, d = bdesc_1arg; i < sizeof (bdesc_1arg) / sizeof *d; i++, d++)
for (i = 0, d = bdesc_1arg; i < ARRAY_SIZE (bdesc_1arg); i++, d++)
if (d->code == (const enum arm_builtins) fcode)
return arm_expand_unop_builtin (d->icode, arglist, target, 0);

View File

@ -9649,53 +9649,38 @@ frv_expand_builtin (exp, target, subtarget, mode, ignore)
/* Expand groups of builtins. */
for (i = 0, d = bdesc_set; i < sizeof (bdesc_set) / sizeof *d; i++, d++)
for (i = 0, d = bdesc_set; i < ARRAY_SIZE (bdesc_set); i++, d++)
if (d->code == fcode)
return frv_expand_set_builtin (d->icode, arglist, target);
for (i = 0, d = bdesc_1arg; i < sizeof (bdesc_1arg) / sizeof *d; i++, d++)
for (i = 0, d = bdesc_1arg; i < ARRAY_SIZE (bdesc_1arg); i++, d++)
if (d->code == fcode)
return frv_expand_unop_builtin (d->icode, arglist, target);
for (i = 0, d = bdesc_2arg; i < sizeof (bdesc_2arg) / sizeof *d; i++, d++)
for (i = 0, d = bdesc_2arg; i < ARRAY_SIZE (bdesc_2arg); i++, d++)
if (d->code == fcode)
return frv_expand_binop_builtin (d->icode, arglist, target);
for (i = 0, d = bdesc_cut; i < sizeof (bdesc_cut) / sizeof *d; i++, d++)
for (i = 0, d = bdesc_cut; i < ARRAY_SIZE (bdesc_cut); i++, d++)
if (d->code == fcode)
return frv_expand_cut_builtin (d->icode, arglist, target);
for (i = 0, d = bdesc_2argimm;
i < sizeof (bdesc_2argimm) / sizeof *d;
i++, d++)
{
if (d->code == fcode)
return frv_expand_binopimm_builtin (d->icode, arglist, target);
}
for (i = 0, d = bdesc_2argimm; i < ARRAY_SIZE (bdesc_2argimm); i++, d++)
if (d->code == fcode)
return frv_expand_binopimm_builtin (d->icode, arglist, target);
for (i = 0, d = bdesc_void2arg;
i < sizeof (bdesc_void2arg) / sizeof *d;
i++, d++)
{
if (d->code == fcode)
return frv_expand_voidbinop_builtin (d->icode, arglist);
}
for (i = 0, d = bdesc_void2arg; i < ARRAY_SIZE (bdesc_void2arg); i++, d++)
if (d->code == fcode)
return frv_expand_voidbinop_builtin (d->icode, arglist);
for (i = 0, d = bdesc_void3arg;
i < sizeof (bdesc_void3arg) / sizeof *d;
i++, d++)
{
if (d->code == fcode)
return frv_expand_voidtriop_builtin (d->icode, arglist);
}
for (i = 0, d = bdesc_void3arg; i < ARRAY_SIZE (bdesc_void3arg); i++, d++)
if (d->code == fcode)
return frv_expand_voidtriop_builtin (d->icode, arglist);
for (i = 0, d = bdesc_voidacc; i < ARRAY_SIZE (bdesc_voidacc); i++, d++)
if (d->code == fcode)
return frv_expand_voidaccop_builtin (d->icode, arglist);
for (i = 0, d = bdesc_voidacc;
i < sizeof (bdesc_voidacc) / sizeof *d;
i++, d++)
{
if (d->code == fcode)
return frv_expand_voidaccop_builtin (d->icode, arglist);
}
return 0;
}

View File

@ -8226,7 +8226,7 @@ sh_media_init_builtins ()
const struct builtin_description *d;
memset (shared, 0, sizeof shared);
for (d = bdesc; d - bdesc < (int) (sizeof bdesc / sizeof bdesc[0]); d++)
for (d = bdesc; d - bdesc < (int) ARRAY_SIZE (bdesc); d++)
{
tree type, arg_type;
int signature = d->signature;