File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / d / macro4 / pipe13.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:30:56 2019 UTC (6 years, 11 months ago) by root
Branches: bsd, MAIN
CVS tags: v121, HEAD
Power 6/32 Unix version 1.21

#include "fpp_defs.h"


/*****************************************************************************
*
*		DBL PIPELINE TEST #13 MONITOR
*
*  This test will do:
*
*	LDD(1)  MULD(x)  MULD(1)  SUBD(x)  ADDD(x)  STD
*
*  where the x's are the LDD data patterns.
*****************************************************************************/
pipe_13()
{
	asm(".globl _pipeline_13_t");
	asm("_pipeline_13_t:");			/* entry address            */
	if( (cycle == 1) && (prt_hdrs) )	/* print headers on 1st cycle */
	{
	   writes(" PIPE_13");
	}
	subtest = 1;
	pipe13_1();				/* data in REGs,  no NOPs */
	subtest++;				/* increment subtest num  */
	pipe13_2();				/* data in REGs,   1 NOP  */
	subtest++;				/* increment subtest num  */
	pipe13_3();				/* data in REGs,   2 NOPs */
	subtest++;				/* increment subtest num  */
	pipe13_4();				/* data in REGs,   3 NOPs */
	subtest++;				/* increment subtest num  */
	pipe13_5();				/* data in CACHE, no NOPs */
	subtest++;				/* increment subtest num  */
	pipe13_6();				/* data in CACHE,  1 NOP  */
	subtest++;				/* increment subtest num  */
	pipe13_7();				/* data in CACHE,  2 NOPs */
	subtest++;				/* increment subtest num  */
	pipe13_8();				/* data in CACHE,  3 NOPs */
	subtest++;				/* increment subtest num  */
	pipe13_9();				/* data via F.P.   0 NOPs */
	asm("jmp *return");			/* return to the test monitor */
}







/************************************************************************
*
*			SUBTEST 1  
*		data in registers, no NO-OPs
*
************************************************************************/
pipe13_1() 
{
	force_loop = FALSE;			/* clear the force_loop flg */
	index = 0;
	do 
	{
	   sgl_value_1  = ldd_1_data[index].ld.m; /* get the operand's MSW    */
	   sgl_value_2  = ldd_1_data[index].ld.l; /* get the operand's MSW    */
	   sgl_value_7  = 0x40800000;		  /* get a dbl precision 1.0  */
	   sgl_value_8  = 0;
	   dbl_expected = ldd_1_data[index].exp;  /* get the expected results */
/*
 * If LOOP ON ERROR is set, this is the loop for this subtest.
 * The force loop flag is set after the first error.
*/
	   asm("_pipe13_1_lp1:");
	   asm("movl _sgl_value_1,r4");		/* move the data to r4/r5  */
	   asm("movl _sgl_value_2,r5");		
	   asm("movl _sgl_value_7,r2");		/* move a '1.0' to r2/r3   */
	   asm("movl _sgl_value_8,r3");		
	   asm("ldd r2");			/* load a '1.0'     (  1 ) */
	   asm("muld r4");			/* multiply by op.  ( op ) */
	   asm("muld r2");			/* multiply by 1.0  ( op ) */
	   asm("subd r4");			/* subtract the op. (  0 ) */
	   asm("addd r4");			/* add the op.      ( op ) */
	   asm("std r6");			/* store the result ( op ) */
	   if( force_loop )
	       asm("brb _pipe13_1_lp1");;	/* run the loop again      */
/* 
 * verify the results
*/
	   asm("movl r6,_sgl_value_3");		/* get the result          */
	   asm("movl r7,_sgl_value_4");
	   dbl_st_acc.m = sgl_value_3;
	   dbl_st_acc.l = sgl_value_4;
	   if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results   */
	       (dbl_st_acc.l != dbl_expected.l) )
	   {
	      errcnt++;				/* bump the error count    */
	      if ( prt_error ) 
		 print_pipe13_er("Reg. Data, no NOPs");
	      if ( halt_flg )
		 pipe13_er_hlt( subtest );
	      if ( loop_on_err ) {
		 force_loop = TRUE;		/* set the force loop flag */
		 asm("brw _pipe13_1_lp1");	/* and loop                */
	      }
	   }   /* end of compare error */
	} while( index++ < max_ldd_1_index );
}  /* end of subtest 1 */







