|
|
1.1 ! root 1: ! 2: ! 3: ! 4: /* B (branch on condition) test */ ! 5: /* */ ! 6: /*Test name = bxxxx */ ! 7: /*Description = */ ! 8: /* This test checks 'branch on condition' instructions as follows: */ ! 9: /* (1) forward & backward branch on condition true */ ! 10: /* (2) no branch (continue with the next instruction) on */ ! 11: /* condition false. */ ! 12: /* */ ! 13: /* */ ! 14: /* */ ! 15: /* Syst.s - Constants */ ! 16: /* */ ! 17: .set IPL,8 ! 18: .set HIGH,31 ! 19: .set ZERO,0 ! 20: .set ONES,0xffffffff ! 21: .set N,8 ! 22: .set Z,4 ! 23: .set V,2 ! 24: .set C,1 ! 25: .set T,16 ! 26: .set IV,32 ! 27: .set FU,64 ! 28: .set DV,128 ! 29: .set PSWMASK,0x003f ! 30: ! 31: ! 32: /* */ ! 33: /* beql & bneq (Z flag On & OFF) test */ ! 34: /* */ ! 35: .globl _b_cond ! 36: _b_cond: ! 37: callf $4,_setjmp /* save context for error return */ ! 38: movab _b_cond,_stpc /* save address of subtest */ ! 39: movl $1,_subtst /* subtest number */ ! 40: movl $0,_no_opr /* number of operands in use */ ! 41: 0: bicpsw $PSWMASK /*Z TEST */ ! 42: bispsw $(N|V|C) /*Z off; others ON */ ! 43: beql erz /*should not branch */ ! 44: bneq fwdz0 /*check forward branch on Z off */ ! 45: jmp *$9f ! 46: 9: movpsl _actual /* actual data */ ! 47: bbs $0,_scoplp,0b /* if set loop on error */ ! 48: movl $2,_ercode /* flag failure did not jump */ ! 49: bicpsw $PSWMASK /*Z TEST */ ! 50: bispsw $(N|V|C) /*Z off; others ON */ ! 51: movpsl _expected /* expected data */ ! 52: jmp *badrtn /* error - did not branch */ ! 53: ! 54: backz0: ! 55: bneq z1 /*goto Z on test */ ! 56: .space 4 /*bad -should never come here */ ! 57: erz: .space 20 ! 58: ! 59: fwdz0: ! 60: bneq backz0 /*ckeck backward branch on Z off */ ! 61: movpsl _actual /* actual data */ ! 62: bbs $0,_scoplp,0b /* if set loop on error */ ! 63: movl $2,_ercode /* flag failure did not jump */ ! 64: bicpsw $PSWMASK /*Z TEST */ ! 65: bispsw $(N|V|C) /*Z off; others ON */ ! 66: movpsl _expected /* expected data */ ! 67: jmp *badrtn /* error - did not branch */ ! 68: ! 69: z1: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 70: b2: callf $4,_setjmp /* save context for error return */ ! 71: movab b2,_stpc /* save address of subtest */ ! 72: movl $2,_subtst /* subtest number */ ! 73: 0: bicpsw $PSWMASK /*Z ON test */ ! 74: bispsw $Z /*turn Z ON */ ! 75: bneq erz /*should not branch */ ! 76: beql fwdz1 /*forward branch on Z on */ ! 77: movpsl _actual /* actual data */ ! 78: bbs $0,_scoplp,0b /* if set loop on error */ ! 79: movl $2,_ercode /* flag failure did not jump */ ! 80: bicpsw $PSWMASK /*Z TEST */ ! 81: bispsw $Z /*turn Z ON */ ! 82: movpsl _expected /* expected data */ ! 83: jmp *badrtn /* error - did not branch */ ! 84: backz1: ! 85: beql n0 /*next test */ ! 86: .space 50 ! 87: fwdz1: ! 88: beql backz1 /*backward branch on Z on */ ! 89: movpsl _actual /* actual data */ ! 90: bbs $0,_scoplp,0b /* if set loop on error */ ! 91: movl $2,_ercode /* flag failure did not jump */ ! 92: bicpsw $PSWMASK /*Z TEST */ ! 93: bispsw $Z /*turn Z ON */ ! 94: movpsl _expected /* expected data */ ! 95: jmp *badrtn /* error - did not branch */ ! 96: ! 97: /* */ ! 98: /* blss & bgeq (N flag ON & OFF) test */ ! 99: /* */ ! 100: ! 101: n0: ! 102: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 103: b3: callf $4,_setjmp /* save context for error return */ ! 104: movab b3,_stpc /* save address of subtest */ ! 105: movl $3,_subtst /* subtest number */ ! 106: 0: bicpsw $PSWMASK /*N TEST */ ! 107: bispsw $(Z|V|C) /*N off; others ON */ ! 108: blss ern /*should not branch */ ! 109: bgeq fwdn0 /*check forward branch on N off */ ! 110: movpsl _actual /* actual data */ ! 111: bbs $0,_scoplp,0b /* if set loop on error */ ! 112: movl $2,_ercode /* flag failure did not jump */ ! 113: bicpsw $PSWMASK /*Z TEST */ ! 114: bispsw $(Z|V|C) /*N off; others ON */ ! 115: movpsl _expected /* expected data */ ! 116: jmp *badrtn /* error - did not branch */ ! 117: ! 118: backn0: ! 119: bgeq n1 /*goto N on test */ ! 120: .space 4 /*bad -should never come here */ ! 121: ern: .space 20 ! 122: fwdn0: ! 123: bgeq backn0 /*ckeck backward branch on N off */ ! 124: movpsl _actual /* actual data */ ! 125: bbs $0,_scoplp,0b /* if set loop on error */ ! 126: movl $2,_ercode /* flag failure did not jump */ ! 127: bicpsw $PSWMASK /*Z TEST */ ! 128: bispsw $(Z|V|C) /*N off; others ON */ ! 129: movpsl _expected /* expected data */ ! 130: jmp *badrtn /* error - did not branch */ ! 131: ! 132: n1: ! 133: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 134: b4: callf $4,_setjmp /* save context for error return */ ! 135: movab b4,_stpc /* save address of subtest */ ! 136: movl $4,_subtst /* subtest number */ ! 137: 0: bicpsw $PSWMASK /*N ON test */ ! 138: bispsw $N /*turn N ON */ ! 139: bgeq ern /*should not branch */ ! 140: blss fwdn1 /*forward branch on N on */ ! 141: jmp *$9f ! 142: 9: movpsl _actual /* actual data */ ! 143: bbs $0,_scoplp,0b /* if set loop on error */ ! 144: movl $2,_ercode /* flag failure did not jump */ ! 145: bicpsw $PSWMASK /*Z TEST */ ! 146: bispsw $N /*turn N ON */ ! 147: movpsl _expected /* expected data */ ! 148: jmp *badrtn /* error - did not branch */ ! 149: backn1: ! 150: blss v0 /*next test */ ! 151: .space 50 ! 152: fwdn1: ! 153: blss backn1 /*backward branch on N on */ ! 154: movpsl _actual /* actual data */ ! 155: bbs $0,_scoplp,0b /* if set loop on error */ ! 156: movl $2,_ercode /* flag failure did not jump */ ! 157: bicpsw $PSWMASK /*Z TEST */ ! 158: bispsw $N /*turn N ON */ ! 159: movpsl _expected /* expected data */ ! 160: jmp *badrtn /* error - did not branch */ ! 161: ! 162: /* */ ! 163: /* bvc & bvs (V flag ON & OFF) test */ ! 164: /* */ ! 165: ! 166: v0: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 167: b5: callf $4,_setjmp /* save context for error return */ ! 168: movab b5,_stpc /* save address of subtest */ ! 169: movl $5,_subtst /* subtest number */ ! 170: 0: bicpsw $PSWMASK /*V TEST */ ! 171: bispsw $(N|Z|C) /*V off; others ON */ ! 172: bvs erv /*should not branch */ ! 173: bvc fwdv0 /*check forward branch on V off */ ! 174: movpsl _actual /* actual data */ ! 175: bbs $0,_scoplp,0b /* if set loop on error */ ! 176: movl $2,_ercode /* flag failure did not jump */ ! 177: bicpsw $PSWMASK /*Z TEST */ ! 178: bispsw $(N|Z|C) /*V off; others ON */ ! 179: movpsl _expected /* expected data */ ! 180: jmp *badrtn /* error - did not branch */ ! 181: backv0: ! 182: bvc v1 /*goto V on test */ ! 183: .space 4 /*bad -should never come here */ ! 184: erv: .space 20 ! 185: fwdv0: ! 186: bvc backv0 /*ckeck backward branch on V off */ ! 187: movpsl _actual /* actual data */ ! 188: bbs $0,_scoplp,0b /* if set loop on error */ ! 189: movl $2,_ercode /* flag failure did not jump */ ! 190: bicpsw $PSWMASK /*Z TEST */ ! 191: bispsw $(N|Z|C) /*V off; others ON */ ! 192: movpsl _expected /* expected data */ ! 193: jmp *badrtn /* error - did not branch */ ! 194: ! 195: v1: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 196: b6: callf $4,_setjmp /* save context for error return */ ! 197: movab b6,_stpc /* save address of subtest */ ! 198: movl $6,_subtst /* subtest number */ ! 199: 0: bicpsw $PSWMASK /*V ON test */ ! 200: bispsw $V /*turn V ON */ ! 201: bvc erv /*should not branch */ ! 202: bvs fwdv1 /*forward branch on V on */ ! 203: movpsl _actual /* actual data */ ! 204: bbs $0,_scoplp,0b /* if set loop on error */ ! 205: movl $2,_ercode /* flag failure did not jump */ ! 206: bicpsw $PSWMASK /*Z TEST */ ! 207: bispsw $V /*turn V ON */ ! 208: movpsl _expected /* expected data */ ! 209: jmp *badrtn /* error - did not branch */ ! 210: ! 211: backv1: ! 212: bvs c0 /*next test */ ! 213: .space 50 ! 214: fwdv1: ! 215: bvs backv1 /*backward branch on V on */ ! 216: movpsl _actual /* actual data */ ! 217: bbs $0,_scoplp,0b /* if set loop on error */ ! 218: movl $2,_ercode /* flag failure did not jump */ ! 219: bicpsw $PSWMASK /*Z TEST */ ! 220: bispsw $V /*turn V ON */ ! 221: movpsl _expected /* expected data */ ! 222: jmp *badrtn /* error - did not branch */ ! 223: ! 224: /* */ ! 225: /* bcs & bcc (C flag ON & OFF) test */ ! 226: /* */ ! 227: ! 228: c0: ! 229: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 230: b7: callf $4,_setjmp /* save context for error return */ ! 231: movab b7,_stpc /* save address of subtest */ ! 232: movl $7,_subtst /* subtest number */ ! 233: 0: bicpsw $PSWMASK /*C TEST */ ! 234: bispsw $(N|V|Z) /*C off; others ON */ ! 235: bcs erc /*should not branch */ ! 236: bcc fwdc0 /*check forward branch on C off */ ! 237: movpsl _actual /* actual data */ ! 238: bbs $0,_scoplp,0b /* if set loop on error */ ! 239: movl $2,_ercode /* flag failure did not jump */ ! 240: bicpsw $PSWMASK /*Z TEST */ ! 241: bispsw $(N|V|Z) /*C off; others ON */ ! 242: movpsl _expected /* expected data */ ! 243: jmp *badrtn /* error - did not branch */ ! 244: ! 245: backc0: ! 246: bcc c1 /*goto C on test */ ! 247: .space 4 /*bad -should never come here */ ! 248: erc: .space 20 ! 249: fwdc0: ! 250: bcc backc0 /*ckeck backward branch on C off */ ! 251: movpsl _actual /* actual data */ ! 252: bbs $0,_scoplp,0b /* if set loop on error */ ! 253: movl $2,_ercode /* flag failure did not jump */ ! 254: bicpsw $PSWMASK /*Z TEST */ ! 255: bispsw $(N|V|Z) /*C off; others ON */ ! 256: movpsl _expected /* expected data */ ! 257: jmp *badrtn /* error - did not branch */ ! 258: ! 259: c1: ! 260: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 261: b8: callf $4,_setjmp /* save context for error return */ ! 262: movab b8,_stpc /* save address of subtest */ ! 263: movl $8,_subtst /* subtest number */ ! 264: 0: bicpsw $PSWMASK /*C ON test */ ! 265: bispsw $C /*turn C ON */ ! 266: bcc erc /*should not branch */ ! 267: bcs fwdc1 /*forward branch on C on */ ! 268: movpsl _actual /* actual data */ ! 269: bbs $0,_scoplp,0b /* if set loop on error */ ! 270: movl $2,_ercode /* flag failure did not jump */ ! 271: bicpsw $PSWMASK /*Z TEST */ ! 272: bispsw $C /*turn C ON */ ! 273: movpsl _expected /* expected data */ ! 274: jmp *badrtn /* error - did not branch */ ! 275: backc1: ! 276: bcs zn0 /*next test */ ! 277: .space 50 ! 278: fwdc1: ! 279: bcs backc1 /*backward branch on C on */ ! 280: movpsl _actual /* actual data */ ! 281: bbs $0,_scoplp,0b /* if set loop on error */ ! 282: movl $2,_ercode /* flag failure did not jump */ ! 283: bicpsw $PSWMASK /*Z TEST */ ! 284: bispsw $C /*turn C ON */ ! 285: movpsl _expected /* expected data */ ! 286: jmp *badrtn /* error - did not branch */ ! 287: ! 288: /* */ ! 289: /* bgtr & bleq (N|Z ON & OFF) test */ ! 290: /* */ ! 291: ! 292: zn0: ! 293: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 294: b9: callf $4,_setjmp /* save context for error return */ ! 295: movab b9,_stpc /* save address of subtest */ ! 296: movl $9,_subtst /* subtest number */ ! 297: 0: bicpsw $PSWMASK /*Z TEST */ ! 298: bispsw $(N|V|C) /*Z off; others ON */ ! 299: bgtr erzn /*should not branch */ ! 300: bleq fwdzn0 /*check forward branch on Z off */ ! 301: movpsl _actual /* actual data */ ! 302: bbs $0,_scoplp,0b /* if set loop on error */ ! 303: movl $2,_ercode /* flag failure did not jump */ ! 304: bicpsw $PSWMASK /*Z TEST */ ! 305: bispsw $(N|V|C) /*Z off; others ON */ ! 306: movpsl _expected /* expected data */ ! 307: jmp *badrtn /* error - did not branch */ ! 308: ! 309: backzn0: ! 310: bleq zn1 /*goto Z on test */ ! 311: .space 4 /*bad -should never come here */ ! 312: erzn: .space 20 ! 313: fwdzn0: ! 314: bleq backzn0 /*ckeck backward branch on Z off */ ! 315: movpsl _actual /* actual data */ ! 316: bbs $0,_scoplp,0b /* if set loop on error */ ! 317: movl $2,_ercode /* flag failure did not jump */ ! 318: bicpsw $PSWMASK /*Z TEST */ ! 319: bispsw $(N|V|C) /*Z off; others ON */ ! 320: movpsl _expected /* expected data */ ! 321: jmp *badrtn /* error - did not branch */ ! 322: ! 323: zn1: ! 324: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 325: b10: callf $4,_setjmp /* save context for error return */ ! 326: movab b10,_stpc /* save address of subtest */ ! 327: movl $0xa,_subtst /* subtest number */ ! 328: 0: bicpsw $PSWMASK /*Z ON test */ ! 329: bispsw $Z /*turn Z ON */ ! 330: bgtr erzn /*should not branch */ ! 331: bleq fwdzn1 /*forward branch on Z on */ ! 332: movpsl _actual /* actual data */ ! 333: bbs $0,_scoplp,0b /* if set loop on error */ ! 334: movl $2,_ercode /* flag failure did not jump */ ! 335: bicpsw $PSWMASK /*Z TEST */ ! 336: bispsw $Z /*turn Z ON */ ! 337: movpsl _expected /* expected data */ ! 338: jmp *badrtn /* error - did not branch */ ! 339: backzn1: ! 340: bleq nz0 /*next test */ ! 341: .space 50 ! 342: fwdzn1: ! 343: bleq backzn1 /*backward branch on Z on */ ! 344: movpsl _actual /* actual data */ ! 345: bbs $0,_scoplp,0b /* if set loop on error */ ! 346: movl $2,_ercode /* flag failure did not jump */ ! 347: bicpsw $PSWMASK /*Z TEST */ ! 348: bispsw $Z /*turn Z ON */ ! 349: movpsl _expected /* expected data */ ! 350: jmp *badrtn /* error - did not branch */ ! 351: nz0: ! 352: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 353: b11: callf $4,_setjmp /* save context for error return */ ! 354: movab b11,_stpc /* save address of subtest */ ! 355: movl $0xb,_subtst /* subtest number */ ! 356: bicpsw $PSWMASK /*N TEST */ ! 357: bispsw $(V|C) /*N off; Z off; others ON */ ! 358: bleq ernz /*should not branch */ ! 359: bgtr fwdnz0 /*check forward branch on N off */ ! 360: movpsl _actual /* actual data */ ! 361: bbs $0,_scoplp,0b /* if set loop on error */ ! 362: movl $2,_ercode /* flag failure did not jump */ ! 363: bicpsw $PSWMASK /*Z TEST */ ! 364: bispsw $(V|C) /*N off; Z off; others ON */ ! 365: movpsl _expected /* expected data */ ! 366: jmp *badrtn /* error - did not branch */ ! 367: backnz0: ! 368: bgtr zc0 /*goto N on test */ ! 369: .space 4 /*bad -should never come here */ ! 370: ernz: .space 50 ! 371: fwdnz0: ! 372: bgtr backnz0 /*ckeck backward branch on N off */ ! 373: movpsl _actual /* actual data */ ! 374: bbs $0,_scoplp,0b /* if set loop on error */ ! 375: movl $2,_ercode /* flag failure did not jump */ ! 376: bicpsw $PSWMASK /*Z TEST */ ! 377: bispsw $(V|C) /*N off; Z off; others ON */ ! 378: movpsl _expected /* expected data */ ! 379: jmp *badrtn /* error - did not branch */ ! 380: /* bgtru & blequ (C|Z flags ON & OFF) test */ ! 381: /* */ ! 382: ! 383: zc0: ! 384: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 385: b12: callf $4,_setjmp /* save context for error return */ ! 386: movab b12,_stpc /* save address of subtest */ ! 387: movl $0xc,_subtst /* subtest number */ ! 388: bicpsw $PSWMASK /*Z TEST */ ! 389: bispsw $(N|V|C) /*Z off; others ON */ ! 390: blequ erzc /*should not branch */ ! 391: bgtru fwdzc0 /*check forward branch on Z off */ ! 392: movpsl _actual /* actual data */ ! 393: bbs $0,_scoplp,0b /* if set loop on error */ ! 394: movl $2,_ercode /* flag failure did not jump */ ! 395: bicpsw $PSWMASK /*Z TEST */ ! 396: bispsw $(N|V|C) /*Z off; others ON */ ! 397: movpsl _expected /* expected data */ ! 398: jmp *badrtn /* error - did not branch */ ! 399: backzc0: ! 400: bgtru zc1 /*goto Z on test */ ! 401: .space 4 /*bad -should never come here */ ! 402: erzc: .space 20 ! 403: fwdzc0: ! 404: bgtru backzc0 /*ckeck backward branch on Z off */ ! 405: movpsl _actual /* actual data */ ! 406: bbs $0,_scoplp,0b /* if set loop on error */ ! 407: movl $2,_ercode /* flag failure did not jump */ ! 408: bicpsw $PSWMASK /*Z TEST */ ! 409: bispsw $(N|V|C) /*Z off; others ON */ ! 410: movpsl _expected /* expected data */ ! 411: jmp *badrtn /* error - did not branch */ ! 412: ! 413: zc1: ! 414: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 415: b13: callf $4,_setjmp /* save context for error return */ ! 416: movab b13,_stpc /* save address of subtest */ ! 417: movl $0xd,_subtst /* subtest number */ ! 418: bicpsw $PSWMASK /*Z ON test */ ! 419: bispsw $Z /*turn Z ON */ ! 420: bgtru erzc /*should not branch */ ! 421: blequ fwdzc1 /*forward branch on Z on */ ! 422: movpsl _actual /* actual data */ ! 423: bbs $0,_scoplp,0b /* if set loop on error */ ! 424: movl $2,_ercode /* flag failure did not jump */ ! 425: bicpsw $PSWMASK /*Z TEST */ ! 426: bispsw $Z /*turn Z ON */ ! 427: movpsl _expected /* expected data */ ! 428: jmp *badrtn /* error - did not branch */ ! 429: backzc1: ! 430: blequ x0 /*next test */ ! 431: .space 50 ! 432: fwdzc1: ! 433: blequ backzc1 /*backward branch on Z on */ ! 434: movpsl _actual /* actual data */ ! 435: bbs $0,_scoplp,0b /* if set loop on error */ ! 436: movl $2,_ercode /* flag failure did not jump */ ! 437: bicpsw $PSWMASK /*Z TEST */ ! 438: bispsw $Z /*turn Z ON */ ! 439: movpsl _expected /* expected data */ ! 440: jmp *badrtn /* error - did not branch */ ! 441: ! 442: x0: ! 443: bbs $0,_force_lp,0b /* if set loop on last subtest */ ! 444: jmp *return /* good, return to monitor */ ! 445: ! 446: ! 447: ! 448: ! 449:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.