|
|
1.1 ! root 1: ! 2: ! 3: /* SUBL2 (subtract long2) test */ ! 4: /* */ ! 5: /*Test name = subl2 */ ! 6: /*Description = */ ! 7: /* This test checks 'subl2' instruction as follows: */ ! 8: /*sub dif result N Z V C (flags) */ ! 9: /*___ ___ ______ _______________ */ ! 10: /*0x7f 0x7f 0x00 0 1 0 1 */ ! 11: /*0xff 0x01 0x02 0 0 0 0 */ ! 12: /*0x01 0xff 0xfe 1 0 0 1 */ ! 13: /*0x81 0x7f 0xfe 1 0 1 0 */ ! 14: /*0x81 0x80 0xff 1 0 0 0 */ ! 15: /*0x7f 0x81 0x02 0 0 1 1 */ ! 16: /* */ ! 17: /* */ ! 18: ! 19: /* */ ! 20: /* */ ! 21: /* constants definition for 'subx' tests. */ ! 22: /* */ ! 23: ! 24: .set SB1,0x11111f7f/*+127, highest +ve number, byte */ ! 25: .set SW1,0x111f7fff ! 26: .set SL1,0x7fffffff ! 27: .set MB1,0x11111f7f/* +127 */ ! 28: .set MW1,0x111f7fff ! 29: .set ML1,SL1 ! 30: .set RB1,0x11111f00 ! 31: .set RW1,0x111f0000 ! 32: .set RL1,0x00000000 ! 33: .set SB2,0xff /* -1 */ ! 34: .set SW2,0xffff ! 35: .set SL2,0xffffffff ! 36: .set MB2,0x01 /* +1 */ ! 37: .set MW2,0x0001 ! 38: .set ML2,0X00000001 ! 39: .set RB2,0x00000002 /* +2 */ ! 40: .set RW2,RB2 ! 41: .set RL2,RB2 ! 42: .set SB3,MB2 /* +1 */ ! 43: .set SW3,MW2 ! 44: .set SL3,ML2 ! 45: .set MB3,0xff /* -1 */ ! 46: .set MW3,0xffff ! 47: .set ML3,0xffffffff ! 48: .set RB3,0x000000fe /* -2 */ ! 49: .set RW3,0x0000fffe ! 50: .set RL3,0Xfffffffe ! 51: .set SB4,0x81 /* -127 */ ! 52: .set SW4,0x8001 ! 53: .set SL4,0x80000001 ! 54: .set MB4,0x7f /* 127 */ ! 55: .set MW4,0x7fff ! 56: .set ML4,0x7fffffff ! 57: .set RB4,0xfe /* -2 */ ! 58: .set RW4,0xfffe ! 59: .set RL4,0xfffffffe ! 60: .set SB5,SB4 /* -127 */ ! 61: .set SW5,SW4 ! 62: .set SL5,SL4 ! 63: .set MB5,0x80 /* -128 */ ! 64: .set MW5,0x8000 ! 65: .set ML5,0x80000000 ! 66: .set RB5,0xff /* -1 */ ! 67: .set RW5,0xffff ! 68: .set RL5,0xffffffff ! 69: .set SB6,0x7f/* +127 */ ! 70: .set SW6,0x7fff ! 71: .set SL6,0x7fffffff ! 72: .set MB6,SB4 /* -127 */ ! 73: .set MW6,SW4 ! 74: .set ML6,SL4 ! 75: .set RB6,0x02 ! 76: .set RW6,0x02 ! 77: .set RL6,0x02 ! 78: ! 79: .set INITB,0x11111f55/* initialization values for 3 operand */ ! 80: .set INITW,0x111f5555 ! 81: .set INITL,0X55555555 ! 82: ! 83: /* */ ! 84: /* Syst.s - Constants */ ! 85: /* */ ! 86: .set IPL,8 ! 87: .set HIGH,31 ! 88: .set ZERO,0 ! 89: .set ONES,0xffffffff ! 90: .set N,8 ! 91: .set Z,4 ! 92: .set V,2 ! 93: .set C,1 ! 94: .set T,16 ! 95: .set IV,32 ! 96: .set FU,64 ! 97: .set DV,128 ! 98: .set PSWMASK,0x003f ! 99: ! 100: ! 101: .globl _sub_l2 ! 102: _sub_l2: ! 103: callf $4,_setjmp /* save context for error return */ ! 104: movab _sub_l2,_stpc /* starting address of subtest */ ! 105: movl $1,_subtst /* subtest number */ ! 106: movl $2,_no_opr /* number of operands in use */ ! 107: movl $SL1,_opr /* first operand */ ! 108: movl $ML1,_opr + 4 /* second operand */ ! 109: 0: movl $SL1,sub /*first operand */ ! 110: movl $ML1,dif /*second operand */ ! 111: bicpsw $PSWMASK /*PSW = 0 */ ! 112: bispsw $(N|V|C) /* these flags ON */ ! 113: subl2 sub,dif /* try 'sub' instruction mem to mem */ ! 114: jlss e1 /*error if N = 1 */ ! 115: jneq e1 /*error if Z = 0 */ ! 116: jvs e1 /*error if V = 1 */ ! 117: jcc e1 /*error if C = 0 */ ! 118: jmp 1f ! 119: e1: movpsl _actual /* actual = psl maybe incorrect */ ! 120: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 121: movl $2,_ercode /* error code flag failure */ ! 122: jmp *badrtn ! 123: 1: bicpsw $Z ! 124: cmpl $RL1,dif /*dif = expected ? */ ! 125: jeql sl2 /*if no error continue */ ! 126: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 127: movl $1,_ercode /* error code data miscompare */ ! 128: movl dif,_actual /* actual data */ ! 129: movl $RL1,_expected /* expected data */ ! 130: jmp *badrtn ! 131: ! 132: sl2: ! 133: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 134: as2: callf $4,_setjmp /* save context for error return */ ! 135: movab as2,_stpc /* starting address of subtest */ ! 136: movl $2,_subtst /* subtest number */ ! 137: movl $2,_no_opr /* number of operands in use */ ! 138: movl $SL2,_opr /* first operand */ ! 139: movl $ML2,_opr + 4 /* second operand */ ! 140: 0: bicpsw $PSWMASK /*PSW = 0 */ ! 141: movl $ML2,dif /*second operand */ ! 142: bicpsw $PSWMASK /*PSW = 0 */ ! 143: bispsw $(N|Z|V) /* these flags ON */ ! 144: subl2 $SL2,dif /* try 'sub' instruction data to mem */ ! 145: jlss e2 /*error if N = 1 */ ! 146: jeql e2 /*error if Z = 1 */ ! 147: jvs e2 /*error if V = 1 */ ! 148: jcs e2 /*error if C = 1 */ ! 149: jmp 1f ! 150: e2: movpsl _actual /* actual = psl maybe incorrect */ ! 151: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 152: movl $2,_ercode /* error code flag failure */ ! 153: jmp *badrtn ! 154: 1: bicpsw $Z ! 155: cmpl $RL2,dif /*dif = expected ? */ ! 156: jeql sl3 /*if no error continue */ ! 157: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 158: movl $1,_ercode /* error code data miscompare */ ! 159: movl dif,_actual /* actual data */ ! 160: movl $RL2,_expected /* expected data */ ! 161: jmp *badrtn ! 162: ! 163: sl3: ! 164: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 165: as3: callf $4,_setjmp /* save context for error return */ ! 166: movab as3,_stpc /* starting address of subtest */ ! 167: movl $3,_subtst /* subtest number */ ! 168: movl $2,_no_opr /* number of operands in use */ ! 169: movl $SL3,_opr /* first operand */ ! 170: movl $ML3,_opr + 4 /* second operand */ ! 171: 0: movl $SL3,r5 /*first operand load reg r5 */ ! 172: movl $ML3,dif /*second operand */ ! 173: bicpsw $PSWMASK /*PSW = 0 */ ! 174: bispsw $(V|Z|C) /* these flags ON */ ! 175: subl2 r5,dif /* try 'sub' instruction reg to mem */ ! 176: jgeq e3 /*error if N = 0 */ ! 177: jeql e3 /*error if Z = 1 */ ! 178: jvs e3 /*error if V = 1 */ ! 179: jcc e3 /*error if C = 0 */ ! 180: jmp 1f ! 181: e3: movpsl _actual /* actual = psl maybe incorrect */ ! 182: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 183: movl $2,_ercode /* error code flag failure */ ! 184: jmp *badrtn ! 185: 1: bicpsw $Z ! 186: cmpl $RL3,dif /*dif = expected ? */ ! 187: jeql sl4 /*if no error continue */ ! 188: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 189: movl $1,_ercode /* error code data miscompare */ ! 190: movl dif,_actual /* actual data */ ! 191: movl $RL3,_expected /* expected data */ ! 192: jmp *badrtn ! 193: ! 194: ! 195: sl4: ! 196: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 197: as4: callf $4,_setjmp /* save context for error return */ ! 198: movab as4,_stpc /* starting address of subtest */ ! 199: movl $4,_subtst /* subtest number */ ! 200: movl $2,_no_opr /* number of operands in use */ ! 201: movl $SL4,_opr /* first operand */ ! 202: movl $ML4,_opr + 4 /* second operand */ ! 203: 0: movl $SL4,r5 /*first operand */ ! 204: movl $ML4,r6 /*second operand */ ! 205: bicpsw $PSWMASK /*PSW = 0 */ ! 206: bispsw $Z /* these flags ON */ ! 207: subl2 r5,r6 /* try 'sub' instruction reg to reg */ ! 208: jlss e4 /*error if N = 0 */ ! 209: jeql e4 /*error if Z = 1 */ ! 210: jvc e4 /*error if V = 0 */ ! 211: jcs e4 /*error if C = 1 */ ! 212: jmp 1f ! 213: e4: movpsl _actual /* actual = psl maybe incorrect */ ! 214: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 215: movl $2,_ercode /* error code flag failure */ ! 216: jmp *badrtn ! 217: 1: bicpsw $Z ! 218: cmpl $RL4,r6 /*dif = expected ? */ ! 219: jeql sl5 /*if no error continue */ ! 220: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 221: movl $1,_ercode /* error code data miscompare */ ! 222: movl r6,_actual /* actual data */ ! 223: movl $RL4,_expected /* expected data */ ! 224: jmp *badrtn ! 225: ! 226: sl5: ! 227: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 228: as5: callf $4,_setjmp /* save context for error return */ ! 229: movab as5,_stpc /* starting address of subtest */ ! 230: movl $5,_subtst /* subtest number */ ! 231: movl $2,_no_opr /* number of operands in use */ ! 232: movl $SL5,_opr /* first operand */ ! 233: movl $ML5,_opr + 4 /* second operand */ ! 234: 0: movl $SL5,sub /*first operand */ ! 235: movl $ML5,r5 /*second operand */ ! 236: bicpsw $PSWMASK /*PSW = 0 */ ! 237: bispsw $(V|Z) /* these flags ON */ ! 238: subl2 $SL5,r5 /* 'sub' instruction data to reg */ ! 239: jgeq e5 /*error if N = 0 */ ! 240: jeql e5 /*error if Z = 1 */ ! 241: jvs e5 /*error if V = 1 */ ! 242: jcs e5 /*error if C = 1 */ ! 243: jmp 1f ! 244: e5: movpsl _actual /* actual = psl maybe incorrect */ ! 245: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 246: movl $2,_ercode /* error code flag failure */ ! 247: jmp *badrtn ! 248: 1: bicpsw $Z ! 249: cmpl $RL5,r5 /*dif = expected ? */ ! 250: jeql sl6 /*if no error continue */ ! 251: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 252: movl $1,_ercode /* error code data miscompare */ ! 253: movl r5,_actual /* actual data */ ! 254: movl $RL5,_expected /* expected data */ ! 255: jmp *badrtn ! 256: ! 257: sl6: ! 258: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 259: as6: callf $4,_setjmp /* save context for error return */ ! 260: movab as6,_stpc /* starting address of subtest */ ! 261: movl $6,_subtst /* subtest number */ ! 262: movl $2,_no_opr /* number of operands in use */ ! 263: movl $SL6,_opr /* first operand */ ! 264: movl $ML6,_opr + 4 /* second operand */ ! 265: 0: movl $SL6,sub /*first operand */ ! 266: movl $ML6,dif /*second operand */ ! 267: bicpsw $PSWMASK /*PSW = 0 */ ! 268: bispsw $(Z|C|N) /* these flags ON */ ! 269: subl2 sub,dif /* try 'sub' instruction */ ! 270: jgeq e6 /*error if N = 1 */ ! 271: jeql e6 /*error if Z = 1 */ ! 272: jvc e6 /*error if V = 0 */ ! 273: jcc e6 /*error if C = 0 */ ! 274: jmp 1f ! 275: e6: movpsl _actual /* actual = psl maybe incorrect */ ! 276: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 277: movl $2,_ercode /* error code flag failure */ ! 278: jmp *badrtn ! 279: 1: bicpsw $Z ! 280: cmpl $RL6,dif /*dif = expected ? */ ! 281: jeql aldn /*if no error continue */ ! 282: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 283: movl $1,_ercode /* error code data miscompare */ ! 284: movl dif,_actual /* actual data */ ! 285: movl $RL6,_expected /* expected data */ ! 286: jmp *badrtn ! 287: ! 288: aldn: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 289: jmp *return ! 290: ! 291: ! 292: /* */ ! 293: /* Variables */ ! 294: /* */ ! 295: .align 2 ! 296: min: .space 4 ! 297: dif: .space 4 ! 298: sub: .space 4 ! 299: ! 300: /* End of file */ ! 301: ! 302:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.