/************************************************************************
*
*			SUBTEST 2  
*		data in registers, 1 NO-OP
*
************************************************************************/
pipe13_2() 
{
	force_loop = FALSE;			/* clear the force_loop flg */
	index = 0;
	do 
	{
	   sgl_value_1  = ldd_1_data[index].ld.m; /* get the operand's MSW    */
	   sgl_value_2  = ldd_1_data[index].ld.l; /* get the operand's MSW    */
	   sgl_value_7  = 0x40800000;		  /* get a dbl precision 1.0  */
	   sgl_value_8  = 0;
	   dbl_expected = ldd_1_data[index].exp;  /* get the expected results */
/*
 * If LOOP ON ERROR is set, this is the loop for this subtest.
 * The force loop flag is set after the first error.
*/
	   asm("_pipe13_2_lp1:");
	   asm("movl _sgl_value_1,r4");		/* move the data to r4/r5  */
	   asm("movl _sgl_value_2,r5");		
	   asm("movl _sgl_value_7,r2");		/* move a '1.0' to r4/r5   */
	   asm("movl _sgl_value_8,r3");		
	   asm("ldd r2");			/* load a '1.0'     (  1 ) */
	   asm("nop");
	   asm("muld r4");			/* multiply by op.  ( op ) */
	   asm("nop");
	   asm("muld r2");			/* multiply by 1.0  ( op ) */
	   asm("nop");
	   asm("subd r4");			/* subtract the op. (  0 ) */
	   asm("nop");
	   asm("addd r4");			/* add the op.      ( op ) */
	   asm("nop");
	   asm("std r6");			/* store the result ( op ) */
	   if( force_loop )
	       asm("brb _pipe13_2_lp1");;	/* run the loop again      */
/* 
 * verify the results
*/
	   asm("movl r6,_sgl_value_3");		/* get the result          */
	   asm("movl r7,_sgl_value_4");
	   dbl_st_acc.m = sgl_value_3;
	   dbl_st_acc.l = sgl_value_4;
	   if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results   */
	       (dbl_st_acc.l != dbl_expected.l) )
	   {
	      errcnt++;				/* bump the error count    */
	      if ( prt_error ) 
		 print_pipe13_er("Reg. Data, 1 NOP");
	      if ( halt_flg )
		 pipe13_er_hlt( subtest );
	      if ( loop_on_err ) {
		 force_loop = TRUE;		/* set the force loop flag */
		 asm("brw _pipe13_2_lp1");	/* and loop                */
	      }
	   }   /* end of compare error */
	} while( index++ < max_ldd_1_index );
}  /* end of subtest 2 */






