vmov.c
1.25 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
#include <stdio.h>
#include <vudefs.h>
/**************************************************************************
* Used for vmov
* =====
* Check_Vmov (tno, Op, rMp, vS, vT, vT_El, vD, vDexp, vTemp)
*
**************************************************************************/
char *Templ_vmov_frmt = "( %2d, %s, $26, %-d, $v%-d, $v%-d%-s, $v%-d, $v%-d, $v%-d)\n";
vmov(fp)
FILE *fp;
{
int i,j;
u16 si, ti;
for (i=0; i<8; i++) {
si = (u16) vs[i];
ti = (u16) get_ti(i);
vd[i] = (i==regtab[SRC].rnum) ? ti : si;
} /*for*/
if (data_pntr < (2048 - 100))
{
/* initidLize data segment starting at data_pntr */
/* SRC, TRGT, RES, RES_ACCH, RES_ACCM, RES_ACCL */
for (i=0;i<8;i++) {data[data_pntr++] = vs[i];}
for (i=0;i<8;i++) {data[data_pntr++] = vt[i];}
for (i=0;i<8;i++) {data[data_pntr++] = vd[i];}
}
fprintf(fp,optab[opindex].op_tmplt);
fprintf(fp,Templ_vmov_frmt,
test_num,
optab[opindex].name,
regtab[SRC].rnum,
regtab[TRG].rnum,
regtab[TRG].rnum,el_sf,
regtab[DST].rnum,
regtab[DST_EXP].rnum,
regtab[TEMP].rnum
);
}/*vmov*/