URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 297 |
Rev 338 |
extern void abort (void);
|
extern void abort (void);
|
|
|
static int inv_J(int a[][2])
|
static int inv_J(int a[][2])
|
{
|
{
|
int i, j;
|
int i, j;
|
int det = 0.0;
|
int det = 0.0;
|
for (j=0; j<2; ++j)
|
for (j=0; j<2; ++j)
|
det += a[j][0] + a[j][1];
|
det += a[j][0] + a[j][1];
|
return det;
|
return det;
|
}
|
}
|
|
|
int foo()
|
int foo()
|
{
|
{
|
int mat[2][2];
|
int mat[2][2];
|
mat[0][0] = 1;
|
mat[0][0] = 1;
|
mat[0][1] = 2;
|
mat[0][1] = 2;
|
mat[1][0] = 4;
|
mat[1][0] = 4;
|
mat[1][1] = 8;
|
mat[1][1] = 8;
|
return inv_J(mat);
|
return inv_J(mat);
|
}
|
}
|
|
|
int main()
|
int main()
|
{
|
{
|
if (foo () != 15)
|
if (foo () != 15)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.