/************************************************************************
*
*			SUBTEST 3  
*		data in registers, 2 NO-OPs
*
************************************************************************/
pipe13_3() 
{
	force_loop = FALSE;			/* clear the force_loop flg */
	index = 0;
	do 
	{
	   sgl_value_1  = ldd_1_data[index].ld.m; /* get the operand's MSW    */
	   sgl_value_2  = ldd_1_data[index].ld.l; /* get the operand's MSW    */
	   sgl_value_7  = 0x40800000;		  /* get a dbl precision 1.0  */
	   sgl_value_8  = 0;
	   dbl_expected = ldd_1_data[index].exp;  /* get the expected results */
/*
 * If LOOP ON ERROR is set, this is the loop for this subtest.
 * The force loop flag is set after the first error.
*/
	   asm("_pipe13_3_lp1:");
	   asm("movl _sgl_value_1,r4");		/* move the data to r4/r5  */
	   asm("movl _sgl_value_2,r5");		
	   asm("movl _sgl_value_7,r2");		/* move a '1.0' to r4/r5   */
	   asm("movl _sgl_value_8,r3");		
	   asm("ldd r2");			/* load a '1.0'     (  1 ) */
	   asm("nop");
	   asm("nop");
	   asm("muld r4");			/* multiply by op.  ( op ) */
	   asm("nop");
	   asm("nop");
	   asm("muld r2");			/* multiply by 1.0  ( op ) */
	   asm("nop");
	   asm("nop");
	   asm("subd r4");			/* subtract the op. (  0 ) */
	   asm("nop");
	   asm("nop");
	   asm("addd r4");			/* add the op.      ( op ) */
	   asm("nop");
	   asm("nop");
	   asm("std r6");			/* store the result ( op ) */
	   if( force_loop )
	       asm("brb _pipe13_3_lp1");;	/* run the loop again      */
/* 
 * verify the results
*/
	   asm("movl r6,_sgl_value_3");		/* get the result          */
	   asm("movl r7,_sgl_value_4");
	   dbl_st_acc.m = sgl_value_3;
	   dbl_st_acc.l = sgl_value_4;
	   if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results   */
	       (dbl_st_acc.l != dbl_expected.l) )
	   {
	      errcnt++;				/* bump the error count    */
	      if ( prt_error ) 
		 print_pipe13_er("Reg. Data, 2 NOPs");
	      if ( halt_flg )
		 pipe13_er_hlt( subtest );
	      if ( loop_on_err ) {
		 force_loop = TRUE;		/* set the force loop flag */
		 asm("brw _pipe13_3_lp1");	/* and loop                */
	      }
	   }   /* end of compare error */
	} while( index++ < max_ldd_1_index );
}  /* end of subtest 3 */





/************************************************************************
*
*			SUBTEST 4  
*		data in registers, 3 NO-OPs
*
************************************************************************/
pipe13_4() 
{
	force_loop = FALSE;			/* clear the force_loop flg */
	index = 0;
	do 
	{
	   sgl_value_1  = ldd_1_data[index].ld.m; /* get the operand's MSW    */
	   sgl_value_2  = ldd_1_data[index].ld.l; /* get the operand's MSW    */
	   sgl_value_7  = 0x40800000;		  /* get a dbl precision 1.0  */
	   sgl_value_8  = 0;
	   dbl_expected = ldd_1_data[index].exp;  /* get the expected results */
/*
 * If LOOP ON ERROR is set, this is the loop for this subtest.
 * The force loop flag is set after the first error.
*/
	   asm("_pipe13_4_lp1:");
	   asm("movl _sgl_value_1,r4");		/* move the data to r4/r5  */
	   asm("movl _sgl_value_2,r5");		
	   asm("movl _sgl_value_7,r2");		/* move a '1.0' to r4/r5   */
	   asm("movl _sgl_value_8,r3");		
	   asm("ldd r2");			/* load a '1.0'     (  1 ) */
	   asm("nop");
	   asm("nop");
	   asm("nop");
	   asm("muld r4");			/* multiply by op.  ( op ) */
	   asm("nop");
	   asm("nop");
	   asm("nop");
	   asm("muld r2");			/* multiply by 1.0  ( op ) */
	   asm("nop");
	   asm("nop");
	   asm("nop");
	   asm("subd r4");			/* subtract the op. (  0 ) */
	   asm("nop");
	   asm("nop");
	   asm("nop");
	   asm("addd r4");			/* add the op.      ( op ) */
	   asm("nop");
	   asm("nop");
	   asm("nop");
	   asm("std r6");			/* store the result ( op ) */
	   if( force_loop )
	       asm("brb _pipe13_4_lp1");;	/* run the loop again      */
/* 
 * verify the results
*/
	   asm("movl r6,_sgl_value_3");		/* get the result          */
	   asm("movl r7,_sgl_value_4");
	   dbl_st_acc.m = sgl_value_3;
	   dbl_st_acc.l = sgl_value_4;
	   if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results   */
	       (dbl_st_acc.l != dbl_expected.l) )
	   {
	      errcnt++;				/* bump the error count    */
	      if ( prt_error ) 
		 print_pipe13_er("Reg. Data, 3 NOPs");
	      if ( halt_flg )
		 pipe13_er_hlt( subtest );
	      if ( loop_on_err ) {
		 force_loop = TRUE;		/* set the force loop flag */
		 asm("brw _pipe13_4_lp1");	/* and loop                */
	      }
	   }   /* end of compare error */
	} while( index++ < max_ldd_1_index );
}  /* end of subtest 4 */








