vmov.c 1.25 KB
#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*/