URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O2" } */
|
/* { dg-options "-O2" } */
|
/* Test check use_block_copy bit propagation in sra element hierarchy. */
|
/* Test check use_block_copy bit propagation in sra element hierarchy. */
|
|
|
typedef unsigned char UINT8 ;
|
typedef unsigned char UINT8 ;
|
typedef unsigned int UINT ;
|
typedef unsigned int UINT ;
|
class C4
|
class C4
|
{
|
{
|
public:
|
public:
|
int xy[2];
|
int xy[2];
|
};
|
};
|
|
|
class C3
|
class C3
|
{
|
{
|
public:
|
public:
|
inline void
|
inline void
|
Reset()
|
Reset()
|
{
|
{
|
C4 const mvMax = {0x7fff, 0x7fff};
|
C4 const mvMax = {0x7fff, 0x7fff};
|
|
|
m42(0,mvMax);
|
m42(0,mvMax);
|
m42(1,mvMax);
|
m42(1,mvMax);
|
m43(0);
|
m43(0);
|
};
|
};
|
|
|
inline void m42 (UINT i, C4 mv)
|
inline void m42 (UINT i, C4 mv)
|
{
|
{
|
mMv[i] = mv;
|
mMv[i] = mv;
|
};
|
};
|
|
|
|
|
|
|
inline void m43(UINT j)
|
inline void m43(UINT j)
|
{
|
{
|
m44 (j);
|
m44 (j);
|
d41 = j + 1;
|
d41 = j + 1;
|
};
|
};
|
|
|
private:
|
private:
|
|
|
C4 mMv[2];
|
C4 mMv[2];
|
UINT8 d41;
|
UINT8 d41;
|
inline void m44 (UINT j) const {};
|
inline void m44 (UINT j) const {};
|
};
|
};
|
|
|
class C2
|
class C2
|
{
|
{
|
private:
|
private:
|
bool valid;
|
bool valid;
|
};
|
};
|
|
|
class C1
|
class C1
|
{
|
{
|
public:
|
public:
|
void m1(C3 *c);
|
void m1(C3 *c);
|
|
|
private:
|
private:
|
const C2 * d1[2];
|
const C2 * d1[2];
|
void m2(C3 *m);
|
void m2(C3 *m);
|
};
|
};
|
|
|
void C1::m1 (C3 *r)
|
void C1::m1 (C3 *r)
|
{
|
{
|
C3 x;
|
C3 x;
|
m2(&x);
|
m2(&x);
|
}
|
}
|
void C1::m2(C3 *x)
|
void C1::m2(C3 *x)
|
{
|
{
|
C3 m3;
|
C3 m3;
|
int i;
|
int i;
|
m3.Reset ();
|
m3.Reset ();
|
for(i=0; i<2; i++)
|
for(i=0; i<2; i++)
|
{
|
{
|
const C2 * r = d1[i];
|
const C2 * r = d1[i];
|
if (r!=__null)
|
if (r!=__null)
|
{
|
{
|
C4 const c400 = {0,0};
|
C4 const c400 = {0,0};
|
m3.m42 (i, c400);
|
m3.m42 (i, c400);
|
|
|
}
|
}
|
}
|
}
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.