URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* PR regression/21897 */
|
/* PR regression/21897 */
|
|
|
extern void abort (void);
|
extern void abort (void);
|
|
|
typedef short v4hi __attribute__ ((vector_size (8)));
|
typedef short v4hi __attribute__ ((vector_size (8)));
|
typedef float v4sf __attribute__ ((vector_size (16)));
|
typedef float v4sf __attribute__ ((vector_size (16)));
|
|
|
union
|
union
|
{
|
{
|
v4hi v;
|
v4hi v;
|
short s[4];
|
short s[4];
|
} u;
|
} u;
|
|
|
union
|
union
|
{
|
{
|
v4sf v;
|
v4sf v;
|
float f[4];
|
float f[4];
|
} v;
|
} v;
|
|
|
void
|
void
|
foo (void)
|
foo (void)
|
{
|
{
|
unsigned int i;
|
unsigned int i;
|
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
u.v += (v4hi) { 12, 14 };
|
u.v += (v4hi) { 12, 14 };
|
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
v.v += (v4sf) { 18.0, 20.0, 22 };
|
v.v += (v4sf) { 18.0, 20.0, 22 };
|
}
|
}
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
foo ();
|
foo ();
|
if (u.s[0] != 24 || u.s[1] != 28 || u.s[2] || u.s[3])
|
if (u.s[0] != 24 || u.s[1] != 28 || u.s[2] || u.s[3])
|
abort ();
|
abort ();
|
if (v.f[0] != 36.0 || v.f[1] != 40.0 || v.f[2] != 44.0 || v.f[3] != 0.0)
|
if (v.f[0] != 36.0 || v.f[1] != 40.0 || v.f[2] != 44.0 || v.f[3] != 0.0)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.