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

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