URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 297 |
Rev 384 |
/* PR rtl-optimization/28062 */
|
/* PR rtl-optimization/28062 */
|
/* Original testcase by Martin Michlmayr <tbm@cyrius.com> */
|
/* Original testcase by Martin Michlmayr <tbm@cyrius.com> */
|
/* C testcase by Andrew Pinski <pinskia@gcc.gnu.org> */
|
/* C testcase by Andrew Pinski <pinskia@gcc.gnu.org> */
|
|
|
struct _NSPoint
|
struct _NSPoint
|
{
|
{
|
float x;
|
float x;
|
float y;
|
float y;
|
};
|
};
|
|
|
typedef struct _NSPoint NSPoint;
|
typedef struct _NSPoint NSPoint;
|
|
|
static inline NSPoint
|
static inline NSPoint
|
NSMakePoint (float x, float y)
|
NSMakePoint (float x, float y)
|
{
|
{
|
NSPoint point;
|
NSPoint point;
|
point.x = x;
|
point.x = x;
|
point.y = y;
|
point.y = y;
|
return point;
|
return point;
|
}
|
}
|
|
|
static inline NSPoint
|
static inline NSPoint
|
RelativePoint (NSPoint point, NSPoint refPoint)
|
RelativePoint (NSPoint point, NSPoint refPoint)
|
{
|
{
|
return NSMakePoint (refPoint.x + point.x, refPoint.y + point.y);
|
return NSMakePoint (refPoint.x + point.x, refPoint.y + point.y);
|
}
|
}
|
|
|
NSPoint g(NSPoint refPoint)
|
NSPoint g(NSPoint refPoint)
|
{
|
{
|
float pointA, pointB;
|
float pointA, pointB;
|
return RelativePoint (NSMakePoint (0, pointA), refPoint);
|
return RelativePoint (NSMakePoint (0, pointA), refPoint);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.