Annotation of cci/d/entry/or_w2.s, revision 1.1

1.1     ! root        1: 
        !             2: /*     ORW2 (or word 2 operand) test                                   */
        !             3: 
        !             4: /*Test name = orw2                                                     */
        !             5: /*Description =                                                                */
        !             6: /*     This test checks 'orw2' instruction as follows:         */
        !             7: /*     destination = r1, memory location (dest)                        */
        !             8: /*     destination     mask            result        Z N C V(flags)    */
        !             9: /*     ___________     ____            _____         _____________     */
        !            10: /*     0xaaaa          0xaaaa          0xaaaa        0 0 1 0           */
        !            11: /*     0xaaaa          0x5555          0xffff        0 0 1 0           */
        !            12: /*     0x0000          0x0000          0x0000        1 0 x 0           */
        !            13: /*                                                                     */
        !            14: /*                                                                     */
        !            15: /*                                                                     */
        !            16: /*                                                                     */
        !            17: /*     Constants                                                       */
        !            18: /*                                                                     */
        !            19:        .set    VALUEB,0x555555aa
        !            20:        .set    VALUEW,0X5555aaaa
        !            21:        .set    VALUEL,0xaaaaaaaa
        !            22:        .set    VALUE3B,0X00000000
        !            23:        .set    VALUE3W,VALUE3B
        !            24:        .set    VALUE3L,VALUE3B
        !            25:        .set    MASK1B,0xaa
        !            26:        .set    MASK1W,0xaaaa
        !            27:        .set    MASK1L,0xaaaaaaaa
        !            28:        .set    MASK2B,0x55
        !            29:        .set    MASK2W,0x5555
        !            30:        .set    MASK2L,0x55555555
        !            31:        .set    MASK3B,0x00
        !            32:        .set    MASK3W,0x0000
        !            33:        .set    MASK3L,0x00000000
        !            34:        .set    EXP1B,0x555555aa
        !            35:        .set    EXP1W,0x5555aaaa
        !            36:        .set    EXP1L,0xaaaaaaaa
        !            37:        .set    EXP2B,0x555555ff
        !            38:        .set    EXP2W,0x5555ffff
        !            39:        .set    EXP2L,0xffffffff
        !            40:        .set    EXP3B,0x00000000
        !            41:        .set    EXP3W,EXP3B
        !            42:        .set    EXP3L,EXP3B
        !            43: 
        !            44: /*                                                                     */
        !            45: /*                                                                     */
        !            46: /*                                                                     */
        !            47: /*     Syst.s - constants                                              */
        !            48: /*                                                                     */
        !            49:        .set    IPL,8
        !            50:        .set    HIGH,31
        !            51:        .set    ZERO,0
        !            52:        .set    ONES,0xffffffff
        !            53:        .set    N,8
        !            54:        .set    Z,4
        !            55:        .set    V,2
        !            56:        .set    C,1
        !            57:        .set    T,16
        !            58:        .set    IV,32
        !            59:        .set    FU,64
        !            60:        .set    DV,128
        !            61:        .set    PSWMASK,0x003f
        !            62: 
        !            63:        .globl  _or_w2
        !            64: _or_w2:
        !            65:        callf   $4,_setjmp      /* save context for error return */
        !            66:        movab   _or_w2,_stpc    /* save starting address of subtest */
        !            67:        movl    $1,_subtst      /* subtest number */
        !            68:        movl    $2,_no_opr      /* number of operands in use */
        !            69:        movl    $MASK1W,_actual /* actual data */
        !            70:        movl    $VALUEW,_expected /* expected data */
        !            71: 0:     
        !            72:        bicpsw  $PSWMASK        /*turn overflow enable bit off          */
        !            73:        movl    $VALUEW,r4      /*set r4 = 0xaaaa                       */
        !            74:        bispsw  $(Z|V|C)        /*overflow, Z & carry bits ON           */
        !            75:        orw2    $MASK1W,r4      /*mask r4 with 0xaaaa data to reg       */
        !            76:        beql    error1          /*error if Z = 1                        */
        !            77:        blss    error1          /*error if N = 1                        */
        !            78:        bcc     error1          /*error if C = 0                        */
        !            79:        bvs     error1          /*error if V = 1                        */
        !            80:        jmp     1f
        !            81: error1:        movpsl  _actual         /* actual = psl may be incorrect        */
        !            82:        bbs     $0,_scoplp,0b   /* if set scope loop on error           */
        !            83:        movl    $2,_ercode      /* error code flag failure              */
        !            84:        jmp     *badrtn
        !            85: 1:     cmpl    r4,$EXP1W       /*if r4 <> expected,                    */
        !            86:        jeql    o2              /* no error then continue               */
        !            87:        bbs     $0,_scoplp,0b   /* if set scope loop on error           */
        !            88:        movl    $1,_ercode      /* error code data miscompare           */
        !            89:        movl    r4,_actual      /* actual data                          */
        !            90:        movl    $EXP1W,_expected /* expected data                       */
        !            91:        jmp     *badrtn
        !            92: 
        !            93: /*     Now try another mask(0x5555) reg to reg                         */
        !            94: /*                                                                     */
        !            95: o2:
        !            96:        bbs     $0,_force_lp,0b /* if set loop on last subtest          */
        !            97: ao2:   callf   $4,_setjmp      /* save context for error return */
        !            98:        movab   ao2,_stpc       /* save starting address of subtest */
        !            99:        movl    $2,_subtst      /* subtest number */
        !           100:        movl    $2,_no_opr      /* number of operands in use */
        !           101:        movl    $MASK2W,_actual /* actual data */
        !           102:        movl    $VALUEW,_expected /* expected data */
        !           103: 0:     bicpsw  $PSWMASK        /*turn overflow enable bit off          */
        !           104:        movl    $VALUEW,r4      /*set r4 = 0xaaaa                       */
        !           105:        movl    $MASK2W,r3      /* mask value in reg r3                 */
        !           106:        bispsw  $(Z|V)          /*overflow & zero bits ON               */
        !           107:        orw2    r3,r4           /*mask r4 with 0x5555 reg to reg        */
        !           108:        beql    error2          /*error if Z = 1                        */
        !           109:        blss    error2          /*error if N = 1                        */
        !           110:        bcc     error2          /*error if C = 0                        */
        !           111:        bvs     error2          /*error if V = 1                        */
        !           112:        jmp     1f
        !           113: error2:        movpsl  _actual         /* actual = psl may be incorrect        */
        !           114:        bbs     $0,_scoplp,0b   /* if set scope loop on error           */
        !           115:        movl    $2,_ercode      /* error code flag failure              */
        !           116:        jmp     *badrtn
        !           117: 1:     cmpl    r4,$EXP2W       /*if r4 <> expected,                    */
        !           118:        jeql    o3              /* no error then continue               */
        !           119:        bbs     $0,_scoplp,0b   /* if set scope loop on error           */
        !           120:        movl    $1,_ercode      /* error code data miscompare           */
        !           121:        movl    r4,_actual      /* actual data                          */
        !           122:        movl    $EXP2W,_expected /* expected data                       */
        !           123:        jmp     *badrtn
        !           124: /*                                                                     */
        !           125: /*     Now try another mask(0x0000) & dest(0x0000) mem to reg          */
        !           126: /*                                                                     */
        !           127: 
        !           128: o3:
        !           129:        bbs     $0,_force_lp,0b /* if set loop on last subtest          */
        !           130: ao3:   callf   $4,_setjmp      /* save context for error return */
        !           131:        movab   ao3,_stpc       /* save starting address of subtest */
        !           132:        movl    $3,_subtst      /* subtest number */
        !           133:        movl    $2,_no_opr      /* number of operands in use */
        !           134:        movl    $MASK3W,_actual /* actual data */
        !           135:        movl    $VALUE3W,_expected /* expected data */
        !           136: 0:     bicpsw  $PSWMASK        /*turn overflow enable bit off          */
        !           137:        movl    $VALUE3W,r4     /*set r4 = 0x0000                       */
        !           138:        movl    $MASK3W,dest    /* load mem loc with mask               */
        !           139:        bispsw  $(N|V)          /*overflow & negetive bits ON           */
        !           140:        orw2    dest,r4         /*mask r4 with 0x0000 mem to reg        */
        !           141:        bneq    error3          /*error if Z = 0                        */
        !           142:        blss    error3          /*error if N = 1                        */
        !           143:        bcc     error3          /*error if C = 0                        */
        !           144:        bvs     error3          /*error if V = 1                        */
        !           145:        jmp     1f
        !           146: error3:        movpsl  _actual         /* actual = psl may be incorrect        */
        !           147:        bbs     $0,_scoplp,0b   /* if set scope loop on error           */
        !           148:        movl    $2,_ercode      /* error code flag failure              */
        !           149:        jmp     *badrtn
        !           150: 1:     cmpl    r4,$EXP3W       /*if r4 <> expected,                    */
        !           151:        jeql    orw2m           /* no error then continue               */
        !           152:        bbs     $0,_scoplp,0b   /* if set scope loop on error           */
        !           153:        movl    $1,_ercode      /* error code data miscompare           */
        !           154:        movl    r4,_actual      /* actual data                          */
        !           155:        movl    $EXP3W,_expected /* expected data                       */
        !           156:        jmp     *badrtn
        !           157: 
        !           158: /*                                                                     */
        !           159: /*     Now use memory location instead of register as destination      */
        !           160: /*                                                                     */
        !           161: orw2m: 
        !           162:        bbs     $0,_force_lp,0b /* if set loop on last subtest          */
        !           163: ao4:   callf   $4,_setjmp      /* save context for error return */
        !           164:        movab   ao4,_stpc       /* save starting address of subtest */
        !           165:        movl    $4,_subtst      /* subtest number */
        !           166:        movl    $2,_no_opr      /* number of operands in use */
        !           167:        movl    $MASK1W,_actual /* actual data */
        !           168:        movl    $VALUEW,_expected /* expected data */
        !           169: 0:     bicpsw  $PSWMASK        /*turn overflow enable bit off          */
        !           170:        movl    $VALUEW,dest    /*set dest = 0xaaaa                     */
        !           171:        bispsw  $(Z|V|C)        /*overflow, Z & carry bits ON           */
        !           172:        orw2    $MASK1W,dest+2  /*mask dest with 0xaaaa data to mem     */
        !           173:        beql    error4          /*error if Z = 1                        */
        !           174:        bgeq    error4          /*error if N = 1                        */
        !           175:        bcc     error4          /*error if C = 0                        */
        !           176:        bvs     error4          /*error if V = 1                        */
        !           177:        jmp     1f
        !           178: error4:        movpsl  _actual         /* actual = psl may be incorrect        */
        !           179:        bbs     $0,_scoplp,0b   /* if set scope loop on error           */
        !           180:        movl    $2,_ercode      /* error code flag failure              */
        !           181:        jmp     *badrtn
        !           182: 1:     cmpl    dest,$EXP1W     /*if dest <> expected,                  */
        !           183:        jeql    o5              /* no error then continue               */
        !           184:        bbs     $0,_scoplp,0b   /* if set scope loop on error           */
        !           185:        movl    $1,_ercode      /* error code data miscompare           */
        !           186:        movl    dest,_actual    /* actual data                          */
        !           187:        movl    $EXP1W,_expected /* expected data                       */
        !           188:        jmp     *badrtn
        !           189: 
        !           190: /*     Now try another mask(0x5555) reg to memory                      */
        !           191: /*                                                                     */
        !           192: 
        !           193: o5:    
        !           194:        bbs     $0,_force_lp,0b /* if set loop on last subtest          */
        !           195: ao5:   callf   $4,_setjmp      /* save context for error return */
        !           196:        movab   ao5,_stpc       /* save starting address of subtest */
        !           197:        movl    $5,_subtst      /* subtest number */
        !           198:        movl    $2,_no_opr      /* number of operands in use */
        !           199:        movl    $MASK2W,_actual /* actual data */
        !           200:        movl    $VALUEW,_expected /* expected data */
        !           201: 0:     bicpsw  $PSWMASK        /*turn overflow enable bit off          */
        !           202:        movl    $VALUEW,dest    /*set dest = 0xaaaa                     */
        !           203:        movl    $MASK2W,r3      /* reg 3 is mask reg                    */
        !           204:        bispsw  $(Z|V)          /*overflow & zero bits ON               */
        !           205:        orw2    r3,dest+2       /*mask dest with 0x5555 reg to mem      */
        !           206:        beql    error5          /*error if Z = 1                        */
        !           207:        bgeq    error5          /*error if N = 1                        */
        !           208:        bcc     error5          /*error if C = 0                        */
        !           209:        bvs     error5          /*error if V = 1                        */
        !           210:        jmp     1f
        !           211: error5:        movpsl  _actual         /* actual = psl may be incorrect        */
        !           212:        bbs     $0,_scoplp,0b   /* if set scope loop on error           */
        !           213:        movl    $2,_ercode      /* error code flag failure              */
        !           214:        jmp     *badrtn
        !           215: 1:     cmpl    dest,$EXP2W     /*if dest <> expected,                  */
        !           216:        jeql    o6              /* no error then continue               */
        !           217:        bbs     $0,_scoplp,0b   /* if set scope loop on error           */
        !           218:        movl    $1,_ercode      /* error code data miscompare           */
        !           219:        movl    dest,_actual    /* actual data                          */
        !           220:        movl    $EXP2W,_expected /* expected data                       */
        !           221:        jmp     *badrtn
        !           222: 
        !           223: 
        !           224: /*                                                                     */
        !           225: /*     Now try another mask(0x0000) & dest(0x0000) mem to mem          */
        !           226: /*                                                                     */
        !           227: 
        !           228: o6:    
        !           229:        bbs     $0,_force_lp,0b /* if set loop on last subtest          */
        !           230: ao6:   callf   $4,_setjmp      /* save context for error return */
        !           231:        movab   ao6,_stpc       /* save starting address of subtest */
        !           232:        movl    $6,_subtst      /* subtest number */
        !           233:        movl    $2,_no_opr      /* number of operands in use */
        !           234:        movl    $MASK3W,_actual /* actual data */
        !           235:        movl    $VALUE3W,_expected /* expected data */
        !           236: 0:     bicpsw  $PSWMASK        /*turn overflow enable bit off          */
        !           237:        movl    $VALUE3W,dest   /*set dest = 0x0000                     */
        !           238:        movl    $MASK3W,srce    /* load location called source          */
        !           239:        bispsw  $(N|V)          /*overflow & negetive bits ON           */
        !           240:        orw2    srce,dest+2     /*mask dest with 0x0000 mem to mem      */
        !           241:        jneq    error6          /*error if Z = 0                        */
        !           242:        jlss    error6          /*error if N = 1                        */
        !           243:        jcc     error6          /*error if C = 0                        */
        !           244:        jvs     error6          /*error if V = 1                        */
        !           245:        jmp     1f
        !           246: error6:        movpsl  _actual         /* actual = psl may be incorrect        */
        !           247:        bbs     $0,_scoplp,0b   /* if set scope loop on error           */
        !           248:        movl    $2,_ercode      /* error code flag failure              */
        !           249:        jmp     *badrtn
        !           250: 1:     cmpl    dest,$EXP3W     /*if dest <> expected,                  */
        !           251:        jeql    aldn            /* no error then continue               */
        !           252:        bbs     $0,_scoplp,0b   /* if set scope loop on error           */
        !           253:        movl    $1,_ercode      /* error code data miscompare           */
        !           254:        movl    dest,_actual    /* actual data                          */
        !           255:        movl    $EXP2W,_expected /* expected data                       */
        !           256:        jmp     *badrtn
        !           257: 
        !           258: aldn:  bbs     $0,_force_lp,0b /* if set loop on last subtest */
        !           259:        jmp     *return         /* good, return to monitor */
        !           260: 
        !           261: /*                                                                     */
        !           262: /*     variables                                                       */
        !           263: /*                                                                     */
        !           264:        .align  2
        !           265: dest:  .space  4
        !           266:        .align  2
        !           267: srce:  .space  4
        !           268: 

unix.superglobalmegacorp.com

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