URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 106 |
Rev 107 |
template<class T> T add(T v1, T v2)
|
template<class T> T add(T v1, T v2)
|
{
|
{
|
T v3;
|
T v3;
|
v3 = v1;
|
v3 = v1;
|
v3 += v2;
|
v3 += v2;
|
return v3;
|
return v3;
|
}
|
}
|
|
|
int main()
|
int main()
|
{
|
{
|
char c;
|
char c;
|
int i;
|
int i;
|
float f;
|
float f;
|
extern void add1();
|
extern void add1();
|
extern void subr2();
|
extern void subr2();
|
extern void subr3();
|
extern void subr3();
|
|
|
c = 'a';
|
c = 'a';
|
i = 2;
|
i = 2;
|
f = 4.5;
|
f = 4.5;
|
|
|
c = add(c, c);
|
c = add(c, c);
|
i = add(i, i);
|
i = add(i, i);
|
f = add(f, f);
|
f = add(f, f);
|
|
|
add1();
|
add1();
|
subr2();
|
subr2();
|
subr3();
|
subr3();
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.