X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fgenmodes.c;h=8b6f5bce96b937f71fe76d47916dee167d2bb59b;hp=dae7e38ebdb4b7d8181a4c8635f022d9cb72f013;hb=04df78dc71f8fb5861a65c301739b38569f87da4;hpb=4c8347147cf74af231cc5b0f11b41c5067970af4 diff --git a/gcc/genmodes.c b/gcc/genmodes.c index dae7e38ebdb..8b6f5bce96b 100644 --- a/gcc/genmodes.c +++ b/gcc/genmodes.c @@ -63,7 +63,6 @@ struct mode_data struct mode_data *component; /* mode of components */ struct mode_data *wider; /* next wider mode */ - struct mode_data *wider_2x; /* 2x wider mode */ struct mode_data *contained; /* Pointer to list of modes that have this mode as a component. */ @@ -83,7 +82,7 @@ static struct mode_data *void_mode; static const struct mode_data blank_mode = { 0, "", MAX_MODE_CLASS, -1U, -1U, -1U, -1U, - 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, "", 0, 0, 0, 0 }; @@ -790,7 +789,7 @@ calc_wider_mode (void) /* Allocate max_n_modes + 1 entries to leave room for the extra null pointer assigned after the qsort call below. */ - sortbuf = (struct mode_data **) alloca ((max_n_modes + 1) * sizeof (struct mode_data *)); + sortbuf = XALLOCAVEC (struct mode_data *, max_n_modes + 1); for (c = 0; c < MAX_MODE_CLASS; c++) { @@ -804,7 +803,6 @@ calc_wider_mode (void) for (prev = 0, m = modes[c]; m; m = next) { m->wider = void_mode; - m->wider_2x = void_mode; /* this is nreverse */ next = m->next; @@ -827,7 +825,6 @@ calc_wider_mode (void) for (j = 0; j < i; j++) sortbuf[j]->next = sortbuf[j]->wider = sortbuf[j + 1]; - modes[c] = sortbuf[0]; } } @@ -1062,6 +1059,21 @@ emit_mode_wider (void) continue; } + /* For vectors we want twice the number of components, + with the same element type. */ + if (m->cl == MODE_VECTOR_INT + || m->cl == MODE_VECTOR_FLOAT + || m->cl == MODE_VECTOR_FRACT + || m->cl == MODE_VECTOR_UFRACT + || m->cl == MODE_VECTOR_ACCUM + || m->cl == MODE_VECTOR_UACCUM) + { + if (m2->ncomponents != 2 * m->ncomponents) + continue; + if (m->component != m2->component) + continue; + } + break; } if (m2 == void_mode)