/************************************************************************
*
*			SUBTEST 5  
*		data in cache, no NO-OPs
*
************************************************************************/
pipe13_5() 
{
	force_loop = FALSE;			/* clear the force_loop flg */
	index = 0;
	do 
	{
	   dbl_value_1   = ldd_1_data[index].ld; /* get the operand's MSW    */
	   dbl_value_2.m = 0x40800000;		 /* set the '1.0' operand    */
	   dbl_value_2.l = 0;
	   dbl_expected = ldd_1_data[index].exp; /* get the expected results */
/*
 * If LOOP ON ERROR is set, this is the loop for this subtest.
 * The force loop flag is set after the first error.
*/
	   asm("_pipe13_5_lp1:");
	   asm("ldd _dbl_value_2");		/* load a '1.0'     (  1 ) */
	   asm("muld _dbl_value_1");		/* multiply by op.  ( op ) */
	   asm("muld _dbl_value_2");		/* multiply by 1.0  ( op ) */
	   asm("subd _dbl_value_1");		/* subtract the op. (  0 ) */
	   asm("addd _dbl_value_1");		/* add the op.      ( op ) */
	   asm("std  _dbl_st_acc");		/* store the result ( op ) */
	   if( force_loop )
	       asm("brb _pipe13_5_lp1");;	/* run the loop again      */
/* 
 * verify the results
*/
	   if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results   */
	       (dbl_st_acc.l != dbl_expected.l) )
	   {
	      errcnt++;				/* bump the error count    */
	      if ( prt_error ) 
		 print_pipe13_er("Cache Data, no NOPs");
	      if ( halt_flg )
		 pipe13_er_hlt( subtest );
	      if ( loop_on_err ) {
		 force_loop = TRUE;		/* set the force loop flag */
		 asm("brw _pipe13_5_lp1");	/* and loop                */
	      }
	   }   /* end of compare error */
	} while( index++ < max_ldd_1_index );
}  /* end of subtest 5 */








/************************************************************************
*
*			SUBTEST 6  
*		data in cache, 1 NO-OP
*
************************************************************************/
pipe13_6() 
{
	force_loop = FALSE;			/* clear the force_loop flg */
	index = 0;
	do 
	{
	   dbl_value_1   = ldd_1_data[index].ld; /* get the operand's MSW    */
	   dbl_value_2.m = 0x40800000;		 /* set the '1.0' operand    */
	   dbl_value_2.l = 0;
	   dbl_expected = ldd_1_data[index].exp; /* get the expected results */
/*
 * If LOOP ON ERROR is set, this is the loop for this subtest.
 * The force loop flag is set after the first error.
*/
	   asm("_pipe13_6_lp1:");
	   asm("ldd _dbl_value_2");		/* load a '1.0'     (  1 ) */
	   asm("nop");
	   asm("muld _dbl_value_1");		/* multiply by op.  ( op ) */
	   asm("nop");
	   asm("muld _dbl_value_2");		/* multiply by 1.0  ( op ) */
	   asm("nop");
	   asm("subd _dbl_value_1");		/* subtract the op. (  0 ) */
	   asm("nop");
	   asm("addd _dbl_value_1");		/* add the op.      ( op ) */
	   asm("nop");
	   asm("std  _dbl_st_acc");		/* store the result ( op ) */
	   if( force_loop )
	       asm("brb _pipe13_6_lp1");;	/* run the loop again      */
/* 
 * verify the results
*/
	   if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results   */
	       (dbl_st_acc.l != dbl_expected.l) )
	   {
	      errcnt++;				/* bump the error count    */
	      if ( prt_error ) 
		 print_pipe13_er("Cache Data, 1 NOP");
	      if ( halt_flg )
		 pipe13_er_hlt( subtest );
	      if ( loop_on_err ) {
		 force_loop = TRUE;		/* set the force loop flag */
		 asm("brw _pipe13_6_lp1");	/* and loop                */
	      }
	   }   /* end of compare error */
	} while( index++ < max_ldd_1_index );
}  /* end of subtest 6 */







