URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 1487 |
Rev 1555 |
Line 58... |
Line 58... |
1, 1, 0, 0, 0, 1, 0, 1,
|
1, 1, 0, 0, 0, 1, 0, 1,
|
0, 1, 0, 1, 0, 1, 0, 1,
|
0, 1, 0, 1, 0, 1, 0, 1,
|
0, 1, 0, 1, 0, 1, 0, 1,
|
0, 1, 0, 1, 0, 1, 0, 1,
|
1, 1};
|
1, 1};
|
|
|
/* returns log2(x) */
|
|
/* Call this log2_int, because there is a library function named log2 */
|
|
int log2_int (unsigned long x)
|
|
{
|
|
int c = 0;
|
|
assert (x >= 0);
|
|
if (!x) return 0; /* not by the book, but practical */
|
|
while (x != 1) x >>= 1, c++;
|
|
return c;
|
|
}
|
|
|
|
/* Does all known instruction optimizations */
|
/* Does all known instruction optimizations */
|
void cuc_optimize (cuc_func *func)
|
void cuc_optimize (cuc_func *func)
|
{
|
{
|
int modified = 0;
|
int modified = 0;
|
int first = 1;
|
int first = 1;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.