URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 932 |
Rev 933 |
Line 26... |
Line 26... |
#include "profiler.h"
|
#include "profiler.h"
|
|
|
/* Shortcut */
|
/* Shortcut */
|
#define GEN(x...) fprintf (fo, x)
|
#define GEN(x...) fprintf (fo, x)
|
|
|
/* returns log2(x) */
|
|
int log2 (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;
|
|
}
|
|
|
|
/* Find index of load/store/call */
|
/* Find index of load/store/call */
|
int find_lsc_index (cuc_func *f, int ref)
|
int find_lsc_index (cuc_func *f, int ref)
|
{
|
{
|
int c = 0;
|
int c = 0;
|
int i;
|
int i;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.