/************************************************************************
*
*			SUBTEST 7  
*		data in cache, 2 NO-OPs
*
************************************************************************/
pipe13_7() 
{
	force_loop = FALSE;			/* clear the force_loop flg */
	index = 0;
	do 
	{
	   dbl_value_1   = ldd_1_data[index].ld; /* get the operand's MSW    */
	   dbl_value_2.m = 0x40800000;		 /* set the '1.0' operand    */
	   dbl_value_2.l = 0;
	   dbl_expected = ldd_1_data[index].exp; /* get the expected results */
/*
 * If LOOP ON ERROR is set, this is the loop for this subtest.
 * The force loop flag is set after the first error.
*/
	   asm("_pipe13_7_lp1:");
	   asm("ldd _dbl_value_2");		/* load a '1.0'     (  1 ) */
	   asm("nop");
	   asm("nop");
	   asm("muld _dbl_value_1");		/* multiply by op.  ( op ) */
	   asm("nop");
	   asm("nop");
	   asm("muld _dbl_value_2");		/* multiply by 1.0  ( op ) */
	   asm("nop");
	   asm("nop");
	   asm("subd _dbl_value_1");		/* subtract the op. (  0 ) */
	   asm("nop");
	   asm("nop");
	   asm("addd _dbl_value_1");		/* add the op.      ( op ) */
	   asm("nop");
	   asm("nop");
	   asm("std  _dbl_st_acc");		/* store the result ( op ) */
	   if( force_loop )
	       asm("brb _pipe13_7_lp1");;	/* run the loop again      */
/* 
 * verify the results
*/
	   if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results   */
	       (dbl_st_acc.l != dbl_expected.l) )
	   {
	      errcnt++;				/* bump the error count    */
	      if ( prt_error ) 
		 print_pipe13_er("Cache Data, 2 NOPs");
	      if ( halt_flg )
		 pipe13_er_hlt( subtest );
	      if ( loop_on_err ) {
		 force_loop = TRUE;		/* set the force loop flag */
		 asm("brw _pipe13_7_lp1");	/* and loop                */
	      }
	   }   /* end of compare error */
	} while( index++ < max_ldd_1_index );
}  /* end of subtest 7 */








/************************************************************************
*
*			SUBTEST 8  
*		data in cache, 3 NO-OPs
*
************************************************************************/
pipe13_8() 
{
	force_loop = FALSE;			/* clear the force_loop flg */
	index = 0;
	do 
	{
	   dbl_value_1   = ldd_1_data[index].ld; /* get the operand's MSW    */
	   dbl_value_2.m = 0x40800000;		 /* set the '1.0' operand    */
	   dbl_value_2.l = 0;
	   dbl_expected = ldd_1_data[index].exp; /* get the expected results */
/*
 * If LOOP ON ERROR is set, this is the loop for this subtest.
 * The force loop flag is set after the first error.
*/
	   asm("_pipe13_8_lp1:");
	   asm("ldd _dbl_value_2");		/* load a '1.0'     (  1 ) */
	   asm("nop");
	   asm("nop");
	   asm("nop");
	   asm("muld _dbl_value_1");		/* multiply by op.  ( op ) */
	   asm("nop");
	   asm("nop");
	   asm("nop");
	   asm("muld _dbl_value_2");		/* multiply by 1.0  ( op ) */
	   asm("nop");
	   asm("nop");
	   asm("nop");
	   asm("subd _dbl_value_1");		/* subtract the op. (  0 ) */
	   asm("nop");
	   asm("nop");
	   asm("nop");
	   asm("addd _dbl_value_1");		/* add the op.      ( op ) */
	   asm("nop");
	   asm("nop");
	   asm("nop");
	   asm("std  _dbl_st_acc");		/* store the result ( op ) */
	   if( force_loop )
	       asm("brb _pipe13_8_lp1");;	/* run the loop again      */
/* 
 * verify the results
*/
	   if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results   */
	       (dbl_st_acc.l != dbl_expected.l) )
	   {
	      errcnt++;				/* bump the error count    */
	      if ( prt_error ) 
		 print_pipe13_er("Cache Data, 3 NOPs");
	      if ( halt_flg )
		 pipe13_er_hlt( subtest );
	      if ( loop_on_err ) {
		 force_loop = TRUE;		/* set the force loop flag */
		 asm("brw _pipe13_8_lp1");	/* and loop                */
	      }
	   }   /* end of compare error */
	} while( index++ < max_ldd_1_index );
}  /* end of subtest 8 */







