|
|
1.1 ! root 1: 1 00000000 LL0: ! 2: 2 00000000 .data ! 3: 3 00000d58 * .text ! 4: 4 00000000 .align 1 ! 5: 5 00000000 .globl _mull2 ! 6: 6 00000000 _mull2: ! 7: 7 00023F34 0000 .word L215 ! 8: 8 00023F36 # #include "fpp_defs.h" ! 9: 9 00023F36 # ! 10: 10 00023F36 # ! 11: 11 00023F36 # /*************************************************************************** ! 12: 12 00023F36 # * ! 13: 13 00023F36 # * MULL2 -MULTIPLY INTEGER 2 INSTRUCTION TEST ! 14: 14 00023F36 # * ! 15: 15 00023F36 # *****************************************************************************/ ! 16: 16 00023F36 # mull2() ! 17: 17 00023F36 # { ! 18: 18 00023F36 11 4f jbr L217 ! 19: 19 00023F38 L218: ! 20: 20 00023F38 # asm(".globl _mull2_t"); ! 21: 21 00023F38 .globl _mull2_t ! 22: 22 00023F38 # asm("_mull2_t:"); /* entry address */ ! 23: 23 00023F38 _mull2_t: ! 24: 24 00023F38 # if( (cycle == 1) && (prt_hdrs) ) /* print headers on 1st cycle */ ! 25: 25 00023F38 1d effffffff6 01 cmpl _cycle,$1 ! 26: 26 00023F3F 21 15 jneq L219 ! 27: 27 00023F41 5d efffffffed tstl _prt_hdrs ! 28: 28 00023F47 31 0d jeql L219 ! 29: 29 00023F49 # { ! 30: 30 00023F49 # writes(" MULL2"); ! 31: 31 00023F49 .data 1 ! 32: 32 00000d58 * L221: ! 33: 33 00000d58 * 204D554C4C3200 .ascii " MULL2\0" ! 34: 34 00000d5f * .text ! 35: 35 00023F49 dd 8f00000d58 pushl $L221 ! 36: 36 00023F4F fe 08 efffffffde callf $8,_writes ! 37: 37 00023F56 # } ! 38: 38 00023F56 # mull2_1(); /* register data / SGL acc. */ ! 39: 39 00023F56 L219: ! 40: 40 00023F56 fe 04 ef0000002d callf $4,_mull2_1 ! 41: 41 00023F5D # mull2_2(); /* memory data / DBL acc. */ ! 42: 42 00023F5D fe 04 ef000001d2 callf $4,_mull2_2 ! 43: 43 00023F64 # mull2_3(); /* register corruption test */ ! 44: 44 00023F64 fe 04 ef000003db callf $4,_mull2_3 ! 45: 45 00023F6B # mull2_4(); /* PSL corruption test */ ! 46: 46 00023F6B fe 04 ef0000056a callf $4,_mull2_4 ! 47: 47 00023F72 # mull2_5(); /* pipelined entry test */ ! 48: 48 00023F72 fe 04 ef0000070d callf $4,_mull2_5 ! 49: 49 00023F79 # mull2_6(); /* pipelined exit test */ ! 50: 50 00023F79 fe 04 ef000008d8 callf $4,_mull2_6 ! 51: 51 00023F80 # asm("jmp *return"); /* return to the test monitor */ ! 52: 52 00023F80 71 ffffffffae jmp *return ! 53: 53 00023F86 # } ! 54: 54 00023F86 40 ret#2 ! 55: 55 00023F87 .set L215,0x0 ! 56: 56 00023F87 L217: ! 57: 57 00023F87 11 af jbr L218 ! 58: 58 00023F89 .data ! 59: 59 00000d58 * .text ! 60: 60 00023F89 00 .align 1 ! 61: 61 00023F8A .globl _mull2_1 ! 62: 62 00023F8A _mull2_1: ! 63: 63 00023F8A 0000 .word L228 ! 64: 64 00023F8C # ! 65: 65 00023F8C # ! 66: 66 00023F8C # ! 67: 67 00023F8C # /************************************************************************ ! 68: 68 00023F8C # * ! 69: 69 00023F8C # * SUBTEST 1 - register addressing / single precsion accumulator ! 70: 70 00023F8C # * ! 71: 71 00023F8C # ************************************************************************/ ! 72: 72 00023F8C # mull2_1() ! 73: 73 00023F8C # { ! 74: 74 00023F8C 13 01a4 jbr L230 ! 75: 75 00023F8F L231: ! 76: 76 00023F8F # force_loop = FALSE; ! 77: 77 00023F8F 4d efffffff9f clrl _force_loop ! 78: 78 00023F95 # subtest = 1; ! 79: 79 00023F95 0d 01 efffffff98 movl $1,_subtest ! 80: 80 00023F9C # for( index = 0; index < max_mull_1_index; index++ ) { ! 81: 81 00023F9C 4d efffffff92 clrl _index ! 82: 82 00023FA2 L234: ! 83: 83 00023FA2 1d efffffff8c efffffff87 cmpl _index,_max_mull_1_index ! 84: 84 00023FAD 91 03 13 0180 jgeq L233 ! 85: 85 00023FB2 # sgl_value_1 = mull_1_data[index].op_1; /* get operand 1 */ ! 86: 86 00023FB2 5c 0c efffffff7b 50 mull3 $12,_index,r0 ! 87: 87 00023FBA 0d e000000000 efffffff6f movl _mull_1_data(r0),_sgl_value_1 ! 88: 88 00023FC5 # sgl_value_2 = mull_1_data[index].op_2; /* get operand 2 */ ! 89: 89 00023FC5 5c 0c efffffff68 50 mull3 $12,_index,r0 ! 90: 90 00023FCD 0d e000000004 efffffff5c movl _mull_1_data+4(r0),_sgl_value_2 ! 91: 91 00023FD8 # sgl_value_4 = mull_1_data[index].exp; /* get expected results */ ! 92: 92 00023FD8 5c 0c efffffff55 50 mull3 $12,_index,r0 ! 93: 93 00023FE0 0d e000000008 efffffff49 movl _mull_1_data+8(r0),_sgl_value_4 ! 94: 94 00023FEB # sgl_ld_acc = 0x12345678; /* set acc data pattern */ ! 95: 95 00023FEB 0d 8f12345678 efffffff3e movl $305419896,_sgl_ld_acc ! 96: 96 00023FF6 # sgl_expected = sgl_ld_acc; /* final Acc expected */ ! 97: 97 00023FF6 0d efffffff38 efffffff33 movl _sgl_ld_acc,_sgl_expected ! 98: 98 00024001 # /* ! 99: 99 00024001 # * If LOOP ON ERROR is set, this is the loop for this subtest. ! 100: 100 00024001 # */ ! 101: 101 00024001 # asm("_mull2_1_lp1:"); ! 102: 102 00024001 _mull2_1_lp1: ! 103: 103 00024001 # asm("movl _sgl_value_1,r3"); /* move the 1st data to r3 */ ! 104: 104 00024001 0d efffffff2d 53 movl _sgl_value_1,r3 ! 105: 105 00024008 # asm("movl _sgl_value_2,r4"); /* move the 2nd data to r4 */ ! 106: 106 00024008 0d efffffff26 54 movl _sgl_value_2,r4 ! 107: 107 0002400F # asm("movl _sgl_ld_acc,r5"); /* move the acc data to r5 */ ! 108: 108 0002400F 0d efffffff1f 55 movl _sgl_ld_acc,r5 ! 109: 109 00024016 # asm("ldf r5"); /* load the acc */ ! 110: 110 00024016 06 55 ldf r5 ! 111: 111 00024018 # asm("mull2 r3,r4"); /* do the multiply */ ! 112: 112 00024018 4c 53 54 mull2 r3,r4 ! 113: 113 0002401B # asm("nop"); ! 114: 114 0002401B 10 nop ! 115: 115 0002401C # asm("stf _sgl_st_acc"); /* save the acc */ ! 116: 116 0002401C 26 efffffff12 stf _sgl_st_acc ! 117: 117 00024022 # if( force_loop ) ! 118: 118 00024022 5d efffffff0c tstl _force_loop ! 119: 119 00024028 31 02 jeql L235 ! 120: 120 0002402A # asm("brb _mull2_1_lp1");; ! 121: 121 0002402A 11 d5 brb _mull2_1_lp1 ! 122: 122 0002402C L235: ! 123: 123 0002402C # asm("movl r4,_sgl_value_3"); ! 124: 124 0002402C 0d 54 efffffff01 movl r4,_sgl_value_3 ! 125: 125 00024033 # if( sgl_expected != sgl_st_acc ) { /* COMPARE the values */ ! 126: 126 00024033 1d effffffefb effffffef6 cmpl _sgl_expected,_sgl_st_acc ! 127: 127 0002403E 21 03 13 0098 jeql L236 ! 128: 128 00024043 # errcnt++; /* bump the error count */ ! 129: 129 00024043 6d effffffeeb incl _errcnt ! 130: 130 00024049 # if ( prt_error ) { ! 131: 131 00024049 5d effffffee5 tstl _prt_error ! 132: 132 0002404F 31 64 jeql L237 ! 133: 133 00024051 # print_mull2_error("(Reg. Data) -THE ACC WAS MODIFIED"); ! 134: 134 00024051 .data 1 ! 135: 135 00000d5f * L239: ! 136: 136 00000d5f * 285265672E204461746129202 .ascii "(Reg. Data) -THE ACC WAS MODIFIED\0" ! 137: D544845204143432057415320 ! 138: 4D4F44494649454400 ! 139: 137 00000d81 * .text ! 140: 138 00024051 dd 8f00000d5f pushl $L239 ! 141: 139 00024057 fe 08 ef000009cc callf $8,_print_mull2_error ! 142: 140 0002405E # writes("initial Acc = "); ! 143: 141 0002405E .data 1 ! 144: 142 00000d81 * L240: ! 145: 143 00000d81 * 696E697469616C20416363203 .ascii "initial Acc = \0" ! 146: D2000 ! 147: 144 00000d90 * .text ! 148: 145 0002405E dd 8f00000d81 pushl $L240 ! 149: 146 00024064 fe 08 effffffec9 callf $8,_writes ! 150: 147 0002406B # write32h( sgl_ld_acc ); ! 151: 148 0002406B dd effffffec3 pushl _sgl_ld_acc ! 152: 149 00024071 fe 08 effffffebc callf $8,_write32h ! 153: 150 00024078 # writes(", final Acc = "); ! 154: 151 00024078 .data 1 ! 155: 152 00000d90 * L242: ! 156: 153 00000d90 * 2C202020202066696E616C204 .ascii ", final Acc = \0" ! 157: 16363203D2000 ! 158: 154 00000da3 * .text ! 159: 155 00024078 dd 8f00000d90 pushl $L242 ! 160: 156 0002407E fe 08 effffffeaf callf $8,_writes ! 161: 157 00024085 # write32h( sgl_st_acc ); ! 162: 158 00024085 dd effffffea9 pushl _sgl_st_acc ! 163: 159 0002408B fe 08 effffffea2 callf $8,_write32h ! 164: 160 00024092 # writes("\n expected Acc = "); ! 165: 161 00024092 .data 1 ! 166: 162 00000da3 * L243: ! 167: 163 00000da3 * 0A20202020202020202020202 .ascii "\12 expected Acc = \0" ! 168: 0202020202020202020202020 ! 169: 2065787065637465642041636 ! 170: 3203D2000 ! 171: 164 00000dcd * .text ! 172: 165 00024092 dd 8f00000da3 pushl $L243 ! 173: 166 00024098 fe 08 effffffe95 callf $8,_writes ! 174: 167 0002409F # write32h( sgl_expected ); ! 175: 168 0002409F dd effffffe8f pushl _sgl_expected ! 176: 169 000240A5 fe 08 effffffe88 callf $8,_write32h ! 177: 170 000240AC # writec('\n'); ! 178: 171 000240AC dd 0a pushl $10 ! 179: 172 000240AE fe 08 effffffe7f callf $8,_writec ! 180: 173 000240B5 # } ! 181: 174 000240B5 # if ( halt_flg ) /* halt on error? */ ! 182: 175 000240B5 L237: ! 183: 176 000240B5 5d effffffe79 tstl _halt_flg ! 184: 177 000240BB 31 09 jeql L245 ! 185: 178 000240BD # mull2_halt( 4 ); ! 186: 179 000240BD dd 04 pushl $4 ! 187: 180 000240BF fe 08 ef00000a6a callf $8,_mull2_halt ! 188: 181 000240C6 # if ( loop_on_err ) { ! 189: 182 000240C6 L245: ! 190: 183 000240C6 5d effffffe68 tstl _loop_on_err ! 191: 184 000240CC 31 0d jeql L247 ! 192: 185 000240CE # force_loop = TRUE; /* set the force loop flag */ ! 193: 186 000240CE 0d 01 effffffe5f movl $1,_force_loop ! 194: 187 000240D5 # asm("jmp _mull2_1_lp1"); /* and loop */ ! 195: 188 000240D5 71 efffffff26 jmp _mull2_1_lp1 ! 196: 189 000240DB # } /* end of loop-on-error */ ! 197: 190 000240DB # } /* end of acc corr error */ ! 198: 191 000240DB L247: ! 199: 192 000240DB # if( sgl_value_4 != sgl_value_3 ) /* COMPARE the values */ ! 200: 193 000240DB L236: ! 201: 194 000240DB 1d effffffe53 effffffe4e cmpl _sgl_value_4,_sgl_value_3 ! 202: 195 000240E6 31 41 jeql L248 ! 203: 196 000240E8 # { ! 204: 197 000240E8 # errcnt++; /* bump the error count */ ! 205: 198 000240E8 6d effffffe46 incl _errcnt ! 206: 199 000240EE # if ( prt_error ) { ! 207: 200 000240EE 5d effffffe40 tstl _prt_error ! 208: 201 000240F4 31 0d jeql L249 ! 209: 202 000240F6 # print_mull2_error("(Reg. Data) -BAD MULTIPLY RESULT"); ! 210: 203 000240F6 .data 1 ! 211: 204 00000dcd * L250: ! 212: 205 00000dcd * 285265672E204461746129202 .ascii "(Reg. Data) -BAD MULTIPLY RESULT\0" ! 213: D424144204D554C5449504C59 ! 214: 20524553554C5400 ! 215: 206 00000dee * .text ! 216: 207 000240F6 dd 8f00000dcd pushl $L250 ! 217: 208 000240FC fe 08 ef00000927 callf $8,_print_mull2_error ! 218: 209 00024103 # } ! 219: 210 00024103 # if ( halt_flg ) /* halt on error? */ ! 220: 211 00024103 L249: ! 221: 212 00024103 5d effffffe2b tstl _halt_flg ! 222: 213 00024109 31 09 jeql L251 ! 223: 214 0002410B # mull2_halt( 1 ); ! 224: 215 0002410B dd 01 pushl $1 ! 225: 216 0002410D fe 08 ef00000a1c callf $8,_mull2_halt ! 226: 217 00024114 # if ( loop_on_err ) { ! 227: 218 00024114 L251: ! 228: 219 00024114 5d effffffe1a tstl _loop_on_err ! 229: 220 0002411A 31 0d jeql L252 ! 230: 221 0002411C # force_loop = TRUE; /* set the force loop flag */ ! 231: 222 0002411C 0d 01 effffffe11 movl $1,_force_loop ! 232: 223 00024123 # asm("jmp _mull2_1_lp1"); /* and loop */ ! 233: 224 00024123 71 effffffed8 jmp _mull2_1_lp1 ! 234: 225 00024129 # } /* end of loop-on-error */ ! 235: 226 00024129 # } /* end of multiply error */ ! 236: 227 00024129 L252: ! 237: 228 00024129 # } ! 238: 229 00024129 L248: ! 239: 230 00024129 L232: ! 240: 231 00024129 6d effffffe05 incl _index ! 241: 232 0002412F 13 fe70 jbr L234 ! 242: 233 00024132 L233: ! 243: 234 00024132 # } /* end of subtest 1 */ ! 244: 235 00024132 40 ret#2 ! 245: 236 00024133 .set L228,0x0 ! 246: 237 00024133 L230: ! 247: 238 00024133 13 fe59 jbr L231 ! 248: 239 00024136 .data ! 249: 240 00000d58 * .text ! 250: 241 00024136 .align 1 ! 251: 242 00024136 .globl _mull2_2 ! 252: 243 00024136 _mull2_2: ! 253: 244 00024136 0000 .word L253 ! 254: 245 00024138 # ! 255: 246 00024138 # ! 256: 247 00024138 # ! 257: 248 00024138 # /************************************************************************ ! 258: 249 00024138 # * ! 259: 250 00024138 # * SUBTEST 2 - cache addressing / double precsion accumulator ! 260: 251 00024138 # * ! 261: 252 00024138 # ************************************************************************/ ! 262: 253 00024138 # mull2_2() ! 263: 254 00024138 # { ! 264: 255 00024138 13 0207 jbr L255 ! 265: 256 0002413B L256: ! 266: 257 0002413B # force_loop = FALSE; ! 267: 258 0002413B 4d effffffdf3 clrl _force_loop ! 268: 259 00024141 # subtest = 2; ! 269: 260 00024141 0d 02 effffffdec movl $2,_subtest ! 270: 261 00024148 # for( index = 0; index < max_mull_1_index; index++ ) { ! 271: 262 00024148 4d effffffde6 clrl _index ! 272: 263 0002414E L259: ! 273: 264 0002414E 1d effffffde0 effffffddb cmpl _index,_max_mull_1_index ! 274: 265 00024159 91 03 13 01e3 jgeq L258 ! 275: 266 0002415E # sgl_value_1 = mull_1_data[index].op_1; /* get operand 1 */ ! 276: 267 0002415E 5c 0c effffffdcf 50 mull3 $12,_index,r0 ! 277: 268 00024166 0d e000000000 effffffdc3 movl _mull_1_data(r0),_sgl_value_1 ! 278: 269 00024171 # sgl_value_2 = mull_1_data[index].op_2; /* get operand 2 */ ! 279: 270 00024171 5c 0c effffffdbc 50 mull3 $12,_index,r0 ! 280: 271 00024179 0d e000000004 effffffdb0 movl _mull_1_data+4(r0),_sgl_value_2 ! 281: 272 00024184 # sgl_value_4 = mull_1_data[index].exp; /* get expected results */ ! 282: 273 00024184 5c 0c effffffda9 50 mull3 $12,_index,r0 ! 283: 274 0002418C 0d e000000008 effffffd9d movl _mull_1_data+8(r0),_sgl_value_4 ! 284: 275 00024197 # dbl_ld_acc.m = 0x12345678; /* set acc data pattern */ ! 285: 276 00024197 0d 8f12345678 effffffd92 movl $305419896,_dbl_ld_acc ! 286: 277 000241A2 # dbl_ld_acc.l = 0x9abcdef0; ! 287: 278 000241A2 0d 8f9abcdef0 effffffd8b movl $-1698898192,_dbl_ld_acc+4 ! 288: 279 000241AD # dbl_expected.m = dbl_ld_acc.m; /* final Acc expected */ ! 289: 280 000241AD 0d effffffd81 effffffd7c movl _dbl_ld_acc,_dbl_expected ! 290: 281 000241B8 # dbl_expected.l = dbl_ld_acc.l; ! 291: 282 000241B8 0d effffffd7a effffffd75 movl _dbl_ld_acc+4,_dbl_expected+4 ! 292: 283 000241C3 # /* ! 293: 284 000241C3 # * If LOOP ON ERROR is set, this is the loop for this subtest. ! 294: 285 000241C3 # */ ! 295: 286 000241C3 # asm("_mull2_2_lp1:"); ! 296: 287 000241C3 _mull2_2_lp1: ! 297: 288 000241C3 # sgl_value_3 = sgl_value_2; /* set initial op 2 data */ ! 298: 289 000241C3 0d effffffd6b effffffd66 movl _sgl_value_2,_sgl_value_3 ! 299: 290 000241CE # asm("ldd _dbl_ld_acc"); /* load the acc */ ! 300: 291 000241CE 07 effffffd60 ldd _dbl_ld_acc ! 301: 292 000241D4 # asm("mull2 _sgl_value_1,_sgl_value_3"); /* multiply the integers */ ! 302: 293 000241D4 4c effffffd5a effffffd55 mull2 _sgl_value_1,_sgl_value_3 ! 303: 294 000241DF # asm("nop"); ! 304: 295 000241DF 10 nop ! 305: 296 000241E0 # asm("std _dbl_st_acc"); /* save the acc */ ! 306: 297 000241E0 27 effffffd4e std _dbl_st_acc ! 307: 298 000241E6 # if( force_loop ) ! 308: 299 000241E6 5d effffffd48 tstl _force_loop ! 309: 300 000241EC 31 02 jeql L260 ! 310: 301 000241EE # asm("brb _mull2_2_lp1");; ! 311: 302 000241EE 11 d3 brb _mull2_2_lp1 ! 312: 303 000241F0 L260: ! 313: 304 000241F0 # if( (dbl_expected.m != dbl_st_acc.m) || /* COMPARE the Acc */ ! 314: 305 000241F0 # (dbl_expected.l != dbl_st_acc.l) ) { ! 315: 306 000241F0 1d effffffd3e effffffd39 cmpl _dbl_expected,_dbl_st_acc ! 316: 307 000241FB 21 10 jneq L9999 ! 317: 308 000241FD 1d effffffd35 effffffd30 cmpl _dbl_expected+4,_dbl_st_acc+4 ! 318: 309 00024208 21 03 13 00dd jeql L261 ! 319: 310 0002420D L9999: ! 320: 311 0002420D # errcnt++; /* bump the error count */ ! 321: 312 0002420D 6d effffffd21 incl _errcnt ! 322: 313 00024213 # if ( prt_error ) { ! 323: 314 00024213 5d effffffd1b tstl _prt_error ! 324: 315 00024219 21 03 13 00a6 jeql L262 ! 325: 316 0002421E # print_mull2_error("(Memory data) -THE ACC WAS MODIFIED"); ! 326: 317 0002421E .data 1 ! 327: 318 00000dee * L263: ! 328: 319 00000dee * 284D656D6F727920646174612 .ascii "(Memory data) -THE ACC WAS MODIFIED\0" ! 329: 9202D54484520414343205741 ! 330: 53204D4F44494649454400 ! 331: 320 00000e12 * .text ! 332: 321 0002421E dd 8f00000dee pushl $L263 ! 333: 322 00024224 fe 08 ef000007ff callf $8,_print_mull2_error ! 334: 323 0002422B # writes("initial Acc = "); ! 335: 324 0002422B .data 1 ! 336: 325 00000e12 * L264: ! 337: 326 00000e12 * 696E697469616C20416363203 .ascii "initial Acc = \0" ! 338: D2000 ! 339: 327 00000e21 * .text ! 340: 328 0002422B dd 8f00000e12 pushl $L264 ! 341: 329 00024231 fe 08 effffffcfc callf $8,_writes ! 342: 330 00024238 # write32h( dbl_ld_acc.m ); ! 343: 331 00024238 dd effffffcf6 pushl _dbl_ld_acc ! 344: 332 0002423E fe 08 effffffcef callf $8,_write32h ! 345: 333 00024245 # writec(' '); ! 346: 334 00024245 dd 20 pushl $32 ! 347: 335 00024247 fe 08 effffffce6 callf $8,_writec ! 348: 336 0002424E # write32h( dbl_ld_acc.l ); ! 349: 337 0002424E dd effffffce4 pushl _dbl_ld_acc+4 ! 350: 338 00024254 fe 08 effffffcd9 callf $8,_write32h ! 351: 339 0002425B # writes(", final Acc = "); ! 352: 340 0002425B .data 1 ! 353: 341 00000e21 * L265: ! 354: 342 00000e21 * 2C202020202066696E616C204 .ascii ", final Acc = \0" ! 355: 16363203D2000 ! 356: 343 00000e34 * .text ! 357: 344 0002425B dd 8f00000e21 pushl $L265 ! 358: 345 00024261 fe 08 effffffccc callf $8,_writes ! 359: 346 00024268 # write32h( dbl_st_acc.m ); ! 360: 347 00024268 dd effffffcc6 pushl _dbl_st_acc ! 361: 348 0002426E fe 08 effffffcbf callf $8,_write32h ! 362: 349 00024275 # writec(' '); ! 363: 350 00024275 dd 20 pushl $32 ! 364: 351 00024277 fe 08 effffffcb6 callf $8,_writec ! 365: 352 0002427E # write32h( dbl_st_acc.l ); ! 366: 353 0002427E dd effffffcb4 pushl _dbl_st_acc+4 ! 367: 354 00024284 fe 08 effffffca9 callf $8,_write32h ! 368: 355 0002428B # writes("\n expected Acc = "); ! 369: 356 0002428B .data 1 ! 370: 357 00000e34 * L266: ! 371: 358 00000e34 * 0A20202020202020202020202 .ascii "\12 expected Acc = \0" ! 372: 0202020202020202020202020 ! 373: 2020202020202020202065787 ! 374: 0656374656420416363203D20 ! 375: 00 ! 376: 359 00000e67 * .text ! 377: 360 0002428B dd 8f00000e34 pushl $L266 ! 378: 361 00024291 fe 08 effffffc9c callf $8,_writes ! 379: 362 00024298 # write32h( dbl_expected.m ); ! 380: 363 00024298 dd effffffc96 pushl _dbl_expected ! 381: 364 0002429E fe 08 effffffc8f callf $8,_write32h ! 382: 365 000242A5 # writec(' '); ! 383: 366 000242A5 dd 20 pushl $32 ! 384: 367 000242A7 fe 08 effffffc86 callf $8,_writec ! 385: 368 000242AE # write32h( dbl_expected.l ); ! 386: 369 000242AE dd effffffc84 pushl _dbl_expected+4 ! 387: 370 000242B4 fe 08 effffffc79 callf $8,_write32h ! 388: 371 000242BB # writec('\n'); ! 389: 372 000242BB dd 0a pushl $10 ! 390: 373 000242BD fe 08 effffffc70 callf $8,_writec ! 391: 374 000242C4 # } ! 392: 375 000242C4 # if ( halt_flg ) /* halt on error? */ ! 393: 376 000242C4 L262: ! 394: 377 000242C4 5d effffffc6a tstl _halt_flg ! 395: 378 000242CA 31 09 jeql L267 ! 396: 379 000242CC # mull2_halt( 4 ); ! 397: 380 000242CC dd 04 pushl $4 ! 398: 381 000242CE fe 08 ef0000085b callf $8,_mull2_halt ! 399: 382 000242D5 # if ( loop_on_err ) { ! 400: 383 000242D5 L267: ! 401: 384 000242D5 5d effffffc59 tstl _loop_on_err ! 402: 385 000242DB 31 0d jeql L268 ! 403: 386 000242DD # force_loop = TRUE; /* set the force loop flag */ ! 404: 387 000242DD 0d 01 effffffc50 movl $1,_force_loop ! 405: 388 000242E4 # asm("jmp _mull2_2_lp1"); /* and loop */ ! 406: 389 000242E4 71 effffffed9 jmp _mull2_2_lp1 ! 407: 390 000242EA # } /* end of loop-on-error */ ! 408: 391 000242EA # } /* end of acc corr error */ ! 409: 392 000242EA L268: ! 410: 393 000242EA # if( sgl_value_4 != sgl_value_3 ) /* COMPARE the values */ ! 411: 394 000242EA L261: ! 412: 395 000242EA 1d effffffc44 effffffc3f cmpl _sgl_value_4,_sgl_value_3 ! 413: 396 000242F5 31 41 jeql L269 ! 414: 397 000242F7 # { ! 415: 398 000242F7 # errcnt++; /* bump the error count */ ! 416: 399 000242F7 6d effffffc37 incl _errcnt ! 417: 400 000242FD # if ( prt_error ) { ! 418: 401 000242FD 5d effffffc31 tstl _prt_error ! 419: 402 00024303 31 0d jeql L270 ! 420: 403 00024305 # print_mull2_error("(Memory data) -BAD MULTIPLY RESULT"); ! 421: 404 00024305 .data 1 ! 422: 405 00000e67 * L271: ! 423: 406 00000e67 * 284D656D6F727920646174612 .ascii "(Memory data) -BAD MULTIPLY RESULT\0" ! 424: 9202D424144204D554C544950 ! 425: 4C5920524553554C5400 ! 426: 407 00000e8a * .text ! 427: 408 00024305 dd 8f00000e67 pushl $L271 ! 428: 409 0002430B fe 08 ef00000718 callf $8,_print_mull2_error ! 429: 410 00024312 # } ! 430: 411 00024312 # if ( halt_flg ) /* halt on error? */ ! 431: 412 00024312 L270: ! 432: 413 00024312 5d effffffc1c tstl _halt_flg ! 433: 414 00024318 31 09 jeql L272 ! 434: 415 0002431A # mull2_halt( 1 ); ! 435: 416 0002431A dd 01 pushl $1 ! 436: 417 0002431C fe 08 ef0000080d callf $8,_mull2_halt ! 437: 418 00024323 # if ( loop_on_err ) { ! 438: 419 00024323 L272: ! 439: 420 00024323 5d effffffc0b tstl _loop_on_err ! 440: 421 00024329 31 0d jeql L273 ! 441: 422 0002432B # force_loop = TRUE; /* set the force loop flag */ ! 442: 423 0002432B 0d 01 effffffc02 movl $1,_force_loop ! 443: 424 00024332 # asm("jmp _mull2_2_lp1"); /* and loop */ ! 444: 425 00024332 71 effffffe8b jmp _mull2_2_lp1 ! 445: 426 00024338 # } /* end of loop-on-error */ ! 446: 427 00024338 # } /* end of multiply error */ ! 447: 428 00024338 L273: ! 448: 429 00024338 # } ! 449: 430 00024338 L269: ! 450: 431 00024338 L257: ! 451: 432 00024338 6d effffffbf6 incl _index ! 452: 433 0002433E 13 fe0d jbr L259 ! 453: 434 00024341 L258: ! 454: 435 00024341 # } /* end of subtest 2 */ ! 455: 436 00024341 40 ret#2 ! 456: 437 00024342 .set L253,0x0 ! 457: 438 00024342 L255: ! 458: 439 00024342 13 fdf6 jbr L256 ! 459: 440 00024345 .data ! 460: 441 00000d58 * .text ! 461: 442 00024345 00 .align 1 ! 462: 443 00024346 .globl _mull2_3 ! 463: 444 00024346 _mull2_3: ! 464: 445 00024346 0000 .word L274 ! 465: 446 00024348 # ! 466: 447 00024348 # ! 467: 448 00024348 # ! 468: 449 00024348 # /************************************************************************ ! 469: 450 00024348 # * ! 470: 451 00024348 # * SUBTEST 3 - register corruption test ! 471: 452 00024348 # * ! 472: 453 00024348 # ************************************************************************/ ! 473: 454 00024348 # mull2_3() ! 474: 455 00024348 # { ! 475: 456 00024348 13 018e jbr L276 ! 476: 457 0002434B L277: ! 477: 458 0002434B # force_loop = FALSE; ! 478: 459 0002434B 4d effffffbe3 clrl _force_loop ! 479: 460 00024351 # subtest = 3; ! 480: 461 00024351 0d 03 effffffbdc movl $3,_subtest ! 481: 462 00024358 # fill_reg_buf( load_regs ); /* get pattern for registers */ ! 482: 463 00024358 dd 8f00000000 pushl $_load_regs ! 483: 464 0002435E fe 08 effffffbcf callf $8,_fill_reg_buf ! 484: 465 00024365 # for( index = 0; index < max_mull_1_index; index++ ) { ! 485: 466 00024365 4d effffffbc9 clrl _index ! 486: 467 0002436B L281: ! 487: 468 0002436B 1d effffffbc3 effffffbbe cmpl _index,_max_mull_1_index ! 488: 469 00024376 91 03 13 015d jgeq L280 ! 489: 470 0002437B # sgl_value_1 = mull_1_data[index].op_1; /* get operand 1 */ ! 490: 471 0002437B 5c 0c effffffbb2 50 mull3 $12,_index,r0 ! 491: 472 00024383 0d e000000000 effffffba6 movl _mull_1_data(r0),_sgl_value_1 ! 492: 473 0002438E # sgl_value_2 = mull_1_data[index].op_2; /* get operand 2 */ ! 493: 474 0002438E 5c 0c effffffb9f 50 mull3 $12,_index,r0 ! 494: 475 00024396 0d e000000004 effffffb93 movl _mull_1_data+4(r0),_sgl_value_2 ! 495: 476 000243A1 # sgl_value_4 = mull_1_data[index].exp; /* get expected results */ ! 496: 477 000243A1 5c 0c effffffb8c 50 mull3 $12,_index,r0 ! 497: 478 000243A9 0d e000000008 effffffb80 movl _mull_1_data+8(r0),_sgl_value_4 ! 498: 479 000243B4 # /* ! 499: 480 000243B4 # * If LOOP ON ERROR is set, this is the loop for this subtest. ! 500: 481 000243B4 # */ ! 501: 482 000243B4 # asm("_mull2_3_lp1:"); ! 502: 483 000243B4 _mull2_3_lp1: ! 503: 484 000243B4 # sgl_value_3 = sgl_value_2; /* set operand 2 */ ! 504: 485 000243B4 0d effffffb7a effffffb75 movl _sgl_value_2,_sgl_value_3 ! 505: 486 000243BF # asm("loadr $0x1fff,_load_regs"); /* load regs 0 - 12 */ ! 506: 487 000243BF ab 891fff effffffb6c loadr $0x1fff,_load_regs ! 507: 488 000243C8 # asm("mull2 _sgl_value_1,_sgl_value_3");/* do the multiply */ ! 508: 489 000243C8 4c effffffb66 effffffb61 mull2 _sgl_value_1,_sgl_value_3 ! 509: 490 000243D3 # asm("nop"); ! 510: 491 000243D3 10 nop ! 511: 492 000243D4 # asm("storer $0x1fff,_store_regs"); /* store regs 0 - 12 */ ! 512: 493 000243D4 bb 891fff effffffb57 storer $0x1fff,_store_regs ! 513: 494 000243DD # if( force_loop ) ! 514: 495 000243DD 5d effffffb51 tstl _force_loop ! 515: 496 000243E3 31 02 jeql L282 ! 516: 497 000243E5 # asm("brb _mull2_3_lp1"); ! 517: 498 000243E5 11 cd brb _mull2_3_lp1 ! 518: 499 000243E7 # /* ! 519: 500 000243E7 # * Now check the result ! 520: 501 000243E7 # */ ! 521: 502 000243E7 # index2 = 0; ! 522: 503 000243E7 L282: ! 523: 504 000243E7 4d effffffb47 clrl _index2 ! 524: 505 000243ED # while( (load_regs[index2] == store_regs[index2]) && (index2 < 13) ) ! 525: 506 000243ED L283: ! 526: 507 000243ED 0d effffffb41 50 movl _index2,r0 ! 527: 508 000243F4 0d effffffb3a 51 movl _index2,r1 ! 528: 509 000243FB 1d 40effffffb32 cmpl _load_regs[r0],_store_regs[r1] ! 529: 41effffffb2c ! 530: 510 00024408 21 11 jneq L284 ! 531: 511 0002440A 1d effffffb24 0d cmpl _index2,$13 ! 532: 512 00024411 81 08 jgeq L284 ! 533: 513 00024413 # index2++; /* check reg values */ ! 534: 514 00024413 6d effffffb1b incl _index2 ! 535: 515 00024419 11 d2 jbr L283 ! 536: 516 0002441B L284: ! 537: 517 0002441B # if( index2 < 13 ) { /* error if index2 < 13 */ ! 538: 518 0002441B 1d effffffb13 0d cmpl _index2,$13 ! 539: 519 00024422 91 03 13 00a8 jgeq L285 ! 540: 520 00024427 # errcnt++; /* bump the error count */ ! 541: 521 00024427 6d effffffb07 incl _errcnt ! 542: 522 0002442D # if ( prt_error ) { ! 543: 523 0002442D 5d effffffb01 tstl _prt_error ! 544: 524 00024433 31 74 jeql L286 ! 545: 525 00024435 # print_mull2_error(" -A REGISTER WAS MODIFIED"); ! 546: 526 00024435 .data 1 ! 547: 527 00000e8a * L287: ! 548: 528 00000e8a * 202D412052454749535445522 .ascii " -A REGISTER WAS MODIFIED\0" ! 549: 0574153204D4F444946494544 ! 550: 00 ! 551: 529 00000ea4 * .text ! 552: 530 00024435 dd 8f00000e8a pushl $L287 ! 553: 531 0002443B fe 08 ef000005e8 callf $8,_print_mull2_error ! 554: 532 00024442 # writes("register "); ! 555: 533 00024442 .data 1 ! 556: 534 00000ea4 * L288: ! 557: 535 00000ea4 * 72656769737465722000 .ascii "register \0" ! 558: 536 00000eae * .text ! 559: 537 00024442 dd 8f00000ea4 pushl $L288 ! 560: 538 00024448 fe 08 effffffae5 callf $8,_writes ! 561: 539 0002444F # writeh( index2 ); ! 562: 540 0002444F dd effffffadf pushl _index2 ! 563: 541 00024455 fe 08 effffffad8 callf $8,_writeh ! 564: 542 0002445C # writes(" = "); ! 565: 543 0002445C .data 1 ! 566: 544 00000eae * L290: ! 567: 545 00000eae * 203D2000 .ascii " = \0" ! 568: 546 00000eb2 * .text ! 569: 547 0002445C dd 8f00000eae pushl $L290 ! 570: 548 00024462 fe 08 effffffacb callf $8,_writes ! 571: 549 00024469 # write32h( store_regs[index2] ); ! 572: 550 00024469 0d effffffac5 50 movl _index2,r0 ! 573: 551 00024470 dd 40effffffabd pushl _store_regs[r0] ! 574: 552 00024477 fe 08 effffffab6 callf $8,_write32h ! 575: 553 0002447E # writes(", should be = "); ! 576: 554 0002447E .data 1 ! 577: 555 00000eb2 * L291: ! 578: 556 00000eb2 * 2C202073686F756C642062652 .ascii ", should be = \0" ! 579: 03D2000 ! 580: 557 00000ec2 * .text ! 581: 558 0002447E dd 8f00000eb2 pushl $L291 ! 582: 559 00024484 fe 08 effffffaa9 callf $8,_writes ! 583: 560 0002448B # write32h( load_regs[index2] ); ! 584: 561 0002448B 0d effffffaa3 50 movl _index2,r0 ! 585: 562 00024492 dd 40effffffa9b pushl _load_regs[r0] ! 586: 563 00024499 fe 08 effffffa94 callf $8,_write32h ! 587: 564 000244A0 # writec('\n'); ! 588: 565 000244A0 dd 0a pushl $10 ! 589: 566 000244A2 fe 08 effffffa8b callf $8,_writec ! 590: 567 000244A9 # } ! 591: 568 000244A9 # if ( halt_flg ) /* halt on error? */ ! 592: 569 000244A9 L286: ! 593: 570 000244A9 5d effffffa85 tstl _halt_flg ! 594: 571 000244AF 31 09 jeql L292 ! 595: 572 000244B1 # mull2_halt( 2 ); ! 596: 573 000244B1 dd 02 pushl $2 ! 597: 574 000244B3 fe 08 ef00000676 callf $8,_mull2_halt ! 598: 575 000244BA # if ( loop_on_err ) { ! 599: 576 000244BA L292: ! 600: 577 000244BA 5d effffffa74 tstl _loop_on_err ! 601: 578 000244C0 31 0d jeql L293 ! 602: 579 000244C2 # force_loop = TRUE; /* set the force loop flag */ ! 603: 580 000244C2 0d 01 effffffa6b movl $1,_force_loop ! 604: 581 000244C9 # asm("jmp _mull2_3_lp1"); /* and loop */ ! 605: 582 000244C9 71 effffffee5 jmp _mull2_3_lp1 ! 606: 583 000244CF # }; /* end of loop-on-error */ ! 607: 584 000244CF L293: ! 608: 585 000244CF # } /* end of multiply error */ ! 609: 586 000244CF # } ! 610: 587 000244CF L285: ! 611: 588 000244CF L279: ! 612: 589 000244CF 6d effffffa5f incl _index ! 613: 590 000244D5 13 fe93 jbr L281 ! 614: 591 000244D8 L280: ! 615: 592 000244D8 # } /* end of subtest 3 */ ! 616: 593 000244D8 40 ret#2 ! 617: 594 000244D9 .set L274,0x0 ! 618: 595 000244D9 L276: ! 619: 596 000244D9 13 fe6f jbr L277 ! 620: 597 000244DC .data ! 621: 598 00000d58 * .text ! 622: 599 000244DC .align 1 ! 623: 600 000244DC .globl _mull2_4 ! 624: 601 000244DC _mull2_4: ! 625: 602 000244DC 0000 .word L294 ! 626: 603 000244DE # ! 627: 604 000244DE # ! 628: 605 000244DE # ! 629: 606 000244DE # /************************************************************************ ! 630: 607 000244DE # * ! 631: 608 000244DE # * SUBTEST 4 - PSL corruption test ! 632: 609 000244DE # * ! 633: 610 000244DE # ************************************************************************/ ! 634: 611 000244DE # mull2_4() ! 635: 612 000244DE # { ! 636: 613 000244DE 13 01a2 jbr L296 ! 637: 614 000244E1 L297: ! 638: 615 000244E1 # force_loop = FALSE; ! 639: 616 000244E1 4d effffffa4d clrl _force_loop ! 640: 617 000244E7 # subtest = 4; ! 641: 618 000244E7 0d 04 effffffa46 movl $4,_subtest ! 642: 619 000244EE # status_index = 0; ! 643: 620 000244EE 4d effffffa40 clrl _status_index ! 644: 621 000244F4 # for( index = 0; index < max_mull_1_index; index++ ) { ! 645: 622 000244F4 4d effffffa3a clrl _index ! 646: 623 000244FA L300: ! 647: 624 000244FA 1d effffffa34 effffffa2f cmpl _index,_max_mull_1_index ! 648: 625 00024505 91 03 13 0178 jgeq L299 ! 649: 626 0002450A # sgl_value_1 = mull_1_data[index].op_1; /* get operand 1 */ ! 650: 627 0002450A 5c 0c effffffa23 50 mull3 $12,_index,r0 ! 651: 628 00024512 0d e000000000 effffffa17 movl _mull_1_data(r0),_sgl_value_1 ! 652: 629 0002451D # sgl_value_2 = mull_1_data[index].op_2; /* get operand 2 */ ! 653: 630 0002451D 5c 0c effffffa10 50 mull3 $12,_index,r0 ! 654: 631 00024525 0d e000000004 effffffa04 movl _mull_1_data+4(r0),_sgl_value_2 ! 655: 632 00024530 # sgl_value_4 = mull_1_data[index].exp; /* get expected results */ ! 656: 633 00024530 5c 0c effffff9fd 50 mull3 $12,_index,r0 ! 657: 634 00024538 0d e000000008 effffff9f1 movl _mull_1_data+8(r0),_sgl_value_4 ! 658: 635 00024543 # sgl_dummy1 = status_array[status_index]; /* status = +, -, 0 */ ! 659: 636 00024543 0d effffff9eb 50 movl _status_index,r0 ! 660: 637 0002454A 0d 40effffff9e3 movl _status_array[r0],_sgl_dummy1 ! 661: effffff9de ! 662: 638 00024556 # /* ! 663: 639 00024556 # * If LOOP ON ERROR is set, this is the loop for this subtest. ! 664: 640 00024556 # */ ! 665: 641 00024556 # asm("_mull2_4_lp1:"); ! 666: 642 00024556 _mull2_4_lp1: ! 667: 643 00024556 # sgl_value_3 = sgl_value_2; /* set operand 2 */ ! 668: 644 00024556 0d effffff9d8 effffff9d3 movl _sgl_value_2,_sgl_value_3 ! 669: 645 00024561 # asm("tstl _sgl_dummy1"); ! 670: 646 00024561 5d effffff9cd tstl _sgl_dummy1 ! 671: 647 00024567 # asm("movpsl _init_psl"); /* save the initial PSL */ ! 672: 648 00024567 cd effffff9c7 movpsl _init_psl ! 673: 649 0002456D # asm("mull2 _sgl_value_1,_sgl_value_3");/* do the multiply */ ! 674: 650 0002456D 4c effffff9c1 effffff9bc mull2 _sgl_value_1,_sgl_value_3 ! 675: 651 00024578 # asm("movpsl _psl_val"); /* save the final PSL */ ! 676: 652 00024578 cd effffff9b6 movpsl _psl_val ! 677: 653 0002457E # if( force_loop ) ! 678: 654 0002457E 5d effffff9b0 tstl _force_loop ! 679: 655 00024584 31 02 jeql L301 ! 680: 656 00024586 # asm("brb _mull2_4_lp1"); ! 681: 657 00024586 11 ce brb _mull2_4_lp1 ! 682: 658 00024588 # /* ! 683: 659 00024588 # * Now check the result ! 684: 660 00024588 # */ ! 685: 661 00024588 # exp_psl = init_psl & 0xffffff3; /* strip off the PSL status */ ! 686: 662 00024588 L301: ! 687: 663 00024588 bc 8f0ffffff3 effffff9a1 andl3 $268435443,_init_psl,r0 ! 688: 50 ! 689: 664 00024594 0d 50 effffff999 movl r0,_exp_psl ! 690: 665 0002459B # if( sgl_value_4 < 0 ) /* check the MULL result */ ! 691: 666 0002459B 5d effffff993 tstl _sgl_value_4 ! 692: 667 000245A1 81 07 jgeq L302 ! 693: 668 000245A3 # exp_psl |= PSL_N; /* set the NEGATIVE bit */ ! 694: 669 000245A3 8c 08 effffff98a orl2 $8,_exp_psl ! 695: 670 000245AA # if( !sgl_value_4 ) ! 696: 671 000245AA L302: ! 697: 672 000245AA 5d effffff984 tstl _sgl_value_4 ! 698: 673 000245B0 21 07 jneq L303 ! 699: 674 000245B2 # exp_psl |= PSL_Z; /* set the ZERO bit */ ! 700: 675 000245B2 8c 04 effffff97b orl2 $4,_exp_psl ! 701: 676 000245B9 # if( psl_val != exp_psl ) { /* was the final PSL correct */ ! 702: 677 000245B9 L303: ! 703: 678 000245B9 1d effffff975 effffff970 cmpl _psl_val,_exp_psl ! 704: 679 000245C4 21 03 13 0098 jeql L304 ! 705: 680 000245C9 # errcnt++; /* bump the error count */ ! 706: 681 000245C9 6d effffff965 incl _errcnt ! 707: 682 000245CF # if ( prt_error ) { ! 708: 683 000245CF 5d effffff95f tstl _prt_error ! 709: 684 000245D5 31 64 jeql L305 ! 710: 685 000245D7 # print_mull2_error(" -INCORRECT FINAL PSL"); ! 711: 686 000245D7 .data 1 ! 712: 687 00000ec2 * L306: ! 713: 688 00000ec2 * 202D494E434F5252454354204 .ascii " -INCORRECT FINAL PSL\0" ! 714: 6494E414C2050534C00 ! 715: 689 00000ed8 * .text ! 716: 690 000245D7 dd 8f00000ec2 pushl $L306 ! 717: 691 000245DD fe 08 ef00000446 callf $8,_print_mull2_error ! 718: 692 000245E4 # writes("initial PSL = "); ! 719: 693 000245E4 .data 1 ! 720: 694 00000ed8 * L307: ! 721: 695 00000ed8 * 696E697469616C2050534C203 .ascii "initial PSL = \0" ! 722: D2000 ! 723: 696 00000ee7 * .text ! 724: 697 000245E4 dd 8f00000ed8 pushl $L307 ! 725: 698 000245EA fe 08 effffff943 callf $8,_writes ! 726: 699 000245F1 # write32h( init_psl ); ! 727: 700 000245F1 dd effffff93d pushl _init_psl ! 728: 701 000245F7 fe 08 effffff936 callf $8,_write32h ! 729: 702 000245FE # writes(", final PSL = "); ! 730: 703 000245FE .data 1 ! 731: 704 00000ee7 * L308: ! 732: 705 00000ee7 * 2C202066696E616C2050534C2 .ascii ", final PSL = \0" ! 733: 03D2000 ! 734: 706 00000ef7 * .text ! 735: 707 000245FE dd 8f00000ee7 pushl $L308 ! 736: 708 00024604 fe 08 effffff929 callf $8,_writes ! 737: 709 0002460B # write32h( psl_val ); ! 738: 710 0002460B dd effffff923 pushl _psl_val ! 739: 711 00024611 fe 08 effffff91c callf $8,_write32h ! 740: 712 00024618 # writes(", expected PSL = "); ! 741: 713 00024618 .data 1 ! 742: 714 00000ef7 * L309: ! 743: 715 00000ef7 * 2C20206578706563746564205 .ascii ", expected PSL = \0" ! 744: 0534C203D2000 ! 745: 716 00000f0a * .text ! 746: 717 00024618 dd 8f00000ef7 pushl $L309 ! 747: 718 0002461E fe 08 effffff90f callf $8,_writes ! 748: 719 00024625 # write32h( exp_psl ); ! 749: 720 00024625 dd effffff909 pushl _exp_psl ! 750: 721 0002462B fe 08 effffff902 callf $8,_write32h ! 751: 722 00024632 # writec('\n'); ! 752: 723 00024632 dd 0a pushl $10 ! 753: 724 00024634 fe 08 effffff8f9 callf $8,_writec ! 754: 725 0002463B # } ! 755: 726 0002463B # if ( halt_flg ) /* halt on error? */ ! 756: 727 0002463B L305: ! 757: 728 0002463B 5d effffff8f3 tstl _halt_flg ! 758: 729 00024641 31 09 jeql L310 ! 759: 730 00024643 # mull2_halt( 3 ); ! 760: 731 00024643 dd 03 pushl $3 ! 761: 732 00024645 fe 08 ef000004e4 callf $8,_mull2_halt ! 762: 733 0002464C # if ( loop_on_err ) { ! 763: 734 0002464C L310: ! 764: 735 0002464C 5d effffff8e2 tstl _loop_on_err ! 765: 736 00024652 31 0d jeql L311 ! 766: 737 00024654 # force_loop = TRUE; /* set the force loop flag */ ! 767: 738 00024654 0d 01 effffff8d9 movl $1,_force_loop ! 768: 739 0002465B # asm("jmp _mull2_4_lp1"); /* and loop */ ! 769: 740 0002465B 71 effffffef5 jmp _mull2_4_lp1 ! 770: 741 00024661 # }; /* end of loop-on-error */ ! 771: 742 00024661 L311: ! 772: 743 00024661 # }; /* end of error */ ! 773: 744 00024661 L304: ! 774: 745 00024661 # if( ++status_index >= 3 ) ! 775: 746 00024661 6d effffff8cd incl _status_index ! 776: 747 00024667 0d effffff8c7 50 movl _status_index,r0 ! 777: 748 0002466E 1d 50 03 cmpl r0,$3 ! 778: 749 00024671 91 06 jlss L312 ! 779: 750 00024673 # status_index = 0; ! 780: 751 00024673 4d effffff8bb clrl _status_index ! 781: 752 00024679 # } ! 782: 753 00024679 L312: ! 783: 754 00024679 L298: ! 784: 755 00024679 6d effffff8b5 incl _index ! 785: 756 0002467F 13 fe78 jbr L300 ! 786: 757 00024682 L299: ! 787: 758 00024682 # } /* end of subtest 4 */ ! 788: 759 00024682 40 ret#2 ! 789: 760 00024683 .set L294,0x0 ! 790: 761 00024683 L296: ! 791: 762 00024683 13 fe5b jbr L297 ! 792: 763 00024686 .data ! 793: 764 00000d58 * .text ! 794: 765 00024686 .align 1 ! 795: 766 00024686 .globl _mull2_5 ! 796: 767 00024686 _mull2_5: ! 797: 768 00024686 0000 .word L313 ! 798: 769 00024688 # ! 799: 770 00024688 # ! 800: 771 00024688 # ! 801: 772 00024688 # /************************************************************************ ! 802: 773 00024688 # * ! 803: 774 00024688 # * SUBTEST 5 - Pipelined Entry test ! 804: 775 00024688 # * ! 805: 776 00024688 # ************************************************************************/ ! 806: 777 00024688 # mull2_5() ! 807: 778 00024688 # { ! 808: 779 00024688 13 01ca jbr L315 ! 809: 780 0002468B L316: ! 810: 781 0002468B # force_loop = FALSE; ! 811: 782 0002468B 4d effffff8a3 clrl _force_loop ! 812: 783 00024691 # subtest = 5; ! 813: 784 00024691 0d 05 effffff89c movl $5,_subtest ! 814: 785 00024698 # for( index = 0; index < max_mull_1_index; index++ ) { ! 815: 786 00024698 4d effffff896 clrl _index ! 816: 787 0002469E L319: ! 817: 788 0002469E 1d effffff890 effffff88b cmpl _index,_max_mull_1_index ! 818: 789 000246A9 91 03 13 01a6 jgeq L318 ! 819: 790 000246AE # sgl_value_1 = mull_1_data[index].op_1; /* get operand 1 */ ! 820: 791 000246AE 5c 0c effffff87f 50 mull3 $12,_index,r0 ! 821: 792 000246B6 0d e000000000 effffff873 movl _mull_1_data(r0),_sgl_value_1 ! 822: 793 000246C1 # sgl_value_2 = mull_1_data[index].op_2; /* get operand 2 */ ! 823: 794 000246C1 5c 0c effffff86c 50 mull3 $12,_index,r0 ! 824: 795 000246C9 0d e000000004 effffff860 movl _mull_1_data+4(r0),_sgl_value_2 ! 825: 796 000246D4 # sgl_value_4 = mull_1_data[index].exp; /* get expected results */ ! 826: 797 000246D4 5c 0c effffff859 50 mull3 $12,_index,r0 ! 827: 798 000246DC 0d e000000008 effffff84d movl _mull_1_data+8(r0),_sgl_value_4 ! 828: 799 000246E7 # sgl_ld_acc = 0x12345678; /* set acc data pattern */ ! 829: 800 000246E7 0d 8f12345678 effffff842 movl $305419896,_sgl_ld_acc ! 830: 801 000246F2 # sgl_expected = sgl_ld_acc; /* final Acc expected */ ! 831: 802 000246F2 0d effffff83c effffff837 movl _sgl_ld_acc,_sgl_expected ! 832: 803 000246FD # sgl_value_10 = 0x40800000; /* floating "1.0" */ ! 833: 804 000246FD 0d 8f40800000 effffff82c movl $1082130432,_sgl_value_10 ! 834: 805 00024708 # /* ! 835: 806 00024708 # * If LOOP ON ERROR is set, this is the loop for this subtest. ! 836: 807 00024708 # */ ! 837: 808 00024708 # asm("_mull2_5_lp1:"); ! 838: 809 00024708 _mull2_5_lp1: ! 839: 810 00024708 # sgl_value_3 = sgl_value_2; /* set integer operand 2 */ ! 840: 811 00024708 0d effffff826 effffff821 movl _sgl_value_2,_sgl_value_3 ! 841: 812 00024713 # asm("ldf _sgl_ld_acc"); /* load the acc */ ! 842: 813 00024713 06 effffff81b ldf _sgl_ld_acc ! 843: 814 00024719 # asm("mulf _sgl_value_10"); /* do a floating multiply */ ! 844: 815 00024719 e6 effffff815 mulf _sgl_value_10 ! 845: 816 0002471F # asm("mull2 _sgl_value_1,_sgl_value_3"); /* do the int. multiply */ ! 846: 817 0002471F 4c effffff80f effffff80a mull2 _sgl_value_1,_sgl_value_3 ! 847: 818 0002472A # asm("nop"); ! 848: 819 0002472A 10 nop ! 849: 820 0002472B # asm("stf _sgl_st_acc"); /* save the acc */ ! 850: 821 0002472B 26 effffff803 stf _sgl_st_acc ! 851: 822 00024731 # if( force_loop ) ! 852: 823 00024731 5d effffff7fd tstl _force_loop ! 853: 824 00024737 31 02 jeql L320 ! 854: 825 00024739 # asm("brb _mull2_5_lp1");; ! 855: 826 00024739 11 cd brb _mull2_5_lp1 ! 856: 827 0002473B L320: ! 857: 828 0002473B # if( sgl_expected != sgl_st_acc ) { /* COMPARE the values */ ! 858: 829 0002473B 1d effffff7f3 effffff7ee cmpl _sgl_expected,_sgl_st_acc ! 859: 830 00024746 21 03 13 00b2 jeql L321 ! 860: 831 0002474B # errcnt++; /* bump the error count */ ! 861: 832 0002474B 6d effffff7e3 incl _errcnt ! 862: 833 00024751 # if ( prt_error ) { ! 863: 834 00024751 5d effffff7dd tstl _prt_error ! 864: 835 00024757 31 7e jeql L322 ! 865: 836 00024759 # print_mull2_error("(Piped Entry) -BAD FINAL ACC"); ! 866: 837 00024759 .data 1 ! 867: 838 00000f0a * L323: ! 868: 839 00000f0a * 28506970656420456E7472792 .ascii "(Piped Entry) -BAD FINAL ACC\0" ! 869: 9202D4241442046494E414C20 ! 870: 41434300 ! 871: 840 00000f27 * .text ! 872: 841 00024759 dd 8f00000f0a pushl $L323 ! 873: 842 0002475F fe 08 ef000002c4 callf $8,_print_mull2_error ! 874: 843 00024766 # writes("initial Acc = "); ! 875: 844 00024766 .data 1 ! 876: 845 00000f27 * L324: ! 877: 846 00000f27 * 696E697469616C20416363203 .ascii "initial Acc = \0" ! 878: D2000 ! 879: 847 00000f36 * .text ! 880: 848 00024766 dd 8f00000f27 pushl $L324 ! 881: 849 0002476C fe 08 effffff7c1 callf $8,_writes ! 882: 850 00024773 # write32h( sgl_ld_acc ); ! 883: 851 00024773 dd effffff7bb pushl _sgl_ld_acc ! 884: 852 00024779 fe 08 effffff7b4 callf $8,_write32h ! 885: 853 00024780 # writes(", final Acc = "); ! 886: 854 00024780 .data 1 ! 887: 855 00000f36 * L325: ! 888: 856 00000f36 * 2C202020202066696E616C204 .ascii ", final Acc = \0" ! 889: 16363203D2000 ! 890: 857 00000f49 * .text ! 891: 858 00024780 dd 8f00000f36 pushl $L325 ! 892: 859 00024786 fe 08 effffff7a7 callf $8,_writes ! 893: 860 0002478D # write32h( sgl_st_acc ); ! 894: 861 0002478D dd effffff7a1 pushl _sgl_st_acc ! 895: 862 00024793 fe 08 effffff79a callf $8,_write32h ! 896: 863 0002479A # writes("\nFPP operand = "); ! 897: 864 0002479A .data 1 ! 898: 865 00000f49 * L326: ! 899: 866 00000f49 * 0A465050206F706572616E642 .ascii "\12FPP operand = \0" ! 900: 03D2000 ! 901: 867 00000f59 * .text ! 902: 868 0002479A dd 8f00000f49 pushl $L326 ! 903: 869 000247A0 fe 08 effffff78d callf $8,_writes ! 904: 870 000247A7 # write32h( sgl_value_10 ); ! 905: 871 000247A7 dd effffff787 pushl _sgl_value_10 ! 906: 872 000247AD fe 08 effffff780 callf $8,_write32h ! 907: 873 000247B4 # writes(", expected Acc = "); ! 908: 874 000247B4 .data 1 ! 909: 875 00000f59 * L327: ! 910: 876 00000f59 * 2C20206578706563746564204 .ascii ", expected Acc = \0" ! 911: 16363203D2000 ! 912: 877 00000f6c * .text ! 913: 878 000247B4 dd 8f00000f59 pushl $L327 ! 914: 879 000247BA fe 08 effffff773 callf $8,_writes ! 915: 880 000247C1 # write32h( sgl_expected ); ! 916: 881 000247C1 dd effffff76d pushl _sgl_expected ! 917: 882 000247C7 fe 08 effffff766 callf $8,_write32h ! 918: 883 000247CE # writec('\n'); ! 919: 884 000247CE dd 0a pushl $10 ! 920: 885 000247D0 fe 08 effffff75d callf $8,_writec ! 921: 886 000247D7 # } ! 922: 887 000247D7 # if ( halt_flg ) /* halt on error? */ ! 923: 888 000247D7 L322: ! 924: 889 000247D7 5d effffff757 tstl _halt_flg ! 925: 890 000247DD 31 09 jeql L328 ! 926: 891 000247DF # mull2_halt( 5 ); ! 927: 892 000247DF dd 05 pushl $5 ! 928: 893 000247E1 fe 08 ef00000348 callf $8,_mull2_halt ! 929: 894 000247E8 # if ( loop_on_err ) { ! 930: 895 000247E8 L328: ! 931: 896 000247E8 5d effffff746 tstl _loop_on_err ! 932: 897 000247EE 31 0d jeql L329 ! 933: 898 000247F0 # force_loop = TRUE; /* set the force loop flag */ ! 934: 899 000247F0 0d 01 effffff73d movl $1,_force_loop ! 935: 900 000247F7 # asm("jmp _mull2_5_lp1"); /* and loop */ ! 936: 901 000247F7 71 efffffff0b jmp _mull2_5_lp1 ! 937: 902 000247FD # } /* end of loop-on-error */ ! 938: 903 000247FD # } /* end of acc corr error */ ! 939: 904 000247FD L329: ! 940: 905 000247FD # if( sgl_value_4 != sgl_value_3 ) /* COMPARE the values */ ! 941: 906 000247FD L321: ! 942: 907 000247FD 1d effffff731 effffff72c cmpl _sgl_value_4,_sgl_value_3 ! 943: 908 00024808 31 41 jeql L330 ! 944: 909 0002480A # { ! 945: 910 0002480A # errcnt++; /* bump the error count */ ! 946: 911 0002480A 6d effffff724 incl _errcnt ! 947: 912 00024810 # if ( prt_error ) { ! 948: 913 00024810 5d effffff71e tstl _prt_error ! 949: 914 00024816 31 0d jeql L331 ! 950: 915 00024818 # print_mull2_error("(Piped Entry) -BAD MULTIPLY RESULT"); ! 951: 916 00024818 .data 1 ! 952: 917 00000f6c * L332: ! 953: 918 00000f6c * 28506970656420456E7472792 .ascii "(Piped Entry) -BAD MULTIPLY RESULT\0" ! 954: 9202D424144204D554C544950 ! 955: 4C5920524553554C5400 ! 956: 919 00000f8f * .text ! 957: 920 00024818 dd 8f00000f6c pushl $L332 ! 958: 921 0002481E fe 08 ef00000205 callf $8,_print_mull2_error ! 959: 922 00024825 # } ! 960: 923 00024825 # if ( halt_flg ) /* halt on error? */ ! 961: 924 00024825 L331: ! 962: 925 00024825 5d effffff709 tstl _halt_flg ! 963: 926 0002482B 31 09 jeql L333 ! 964: 927 0002482D # mull2_halt( 1 ); ! 965: 928 0002482D dd 01 pushl $1 ! 966: 929 0002482F fe 08 ef000002fa callf $8,_mull2_halt ! 967: 930 00024836 # if ( loop_on_err ) { ! 968: 931 00024836 L333: ! 969: 932 00024836 5d effffff6f8 tstl _loop_on_err ! 970: 933 0002483C 31 0d jeql L334 ! 971: 934 0002483E # force_loop = TRUE; /* set the force loop flag */ ! 972: 935 0002483E 0d 01 effffff6ef movl $1,_force_loop ! 973: 936 00024845 # asm("jmp _mull2_5_lp1"); /* and loop */ ! 974: 937 00024845 71 effffffebd jmp _mull2_5_lp1 ! 975: 938 0002484B # } /* end of loop-on-error */ ! 976: 939 0002484B # } /* end of multiply error */ ! 977: 940 0002484B L334: ! 978: 941 0002484B # } ! 979: 942 0002484B L330: ! 980: 943 0002484B L317: ! 981: 944 0002484B 6d effffff6e3 incl _index ! 982: 945 00024851 13 fe4a jbr L319 ! 983: 946 00024854 L318: ! 984: 947 00024854 # } /* end of subtest 5 */ ! 985: 948 00024854 40 ret#2 ! 986: 949 00024855 .set L313,0x0 ! 987: 950 00024855 L315: ! 988: 951 00024855 13 fe33 jbr L316 ! 989: 952 00024858 .data ! 990: 953 00000d58 * .text ! 991: 954 00024858 .align 1 ! 992: 955 00024858 .globl _mull2_6 ! 993: 956 00024858 _mull2_6: ! 994: 957 00024858 0000 .word L335 ! 995: 958 0002485A # ! 996: 959 0002485A # ! 997: 960 0002485A # ! 998: 961 0002485A # /************************************************************************ ! 999: 962 0002485A # * ! 1000: 963 0002485A # * SUBTEST 6 - Pipelined Exit test ! 1001: 964 0002485A # * ! 1002: 965 0002485A # ************************************************************************/ ! 1003: 966 0002485A # mull2_6() ! 1004: 967 0002485A # { ! 1005: 968 0002485A 13 01c9 jbr L337 ! 1006: 969 0002485D L338: ! 1007: 970 0002485D # force_loop = FALSE; ! 1008: 971 0002485D 4d effffff6d1 clrl _force_loop ! 1009: 972 00024863 # subtest = 6; ! 1010: 973 00024863 0d 06 effffff6ca movl $6,_subtest ! 1011: 974 0002486A # for( index = 0; index < max_mull_1_index; index++ ) { ! 1012: 975 0002486A 4d effffff6c4 clrl _index ! 1013: 976 00024870 L341: ! 1014: 977 00024870 1d effffff6be effffff6b9 cmpl _index,_max_mull_1_index ! 1015: 978 0002487B 91 03 13 01a5 jgeq L340 ! 1016: 979 00024880 # sgl_value_1 = mull_1_data[index].op_1; /* get operand 1 */ ! 1017: 980 00024880 5c 0c effffff6ad 50 mull3 $12,_index,r0 ! 1018: 981 00024888 0d e000000000 effffff6a1 movl _mull_1_data(r0),_sgl_value_1 ! 1019: 982 00024893 # sgl_value_2 = mull_1_data[index].op_2; /* get operand 2 */ ! 1020: 983 00024893 5c 0c effffff69a 50 mull3 $12,_index,r0 ! 1021: 984 0002489B 0d e000000004 effffff68e movl _mull_1_data+4(r0),_sgl_value_2 ! 1022: 985 000248A6 # sgl_value_4 = mull_1_data[index].exp; /* get expected results */ ! 1023: 986 000248A6 5c 0c effffff687 50 mull3 $12,_index,r0 ! 1024: 987 000248AE 0d e000000008 effffff67b movl _mull_1_data+8(r0),_sgl_value_4 ! 1025: 988 000248B9 # sgl_ld_acc = 0x40800000; /* floating "1.0" */ ! 1026: 989 000248B9 0d 8f40800000 effffff670 movl $1082130432,_sgl_ld_acc ! 1027: 990 000248C4 # sgl_value_10 = 0x12345678; /* set acc data pattern */ ! 1028: 991 000248C4 0d 8f12345678 effffff665 movl $305419896,_sgl_value_10 ! 1029: 992 000248CF # sgl_expected = sgl_value_10; /* final Acc expected */ ! 1030: 993 000248CF 0d effffff65f effffff65a movl _sgl_value_10,_sgl_expected ! 1031: 994 000248DA # /* ! 1032: 995 000248DA # * If LOOP ON ERROR is set, this is the loop for this subtest. ! 1033: 996 000248DA # */ ! 1034: 997 000248DA # asm("_mull2_6_lp1:"); ! 1035: 998 000248DA _mull2_6_lp1: ! 1036: 999 000248DA # sgl_value_3 = sgl_value_2; /* set integer operand 2 */ ! 1037: 1000 000248DA 0d effffff654 effffff64f movl _sgl_value_2,_sgl_value_3 ! 1038: 1001 000248E5 # asm("ldf _sgl_ld_acc"); /* load the acc */ ! 1039: 1002 000248E5 06 effffff649 ldf _sgl_ld_acc ! 1040: 1003 000248EB # asm("mull2 _sgl_value_1,_sgl_value_3"); /* do the int. multiply */ ! 1041: 1004 000248EB 4c effffff643 effffff63e mull2 _sgl_value_1,_sgl_value_3 ! 1042: 1005 000248F6 # asm("mulf _sgl_value_10"); /* do a floating multiply */ ! 1043: 1006 000248F6 e6 effffff638 mulf _sgl_value_10 ! 1044: 1007 000248FC # asm("stf _sgl_st_acc"); /* save the acc */ ! 1045: 1008 000248FC 26 effffff632 stf _sgl_st_acc ! 1046: 1009 00024902 # if( force_loop ) ! 1047: 1010 00024902 5d effffff62c tstl _force_loop ! 1048: 1011 00024908 31 02 jeql L342 ! 1049: 1012 0002490A # asm("brb _mull2_6_lp1");; ! 1050: 1013 0002490A 11 ce brb _mull2_6_lp1 ! 1051: 1014 0002490C L342: ! 1052: 1015 0002490C # if( sgl_expected != sgl_st_acc ) { /* COMPARE the values */ ! 1053: 1016 0002490C 1d effffff622 effffff61d cmpl _sgl_expected,_sgl_st_acc ! 1054: 1017 00024917 21 03 13 00b2 jeql L343 ! 1055: 1018 0002491C # errcnt++; /* bump the error count */ ! 1056: 1019 0002491C 6d effffff612 incl _errcnt ! 1057: 1020 00024922 # if ( prt_error ) { ! 1058: 1021 00024922 5d effffff60c tstl _prt_error ! 1059: 1022 00024928 31 7e jeql L344 ! 1060: 1023 0002492A # print_mull2_error("(Piped Exit) -BAD FINAL ACC"); ! 1061: 1024 0002492A .data 1 ! 1062: 1025 00000f8f * L345: ! 1063: 1026 00000f8f * 2850697065642045786974292 .ascii "(Piped Exit) -BAD FINAL ACC\0" ! 1064: 02D4241442046494E414C2041 ! 1065: 434300 ! 1066: 1027 00000fab * .text ! 1067: 1028 0002492A dd 8f00000f8f pushl $L345 ! 1068: 1029 00024930 fe 08 ef000000f3 callf $8,_print_mull2_error ! 1069: 1030 00024937 # writes("initial Acc = "); ! 1070: 1031 00024937 .data 1 ! 1071: 1032 00000fab * L346: ! 1072: 1033 00000fab * 696E697469616C20416363203 .ascii "initial Acc = \0" ! 1073: D2000 ! 1074: 1034 00000fba * .text ! 1075: 1035 00024937 dd 8f00000fab pushl $L346 ! 1076: 1036 0002493D fe 08 effffff5f0 callf $8,_writes ! 1077: 1037 00024944 # write32h( sgl_ld_acc ); ! 1078: 1038 00024944 dd effffff5ea pushl _sgl_ld_acc ! 1079: 1039 0002494A fe 08 effffff5e3 callf $8,_write32h ! 1080: 1040 00024951 # writes(", final Acc = "); ! 1081: 1041 00024951 .data 1 ! 1082: 1042 00000fba * L347: ! 1083: 1043 00000fba * 2C202020202066696E616C204 .ascii ", final Acc = \0" ! 1084: 16363203D2000 ! 1085: 1044 00000fcd * .text ! 1086: 1045 00024951 dd 8f00000fba pushl $L347 ! 1087: 1046 00024957 fe 08 effffff5d6 callf $8,_writes ! 1088: 1047 0002495E # write32h( sgl_st_acc ); ! 1089: 1048 0002495E dd effffff5d0 pushl _sgl_st_acc ! 1090: 1049 00024964 fe 08 effffff5c9 callf $8,_write32h ! 1091: 1050 0002496B # writes("\nFPP operand = "); ! 1092: 1051 0002496B .data 1 ! 1093: 1052 00000fcd * L348: ! 1094: 1053 00000fcd * 0A465050206F706572616E642 .ascii "\12FPP operand = \0" ! 1095: 03D2000 ! 1096: 1054 00000fdd * .text ! 1097: 1055 0002496B dd 8f00000fcd pushl $L348 ! 1098: 1056 00024971 fe 08 effffff5bc callf $8,_writes ! 1099: 1057 00024978 # write32h( sgl_value_10 ); ! 1100: 1058 00024978 dd effffff5b6 pushl _sgl_value_10 ! 1101: 1059 0002497E fe 08 effffff5af callf $8,_write32h ! 1102: 1060 00024985 # writes(", expected Acc = "); ! 1103: 1061 00024985 .data 1 ! 1104: 1062 00000fdd * L349: ! 1105: 1063 00000fdd * 2C20206578706563746564204 .ascii ", expected Acc = \0" ! 1106: 16363203D2000 ! 1107: 1064 00000ff0 * .text ! 1108: 1065 00024985 dd 8f00000fdd pushl $L349 ! 1109: 1066 0002498B fe 08 effffff5a2 callf $8,_writes ! 1110: 1067 00024992 # write32h( sgl_expected ); ! 1111: 1068 00024992 dd effffff59c pushl _sgl_expected ! 1112: 1069 00024998 fe 08 effffff595 callf $8,_write32h ! 1113: 1070 0002499F # writec('\n'); ! 1114: 1071 0002499F dd 0a pushl $10 ! 1115: 1072 000249A1 fe 08 effffff58c callf $8,_writec ! 1116: 1073 000249A8 # } ! 1117: 1074 000249A8 # if ( halt_flg ) /* halt on error? */ ! 1118: 1075 000249A8 L344: ! 1119: 1076 000249A8 5d effffff586 tstl _halt_flg ! 1120: 1077 000249AE 31 09 jeql L350 ! 1121: 1078 000249B0 # mull2_halt( 5 ); ! 1122: 1079 000249B0 dd 05 pushl $5 ! 1123: 1080 000249B2 fe 08 ef00000177 callf $8,_mull2_halt ! 1124: 1081 000249B9 # if ( loop_on_err ) { ! 1125: 1082 000249B9 L350: ! 1126: 1083 000249B9 5d effffff575 tstl _loop_on_err ! 1127: 1084 000249BF 31 0d jeql L351 ! 1128: 1085 000249C1 # force_loop = TRUE; /* set the force loop flag */ ! 1129: 1086 000249C1 0d 01 effffff56c movl $1,_force_loop ! 1130: 1087 000249C8 # asm("jmp _mull2_6_lp1"); /* and loop */ ! 1131: 1088 000249C8 71 efffffff0c jmp _mull2_6_lp1 ! 1132: 1089 000249CE # } /* end of loop-on-error */ ! 1133: 1090 000249CE # } /* end of acc corr error */ ! 1134: 1091 000249CE L351: ! 1135: 1092 000249CE # if( sgl_value_4 != sgl_value_3 ) /* COMPARE the values */ ! 1136: 1093 000249CE L343: ! 1137: 1094 000249CE 1d effffff560 effffff55b cmpl _sgl_value_4,_sgl_value_3 ! 1138: 1095 000249D9 31 41 jeql L352 ! 1139: 1096 000249DB # { ! 1140: 1097 000249DB # errcnt++; /* bump the error count */ ! 1141: 1098 000249DB 6d effffff553 incl _errcnt ! 1142: 1099 000249E1 # if ( prt_error ) { ! 1143: 1100 000249E1 5d effffff54d tstl _prt_error ! 1144: 1101 000249E7 31 0d jeql L353 ! 1145: 1102 000249E9 # print_mull2_error("(Piped Exit) -BAD MULTIPLY RESULT"); ! 1146: 1103 000249E9 .data 1 ! 1147: 1104 00000ff0 * L354: ! 1148: 1105 00000ff0 * 2850697065642045786974292 .ascii "(Piped Exit) -BAD MULTIPLY RESULT\0" ! 1149: 02D424144204D554C5449504C ! 1150: 5920524553554C5400 ! 1151: 1106 00001012 * .text ! 1152: 1107 000249E9 dd 8f00000ff0 pushl $L354 ! 1153: 1108 000249EF fe 08 ef00000034 callf $8,_print_mull2_error ! 1154: 1109 000249F6 # } ! 1155: 1110 000249F6 # if ( halt_flg ) /* halt on error? */ ! 1156: 1111 000249F6 L353: ! 1157: 1112 000249F6 5d effffff538 tstl _halt_flg ! 1158: 1113 000249FC 31 09 jeql L355 ! 1159: 1114 000249FE # mull2_halt( 1 ); ! 1160: 1115 000249FE dd 01 pushl $1 ! 1161: 1116 00024A00 fe 08 ef00000129 callf $8,_mull2_halt ! 1162: 1117 00024A07 # if ( loop_on_err ) { ! 1163: 1118 00024A07 L355: ! 1164: 1119 00024A07 5d effffff527 tstl _loop_on_err ! 1165: 1120 00024A0D 31 0d jeql L356 ! 1166: 1121 00024A0F # force_loop = TRUE; /* set the force loop flag */ ! 1167: 1122 00024A0F 0d 01 effffff51e movl $1,_force_loop ! 1168: 1123 00024A16 # asm("jmp _mull2_6_lp1"); /* and loop */ ! 1169: 1124 00024A16 71 effffffebe jmp _mull2_6_lp1 ! 1170: 1125 00024A1C # } /* end of loop-on-error */ ! 1171: 1126 00024A1C # } /* end of multiply error */ ! 1172: 1127 00024A1C L356: ! 1173: 1128 00024A1C # } ! 1174: 1129 00024A1C L352: ! 1175: 1130 00024A1C L339: ! 1176: 1131 00024A1C 6d effffff512 incl _index ! 1177: 1132 00024A22 13 fe4b jbr L341 ! 1178: 1133 00024A25 L340: ! 1179: 1134 00024A25 # } /* end of subtest 6 */ ! 1180: 1135 00024A25 40 ret#2 ! 1181: 1136 00024A26 .set L335,0x0 ! 1182: 1137 00024A26 L337: ! 1183: 1138 00024A26 13 fe34 jbr L338 ! 1184: 1139 00024A29 .data ! 1185: 1140 00000d58 * .text ! 1186: 1141 00024A29 00 .align 1 ! 1187: 1142 00024A2A .globl _print_mull2_error ! 1188: 1143 00024A2A _print_mull2_error: ! 1189: 1144 00024A2A 0000 .word L357 ! 1190: 1145 00024A2C # ! 1191: 1146 00024A2C # ! 1192: 1147 00024A2C # ! 1193: 1148 00024A2C # /***************************************************************************** ! 1194: 1149 00024A2C # * ! 1195: 1150 00024A2C # * Print an error message of the form: ! 1196: 1151 00024A2C # * ! 1197: 1152 00024A2C # * cycle: xx MULL2 test xx, subtest xx <"your message here"> ! 1198: 1153 00024A2C # * operand 1 = xxxxxxxx, result = xxxxxxxx, data index = xx ! 1199: 1154 00024A2C # * operand 2 = xxxxxxxx, expected = xxxxxxxx ! 1200: 1155 00024A2C # * ! 1201: 1156 00024A2C # *****************************************************************************/ ! 1202: 1157 00024A2C # print_mull2_error(msg) ! 1203: 1158 00024A2C # char *msg; /* addressing mode msg */ ! 1204: 1159 00024A2C # { ! 1205: 1160 00024A2C 13 00fe jbr L359 ! 1206: 1161 00024A2F L360: ! 1207: 1162 00024A2F # writes(" \n"); /* start a new print line */ ! 1208: 1163 00024A2F .data 1 ! 1209: 1164 00001012 * L361: ! 1210: 1165 00001012 * 200A00 .ascii " \12\0" ! 1211: 1166 00001015 * .text ! 1212: 1167 00024A2F dd 8f00001012 pushl $L361 ! 1213: 1168 00024A35 fe 08 effffff4f8 callf $8,_writes ! 1214: 1169 00024A3C # writes("cycle: "); ! 1215: 1170 00024A3C .data 1 ! 1216: 1171 00001015 * L362: ! 1217: 1172 00001015 * 6379636C653A2000 .ascii "cycle: \0" ! 1218: 1173 0000101d * .text ! 1219: 1174 00024A3C dd 8f00001015 pushl $L362 ! 1220: 1175 00024A42 fe 08 effffff4eb callf $8,_writes ! 1221: 1176 00024A49 # writed( cycle ); ! 1222: 1177 00024A49 dd effffff4e5 pushl _cycle ! 1223: 1178 00024A4F fe 08 effffff4de callf $8,_writed ! 1224: 1179 00024A56 # writes(" MULL2 test "); ! 1225: 1180 00024A56 .data 1 ! 1226: 1181 0000101d * L364: ! 1227: 1182 0000101d * 20204D554C4C3220746573742 .ascii " MULL2 test \0" ! 1228: 000 ! 1229: 1183 0000102b * .text ! 1230: 1184 00024A56 dd 8f0000101d pushl $L364 ! 1231: 1185 00024A5C fe 08 effffff4d1 callf $8,_writes ! 1232: 1186 00024A63 # writed( test_no ); ! 1233: 1187 00024A63 dd effffff4cb pushl _test_no ! 1234: 1188 00024A69 fe 08 effffff4c4 callf $8,_writed ! 1235: 1189 00024A70 # writes(", subtest "); ! 1236: 1190 00024A70 .data 1 ! 1237: 1191 0000102b * L365: ! 1238: 1192 0000102b * 2C20737562746573742000 .ascii ", subtest \0" ! 1239: 1193 00001036 * .text ! 1240: 1194 00024A70 dd 8f0000102b pushl $L365 ! 1241: 1195 00024A76 fe 08 effffff4b7 callf $8,_writes ! 1242: 1196 00024A7D # writed( subtest ); ! 1243: 1197 00024A7D dd effffff4b1 pushl _subtest ! 1244: 1198 00024A83 fe 08 effffff4aa callf $8,_writed ! 1245: 1199 00024A8A # writes(" "); ! 1246: 1200 00024A8A .data 1 ! 1247: 1201 00001036 * L366: ! 1248: 1202 00001036 * 202000 .ascii " \0" ! 1249: 1203 00001039 * .text ! 1250: 1204 00024A8A dd 8f00001036 pushl $L366 ! 1251: 1205 00024A90 fe 08 effffff49d callf $8,_writes ! 1252: 1206 00024A97 # writes( msg ); ! 1253: 1207 00024A97 dd ad04 pushl 4(fp) ! 1254: 1208 00024A9A fe 08 effffff493 callf $8,_writes ! 1255: 1209 00024AA1 # writes("\n operand 1 = "); ! 1256: 1210 00024AA1 .data 1 ! 1257: 1211 00001039 * L367: ! 1258: 1212 00001039 * 0A20206F706572616E6420312 .ascii "\12 operand 1 = \0" ! 1259: 03D2000 ! 1260: 1213 00001049 * .text ! 1261: 1214 00024AA1 dd 8f00001039 pushl $L367 ! 1262: 1215 00024AA7 fe 08 effffff486 callf $8,_writes ! 1263: 1216 00024AAE # write32h( sgl_value_1 ); ! 1264: 1217 00024AAE dd effffff480 pushl _sgl_value_1 ! 1265: 1218 00024AB4 fe 08 effffff479 callf $8,_write32h ! 1266: 1219 00024ABB # writes(", result = "); ! 1267: 1220 00024ABB .data 1 ! 1268: 1221 00001049 * L368: ! 1269: 1222 00001049 * 2C20202020202020207265737 .ascii ", result = \0" ! 1270: 56C74203D2000 ! 1271: 1223 0000105c * .text ! 1272: 1224 00024ABB dd 8f00001049 pushl $L368 ! 1273: 1225 00024AC1 fe 08 effffff46c callf $8,_writes ! 1274: 1226 00024AC8 # write32h( sgl_value_3 ); ! 1275: 1227 00024AC8 dd effffff466 pushl _sgl_value_3 ! 1276: 1228 00024ACE fe 08 effffff45f callf $8,_write32h ! 1277: 1229 00024AD5 # writes(", data index = "); ! 1278: 1230 00024AD5 .data 1 ! 1279: 1231 0000105c * L369: ! 1280: 1232 0000105c * 2C2020206461746120696E646 .ascii ", data index = \0" ! 1281: 578203D2000 ! 1282: 1233 0000106e * .text ! 1283: 1234 00024AD5 dd 8f0000105c pushl $L369 ! 1284: 1235 00024ADB fe 08 effffff452 callf $8,_writes ! 1285: 1236 00024AE2 # writed( index ); ! 1286: 1237 00024AE2 dd effffff44c pushl _index ! 1287: 1238 00024AE8 fe 08 effffff445 callf $8,_writed ! 1288: 1239 00024AEF # writes("\n operand 2 = "); ! 1289: 1240 00024AEF .data 1 ! 1290: 1241 0000106e * L370: ! 1291: 1242 0000106e * 0A20206F706572616E6420322 .ascii "\12 operand 2 = \0" ! 1292: 03D2000 ! 1293: 1243 0000107e * .text ! 1294: 1244 00024AEF dd 8f0000106e pushl $L370 ! 1295: 1245 00024AF5 fe 08 effffff438 callf $8,_writes ! 1296: 1246 00024AFC # write32h( sgl_value_2 ); ! 1297: 1247 00024AFC dd effffff432 pushl _sgl_value_2 ! 1298: 1248 00024B02 fe 08 effffff42b callf $8,_write32h ! 1299: 1249 00024B09 # writes(", expected = "); ! 1300: 1250 00024B09 .data 1 ! 1301: 1251 0000107e * L371: ! 1302: 1252 0000107e * 2C20202020202065787065637 .ascii ", expected = \0" ! 1303: 46564203D2000 ! 1304: 1253 00001091 * .text ! 1305: 1254 00024B09 dd 8f0000107e pushl $L371 ! 1306: 1255 00024B0F fe 08 effffff41e callf $8,_writes ! 1307: 1256 00024B16 # write32h( sgl_value_4 ); ! 1308: 1257 00024B16 dd effffff418 pushl _sgl_value_4 ! 1309: 1258 00024B1C fe 08 effffff411 callf $8,_write32h ! 1310: 1259 00024B23 # writec('\n'); ! 1311: 1260 00024B23 dd 0a pushl $10 ! 1312: 1261 00024B25 fe 08 effffff408 callf $8,_writec ! 1313: 1262 00024B2C # } ! 1314: 1263 00024B2C 40 ret#2 ! 1315: 1264 00024B2D .set L357,0x0 ! 1316: 1265 00024B2D L359: ! 1317: 1266 00024B2D 13 feff jbr L360 ! 1318: 1267 00024B30 .data ! 1319: 1268 00000d58 * .text ! 1320: 1269 00024B30 .align 1 ! 1321: 1270 00024B30 .globl _mull2_halt ! 1322: 1271 00024B30 _mull2_halt: ! 1323: 1272 00024B30 0000 .word L372 ! 1324: 1273 00024B32 # ! 1325: 1274 00024B32 # ! 1326: 1275 00024B32 # ! 1327: 1276 00024B32 # /*************************************************************************** ! 1328: 1277 00024B32 # * ! 1329: 1278 00024B32 # * HALT ON AN ERROR ! 1330: 1279 00024B32 # * ! 1331: 1280 00024B32 # ***************************************************************************/ ! 1332: 1281 00024B32 # mull2_halt( code ) ! 1333: 1282 00024B32 # int code; /* error code to use */ ! 1334: 1283 00024B32 # { ! 1335: 1284 00024B32 13 0152 jbr L374 ! 1336: 1285 00024B35 L375: ! 1337: 1286 00024B35 # sgl_dummy1 = code; /* save the error code */ ! 1338: 1287 00024B35 0d ad04 effffff3f7 movl 4(fp),_sgl_dummy1 ! 1339: 1288 00024B3D # asm("movl _test_no,r0"); /* r0 = test number */ ! 1340: 1289 00024B3D 0d effffff3f1 50 movl _test_no,r0 ! 1341: 1290 00024B44 # asm("movl _subtest,r1"); /* r1 = subtest number */ ! 1342: 1291 00024B44 0d effffff3ea 51 movl _subtest,r1 ! 1343: 1292 00024B4B # asm("movl _sgl_dummy1,r2"); /* r2 = error code */ ! 1344: 1293 00024B4B 0d effffff3e3 52 movl _sgl_dummy1,r2 ! 1345: 1294 00024B52 # asm("movl _cycle,r3"); /* r3 = cycle count */ ! 1346: 1295 00024B52 0d effffff3dc 53 movl _cycle,r3 ! 1347: 1296 00024B59 # asm("movl _sgl_value_1,r4"); /* r4 = operand 1 */ ! 1348: 1297 00024B59 0d effffff3d5 54 movl _sgl_value_1,r4 ! 1349: 1298 00024B60 # asm("movl _sgl_value_2,r5"); /* r5 = operand 2 */ ! 1350: 1299 00024B60 0d effffff3ce 55 movl _sgl_value_2,r5 ! 1351: 1300 00024B67 # asm("movl _sgl_value_3,r6"); /* r6 = MULL2's result */ ! 1352: 1301 00024B67 0d effffff3c7 56 movl _sgl_value_3,r6 ! 1353: 1302 00024B6E # if( code == 1 ) { ! 1354: 1303 00024B6E 1d ad04 01 cmpl 4(fp),$1 ! 1355: 1304 00024B72 21 11 jneq L376 ! 1356: 1305 00024B74 # asm("movl _sgl_value_4,r7"); /* r7 = expected result */ ! 1357: 1306 00024B74 0d effffff3ba 57 movl _sgl_value_4,r7 ! 1358: 1307 00024B7B # asm("movl _index,r8");; /* r8 = data index */ ! 1359: 1308 00024B7B 0d effffff3b3 58 movl _index,r8 ! 1360: 1309 00024B82 # } ! 1361: 1310 00024B82 # else if( code == 2 ) { /* corrupted register */ ! 1362: 1311 00024B82 13 0100 jbr L377 ! 1363: 1312 00024B85 L376: ! 1364: 1313 00024B85 1d ad04 02 cmpl 4(fp),$2 ! 1365: 1314 00024B89 21 3e jneq L378 ! 1366: 1315 00024B8B # sgl_dummy1 = store_regs[index2]; /* get the actual reg data */ ! 1367: 1316 00024B8B 0d effffff3a3 50 movl _index2,r0 ! 1368: 1317 00024B92 0d 40effffff39b movl _store_regs[r0],_sgl_dummy1 ! 1369: effffff396 ! 1370: 1318 00024B9E # sgl_dummy2 = load_regs[index2]; /* get the data expected */ ! 1371: 1319 00024B9E 0d effffff390 50 movl _index2,r0 ! 1372: 1320 00024BA5 0d 40effffff388 movl _load_regs[r0],_sgl_dummy2 ! 1373: effffff383 ! 1374: 1321 00024BB1 # asm("movl _index2,r7"); /* r7 = register number */ ! 1375: 1322 00024BB1 0d effffff37d 57 movl _index2,r7 ! 1376: 1323 00024BB8 # asm("movl _sgl_dummy1,r8"); /* r8 = final reg value */ ! 1377: 1324 00024BB8 0d effffff376 58 movl _sgl_dummy1,r8 ! 1378: 1325 00024BBF # asm("movl _sgl_dummy2,r9"); /* r9 = expected value */ ! 1379: 1326 00024BBF 0d effffff36f 59 movl _sgl_dummy2,r9 ! 1380: 1327 00024BC6 # } ! 1381: 1328 00024BC6 # else if( code == 3 ) { /* corrupted PSL */ ! 1382: 1329 00024BC6 13 00bc jbr L379 ! 1383: 1330 00024BC9 L378: ! 1384: 1331 00024BC9 1d ad04 03 cmpl 4(fp),$3 ! 1385: 1332 00024BCD 21 18 jneq L380 ! 1386: 1333 00024BCF # asm("movl _init_psl,r7"); /* r7 = initial PSL */ ! 1387: 1334 00024BCF 0d effffff35f 57 movl _init_psl,r7 ! 1388: 1335 00024BD6 # asm("movl _psl_val,r8"); /* r8 = final PSL */ ! 1389: 1336 00024BD6 0d effffff358 58 movl _psl_val,r8 ! 1390: 1337 00024BDD # asm("movl _exp_psl,r9"); /* r9 = expected PSL */ ! 1391: 1338 00024BDD 0d effffff351 59 movl _exp_psl,r9 ! 1392: 1339 00024BE4 # } ! 1393: 1340 00024BE4 # else if( code == 4 ) { /* corrupted Acc */ ! 1394: 1341 00024BE4 13 009e jbr L381 ! 1395: 1342 00024BE7 L380: ! 1396: 1343 00024BE7 1d ad04 04 cmpl 4(fp),$4 ! 1397: 1344 00024BEB 21 6f jneq L382 ! 1398: 1345 00024BED # if( subtest == 1 ) { /* single precision */ ! 1399: 1346 00024BED 1d effffff341 01 cmpl _subtest,$1 ! 1400: 1347 00024BF4 21 33 jneq L383 ! 1401: 1348 00024BF6 # dbl_ld_acc.m = sgl_ld_acc; ! 1402: 1349 00024BF6 0d effffff338 effffff333 movl _sgl_ld_acc,_dbl_ld_acc ! 1403: 1350 00024C01 # dbl_ld_acc.l = 0; ! 1404: 1351 00024C01 4d effffff331 clrl _dbl_ld_acc+4 ! 1405: 1352 00024C07 # dbl_st_acc.m = sgl_st_acc; ! 1406: 1353 00024C07 0d effffff327 effffff322 movl _sgl_st_acc,_dbl_st_acc ! 1407: 1354 00024C12 # dbl_st_acc.l = 0; ! 1408: 1355 00024C12 4d effffff320 clrl _dbl_st_acc+4 ! 1409: 1356 00024C18 # dbl_expected.m = sgl_expected; ! 1410: 1357 00024C18 0d effffff316 effffff311 movl _sgl_expected,_dbl_expected ! 1411: 1358 00024C23 # dbl_expected.l = 0; ! 1412: 1359 00024C23 4d effffff30f clrl _dbl_expected+4 ! 1413: 1360 00024C29 # }; ! 1414: 1361 00024C29 L383: ! 1415: 1362 00024C29 # asm("movl _index,r7"); /* r7 = data index */ ! 1416: 1363 00024C29 0d effffff305 57 movl _index,r7 ! 1417: 1364 00024C30 # asm("movl _dbl_ld_acc,r8"); /* r8 = MS initial Acc. */ ! 1418: 1365 00024C30 0d effffff2fe 58 movl _dbl_ld_acc,r8 ! 1419: 1366 00024C37 # asm("movl _dbl_ld_acc+4,r9"); /* r9 = LS initial Acc. */ ! 1420: 1367 00024C37 0d effffff2fb 59 movl _dbl_ld_acc+4,r9 ! 1421: 1368 00024C3E # asm("movl _dbl_st_acc,r10"); /* r10 = MS final Acc. */ ! 1422: 1369 00024C3E 0d effffff2f0 5a movl _dbl_st_acc,r10 ! 1423: 1370 00024C45 # asm("movl _dbl_st_acc+4,r11"); /* r11 = LS final Acc. */ ! 1424: 1371 00024C45 0d effffff2ed 5b movl _dbl_st_acc+4,r11 ! 1425: 1372 00024C4C # asm("movl _dbl_expected,r12"); /* r12 = MS expected Acc. */ ! 1426: 1373 00024C4C 0d effffff2e2 5c movl _dbl_expected,r12 ! 1427: 1374 00024C53 # asm("movl _dbl_expected+4,r13"); /* r13 = LS expected Acc. */ ! 1428: 1375 00024C53 0d effffff2df 5d movl _dbl_expected+4,r13 ! 1429: 1376 00024C5A # } ! 1430: 1377 00024C5A # else if( code == 5 ) { /* bad final Acc */ ! 1431: 1378 00024C5A 11 29 jbr L384 ! 1432: 1379 00024C5C L382: ! 1433: 1380 00024C5C 1d ad04 05 cmpl 4(fp),$5 ! 1434: 1381 00024C60 21 23 jneq L385 ! 1435: 1382 00024C62 # asm("movl _index,r7"); /* r7 = data index */ ! 1436: 1383 00024C62 0d effffff2cc 57 movl _index,r7 ! 1437: 1384 00024C69 # asm("movl _sgl_ld_acc,r8"); /* r8 = initial Acc. */ ! 1438: 1385 00024C69 0d effffff2c5 58 movl _sgl_ld_acc,r8 ! 1439: 1386 00024C70 # asm("movl _sgl_value_10,r9"); /* r9 = fpp operand */ ! 1440: 1387 00024C70 0d effffff2be 59 movl _sgl_value_10,r9 ! 1441: 1388 00024C77 # asm("movl _sgl_st_acc,r10"); /* r10 = final Acc. */ ! 1442: 1389 00024C77 0d effffff2b7 5a movl _sgl_st_acc,r10 ! 1443: 1390 00024C7E # asm("movl _sgl_expected,r11"); /* r11 = expected Acc. */ ! 1444: 1391 00024C7E 0d effffff2b0 5b movl _sgl_expected,r11 ! 1445: 1392 00024C85 # }; ! 1446: 1393 00024C85 L385: ! 1447: 1394 00024C85 L384: ! 1448: 1395 00024C85 L381: ! 1449: 1396 00024C85 L379: ! 1450: 1397 00024C85 L377: ! 1451: 1398 00024C85 # asm("halt"); /* HALT ... */ ! 1452: 1399 00024C85 00 halt ! 1453: 1400 00024C86 # } ! 1454: 1401 00024C86 40 ret#2 ! 1455: 1402 00024C87 .set L372,0x0 ! 1456: 1403 00024C87 L374: ! 1457: 1404 00024C87 13 feab jbr L375 ! 1458: 1405 00024C8A .data ! 1459: 1405 00048BBE .data
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.