URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
extern void abort (void);
|
extern void abort (void);
|
|
|
typedef struct {
|
typedef struct {
|
long r[(19 + sizeof (long))/(sizeof (long))];
|
long r[(19 + sizeof (long))/(sizeof (long))];
|
} realvaluetype;
|
} realvaluetype;
|
|
|
typedef void *tree;
|
typedef void *tree;
|
|
|
static realvaluetype
|
static realvaluetype
|
real_value_from_int_cst (tree x, tree y)
|
real_value_from_int_cst (tree x, tree y)
|
{
|
{
|
realvaluetype r;
|
realvaluetype r;
|
int i;
|
int i;
|
for (i = 0; i < sizeof(r.r)/sizeof(long); ++i)
|
for (i = 0; i < sizeof(r.r)/sizeof(long); ++i)
|
r.r[i] = -1;
|
r.r[i] = -1;
|
return r;
|
return r;
|
}
|
}
|
|
|
struct brfic_args
|
struct brfic_args
|
{
|
{
|
tree type;
|
tree type;
|
tree i;
|
tree i;
|
realvaluetype d;
|
realvaluetype d;
|
};
|
};
|
|
|
static void
|
static void
|
build_real_from_int_cst_1 (data)
|
build_real_from_int_cst_1 (data)
|
void * data;
|
void * data;
|
{
|
{
|
struct brfic_args *args = (struct brfic_args *) data;
|
struct brfic_args *args = (struct brfic_args *) data;
|
args->d = real_value_from_int_cst (args->type, args->i);
|
args->d = real_value_from_int_cst (args->type, args->i);
|
}
|
}
|
|
|
int main()
|
int main()
|
{
|
{
|
struct brfic_args args;
|
struct brfic_args args;
|
|
|
__builtin_memset (&args, 0, sizeof(args));
|
__builtin_memset (&args, 0, sizeof(args));
|
build_real_from_int_cst_1 (&args);
|
build_real_from_int_cst_1 (&args);
|
|
|
if (args.d.r[0] == 0)
|
if (args.d.r[0] == 0)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.