/******************************************************************************
*
*			SUBTEST 9  
*
*	Get the data via the FRAME POINTER  ( quad word indexed )
*
*	 ADDRESSES OF DATA OPERANDS    INDEX       DATA
*	pointer_data,-4     ( FP+24 )    3     the STF result goes here
*	pointer_data-8,-12  ( FP+16 )    2     <operand data>
*	pointer_data-16,-20 ( FP+8  )    1     < '1.0'  data>
*	pointer_data-24,-28 (  FP   )    0     point the frame pointer here
*
* NOTE: The double precision instructions are using Quad Word indexing.
******************************************************************************/
pipe13_9() 
{
	asm("moval (r13),_pre_event_fp");	/* save the frame pointer   */ 
	asm("moval (r14),_pre_event_sp");	/* save the stack pointer   */ 
	force_loop = FALSE;			/* clear force_loop flag */
	index = 0;
	do 
	{
	   sgl_value_1  = ldd_1_data[index].ld.m;  /* get operand 1's MSW   */
	   sgl_value_2  = ldd_1_data[index].ld.l;  /* get operand 1's LSW   */
	   sgl_value_7  = 0x40800000;		   /* get the '1.0' data    */
	   sgl_value_8  = 0;
	   dbl_expected = ldd_1_data[index].exp;   /* get expected results  */
/*
 * If LOOP ON ERROR is set, this is the loop for this subtest.
 * The force loop flag is set after the first error.
*/
	   asm("_pipe13_9_lp1:");
	   asm("moval _pointer_data,_sgl_value_9");/* get store data's addr */
	   sgl_value_9 -= 8;
	   asm("movl _sgl_value_2,*_sgl_value_9"); /* set the operand's LSW */
	   sgl_value_9 -= 4;
	   asm("movl _sgl_value_1,*_sgl_value_9"); /* set the operand's MSW */
	   sgl_value_9 -= 4;
	   asm("movl _sgl_value_8,*_sgl_value_9"); /* set '1.0' data's LSW  */
	   sgl_value_9 -= 4;
	   asm("movl _sgl_value_7,*_sgl_value_9"); /* set '1.0' data's MSW  */
	   sgl_value_9 -= 8;			/* get the FP addr to use   */
	   asm("movl _sgl_value_9,r13");	/* set the FRAME POINTER    */
	   asm("movl $1,r5");			/* r5 index = 1 quadwords  */
	   asm("movl $2,r6");			/* r6 index = 2 quadwords  */
	   asm("movl $3,r7");			/* r7 index = 3 quadwords  */
	   asm("ldd  (r13)[r5]");		/* load a '1.0'     (  1 ) */
	   asm("muld (r13)[r6]");		/* multiply by op.  ( op ) */
	   asm("muld (r13)[r5]");		/* multiply by 1.0  ( op ) */
	   asm("subd (r13)[r6]");		/* subtract the op. (  0 ) */
	   asm("addd (r13)[r6]");		/* add the op.      ( op ) */
	   asm("std  (r13)[r7]");		/* store the result ( op ) */
	   if( force_loop )
	       asm("brw _pipe13_9_lp1");	/* run the loop again      */
/* 
 * verify the results
*/
	   asm("moval (r13),_sgl_value_10");	/* save the frame pointer  */
	   asm("movl _pointer_data,_sgl_value_4"); /* save the LSW stored  */
	   asm("movl _pointer_data-4,_sgl_value_3"); /*   and the MSW      */
	   if( (sgl_value_3  != dbl_expected.m) || /* verify the result... */
	       (sgl_value_4  != dbl_expected.l) || /* verify the result... */
	       (sgl_value_10 != sgl_value_9) )	   /* ... and the final FP */
	   {
	      asm("movl _pre_event_fp,r13");	/* restore frame pointer   */
	      asm("movl _pre_event_sp,r14");	/* restore stack pointer   */
	      errcnt++;				/* bump the error count    */
	      if ( prt_error ) {
		 print_pipe13_er("indexed FP addressing.\n");
		 writes("final Frame Pointer = ");
		 write32h( sgl_value_10 );
		 writes(",  expected FP = ");
		 write32h( sgl_value_9 );
		 writes(" \n");
	      }
	      if ( halt_flg )
		 pipe13_er_hlt( subtest );
	      if ( loop_on_err ) {
		 force_loop = TRUE;		/* set the force loop flag */
		 asm("brw _pipe13_9_lp1");	/* and loop                */
	      }
	   }   /* end of compare error */
	} while( index++ < max_ldd_1_index );
	asm("movl _pre_event_fp,r13");		/* restore the frame pointer */
	asm("movl _pre_event_sp,r14");		/* restore the stack pointer */
}  /* end of subtest 9 */


