- fixed num iterations
git-svn-id: http://moon:8086/svn/mips@171 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
+13
-16
@@ -202,7 +202,7 @@ int Test10_LoadStore()
|
|||||||
|
|
||||||
|
|
||||||
#define NUM_ELEMENTS 20
|
#define NUM_ELEMENTS 20
|
||||||
#define NUM_RUNS 3
|
#define NUM_RUNS 1
|
||||||
int Test11_AddSub()
|
int Test11_AddSub()
|
||||||
{
|
{
|
||||||
int buf[NUM_ELEMENTS], result, i, j, diff, fill, num_right_elements, num_right_runs;
|
int buf[NUM_ELEMENTS], result, i, j, diff, fill, num_right_elements, num_right_runs;
|
||||||
@@ -242,24 +242,21 @@ int Test12_MulDiv()
|
|||||||
div_t div_res;
|
div_t div_res;
|
||||||
|
|
||||||
srand(0x19701031);
|
srand(0x19701031);
|
||||||
for (i=0; i < 100; i++)
|
for (i=0; i < NUM_RUNS; i++)
|
||||||
{
|
{
|
||||||
for (j=1; j < 1000; j++)
|
mix = (int)rand();
|
||||||
{
|
mix = (mix << 8) ^ (mix << 16);
|
||||||
mix = (int)rand();
|
s1 = (int)rand() ^ mix;
|
||||||
mix = (mix << 8) ^ (mix << 16);
|
mix = (int)rand();
|
||||||
s1 = (int)rand() ^ mix;
|
mix = (mix << 8) ^ (mix << 16);
|
||||||
mix = (int)rand();
|
s2 = (int)rand() ^ mix;
|
||||||
mix = (mix << 8) ^ (mix << 16);
|
|
||||||
s2 = (int)rand() ^ mix;
|
|
||||||
|
|
||||||
div_res = div(s1, s2);
|
div_res = div(s1, s2);
|
||||||
|
|
||||||
sp = s2*div_res.quot;
|
sp = s2*div_res.quot;
|
||||||
st = div_res.rem + sp;
|
st = div_res.rem + sp;
|
||||||
if (st != s1)
|
if (st != s1)
|
||||||
return TEST12_ERROR;
|
return TEST12_ERROR;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user