|
|
1.1 ! root 1: /* ANDL2 (and long 2 operand) test */ ! 2: ! 3: /*Test name = andl2 */ ! 4: /*Description = */ ! 5: /* This test checks 'andl2' instruction as follows: */ ! 6: /* destination = r1, memory location (dest) */ ! 7: /* destination mask result Z N C V(flags) */ ! 8: /* ___________ ____ _____ _____________ */ ! 9: /* 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0 1 1 0 */ ! 10: /* 0xaaaaaaaa 0x55555555 0x00000000 1 0 1 0 */ ! 11: /* */ ! 12: /* */ ! 13: /* Constants */ ! 14: /* */ ! 15: .set VALUEB,0x000000aa ! 16: .set VALUEW,0X0000aaaa ! 17: .set VALUEL,0xaaaaaaaa ! 18: .set MASK1B,0xaa ! 19: .set MASK1W,0xaaaa ! 20: .set MASK1L,0xaaaaaaaa ! 21: .set MASK2B,0x55 ! 22: .set MASK2W,0x5555 ! 23: .set MASK2L,0x55555555 ! 24: .set EXP1B,0x000000aa ! 25: .set EXP1W,0x0000aaaa ! 26: .set EXP1L,0xaaaaaaaa ! 27: .set EXP2B,0x00000000 ! 28: .set EXP2W,0x00000000 ! 29: .set EXP2L,0x00000000 ! 30: ! 31: /* */ ! 32: /* */ ! 33: /* */ ! 34: /* Syst.s - constants */ ! 35: /* */ ! 36: .set IPL,8 ! 37: .set HIGH,31 ! 38: .set ZERO,0 ! 39: .set ONES,0xffffffff ! 40: .set N,8 ! 41: .set Z,4 ! 42: .set V,2 ! 43: .set C,1 ! 44: .set T,16 ! 45: .set IV,32 ! 46: .set FU,64 ! 47: .set DV,128 ! 48: .set PSWMASK,0x003f ! 49: .globl _andl2 ! 50: _andl2: ! 51: callf $4,_setjmp /* save context for error return */ ! 52: movab _andl2,_stpc /* save subtest address */ ! 53: movl $1,_subtst /* subtst number */ ! 54: movl $2,_no_opr /* number of operands in use */ ! 55: movl $MASK1L,_opr /* first operand */ ! 56: movl $VALUEL,_opr + 4 /* second operand */ ! 57: 0: movl $VALUEL,r3 /*set r3 = 0xaaaaaaaa */ ! 58: bispsw $(Z|V|C) /*overflow, Z & carry bits ON */ ! 59: andl2 $MASK1L,r3 /*mask r3 with 0xaaaaaaaa data to reg */ ! 60: beql error1 /*error if Z = 1 */ ! 61: bgeq error1 /*error if N = 0 */ ! 62: bcc error1 /*error if C = 0 */ ! 63: bvs error1 /*error if V = 1 */ ! 64: cmpl r3,$EXP1L /*if r1 <> expected(0xaaaaaaaa), */ ! 65: beql a2 /* if correct then continue */ ! 66: movl $1,_ercode /* error code data miscompare */ ! 67: bbs $0,_scoplp,0b /* if set loop on error */ ! 68: movl r3,_actual /* actual data of inst execution */ ! 69: movl $EXP1L,_expected /* expected data */ ! 70: jmp *badrtn ! 71: error1: movpsl _actual /* error code flag miscompare */ ! 72: bbs $0,_scoplp,0b /* if set loop on error */ ! 73: movl $2,_ercode /* error code flag miscompare */ ! 74: jmp *badrtn ! 75: ! 76: /* Now try another mask(0x55555555) register to memory */ ! 77: /* */ ! 78: a2: ! 79: bbs $0,_force_lp,0b /* if set loop on subtest*/ ! 80: aa2: callf $4,_setjmp /* save context for error return */ ! 81: movab aa2,_stpc /* save subtest address */ ! 82: movl $2,_subtst /* subtst number */ ! 83: movl $2,_no_opr /* number of operands in use */ ! 84: movl $MASK2L,_opr /* first operand */ ! 85: movl $VALUEL,_opr + 4 /* second operand */ ! 86: 0: bicpsw $PSWMASK /*turn overflow enable bit off */ ! 87: movl $VALUEL,dest /*set dest = 0xaaaaaaaa */ ! 88: movl $MASK2L,r3 /* mask in reg r3 */ ! 89: bispsw $(N|V) /*overflow & negetive bits ON */ ! 90: andl2 r3,dest /*mask r3 with 0x55555555 reg to mem */ ! 91: bneq error2 /*error if Z = 0 */ ! 92: blss error2 /*error if N = 1 */ ! 93: bcc error2 /*error if C = 0 */ ! 94: bvs error2 /*error if V = 1 */ ! 95: cmpl dest,$EXP2L /*if dest <> expected(0x00000000), */ ! 96: beql andl2m /* if correct then continue */ ! 97: movl $1,_ercode /* error code data miscompare */ ! 98: bbs $0,_scoplp,0b /* if set loop on error */ ! 99: movl dest,_actual /* actual data of inst execution */ ! 100: movl $EXP2L,_expected /* expected data */ ! 101: jmp *badrtn ! 102: error2: movpsl _actual /* error code flag miscompare */ ! 103: bbs $0,_scoplp,0b /* if set loop on error */ ! 104: movl $2,_ercode /* error code flag miscompare */ ! 105: jmp *badrtn ! 106: ! 107: /* */ ! 108: /* Now use memory location instead of register as destination */ ! 109: /* data to memory operation */ ! 110: andl2m: ! 111: bbs $0,_force_lp,0b /* if set loop on subtest*/ ! 112: aa3: callf $4,_setjmp /* save context for error return */ ! 113: movab aa3,_stpc /* save subtest address */ ! 114: movl $3,_subtst /* subtst number */ ! 115: movl $2,_no_opr /* number of operands in use */ ! 116: movl $MASK1L,_opr /* first operand */ ! 117: movl $VALUEL,_opr + 4 /* second operand */ ! 118: 0: bicpsw $PSWMASK /*turn overflow enable bit off */ ! 119: movl $VALUEL,dest /*set dest = 0xaaaaaaaa */ ! 120: bispsw $(Z|V|C) /*overflow, Z & carry bits ON */ ! 121: andl2 $MASK1L,dest /*mask dest with 0xaaaaaaaa */ ! 122: beql error3 /*error if Z = 1 */ ! 123: bgeq error3 /*error if N = 0 */ ! 124: bcc error3 /*error if C = 0 */ ! 125: bvs error3 /*error if V = 1 */ ! 126: cmpl dest,$EXP1L /*if dest <> expected(0xaaaaaaaa), */ ! 127: beql a4 /* if correct then continue */ ! 128: movl $1,_ercode /* error code data miscompare */ ! 129: bbs $0,_scoplp,0b /* if set loop on error */ ! 130: movl dest,_actual /* actual data of inst execution */ ! 131: movl $EXP1L,_expected /* expected data */ ! 132: jmp *badrtn ! 133: error3: movpsl _actual /* error code flag miscompare */ ! 134: bbs $0,_scoplp,0b /* if set loop on error */ ! 135: movl $2,_ercode /* error code flag miscompare */ ! 136: jmp *badrtn ! 137: ! 138: /* Now try another mask(0x55555555) register to register */ ! 139: /* */ ! 140: a4: ! 141: bbs $0,_force_lp,0b /* if set loop on subtest*/ ! 142: aa4: callf $4,_setjmp /* save context for error return */ ! 143: movab aa4,_stpc /* save subtest address */ ! 144: movl $4,_subtst /* subtst number */ ! 145: movl $2,_no_opr /* number of operands in use */ ! 146: movl $MASK2L,_opr /* first operand */ ! 147: movl $VALUEL,_opr + 4 /* second operand */ ! 148: 0: bicpsw $PSWMASK /*turn overflow enable bit off */ ! 149: movl $VALUEL,r4 /*set r4 = 0xaaaaaaaa */ ! 150: movl $MASK2L,r3 /* set r3 = 0x55555555 */ ! 151: bispsw $(N|V) /*overflow & negetive bits ON */ ! 152: andl2 r3,r4 /*mask dest with 0x55555555 reg to reg */ ! 153: bneq error4 /*error if Z = 0 */ ! 154: blss error4 /*error if N = 1 */ ! 155: bcc error4 /*error if C = 0 */ ! 156: bvs error4 /*error if V = 1 */ ! 157: movl $EXP2L,r3 ! 158: cmpl r4,$EXP2L /*if dest <> expected(0x00000000), */ ! 159: beql aldn /* if correct then continue */ ! 160: movl $1,_ercode /* error code data miscompare */ ! 161: bbs $0,_scoplp,0b /* if set loop on error */ ! 162: movl r4,_actual /* actual data of inst execution */ ! 163: movl $EXP2L,_expected /* expected data */ ! 164: jmp *badrtn ! 165: error4: movpsl _actual /* error code flag miscompare */ ! 166: bbs $0,_scoplp,0b /* if set loop on error */ ! 167: movl $2,_ercode /* error code flag miscompare */ ! 168: jmp *badrtn ! 169: aldn: bbs $0,_force_lp,0b /* if set loop on subtest*/ ! 170: jmp *return /* return to monitor */ ! 171: ! 172: /* */ ! 173: /* variables */ ! 174: /* */ ! 175: .align 2 ! 176: dest: .space 4 ! 177:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.