|
|
1.1 ! root 1: ! 2: ! 3: ! 4: /* SUBL3 (subtract long 3) test */ ! 5: /* */ ! 6: /*Test name = subl3 */ ! 7: /*Description = */ ! 8: /* This test checks 'subl3' instruction as follows: */ ! 9: /*sub min dif N Z V C (flags) */ ! 10: /*___ ___ ______ _______________ */ ! 11: /*0x7fffffff 0x7fffffff 0x00000000 0 1 0 1 */ ! 12: /*0xffffffff 0x00000001 0x00000002 0 0 0 0 */ ! 13: /*0x00000001 0xffffffff 0xfffffffe 1 0 0 1 */ ! 14: /*0x80000001 0x7fffffff 0xfffffffe 1 0 1 0 */ ! 15: /*0x80000001 0x80000000 0xffffffff 1 0 0 0 */ ! 16: /*0x7fffffff 0x80000001 0x00000002 0 0 1 1 */ ! 17: /* */ ! 18: /* */ ! 19: ! 20: /* */ ! 21: /* */ ! 22: /* constants definition for 'subx' tests. */ ! 23: /* */ ! 24: ! 25: .set SB1,0x11111f7f/*+127, highest +ve number, byte */ ! 26: .set SW1,0x111f7fff ! 27: .set SL1,0x7fffffff ! 28: .set MB1,0x11111f7f/* +127 */ ! 29: .set MW1,0x111f7fff ! 30: .set ML1,SL1 ! 31: .set RB1,0x11111f00 ! 32: .set RW1,0x111f0000 ! 33: .set RL1,0x00000000 ! 34: .set SB2,0xff /* -1 */ ! 35: .set SW2,0xffff ! 36: .set SL2,0xffffffff ! 37: .set MB2,0x01 /* +1 */ ! 38: .set MW2,0x0001 ! 39: .set ML2,0X00000001 ! 40: .set RB2,0x00000002 /* +2 */ ! 41: .set RW2,RB2 ! 42: .set RL2,RB2 ! 43: .set SB3,MB2 /* +1 */ ! 44: .set SW3,MW2 ! 45: .set SL3,ML2 ! 46: .set MB3,0xff /* -1 */ ! 47: .set MW3,0xffff ! 48: .set ML3,0xffffffff ! 49: .set RB3,0x000000fe /* -2 */ ! 50: .set RW3,0x0000fffe ! 51: .set RL3,0Xfffffffe ! 52: .set SB4,0x81 /* -127 */ ! 53: .set SW4,0x8001 ! 54: .set SL4,0x80000001 ! 55: .set MB4,0x7f /* 127 */ ! 56: .set MW4,0x7fff ! 57: .set ML4,0x7fffffff ! 58: .set RB4,0xfe /* -2 */ ! 59: .set RW4,0xfffe ! 60: .set RL4,0xfffffffe ! 61: .set SB5,SB4 /* -127 */ ! 62: .set SW5,SW4 ! 63: .set SL5,SL4 ! 64: .set MB5,0x80 /* -128 */ ! 65: .set MW5,0x8000 ! 66: .set ML5,0x80000000 ! 67: .set RB5,0xff /* -1 */ ! 68: .set RW5,0xffff ! 69: .set RL5,0xffffffff ! 70: .set SB6,0x7f/* +127 */ ! 71: .set SW6,0x7fff ! 72: .set SL6,0x7fffffff ! 73: .set MB6,SB4 /* -127 */ ! 74: .set MW6,SW4 ! 75: .set ML6,SL4 ! 76: .set RB6,0x02 ! 77: .set RW6,0x02 ! 78: .set RL6,0x02 ! 79: ! 80: .set INITB,0x11111f55/* initialization values for 3 operand */ ! 81: .set INITW,0x111f5555 ! 82: .set INITL,0X55555555 ! 83: ! 84: /* */ ! 85: /* Syst.s - Constants */ ! 86: /* */ ! 87: .set IPL,8 ! 88: .set HIGH,31 ! 89: .set ZERO,0 ! 90: .set ONES,0xffffffff ! 91: .set N,8 ! 92: .set Z,4 ! 93: .set V,2 ! 94: .set C,1 ! 95: .set T,16 ! 96: .set IV,32 ! 97: .set FU,64 ! 98: .set DV,128 ! 99: .set PSWMASK,0x003f ! 100: ! 101: .globl _sub_l3 ! 102: _sub_l3: ! 103: callf $4,_setjmp /* save context for error return */ ! 104: movab _sub_l3,_stpc /* 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: bicpsw $PSWMASK /*PSW = 0 */ ! 110: movl $SL1,sub /*first operand */ ! 111: movl $ML1,min /*second operand */ ! 112: movl $INITL,dif /*initialize destination */ ! 113: bicpsw $PSWMASK /*PSW = 0 */ ! 114: bispsw $(N|V|C) /* these flags ON */ ! 115: subl3 sub,min,dif /* try 'sub' instruction mem mem mem */ ! 116: jlss e1 /*error if N = 1 */ ! 117: jneq e1 /*error if Z = 0 */ ! 118: jvs e1 /*error if V = 1 */ ! 119: jcc e1 /*error if C = 0 */ ! 120: jmp 1f ! 121: e1: movpsl _actual /* actual= psl maybe incorrect */ ! 122: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 123: movl $2,_ercode /* error code flag failure */ ! 124: jmp *badrtn ! 125: 1: bicpsw $Z ! 126: cmpl $RL1,dif /*dif = expected ? */ ! 127: jeql sl2 ! 128: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 129: movl $1,_ercode /* error code data miscompare */ ! 130: movl dif,_actual /* actual data */ ! 131: movl $RL1,_expected /* expected data */ ! 132: jmp *badrtn ! 133: ! 134: sl2: ! 135: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 136: as2: callf $4,_setjmp /* save context for error return */ ! 137: movab as2,_stpc /* address of subtest */ ! 138: movl $2,_subtst /* subtest number */ ! 139: movl $2,_no_opr /* number of operands in use */ ! 140: movl $SL2,_opr /* first operand */ ! 141: movl $ML2,_opr + 4 /* second operand */ ! 142: 0: bicpsw $PSWMASK /*PSW = 0 */ ! 143: movl $SL2,r6 /*first operand */ ! 144: movl $ML2,r7 /*second operand */ ! 145: movl $0,r8 /*initialize destination */ ! 146: bicpsw $PSWMASK /*PSW = 0 */ ! 147: bispsw $(N|Z|V) /* these flags ON */ ! 148: subl3 r6,r7,r8 /* try 'sub' instruction reg reg reg */ ! 149: jlss e2 /*error if N = 1 */ ! 150: jeql e2 /*error if Z = 1 */ ! 151: jvs e2 /*error if V = 1 */ ! 152: jcs e2 /*error if C = 1 */ ! 153: jmp 1f ! 154: e2: movpsl _actual /* actual= psl maybe incorrect */ ! 155: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 156: movl $2,_ercode /* error code flag failure */ ! 157: jmp *badrtn ! 158: 1: bicpsw $Z ! 159: cmpl $RL2,r8 /*dif = expected ? */ ! 160: jeql sl3 ! 161: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 162: movl $1,_ercode /* error code data miscompare */ ! 163: movl r8,_actual /* actual data */ ! 164: movl $RL2,_expected /* expected data */ ! 165: jmp *badrtn ! 166: ! 167: sl3: ! 168: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 169: as3: callf $4,_setjmp /* save context for error return */ ! 170: movab as3,_stpc /* address of subtest */ ! 171: movl $3,_subtst /* subtest number */ ! 172: movl $2,_no_opr /* number of operands in use */ ! 173: movl $SL3,_opr /* first operand */ ! 174: movl $ML3,_opr + 4 /* second operand */ ! 175: 0: bicpsw $PSWMASK /*PSW = 0 */ ! 176: movl $SL3,r6 /*first operand */ ! 177: movl $ML3,r7 /*second operand */ ! 178: movl $0,dif /*initialize destination */ ! 179: bicpsw $PSWMASK /*PSW = 0 */ ! 180: bispsw $(V|Z|C) /* these flags ON */ ! 181: subl3 r6,r7,dif /* try 'sub' instruction reg reg mem */ ! 182: jgeq e3 /*error if N = 0 */ ! 183: jeql e3 /*error if Z = 1 */ ! 184: jvs e3 /*error if V = 1 */ ! 185: jcc e3 /*error if C = 0 */ ! 186: jmp 1f ! 187: e3: movpsl _actual /* actual= psl maybe incorrect */ ! 188: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 189: movl $2,_ercode /* error code flag failure */ ! 190: jmp *badrtn ! 191: 1: bicpsw $Z ! 192: cmpl $RL3,dif /*dif = expected ? */ ! 193: jeql sl4 ! 194: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 195: movl $1,_ercode /* error code data miscompare */ ! 196: movl dif,_actual /* actual data */ ! 197: movl $RL3,_expected /* expected data */ ! 198: jmp *badrtn ! 199: ! 200: sl4: ! 201: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 202: as4: callf $4,_setjmp /* save context for error return */ ! 203: movab as4,_stpc /* address of subtest */ ! 204: movl $4,_subtst /* subtest number */ ! 205: movl $2,_no_opr /* number of operands in use */ ! 206: movl $SL4,_opr /* first operand */ ! 207: movl $ML4,_opr + 4 /* second operand */ ! 208: 0: bicpsw $PSWMASK /*PSW = 0 */ ! 209: movl $SL4,r6 /*first operand */ ! 210: movl $0,dif /*initialize destination */ ! 211: bicpsw $PSWMASK /*PSW = 0 */ ! 212: bispsw $Z /* these flags ON */ ! 213: subl3 r6,$ML4,dif /* try 'sub' instruction reg data mem */ ! 214: jlss e4 /*error if N = 0 */ ! 215: jeql e4 /*error if Z = 1 */ ! 216: jvc e4 /*error if V = 0 */ ! 217: jcs e4 /*error if C = 1 */ ! 218: jmp 1f ! 219: e4: movpsl _actual /* actual= psl maybe incorrect */ ! 220: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 221: movl $2,_ercode /* error code flag failure */ ! 222: jmp *badrtn ! 223: 1: bicpsw $Z ! 224: cmpl $RL4,dif /*dif = expected ? */ ! 225: jeql sl5 ! 226: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 227: movl $1,_ercode /* error code data miscompare */ ! 228: movl dif,_actual /* actual data */ ! 229: movl $RL4,_expected /* expected data */ ! 230: jmp *badrtn ! 231: ! 232: sl5: ! 233: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 234: as5: callf $4,_setjmp /* save context for error return */ ! 235: movab as5,_stpc /* address of subtest */ ! 236: movl $5,_subtst /* subtest number */ ! 237: movl $2,_no_opr /* number of operands in use */ ! 238: movl $SL5,_opr /* first operand */ ! 239: movl $ML5,_opr + 4 /* second operand */ ! 240: 0: bicpsw $PSWMASK /*PSW = 0 */ ! 241: movl $0,dif /*initialize destination */ ! 242: bicpsw $PSWMASK /*PSW = 0 */ ! 243: bispsw $(V|Z) /* these flags ON */ ! 244: subl3 $SL5,$ML5,dif /* try 'sub' instruction data data mem */ ! 245: jgeq e5 /*error if N = 0 */ ! 246: jeql e5 /*error if Z = 1 */ ! 247: jvs e5 /*error if V = 1 */ ! 248: jcs e5 /*error if C = 1 */ ! 249: jmp 1f ! 250: e5: movpsl _actual /* actual= psl maybe incorrect */ ! 251: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 252: movl $2,_ercode /* error code flag failure */ ! 253: jmp *badrtn ! 254: 1: bicpsw $Z ! 255: cmpl $RL5,dif /*dif = expected ? */ ! 256: jeql sl6 ! 257: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 258: movl $1,_ercode /* error code data miscompare */ ! 259: movl dif,_actual /* actual data */ ! 260: movl $RL5,_expected /* expected data */ ! 261: jmp *badrtn ! 262: ! 263: sl6: ! 264: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 265: as6: callf $4,_setjmp /* save context for error return */ ! 266: movab as6,_stpc /* address of subtest */ ! 267: movl $6,_subtst /* subtest number */ ! 268: movl $2,_no_opr /* number of operands in use */ ! 269: movl $SL6,_opr /* first operand */ ! 270: movl $ML6,_opr + 4 /* second operand */ ! 271: 0: bicpsw $PSWMASK /*PSW = 0 */ ! 272: movl $0,r8 /*initialize destination */ ! 273: bicpsw $PSWMASK /*PSW = 0 */ ! 274: bispsw $(Z|C|N) /* these flags ON */ ! 275: subl3 $SL6,$ML6,r8 /* try 'sub' instruction data data reg */ ! 276: jgeq e6 /*error if N = 1 */ ! 277: jeql e6 /*error if Z = 1 */ ! 278: jvc e6 /*error if V = 0 */ ! 279: jcc e6 /*error if C = 0 */ ! 280: jmp 1f ! 281: e6: movpsl _actual /* actual= psl maybe incorrect */ ! 282: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 283: movl $2,_ercode /* error code flag failure */ ! 284: jmp *badrtn ! 285: 1: bicpsw $Z ! 286: cmpl $RL6,r8 /*dif = expected ? */ ! 287: jeql sl7 ! 288: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 289: movl $1,_ercode /* error code data miscompare */ ! 290: movl r8,_actual /* actual data */ ! 291: movl $RL6,_expected /* expected data */ ! 292: jmp *badrtn ! 293: ! 294: sl7: ! 295: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 296: as7: callf $4,_setjmp /* save context for error return */ ! 297: movab as7,_stpc /* address of subtest */ ! 298: movl $7,_subtst /* subtest number */ ! 299: movl $2,_no_opr /* number of operands in use */ ! 300: movl $SL6,_opr /* first operand */ ! 301: movl $ML6,_opr + 4 /* second operand */ ! 302: 0: bicpsw $PSWMASK /*PSW = 0 */ ! 303: movl $SL6,r6 ! 304: movl $0,r8 /*initialize destination */ ! 305: bicpsw $PSWMASK /*PSW = 0 */ ! 306: bispsw $(Z|C|N) /* these flags ON */ ! 307: subl3 r6,$ML6,r8 /* try 'sub' instruction reg data reg */ ! 308: jgeq e7 /*error if N = 1 */ ! 309: jeql e7 /*error if Z = 1 */ ! 310: jvc e7 /*error if V = 0 */ ! 311: jcc e7 /*error if C = 0 */ ! 312: jmp 1f ! 313: e7: movpsl _actual /* actual= psl maybe incorrect */ ! 314: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 315: movl $2,_ercode /* error code flag failure */ ! 316: jmp *badrtn ! 317: 1: bicpsw $Z ! 318: cmpl $RL6,r8 /*dif = expected ? */ ! 319: jeql sl8 ! 320: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 321: movl $1,_ercode /* error code data miscompare */ ! 322: movl r8,_actual /* actual data */ ! 323: movl $RL6,_expected /* expected data */ ! 324: jmp *badrtn ! 325: ! 326: sl8: ! 327: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 328: as8: callf $4,_setjmp /* save context for error return */ ! 329: movab as8,_stpc /* address of subtest */ ! 330: movl $8,_subtst /* subtest number */ ! 331: movl $2,_no_opr /* number of operands in use */ ! 332: movl $SL3,_opr /* first operand */ ! 333: movl $ML3,_opr + 4 /* second operand */ ! 334: 0: bicpsw $PSWMASK /*PSW = 0 */ ! 335: movl $ML3,r7 /*second operand */ ! 336: movl $0,dif /*initialize destination */ ! 337: bicpsw $PSWMASK /*PSW = 0 */ ! 338: bispsw $(V|Z|C) /* these flags ON */ ! 339: subl3 $SL3,r7,dif /* try 'sub' instruction data reg mem */ ! 340: jgeq e8 /*error if N = 0 */ ! 341: jeql e8 /*error if Z = 1 */ ! 342: jvs e8 /*error if V = 1 */ ! 343: jcc e8 /*error if C = 0 */ ! 344: jmp 1f ! 345: e8: movpsl _actual /* actual= psl maybe incorrect */ ! 346: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 347: movl $2,_ercode /* error code flag failure */ ! 348: jmp *badrtn ! 349: 1: bicpsw $Z ! 350: cmpl $RL3,dif /*dif = expected ? */ ! 351: jeql sl9 ! 352: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 353: movl $1,_ercode /* error code data miscompare */ ! 354: movl dif,_actual /* actual data */ ! 355: movl $RL3,_expected /* expected data */ ! 356: jmp *badrtn ! 357: ! 358: sl9: ! 359: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 360: as9: callf $4,_setjmp /* save context for error return */ ! 361: movab as9,_stpc /* address of subtest */ ! 362: movl $9,_subtst /* subtest number */ ! 363: movl $2,_no_opr /* number of operands in use */ ! 364: movl $SL2,_opr /* first operand */ ! 365: movl $ML2,_opr + 4 /* second operand */ ! 366: 0: bicpsw $PSWMASK /*PSW = 0 */ ! 367: movl $ML2,r7 /*second operand */ ! 368: movl $0,r8 /*initialize destination */ ! 369: bicpsw $PSWMASK /*PSW = 0 */ ! 370: bispsw $(N|Z|V) /* these flags ON */ ! 371: subl3 $SL2,r7,r8 /* try 'sub' instruction data reg reg */ ! 372: jlss e9 /*error if N = 1 */ ! 373: jeql e9 /*error if Z = 1 */ ! 374: jvs e9 /*error if V = 1 */ ! 375: jcs e9 /*error if C = 1 */ ! 376: jmp 1f ! 377: e9: movpsl _actual /* actual= psl maybe incorrect */ ! 378: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 379: movl $2,_ercode /* error code flag failure */ ! 380: jmp *badrtn ! 381: 1: bicpsw $Z ! 382: cmpl $RL2,r8 /*dif = expected ? */ ! 383: jeql aldn ! 384: bbs $0,_scoplp,0b /* if set scope loop on error */ ! 385: movl $1,_ercode /* error code data miscompare */ ! 386: movl r8,_actual /* actual data */ ! 387: movl $RL2,_expected /* expected data */ ! 388: jmp *badrtn ! 389: ! 390: aldn: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 391: jmp *return ! 392: ! 393: ! 394: /* */ ! 395: /* Variables */ ! 396: /* */ ! 397: .align 2 ! 398: min: .space 4 ! 399: dif: .space 4 ! 400: sub: .space 4 ! 401: ! 402: /* End of file */ ! 403: ! 404:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.