URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
void adjust_xy (short *, short *);
|
void adjust_xy (short *, short *);
|
|
|
struct adjust_template
|
struct adjust_template
|
{
|
{
|
short kx_x;
|
short kx_x;
|
short kx_y;
|
short kx_y;
|
short kx;
|
short kx;
|
short kz;
|
short kz;
|
};
|
};
|
|
|
static struct adjust_template adjust = {0, 0, 1, 1};
|
static struct adjust_template adjust = {0, 0, 1, 1};
|
|
|
main ()
|
main ()
|
{
|
{
|
short x = 1, y = 1;
|
short x = 1, y = 1;
|
|
|
adjust_xy (&x, &y);
|
adjust_xy (&x, &y);
|
|
|
if (x != 1)
|
if (x != 1)
|
abort ();
|
abort ();
|
|
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
void
|
void
|
adjust_xy (x, y)
|
adjust_xy (x, y)
|
short *x;
|
short *x;
|
short *y;
|
short *y;
|
{
|
{
|
*x = adjust.kx_x * *x + adjust.kx_y * *y + adjust.kx;
|
*x = adjust.kx_x * *x + adjust.kx_y * *y + adjust.kx;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.