Annotation of cci/d/macro4/pipe8.c, revision 1.1

1.1     ! root        1: #include "fpp_defs.h"
        !             2: 
        !             3: 
        !             4: /*****************************************************************************
        !             5: *
        !             6: *                      PIPELINE TEST #8 MONITOR
        !             7: *
        !             8: *  This test will do:
        !             9: *
        !            10: *      LDF(1), SUBF(2), MULF(x), ADDF(x), ADDF(x), STF
        !            11: *
        !            12: *  where x is the fmacro1 LDF data.
        !            13: *****************************************************************************/
        !            14: pipe_8()
        !            15: {
        !            16:        asm(".globl _pipeline_8_t");
        !            17:        asm("_pipeline_8_t:");                  /* entry address            */
        !            18:        if( (cycle == 1) && (prt_hdrs) )        /* print headers on 1st cycle */
        !            19:        {
        !            20:           writes("\n PIPE_8 ");
        !            21:        }
        !            22:        subtest = 1;
        !            23:        pipe8_1();                              /* data in REGs,  no NOPs */
        !            24:        subtest++;                              /* increment subtest num  */
        !            25:        pipe8_2();                              /* data in REGs,   1 NOP  */
        !            26:        subtest++;                              /* increment subtest num  */
        !            27:        pipe8_3();                              /* data in REGs,   2 NOPs */
        !            28:        subtest++;                              /* increment subtest num  */
        !            29:        pipe8_4();                              /* data in REGs,   3 NOPs */
        !            30:        subtest++;                              /* increment subtest num  */
        !            31:        pipe8_5();                              /* data in CACHE, no NOPs */
        !            32:        subtest++;                              /* increment subtest num  */
        !            33:        pipe8_6();                              /* data in CACHE,  1 NOP  */
        !            34:        subtest++;                              /* increment subtest num  */
        !            35:        pipe8_7();                              /* data in CACHE,  2 NOPs */
        !            36:        subtest++;                              /* increment subtest num  */
        !            37:        pipe8_8();                              /* data in CACHE,  3 NOPs */
        !            38:        subtest++;                              /* increment subtest num  */
        !            39:        pipe8_9();                              /* data on STACK, no NOPs */
        !            40:        subtest++;                              /* increment subtest num  */
        !            41:        pipe8_10();                             /* data via FP  no NOPs */
        !            42:        asm("jmp *return");                     /* return to the test monitor */
        !            43: }
        !            44: 
        !            45: 
        !            46: 
        !            47: 
        !            48: 
        !            49: 
        !            50: /************************************************************************
        !            51: *
        !            52: *                      SUBTEST 1  
        !            53: *              data in registers, no NO-OPs
        !            54: *
        !            55: ************************************************************************/
        !            56: pipe8_1() 
        !            57: {
        !            58:        force_loop = FALSE;                     /* clear force_loop flag */
        !            59:        index = 0;
        !            60:        do 
        !            61:        {
        !            62:           sgl_value_1  = ldf_1_data[index].ld;   /* get operand 1        */
        !            63:           sgl_expected = ldf_1_data[index].exp;  /* get expected results */
        !            64:           sgl_value_2  = 0x40800000;             /* floating '1'         */
        !            65:           sgl_value_3  = 0x41000000;             /* floating '2'         */
        !            66: /*
        !            67:  * If LOOP ON ERROR is set, this is the loop for this subtest.
        !            68:  * The force loop flag is set after the first error.
        !            69: */
        !            70:           asm("_pipe8_1_lp1:");
        !            71:           asm("movl _sgl_value_1,r4");         /* move the data to r4     */
        !            72:           asm("movl _sgl_value_2,r5");         /* move data to r5         */
        !            73:           asm("movl _sgl_value_3,r6");         /* move data to r6         */
        !            74:           asm("ldf  r5");                      /* 1.0 to the ACC. ( 1.0 ) */
        !            75:           asm("subf r6");                      /* minus 2.0       (-1.0 ) */
        !            76:           asm("mulf r4");                      /* *'s the operand ( -op ) */
        !            77:           asm("addf r4");                      /* + the operand   (  0  ) */
        !            78:           asm("addf r4");                      /* + the operand   ( +op ) */
        !            79:           asm("stf r7");                       /* store the result        */
        !            80:           if( force_loop )
        !            81:              asm("brb _pipe8_1_lp1");;         /* loop on the error       */
        !            82: /* 
        !            83:  * verify the results
        !            84: */
        !            85:           asm("movl r7,_sgl_st_acc");          /* get the result          */
        !            86:           if( sgl_st_acc != sgl_expected )     /* COMPARE the values      */
        !            87:           {
        !            88:              errcnt++;                         /* bump the error count    */
        !            89:              if ( prt_error ) 
        !            90:                 print_pipe8_er("Reg. Data, no NO-OPs");
        !            91:              if ( halt_flg )
        !            92:                 pipe8_er_hlt( subtest );
        !            93:              if ( loop_on_err ) {
        !            94:                 force_loop = TRUE;             /* set the force loop flag */
        !            95:                 asm("jmp _pipe8_1_lp1");       /* and loop                */
        !            96:              }
        !            97:           }   /* end of compare error */
        !            98:        } while( index++ < max_ldf_1_index );
        !            99: }  /* end of subtest 1 */
        !           100: 
        !           101: 
        !           102: 
        !           103: 
        !           104: 
        !           105: 
        !           106: /************************************************************************
        !           107: *
        !           108: *                      SUBTEST 2  
        !           109: *              data in registers, 1 NO-OP
        !           110: *
        !           111: ************************************************************************/
        !           112: pipe8_2() 
        !           113: {
        !           114:        force_loop = FALSE;                     /* clear force_loop flag */
        !           115:        index = 0;
        !           116:        do 
        !           117:        {
        !           118:           sgl_value_1  = ldf_1_data[index].ld;   /* get operand 1        */
        !           119:           sgl_expected = ldf_1_data[index].exp;  /* get expected results */
        !           120:           sgl_value_2  = 0x40800000;             /* floating '1'         */
        !           121:           sgl_value_3  = 0x41000000;             /* floating '2'         */
        !           122: /*
        !           123:  * If LOOP ON ERROR is set, this is the loop for this subtest.
        !           124:  * The force loop flag is set after the first error.
        !           125: */
        !           126:           asm("_pipe8_2_lp1:");
        !           127:           asm("movl _sgl_value_1,r4");         /* move the data to r4     */
        !           128:           asm("movl _sgl_value_2,r5");         /* move data to r5         */
        !           129:           asm("movl _sgl_value_3,r6");         /* move data to r6         */
        !           130:           asm("ldf  r5");                      /* 1.0 to the ACC. ( 1.0 ) */
        !           131:           asm("nop");
        !           132:           asm("subf r6");                      /* minus 2.0       (-1.0 ) */
        !           133:           asm("nop");
        !           134:           asm("mulf r4");                      /* *'s the operand ( -op ) */
        !           135:           asm("nop");
        !           136:           asm("addf r4");                      /* + the operand   (  0  ) */
        !           137:           asm("nop");
        !           138:           asm("addf r4");                      /* + the operand   ( +op ) */
        !           139:           asm("nop");
        !           140:           asm("stf r7");                       /* store the result        */
        !           141:           if( force_loop )
        !           142:              asm("brb _pipe8_2_lp1");;         /* loop on the error       */
        !           143: /* 
        !           144:  * verify the results
        !           145: */
        !           146:           asm("movl r7,_sgl_st_acc");          /* get the result          */
        !           147:           if( sgl_st_acc != sgl_expected )     /* COMPARE the values      */
        !           148:           {
        !           149:              errcnt++;                         /* bump the error count    */
        !           150:              if ( prt_error ) 
        !           151:                 print_pipe8_er("Reg. Data, 1 NO-OP");
        !           152:              if ( halt_flg )
        !           153:                 pipe8_er_hlt( subtest );
        !           154:              if ( loop_on_err ) {
        !           155:                 force_loop = TRUE;             /* set the force loop flag */
        !           156:                 asm("jmp _pipe8_2_lp1");       /* and loop                */
        !           157:              }
        !           158:           }   /* end of compare error */
        !           159:        } while( index++ < max_ldf_1_index );
        !           160: }  /* end of subtest 2 */
        !           161: 
        !           162: 
        !           163: 
        !           164: 
        !           165: 
        !           166: 
        !           167: /************************************************************************
        !           168: *
        !           169: *                      SUBTEST 3  
        !           170: *              data in registers, 2 NO-OPs
        !           171: *
        !           172: ************************************************************************/
        !           173: pipe8_3() 
        !           174: {
        !           175:        force_loop = FALSE;                     /* clear force_loop flag */
        !           176:        index = 0;
        !           177:        do 
        !           178:        {
        !           179:           sgl_value_1  = ldf_1_data[index].ld;   /* get operand 1        */
        !           180:           sgl_expected = ldf_1_data[index].exp;  /* get expected results */
        !           181:           sgl_value_2  = 0x40800000;             /* floating '1'         */
        !           182:           sgl_value_3  = 0x41000000;             /* floating '2'         */
        !           183: /*
        !           184:  * If LOOP ON ERROR is set, this is the loop for this subtest.
        !           185:  * The force loop flag is set after the first error.
        !           186: */
        !           187:           asm("_pipe8_3_lp1:");
        !           188:           asm("movl _sgl_value_1,r4");         /* move the data to r4     */
        !           189:           asm("movl _sgl_value_2,r5");         /* move data to r5         */
        !           190:           asm("movl _sgl_value_3,r6");         /* move data to r6         */
        !           191:           asm("ldf  r5");                      /* 1.0 to the ACC. ( 1.0 ) */
        !           192:           asm("nop");
        !           193:           asm("nop");
        !           194:           asm("subf r6");                      /* minus 2.0       (-1.0 ) */
        !           195:           asm("nop");
        !           196:           asm("nop");
        !           197:           asm("mulf r4");                      /* *'s the operand ( -op ) */
        !           198:           asm("nop");
        !           199:           asm("nop");
        !           200:           asm("addf r4");                      /* + the operand   (  0  ) */
        !           201:           asm("nop");
        !           202:           asm("nop");
        !           203:           asm("addf r4");                      /* + the operand   ( +op ) */
        !           204:           asm("nop");
        !           205:           asm("nop");
        !           206:           asm("stf r7");                       /* store the result        */
        !           207:           if( force_loop )
        !           208:              asm("brb _pipe8_3_lp1");;         /* loop on the error       */
        !           209: /* 
        !           210:  * verify the results
        !           211: */
        !           212:           asm("movl r7,_sgl_st_acc");          /* get the result          */
        !           213:           if( sgl_st_acc != sgl_expected )     /* COMPARE the values      */
        !           214:           {
        !           215:              errcnt++;                         /* bump the error count    */
        !           216:              if ( prt_error ) 
        !           217:                 print_pipe8_er("Reg. Data, 2 NO-OPs");
        !           218:              if ( halt_flg )
        !           219:                 pipe8_er_hlt( subtest );
        !           220:              if ( loop_on_err ) {
        !           221:                 force_loop = TRUE;             /* set the force loop flag */
        !           222:                 asm("jmp _pipe8_3_lp1");       /* and loop                */
        !           223:              }
        !           224:           }   /* end of compare error */
        !           225:        } while( index++ < max_ldf_1_index );
        !           226: }  /* end of subtest 3 */
        !           227: 
        !           228: 
        !           229: 
        !           230: 
        !           231: 
        !           232: 
        !           233: /************************************************************************
        !           234: *
        !           235: *                      SUBTEST 4  
        !           236: *              data in registers, 3 NO-OPs
        !           237: *
        !           238: ************************************************************************/
        !           239: pipe8_4() 
        !           240: {
        !           241:        force_loop = FALSE;                     /* clear force_loop flag */
        !           242:        index = 0;
        !           243:        do 
        !           244:        {
        !           245:           sgl_value_1  = ldf_1_data[index].ld;   /* get operand 1        */
        !           246:           sgl_expected = ldf_1_data[index].exp;  /* get expected results */
        !           247:           sgl_value_2  = 0x40800000;             /* floating '1'         */
        !           248:           sgl_value_3  = 0x41000000;             /* floating '2'         */
        !           249: /*
        !           250:  * If LOOP ON ERROR is set, this is the loop for this subtest.
        !           251:  * The force loop flag is set after the first error.
        !           252: */
        !           253:           asm("_pipe8_4_lp1:");
        !           254:           asm("movl _sgl_value_1,r4");         /* move the data to r4     */
        !           255:           asm("movl _sgl_value_2,r5");         /* move data to r5         */
        !           256:           asm("movl _sgl_value_3,r6");         /* move data to r6         */
        !           257:           asm("ldf  r5");                      /* 1.0 to the ACC. ( 1.0 ) */
        !           258:           asm("nop");
        !           259:           asm("nop");
        !           260:           asm("nop");
        !           261:           asm("subf r6");                      /* minus 2.0       (-1.0 ) */
        !           262:           asm("nop");
        !           263:           asm("nop");
        !           264:           asm("nop");
        !           265:           asm("mulf r4");                      /* *'s the operand ( -op ) */
        !           266:           asm("nop");
        !           267:           asm("nop");
        !           268:           asm("nop");
        !           269:           asm("addf r4");                      /* + the operand   (  0  ) */
        !           270:           asm("nop");
        !           271:           asm("nop");
        !           272:           asm("nop");
        !           273:           asm("addf r4");                      /* + the operand   ( +op ) */
        !           274:           asm("nop");
        !           275:           asm("nop");
        !           276:           asm("nop");
        !           277:           asm("stf r7");                       /* store the result        */
        !           278:           if( force_loop )
        !           279:              asm("brb _pipe8_4_lp1");;         /* loop on the error       */
        !           280: /* 
        !           281:  * verify the results
        !           282: */
        !           283:           asm("movl r7,_sgl_st_acc");          /* get the result          */
        !           284:           if( sgl_st_acc != sgl_expected )     /* COMPARE the values      */
        !           285:           {
        !           286:              errcnt++;                         /* bump the error count    */
        !           287:              if ( prt_error ) 
        !           288:                 print_pipe8_er("Reg. Data, 3 NO-OPs");
        !           289:              if ( halt_flg )
        !           290:                 pipe8_er_hlt( subtest );
        !           291:              if ( loop_on_err ) {
        !           292:                 force_loop = TRUE;             /* set the force loop flag */
        !           293:                 asm("jmp _pipe8_4_lp1");       /* and loop                */
        !           294:              }
        !           295:           }   /* end of compare error */
        !           296:        } while( index++ < max_ldf_1_index );
        !           297: }  /* end of subtest 4 */
        !           298: 
        !           299: 
        !           300: 
        !           301: 
        !           302: 
        !           303: 
        !           304: 
        !           305: /************************************************************************
        !           306: *
        !           307: *                      SUBTEST 5  
        !           308: *              data in Cache, no NO-OPs
        !           309: *
        !           310: ************************************************************************/
        !           311: pipe8_5() 
        !           312: {
        !           313:        force_loop = FALSE;                     /* clear force_loop flag */
        !           314:        index = 0;
        !           315:        do 
        !           316:        {
        !           317:           sgl_value_1  = ldf_1_data[index].ld;   /* get operand 1        */
        !           318:           sgl_expected = ldf_1_data[index].exp;  /* get expected results */
        !           319:           sgl_value_2  = 0x40800000;             /* floating '1'         */
        !           320:           sgl_value_3  = 0x41000000;             /* floating '2'         */
        !           321: /*
        !           322:  * If LOOP ON ERROR is set, this is the loop for this subtest.
        !           323:  * The force loop flag is set after the first error.
        !           324: */
        !           325:           asm("_pipe8_5_lp1:");
        !           326:           asm("ldf  _sgl_value_2");            /* 1.0 to the ACC. ( 1.0 ) */
        !           327:           asm("subf _sgl_value_3");            /* minus 2.0       (-1.0 ) */
        !           328:           asm("mulf _sgl_value_1");            /* *'s the operand ( -op ) */
        !           329:           asm("addf _sgl_value_1");            /* + the operand   (  0  ) */
        !           330:           asm("addf _sgl_value_1");            /* + the operand   ( +op ) */
        !           331:           asm("stf _sgl_st_acc");              /* store the result        */
        !           332:           if( force_loop )
        !           333:              asm("brb _pipe8_5_lp1");;         /* loop on the error       */
        !           334: /* 
        !           335:  * verify the results
        !           336: */
        !           337:           if( sgl_st_acc != sgl_expected )     /* COMPARE the values      */
        !           338:           {
        !           339:              errcnt++;                         /* bump the error count    */
        !           340:              if ( prt_error ) 
        !           341:                 print_pipe8_er("Cache Data, no NO-OPs");
        !           342:              if ( halt_flg )
        !           343:                 pipe8_er_hlt( subtest );
        !           344:              if ( loop_on_err ) {
        !           345:                 force_loop = TRUE;             /* set the force loop flag */
        !           346:                 asm("jmp _pipe8_5_lp1");       /* and loop                */
        !           347:              }
        !           348:           }   /* end of compare error */
        !           349:        } while( index++ < max_ldf_1_index );
        !           350: }  /* end of subtest 5 */
        !           351: 
        !           352: 
        !           353: 
        !           354: 
        !           355: 
        !           356: 
        !           357: /************************************************************************
        !           358: *
        !           359: *                      SUBTEST 6  
        !           360: *              data in Cache, 1 NO-OP
        !           361: *
        !           362: ************************************************************************/
        !           363: pipe8_6() 
        !           364: {
        !           365:        force_loop = FALSE;                     /* clear force_loop flag */
        !           366:        index = 0;
        !           367:        do 
        !           368:        {
        !           369:           sgl_value_1  = ldf_1_data[index].ld;   /* get operand 1        */
        !           370:           sgl_expected = ldf_1_data[index].exp;  /* get expected results */
        !           371:           sgl_value_2  = 0x40800000;             /* floating '1'         */
        !           372:           sgl_value_3  = 0x41000000;             /* floating '2'         */
        !           373: /*
        !           374:  * If LOOP ON ERROR is set, this is the loop for this subtest.
        !           375:  * The force loop flag is set after the first error.
        !           376: */
        !           377:           asm("_pipe8_6_lp1:");
        !           378:           asm("ldf  _sgl_value_2");            /* 1.0 to the ACC. ( 1.0 ) */
        !           379:           asm("nop");
        !           380:           asm("subf _sgl_value_3");            /* minus 2.0       (-1.0 ) */
        !           381:           asm("nop");
        !           382:           asm("mulf _sgl_value_1");            /* *'s the operand ( -op ) */
        !           383:           asm("nop");
        !           384:           asm("addf _sgl_value_1");            /* + the operand   (  0  ) */
        !           385:           asm("nop");
        !           386:           asm("addf _sgl_value_1");            /* + the operand   ( +op ) */
        !           387:           asm("nop");
        !           388:           asm("stf _sgl_st_acc");              /* store the result        */
        !           389:           if( force_loop )
        !           390:              asm("brb _pipe8_6_lp1");;         /* loop on the error       */
        !           391: /* 
        !           392:  * verify the results
        !           393: */
        !           394:           if( sgl_st_acc != sgl_expected )     /* COMPARE the values      */
        !           395:           {
        !           396:              errcnt++;                         /* bump the error count    */
        !           397:              if ( prt_error ) 
        !           398:                 print_pipe8_er("Cache Data, 1 NO-OP");
        !           399:              if ( halt_flg )
        !           400:                 pipe8_er_hlt( subtest );
        !           401:              if ( loop_on_err ) {
        !           402:                 force_loop = TRUE;             /* set the force loop flag */
        !           403:                 asm("jmp _pipe8_6_lp1");       /* and loop                */
        !           404:              }
        !           405:           }   /* end of compare error */
        !           406:        } while( index++ < max_ldf_1_index );
        !           407: }  /* end of subtest 6 */
        !           408: 
        !           409: 
        !           410: 
        !           411: 
        !           412: 
        !           413: 
        !           414: /************************************************************************
        !           415: *
        !           416: *                      SUBTEST 7  
        !           417: *              data in Cache, 2 NO-OPs
        !           418: *
        !           419: ************************************************************************/
        !           420: pipe8_7() 
        !           421: {
        !           422:        force_loop = FALSE;                     /* clear force_loop flag */
        !           423:        index = 0;
        !           424:        do 
        !           425:        {
        !           426:           sgl_value_1  = ldf_1_data[index].ld;   /* get operand 1        */
        !           427:           sgl_expected = ldf_1_data[index].exp;  /* get expected results */
        !           428:           sgl_value_2  = 0x40800000;             /* floating '1'         */
        !           429:           sgl_value_3  = 0x41000000;             /* floating '2'         */
        !           430: /*
        !           431:  * If LOOP ON ERROR is set, this is the loop for this subtest.
        !           432:  * The force loop flag is set after the first error.
        !           433: */
        !           434:           asm("_pipe8_7_lp1:");
        !           435:           asm("ldf  _sgl_value_2");            /* 1.0 to the ACC. ( 1.0 ) */
        !           436:           asm("nop");
        !           437:           asm("nop");
        !           438:           asm("subf _sgl_value_3");            /* minus 2.0       (-1.0 ) */
        !           439:           asm("nop");
        !           440:           asm("nop");
        !           441:           asm("mulf _sgl_value_1");            /* *'s the operand ( -op ) */
        !           442:           asm("nop");
        !           443:           asm("nop");
        !           444:           asm("addf _sgl_value_1");            /* + the operand   (  0  ) */
        !           445:           asm("nop");
        !           446:           asm("nop");
        !           447:           asm("addf _sgl_value_1");            /* + the operand   ( +op ) */
        !           448:           asm("nop");
        !           449:           asm("nop");
        !           450:           asm("stf _sgl_st_acc");              /* store the result        */
        !           451:           if( force_loop )
        !           452:              asm("brb _pipe8_7_lp1");;         /* loop on the error       */
        !           453: /* 
        !           454:  * verify the results
        !           455: */
        !           456:           if( sgl_st_acc != sgl_expected )     /* COMPARE the values      */
        !           457:           {
        !           458:              errcnt++;                         /* bump the error count    */
        !           459:              if ( prt_error ) 
        !           460:                 print_pipe8_er("Cache Data, 2 NO-OPs");
        !           461:              if ( halt_flg )
        !           462:                 pipe8_er_hlt( subtest );
        !           463:              if ( loop_on_err ) {
        !           464:                 force_loop = TRUE;             /* set the force loop flag */
        !           465:                 asm("jmp _pipe8_7_lp1");       /* and loop                */
        !           466:              }
        !           467:           }   /* end of compare error */
        !           468:        } while( index++ < max_ldf_1_index );
        !           469: }  /* end of subtest 7 */
        !           470: 
        !           471: 
        !           472: 
        !           473: 
        !           474: 
        !           475: 
        !           476: /************************************************************************
        !           477: *
        !           478: *                      SUBTEST 8  
        !           479: *              data in Cache, 3 NO-OPs
        !           480: *
        !           481: ************************************************************************/
        !           482: pipe8_8() 
        !           483: {
        !           484:        force_loop = FALSE;                     /* clear force_loop flag */
        !           485:        index = 0;
        !           486:        do 
        !           487:        {
        !           488:           sgl_value_1  = ldf_1_data[index].ld;   /* get operand 1        */
        !           489:           sgl_expected = ldf_1_data[index].exp;  /* get expected results */
        !           490:           sgl_value_2  = 0x40800000;             /* floating '1'         */
        !           491:           sgl_value_3  = 0x41000000;             /* floating '2'         */
        !           492: /*
        !           493:  * If LOOP ON ERROR is set, this is the loop for this subtest.
        !           494:  * The force loop flag is set after the first error.
        !           495: */
        !           496:           asm("_pipe8_8_lp1:");
        !           497:           asm("ldf  _sgl_value_2");            /* 1.0 to the ACC. ( 1.0 ) */
        !           498:           asm("nop");
        !           499:           asm("nop");
        !           500:           asm("nop");
        !           501:           asm("subf _sgl_value_3");            /* minus 2.0       (-1.0 ) */
        !           502:           asm("nop");
        !           503:           asm("nop");
        !           504:           asm("nop");
        !           505:           asm("mulf _sgl_value_1");            /* *'s the operand ( -op ) */
        !           506:           asm("nop");
        !           507:           asm("nop");
        !           508:           asm("nop");
        !           509:           asm("addf _sgl_value_1");            /* + the operand   (  0  ) */
        !           510:           asm("nop");
        !           511:           asm("nop");
        !           512:           asm("nop");
        !           513:           asm("addf _sgl_value_1");            /* + the operand   ( +op ) */
        !           514:           asm("nop");
        !           515:           asm("nop");
        !           516:           asm("nop");
        !           517:           asm("stf _sgl_st_acc");              /* store the result        */
        !           518:           if( force_loop )
        !           519:              asm("brb _pipe8_8_lp1");;         /* loop on the error       */
        !           520: /* 
        !           521:  * verify the results
        !           522: */
        !           523:           if( sgl_st_acc != sgl_expected )     /* COMPARE the values      */
        !           524:           {
        !           525:              errcnt++;                         /* bump the error count    */
        !           526:              if ( prt_error ) 
        !           527:                 print_pipe8_er("Cache Data, 3 NO-OPs");
        !           528:              if ( halt_flg )
        !           529:                 pipe8_er_hlt( subtest );
        !           530:              if ( loop_on_err ) {
        !           531:                 force_loop = TRUE;             /* set the force loop flag */
        !           532:                 asm("jmp _pipe8_8_lp1");       /* and loop                */
        !           533:              }
        !           534:           }   /* end of compare error */
        !           535:        } while( index++ < max_ldf_1_index );
        !           536: }  /* end of subtest 8 */
        !           537: 
        !           538: 
        !           539: 
        !           540: 
        !           541: 
        !           542: 
        !           543: /*****************************************************************************
        !           544: *
        !           545: *                      SUBTEST 9  
        !           546: *              data on the stack, no NO-OPs
        !           547: *
        !           548: *****************************************************************************/
        !           549: pipe8_9() 
        !           550: {
        !           551:        asm("moval (r13),_pre_event_fp");       /* save the frame pointer   */ 
        !           552:        asm("moval (r14),_pre_event_sp");       /* save the stack pointer   */ 
        !           553:        force_loop = FALSE;                     /* clear force_loop flag */
        !           554:        index = 0;
        !           555:        do 
        !           556:        {
        !           557:           sgl_value_1  = ldf_1_data[index].ld;   /* get operand 1          */
        !           558:           sgl_expected = ldf_1_data[index].exp;  /* get expected results   */
        !           559:           sgl_value_2  = 0x40800000;             /* floating '1'           */
        !           560:           sgl_value_3  = 0x41000000;             /* floating '2'         */
        !           561:           asm("moval _pointer_data,_sgl_value_4");/* init / final SP value */
        !           562: /*
        !           563:  * If LOOP ON ERROR is set, this is the loop for this subtest.
        !           564:  * The force loop flag is set after the first error.
        !           565: */
        !           566:           asm("_pipe8_9_lp1:");
        !           567:           asm("moval _pointer_data,r14");      /* set the stack pointer   */
        !           568:           asm("movl _sgl_value_1,-(r14)");     /* push the operand        */
        !           569:           asm("movl _sgl_value_1,-(r14)");     /*    onto the stack       */
        !           570:           asm("movl _sgl_value_1,-(r14)");     /*       3 times           */
        !           571:           asm("movl _sgl_value_3,-(r14)");     /* push a '2' on the stack */
        !           572:           asm("movl _sgl_value_2,-(r14)");     /* push a '1' on the stack */
        !           573: /*
        !           574:  * now pop the data off the stack
        !           575: */
        !           576:           asm("ldf  (r14)+");                  /* 1.0 to the ACC. ( 1.0 ) */
        !           577:           asm("subf (r14)+");                  /* minus 2.0       (-1.0 ) */
        !           578:           asm("mulf (r14)+");                  /* *'s the operand ( -op ) */
        !           579:           asm("addf (r14)+");                  /* + the operand   (  0  ) */
        !           580:           asm("addf (r14)+");                  /* + the operand   ( +op ) */
        !           581:           asm("stf r5");                       /* store the result        */
        !           582:           if( force_loop )
        !           583:              asm("brb _pipe8_9_lp1");;         /* loop on the error       */
        !           584: /* 
        !           585:  * verify the results
        !           586: */
        !           587:           asm("movl r5,_sgl_st_acc");          /* get the result          */
        !           588:           asm("moval (r14),_sgl_value_5");     /* save the stack pointer  */
        !           589:           if( (sgl_st_acc  != sgl_expected) || /* verify the result...    */
        !           590:               (sgl_value_5 != sgl_value_4) )   /* ... and the final SP    */
        !           591:           {
        !           592:              asm("movl _pre_event_fp,r13");    /* restore frame pointer   */
        !           593:              asm("movl _pre_event_sp,r14");    /* restore stack pointer   */
        !           594:              errcnt++;                         /* bump the error count    */
        !           595:              if ( prt_error ) {
        !           596:                 print_pipe8_er("POP data from the STACK");
        !           597:                 writes("final Stack Pointer = ");
        !           598:                 write32h( sgl_value_5 );
        !           599:                 writes(",  expected SP = ");
        !           600:                 write32h( sgl_value_4 );
        !           601:                 writes("\n");
        !           602:              }
        !           603:              if ( halt_flg )
        !           604:                 pipe8_er_hlt( subtest );
        !           605:              if ( loop_on_err ) {
        !           606:                 force_loop = TRUE;             /* set the force loop flag */
        !           607:                 asm("jmp _pipe8_9_lp1");       /* and loop                */
        !           608:              }
        !           609:           }   /* end of compare error */
        !           610:        } while( index++ < max_ldf_1_index );
        !           611:        asm("movl _pre_event_fp,r13");          /* restore the frame pointer */
        !           612:        asm("movl _pre_event_sp,r14");          /* restore the stack pointer */
        !           613: }  /* end of subtest 9 */
        !           614: 
        !           615: 
        !           616: 
        !           617: 
        !           618: 
        !           619: 
        !           620: /******************************************************************************
        !           621: *
        !           622: *                      SUBTEST 10  
        !           623: *              get data via indexed FRAME pointer
        !           624: *
        !           625: *      ADDR            INDEX   DATA
        !           626: *      pointer_data      4     <the STF result goes here>
        !           627: *      pointer_data-4    3     <operand data>
        !           628: *      pointer_data-8    2     <floating 1.0>
        !           629: *      pointer_data-12   1     <floating 2.0>
        !           630: *      pointer_data-16   0     point the frame pointer here
        !           631: *
        !           632: ******************************************************************************/
        !           633: pipe8_10() 
        !           634: {
        !           635:        asm("moval (r13),_pre_event_fp");       /* save the frame pointer   */ 
        !           636:        asm("moval (r14),_pre_event_sp");       /* save the stack pointer   */ 
        !           637:        force_loop = FALSE;                     /* clear force_loop flag */
        !           638:        index = 0;
        !           639:        do 
        !           640:        {
        !           641:           sgl_value_1  = ldf_1_data[index].ld;    /* get operand 1         */
        !           642:           sgl_expected = ldf_1_data[index].exp;   /* get expected results  */
        !           643:           sgl_value_2  = 0x40800000;              /* floating '1'          */
        !           644:           sgl_value_3  = 0x41000000;              /* floating '2'          */
        !           645:           asm("moval _pointer_data,_sgl_value_4");/* get store data's addr */
        !           646:           sgl_value_4 -= 4;                    /* decrement it by 4 (bytes)*/
        !           647:           asm("movl _sgl_value_1,*_sgl_value_4"); /* set the operand data  */
        !           648:           sgl_value_4 -= 4;                    /* decrement it by 4 (bytes)*/
        !           649:           asm("movl _sgl_value_2,*_sgl_value_4"); /* set the "1.0" data    */
        !           650:           sgl_value_4 -= 4;                    /* decrement it by 4 (bytes)*/
        !           651:           asm("movl _sgl_value_3,*_sgl_value_4"); /* set the "2.0" data    */
        !           652:           sgl_value_4 -= 4;                       /* get FRAME PTR address */
        !           653: /*
        !           654:  * If LOOP ON ERROR is set, this is the loop for this subtest.
        !           655:  * The force loop flag is set after the first error.
        !           656: */
        !           657:           asm("_pipe8_10_lp1:");
        !           658:           asm("movl _sgl_value_4,r13");        /* set the FRAME POINTER   */
        !           659:           asm("movl $1,r1");                   /* r1 index = 1 longwords  */
        !           660:           asm("movl $2,r2");                   /* r2 index = 2 longwords  */
        !           661:           asm("movl $3,r3");                   /* r3 index = 3 longwords  */
        !           662:           asm("movl $4,r4");                   /* r4 index = 4 longwords  */
        !           663:           asm("ldf  (r13)[r2]");               /* 1.0 to the ACC. ( 1.0 ) */
        !           664:           asm("subf (r13)[r1]");               /* minus 2.0       (-1.0 ) */
        !           665:           asm("mulf (r13)[r3]");               /* *'s the operand ( -op ) */
        !           666:           asm("addf (r13)[r3]");               /* + the operand   (  0  ) */
        !           667:           asm("addf (r13)[r3]");               /* + the operand   ( +op ) */
        !           668:           asm("stf  (r13)[r4]");               /* store -indexed by r4    */
        !           669:           if( force_loop )
        !           670:              asm("brb _pipe8_10_lp1");         /* loop on the error       */
        !           671: /* 
        !           672:  * verify the results
        !           673: */
        !           674:           sgl_st_acc = pointer_data;           /* move the stored result  */
        !           675:           asm("moval (r13),_sgl_value_5");     /* save the frame pointer  */
        !           676:           if( (sgl_st_acc  != sgl_expected) || /* verify the result...    */
        !           677:               (sgl_value_5 != sgl_value_4) )   /* ... and the final FP    */
        !           678:           {
        !           679:              asm("movl _pre_event_fp,r13");    /* restore frame pointer   */
        !           680:              asm("movl _pre_event_sp,r14");    /* restore stack pointer   */
        !           681:              errcnt++;                         /* bump the error count    */
        !           682:              if ( prt_error ) {
        !           683:                 print_pipe8_er("indexed FP addressing");
        !           684:                 writes("final Frame Pointer = ");
        !           685:                 writeh( sgl_value_5 );
        !           686:                 writes(",  expected FP = ");
        !           687:                 writeh( sgl_value_4 );
        !           688:                 writes("\n");
        !           689:              }
        !           690:              if ( halt_flg )
        !           691:                 pipe8_er_hlt( subtest );
        !           692:              if ( loop_on_err ) {
        !           693:                 force_loop = TRUE;             /* set the force loop flag */
        !           694:                 asm("jmp _pipe8_10_lp1");      /* and loop                */
        !           695:              }
        !           696:           }   /* end of compare error */
        !           697:        } while( index++ < max_ldf_1_index );
        !           698:        asm("movl _pre_event_fp,r13");          /* restore the frame pointer */
        !           699:        asm("movl _pre_event_sp,r14");          /* restore the stack pointer */
        !           700: }  /* end of subtest 10 */
        !           701: 
        !           702: 
        !           703: /******************************************************************************
        !           704: *
        !           705: *                      ERROR ROUTINE
        !           706: *
        !           707: *      print an error in the following form
        !           708: *
        !           709: *  operand = xxxxxxxx,   final Acc = xxxxxxxx,   data index = dd
        !           710: *                     expected Acc = xxxxxxxx
        !           711: *
        !           712: ******************************************************************************/
        !           713: print_pipe8_er(msg)
        !           714: char *msg;
        !           715: {
        !           716:        writes("\n");           /* start a new print line   */
        !           717:        writes("cycle: ");
        !           718:        writed( cycle );
        !           719:        writes(" test ");
        !           720:        writed( test_no );
        !           721:        writes("  (Pipe 8), subtest ");
        !           722:        writed( subtest );
        !           723:        writes(" error - ");
        !           724:        writes( msg );
        !           725:        writec('\n');
        !           726:        writes(
        !           727:        "LDF(1.0), SUBF(2.0), MULF(op), ADDF(op),  ADDF(op),  STF\n");
        !           728:        writes("operand = ");
        !           729:        write32h( sgl_value_1 );
        !           730:        writes(",   final Acc = ");
        !           731:        write32h( sgl_st_acc );
        !           732:        writes(",   data index = ");
        !           733:        writed( index );
        !           734:        writec('\n');
        !           735:        writes("                   expected Acc = ");
        !           736:        write32h( sgl_expected );
        !           737:        writec('\n');
        !           738: }
        !           739: 
        !           740: 
        !           741: 
        !           742: 
        !           743: 
        !           744: /******************************************************************************
        !           745: *
        !           746: *                      HALT ON ERROR ROUTINE
        !           747: *
        !           748: *      halt with the necessary information saved in the registers
        !           749: *
        !           750: ******************************************************************************/
        !           751: pipe8_er_hlt( subtest )
        !           752: int subtest;
        !           753: {
        !           754:        asm("movl _test_no,r0");                /* r0 = test number        */
        !           755:        asm("movl _subtest,r1");                /* r1 = subtest number     */
        !           756:        asm("movl $1,r2");                      /* r2 = error code         */
        !           757:        asm("movl _cycle,r3");                  /* r3 = cycle count        */
        !           758:        asm("movl _sgl_value_1,r4");            /* r4 = sgl operand        */
        !           759:        asm("movl _sgl_st_acc,r5");             /* r5 = sgl stored         */
        !           760:        asm("movl _sgl_expected,r6");           /* r6 = sgl expected       */
        !           761:        asm("movl _index,r7");                  /* r7 = data index         */
        !           762:        asm("movl _sgl_value_2,r8");            /* r8 = floating one       */
        !           763:        asm("movl _sgl_value_3,r9");            /* r9 = floating two       */
        !           764:        if( subtest == 9 ) {
        !           765:                asm("movl _sgl_value_3,r10");   /* r10 = final SP value    */
        !           766:                asm("movl _sgl_value_2,r11");   /* r11 = expected SP value */
        !           767:        } else
        !           768:        if( subtest == 10 ) {
        !           769:                asm("movl _sgl_value_3,r10");   /* r10 = final FP value    */
        !           770:                asm("movl _sgl_value_2,r11");   /* r11 = expected FP value */
        !           771:        };
        !           772:        asm(".globl _pipe8_1_hlt");
        !           773:        asm("_pipe8_1_hlt:");                   /* PC after the halt       */
        !           774:        asm("halt");                            /* HALT ...                */
        !           775: }  /* 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.