Sorry, forgot the ANSI C simulation code for the custom instruction.
Here it is:
void ci_9(
int *d0
,int *d1
,int s0
,int s1
,int s2
,int s3
)
{
int vr228_s32;
int vr229_s32;
int vr230_s32;
int vr231_s32;
int vr232_s32;
int vr233_s32;
*d1 = 1;
vr231_s32 = s1-s3;
vr232_s32 = ((vr231_s32 < 0) ? -vr231_s32 : vr231_s32);
vr233_s32 = s0<vr232_s32;
vr228_s32 = s1-s2;
vr229_s32 = ((vr228_s32 < 0) ? -vr228_s32 : vr228_s32);
vr230_s32 = s0<vr229_s32;
*d0 = vr230_s32|vr233_s32;
#pragma cycles_est_total = 2
}
Now, can you see the power of YARDstick?
My backend generating fully ANSI C simulation code for any custom
instruction (of any complexity within basic block limits -- for now)
is a mere 1000 lines in C.
Again: what is that you find inconceivable (or impossible). I have
been using YARDstick for 6 months now, and continue to maintain and
add useful stuff to it.
By the time of the DATE'07 conference, the source code base was around
16Klines.
Hope you can see that is doable by a very good programmer with a good
deal of architecture depth (this is me ^_^)
Nikolaos Kavvadias
Computer Architecture Specialist and Compiler Developer
Ph.D. candidate


|