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

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