/******************************************************************************
*
*			ERROR ROUTINE
*
*	print an error in the following form
*
*operand = xxxxxxxx xxxxxxxx,   final Acc = xxxxxxxx xxxxxxxx,   index = dd
*                            expected Acc = xxxxxxxx xxxxxxxx
*
******************************************************************************/
print_pipe13_er(msg)
char *msg;
{
	writes(" \n");		/* start a new print line   */
	writes("cycle: ");
	writed( cycle );
	writes(" test ");
	writed( test_no );
	writes("  (Pipe 13), subtest ");
	writed( subtest );
	writes(" error - ");
	writes( msg );
	writec('\n');
	writes(" LDD(1.0), MULD(op), MULD(1.0), SUBD(op), ADDD(op), STD\n");
	writes("operand = ");
	write32h( dbl_ld_acc.m );
	writec(' ');
	write32h( dbl_ld_acc.l );
	writes(",   final Acc = ");
	write32h( dbl_st_acc.m );
	writec(' ');
	write32h( dbl_st_acc.l );
	writes(",   index = ");
	writed( index );
	writec('\n');
	writes("                            expected Acc = ");
	write32h( dbl_expected.m );
	writec(' ');
	write32h( dbl_expected.l );
	writec('\n');
}





/******************************************************************************
*
*			HALT ON ERROR ROUTINE
*
*  	halt with the necessary information saved in the registers
*
******************************************************************************/
pipe13_er_hlt( subtest )
int subtest;
{
	sgl_value_3 = dbl_st_acc.m;
	sgl_value_4 = dbl_st_acc.l;
	asm("movl _test_no,r0");		/* r0 = test number        */
	asm("movl _subtest,r1");		/* r1 = subtest number     */
	asm("movl $1,r2");			/* r2 = error code         */
	asm("movl _cycle,r3");			/* r3 = cycle count        */
	asm("movl _sgl_value_1,r4");		/* r4 = MSW operand loaded */
	asm("movl _sgl_value_2,r5");		/* r5 = LSW operand loaded */
	asm("movl _sgl_value_3,r6");		/* r6 = MSW operand stored */
	asm("movl _sgl_value_4,r7");		/* r7 = LSW operand stored */
	asm("movl _sgl_value_5,r8");		/* r8 = MSW operand expect */
	asm("movl _sgl_value_6,r9");		/* r9 = LSW operand expect */
	asm("movl _index,r10");			/* r10 = data index        */
	if( subtest == 9 ) {
		asm("movl _sgl_value_10,r11");	/* r11 = final FP value     */
		asm("movl _sgl_value_9,r12");	/* r12 = expected FP value  */
	};
	asm(".globl _pipe13_1_hlt");
	asm("_pipe13_1_hlt:");			/* PC after the halt       */
	asm("halt");				/* HALT ...                */
}  /* end of halt on error */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.