mc2.c
1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/****************************************************************
WHAT: RSP SCALAR UNIT TEST GENERATOR FOR MC2 FORMAT
SCCS: %W% %G%
PTLS: $Id: mc2.c,v 1.1.1.1 2002/10/29 08:07:09 blythe Exp $
FILE: mc2 - move between SU GPR and VU element register
ENGR: Evan Y. Wang
PROJ: Project Reality
(CR): 1994 Silicon Graphics, Inc.
****************************************************************/
#include <stdio.h>
#include "software.h"
#include "gen.h"
#include "suregre.h"
#define MAX_TCS MAX_MC2_TCS
#define GenCase() \
fprintf(outp,Templ,CurTcNo,ip->name, \
rA, rB, rR, rT, vT, El, \
HHW(OpA), LHW(OpA), HHW(OpB), LHW(OpB), \
HHW(Res), LHW(Res), HHW(Imm), LHW(Imm))
PRIVATE char *Templ =
/* ChkMc2( n,Op, rA, rB, rR, rT, vT,El, AH, AL, BH, BL, RH, RL, TH, TL); */
"\tChkMc2(%2d,%s,r%-2d,r%-2d,r%-2d,r%-2d,v%d,%d,0x%4.4X,0x%4.4X,0x%4.4X,0x%4.4X,0x%4.4X,0x%4.4X,0x%4.4X,0x%4.4X)\n";
int Mc2Gen(outp, ip)
FILE *outp; /* output file handle */
I_TABLE *ip; /* instruction table entry ptr */
{
int i, j;
/* Test VCO */
for (i=0; i<32; i++) {
vT = i;
for (j=0; j<8; j++) {
El = 2*j;
OpA = (4<<i) | (2<<(j<<1)) | (1<<(i&7));
OpB = (0x80000000>>i) | (0x10000>>j) | (0x80>>(i&7));
FILE_SPLIT {
Res = ip->proc(OpA,OpB);
GenCase();
UpdRegTABR();
}
CurTcNo++;
UpdRegID();
}
}
return 0;
} /* Mc2Gen */