|
|
1.1 ! root 1: 1 00000000 LL0: ! 2: 2 00000000 .data ! 3: 3 00000d38 * .text ! 4: 4 00000000 .align 1 ! 5: 5 00000000 .globl _mull3 ! 6: 6 00000000 _mull3: ! 7: 7 00024C8C 0000 .word L215 ! 8: 8 00024C8E # #include "fpp_defs.h" ! 9: 9 00024C8E # ! 10: 10 00024C8E # ! 11: 11 00024C8E # /*************************************************************************** ! 12: 12 00024C8E # * ! 13: 13 00024C8E # * MULL3 -MULTIPLY INTEGER 3 INSTRUCTION TEST ! 14: 14 00024C8E # * ! 15: 15 00024C8E # *****************************************************************************/ ! 16: 16 00024C8E # mull3() ! 17: 17 00024C8E # { ! 18: 18 00024C8E 11 4f jbr L217 ! 19: 19 00024C90 L218: ! 20: 20 00024C90 # asm(".globl _mull3_t"); ! 21: 21 00024C90 .globl _mull3_t ! 22: 22 00024C90 # asm("_mull3_t:"); /* entry address */ ! 23: 23 00024C90 _mull3_t: ! 24: 24 00024C90 # if( (cycle == 1) && (prt_hdrs) ) /* print headers on 1st cycle */ ! 25: 25 00024C90 1d effffffff6 01 cmpl _cycle,$1 ! 26: 26 00024C97 21 15 jneq L219 ! 27: 27 00024C99 5d efffffffed tstl _prt_hdrs ! 28: 28 00024C9F 31 0d jeql L219 ! 29: 29 00024CA1 # { ! 30: 30 00024CA1 # writes(" MULL3"); ! 31: 31 00024CA1 .data 1 ! 32: 32 00000d38 * L221: ! 33: 33 00000d38 * 204D554C4C3300 .ascii " MULL3\0" ! 34: 34 00000d3f * .text ! 35: 35 00024CA1 dd 8f00000d38 pushl $L221 ! 36: 36 00024CA7 fe 08 efffffffde callf $8,_writes ! 37: 37 00024CAE # } ! 38: 38 00024CAE # mull3_1(); /* register data / SGL acc. */ ! 39: 39 00024CAE L219: ! 40: 40 00024CAE fe 04 ef0000002d callf $4,_mull3_1 ! 41: 41 00024CB5 # mull3_2(); /* memory data / DBL acc. */ ! 42: 42 00024CB5 fe 04 ef000001d0 callf $4,_mull3_2 ! 43: 43 00024CBC # mull3_3(); /* register corruption test */ ! 44: 44 00024CBC fe 04 ef000003d3 callf $4,_mull3_3 ! 45: 45 00024CC3 # mull3_4(); /* PSL corruption test */ ! 46: 46 00024CC3 fe 04 ef0000055c callf $4,_mull3_4 ! 47: 47 00024CCA # mull3_5(); /* pipelined entry test */ ! 48: 48 00024CCA fe 04 ef000006f9 callf $4,_mull3_5 ! 49: 49 00024CD1 # mull3_6(); /* pipelined exit test */ ! 50: 50 00024CD1 fe 04 ef000008be callf $4,_mull3_6 ! 51: 51 00024CD8 # asm("jmp *return"); /* return to the test monitor */ ! 52: 52 00024CD8 71 ffffffffae jmp *return ! 53: 53 00024CDE # } ! 54: 54 00024CDE 40 ret#2 ! 55: 55 00024CDF .set L215,0x0 ! 56: 56 00024CDF L217: ! 57: 57 00024CDF 11 af jbr L218 ! 58: 58 00024CE1 .data ! 59: 59 00000d38 * .text ! 60: 60 00024CE1 00 .align 1 ! 61: 61 00024CE2 .globl _mull3_1 ! 62: 62 00024CE2 _mull3_1: ! 63: 63 00024CE2 0000 .word L228 ! 64: 64 00024CE4 # ! 65: 65 00024CE4 # ! 66: 66 00024CE4 # ! 67: 67 00024CE4 # /************************************************************************ ! 68: 68 00024CE4 # * ! 69: 69 00024CE4 # * SUBTEST 1 - register addressing / single precsion accumulator ! 70: 70 00024CE4 # * ! 71: 71 00024CE4 # ************************************************************************/ ! 72: 72 00024CE4 # mull3_1() ! 73: 73 00024CE4 # { ! 74: 74 00024CE4 13 01a2 jbr L230 ! 75: 75 00024CE7 L231: ! 76: 76 00024CE7 # force_loop = FALSE; ! 77: 77 00024CE7 4d efffffff9f clrl _force_loop ! 78: 78 00024CED # subtest = 1; ! 79: 79 00024CED 0d 01 efffffff98 movl $1,_subtest ! 80: 80 00024CF4 # for( index = 0; index < max_mull_1_index; index++ ) { ! 81: 81 00024CF4 4d efffffff92 clrl _index ! 82: 82 00024CFA L234: ! 83: 83 00024CFA 1d efffffff8c efffffff87 cmpl _index,_max_mull_1_index ! 84: 84 00024D05 91 03 13 017e jgeq L233 ! 85: 85 00024D0A # sgl_value_1 = mull_1_data[index].op_1; /* get operand 1 */ ! 86: 86 00024D0A 5c 0c efffffff7b 50 mull3 $12,_index,r0 ! 87: 87 00024D12 0d e000000000 efffffff6f movl _mull_1_data(r0),_sgl_value_1 ! 88: 88 00024D1D # sgl_value_2 = mull_1_data[index].op_2; /* get operand 2 */ ! 89: 89 00024D1D 5c 0c efffffff68 50 mull3 $12,_index,r0 ! 90: 90 00024D25 0d e000000004 efffffff5c movl _mull_1_data+4(r0),_sgl_value_2 ! 91: 91 00024D30 # sgl_value_4 = mull_1_data[index].exp; /* get expected results */ ! 92: 92 00024D30 5c 0c efffffff55 50 mull3 $12,_index,r0 ! 93: 93 00024D38 0d e000000008 efffffff49 movl _mull_1_data+8(r0),_sgl_value_4 ! 94: 94 00024D43 # sgl_ld_acc = 0x12345678; /* set acc data pattern */ ! 95: 95 00024D43 0d 8f12345678 efffffff3e movl $305419896,_sgl_ld_acc ! 96: 96 00024D4E # sgl_expected = sgl_ld_acc; /* final Acc expected */ ! 97: 97 00024D4E 0d efffffff38 efffffff33 movl _sgl_ld_acc,_sgl_expected ! 98: 98 00024D59 # /* ! 99: 99 00024D59 # * If LOOP ON ERROR is set, this is the loop for this subtest. ! 100: 100 00024D59 # */ ! 101: 101 00024D59 # asm("_mull3_1_lp1:"); ! 102: 102 00024D59 _mull3_1_lp1: ! 103: 103 00024D59 # asm("movl _sgl_value_1,r3"); /* move the 1st data to r3 */ ! 104: 104 00024D59 0d efffffff2d 53 movl _sgl_value_1,r3 ! 105: 105 00024D60 # asm("movl _sgl_value_2,r4"); /* move the 2nd data to r4 */ ! 106: 106 00024D60 0d efffffff26 54 movl _sgl_value_2,r4 ! 107: 107 00024D67 # asm("ldf _sgl_ld_acc"); /* load the acc */ ! 108: 108 00024D67 06 efffffff1f ldf _sgl_ld_acc ! 109: 109 00024D6D # asm("mull3 r3,r4,r5"); /* do the multiply */ ! 110: 110 00024D6D 5c 53 54 55 mull3 r3,r4,r5 ! 111: 111 00024D71 # asm("nop"); ! 112: 112 00024D71 10 nop ! 113: 113 00024D72 # asm("stf _sgl_st_acc"); /* save the acc */ ! 114: 114 00024D72 26 efffffff14 stf _sgl_st_acc ! 115: 115 00024D78 # if( force_loop ) ! 116: 116 00024D78 5d efffffff0e tstl _force_loop ! 117: 117 00024D7E 31 02 jeql L235 ! 118: 118 00024D80 # asm("brb _mull3_1_lp1");; ! 119: 119 00024D80 11 d7 brb _mull3_1_lp1 ! 120: 120 00024D82 L235: ! 121: 121 00024D82 # asm("movl r5,_sgl_value_3"); ! 122: 122 00024D82 0d 55 efffffff03 movl r5,_sgl_value_3 ! 123: 123 00024D89 # if( sgl_expected != sgl_st_acc ) { /* COMPARE the values */ ! 124: 124 00024D89 1d effffffefd effffffef8 cmpl _sgl_expected,_sgl_st_acc ! 125: 125 00024D94 21 03 13 0098 jeql L236 ! 126: 126 00024D99 # errcnt++; /* bump the error count */ ! 127: 127 00024D99 6d effffffeed incl _errcnt ! 128: 128 00024D9F # if ( prt_error ) { ! 129: 129 00024D9F 5d effffffee7 tstl _prt_error ! 130: 130 00024DA5 31 64 jeql L237 ! 131: 131 00024DA7 # print_mull3_error("(Reg. Data) -THE ACC WAS MODIFIED"); ! 132: 132 00024DA7 .data 1 ! 133: 133 00000d3f * L239: ! 134: 134 00000d3f * 285265672E204461746129202 .ascii "(Reg. Data) -THE ACC WAS MODIFIED\0" ! 135: D544845204143432057415320 ! 136: 4D4F44494649454400 ! 137: 135 00000d61 * .text ! 138: 136 00024DA7 dd 8f00000d3f pushl $L239 ! 139: 137 00024DAD fe 08 ef000009ae callf $8,_print_mull3_error ! 140: 138 00024DB4 # writes("initial Acc = "); ! 141: 139 00024DB4 .data 1 ! 142: 140 00000d61 * L240: ! 143: 141 00000d61 * 696E697469616C20416363203 .ascii "initial Acc = \0" ! 144: D2000 ! 145: 142 00000d70 * .text ! 146: 143 00024DB4 dd 8f00000d61 pushl $L240 ! 147: 144 00024DBA fe 08 effffffecb callf $8,_writes ! 148: 145 00024DC1 # write32h( sgl_ld_acc ); ! 149: 146 00024DC1 dd effffffec5 pushl _sgl_ld_acc ! 150: 147 00024DC7 fe 08 effffffebe callf $8,_write32h ! 151: 148 00024DCE # writes(", final Acc = "); ! 152: 149 00024DCE .data 1 ! 153: 150 00000d70 * L242: ! 154: 151 00000d70 * 2C202020202066696E616C204 .ascii ", final Acc = \0" ! 155: 16363203D2000 ! 156: 152 00000d83 * .text ! 157: 153 00024DCE dd 8f00000d70 pushl $L242 ! 158: 154 00024DD4 fe 08 effffffeb1 callf $8,_writes ! 159: 155 00024DDB # write32h( sgl_st_acc ); ! 160: 156 00024DDB dd effffffeab pushl _sgl_st_acc ! 161: 157 00024DE1 fe 08 effffffea4 callf $8,_write32h ! 162: 158 00024DE8 # writes("\n expected Acc = "); ! 163: 159 00024DE8 .data 1 ! 164: 160 00000d83 * L243: ! 165: 161 00000d83 * 0A20202020202020202020202 .ascii "\12 expected Acc = \0" ! 166: 0202020202020202020202020 ! 167: 2020202065787065637465642 ! 168: 0416363203D2000 ! 169: 162 00000db0 * .text ! 170: 163 00024DE8 dd 8f00000d83 pushl $L243 ! 171: 164 00024DEE fe 08 effffffe97 callf $8,_writes ! 172: 165 00024DF5 # write32h( sgl_expected ); ! 173: 166 00024DF5 dd effffffe91 pushl _sgl_expected ! 174: 167 00024DFB fe 08 effffffe8a callf $8,_write32h ! 175: 168 00024E02 # writec('\n'); ! 176: 169 00024E02 dd 0a pushl $10 ! 177: 170 00024E04 fe 08 effffffe81 callf $8,_writec ! 178: 171 00024E0B # } ! 179: 172 00024E0B # if ( halt_flg ) /* halt on error? */ ! 180: 173 00024E0B L237: ! 181: 174 00024E0B 5d effffffe7b tstl _halt_flg ! 182: 175 00024E11 31 09 jeql L245 ! 183: 176 00024E13 # mull3_halt( 4 ); ! 184: 177 00024E13 dd 04 pushl $4 ! 185: 178 00024E15 fe 08 ef00000a4c callf $8,_mull3_halt ! 186: 179 00024E1C # if ( loop_on_err ) { ! 187: 180 00024E1C L245: ! 188: 181 00024E1C 5d effffffe6a tstl _loop_on_err ! 189: 182 00024E22 31 0d jeql L247 ! 190: 183 00024E24 # force_loop = TRUE; /* set the force loop flag */ ! 191: 184 00024E24 0d 01 effffffe61 movl $1,_force_loop ! 192: 185 00024E2B # asm("jmp _mull3_1_lp1"); /* and loop */ ! 193: 186 00024E2B 71 efffffff28 jmp _mull3_1_lp1 ! 194: 187 00024E31 # } /* end of loop-on-error */ ! 195: 188 00024E31 # } /* end of acc corr error */ ! 196: 189 00024E31 L247: ! 197: 190 00024E31 # if( sgl_value_4 != sgl_value_3 ) /* COMPARE the values */ ! 198: 191 00024E31 L236: ! 199: 192 00024E31 1d effffffe55 effffffe50 cmpl _sgl_value_4,_sgl_value_3 ! 200: 193 00024E3C 31 41 jeql L248 ! 201: 194 00024E3E # { ! 202: 195 00024E3E # errcnt++; /* bump the error count */ ! 203: 196 00024E3E 6d effffffe48 incl _errcnt ! 204: 197 00024E44 # if ( prt_error ) { ! 205: 198 00024E44 5d effffffe42 tstl _prt_error ! 206: 199 00024E4A 31 0d jeql L249 ! 207: 200 00024E4C # print_mull3_error("(Reg. Data) -BAD MULTIPLY RESULT"); ! 208: 201 00024E4C .data 1 ! 209: 202 00000db0 * L250: ! 210: 203 00000db0 * 285265672E204461746129202 .ascii "(Reg. Data) -BAD MULTIPLY RESULT\0" ! 211: D424144204D554C5449504C59 ! 212: 20524553554C5400 ! 213: 204 00000dd1 * .text ! 214: 205 00024E4C dd 8f00000db0 pushl $L250 ! 215: 206 00024E52 fe 08 ef00000909 callf $8,_print_mull3_error ! 216: 207 00024E59 # } ! 217: 208 00024E59 # if ( halt_flg ) /* halt on error? */ ! 218: 209 00024E59 L249: ! 219: 210 00024E59 5d effffffe2d tstl _halt_flg ! 220: 211 00024E5F 31 09 jeql L251 ! 221: 212 00024E61 # mull3_halt( 1 ); ! 222: 213 00024E61 dd 01 pushl $1 ! 223: 214 00024E63 fe 08 ef000009fe callf $8,_mull3_halt ! 224: 215 00024E6A # if ( loop_on_err ) { ! 225: 216 00024E6A L251: ! 226: 217 00024E6A 5d effffffe1c tstl _loop_on_err ! 227: 218 00024E70 31 0d jeql L252 ! 228: 219 00024E72 # force_loop = TRUE; /* set the force loop flag */ ! 229: 220 00024E72 0d 01 effffffe13 movl $1,_force_loop ! 230: 221 00024E79 # asm("jmp _mull3_1_lp1"); /* and loop */ ! 231: 222 00024E79 71 effffffeda jmp _mull3_1_lp1 ! 232: 223 00024E7F # } /* end of loop-on-error */ ! 233: 224 00024E7F # } /* end of multiply error */ ! 234: 225 00024E7F L252: ! 235: 226 00024E7F # } ! 236: 227 00024E7F L248: ! 237: 228 00024E7F L232: ! 238: 229 00024E7F 6d effffffe07 incl _index ! 239: 230 00024E85 13 fe72 jbr L234 ! 240: 231 00024E88 L233: ! 241: 232 00024E88 # } /* end of subtest 1 */ ! 242: 233 00024E88 40 ret#2 ! 243: 234 00024E89 .set L228,0x0 ! 244: 235 00024E89 L230: ! 245: 236 00024E89 13 fe5b jbr L231 ! 246: 237 00024E8C .data ! 247: 238 00000d38 * .text ! 248: 239 00024E8C .align 1 ! 249: 240 00024E8C .globl _mull3_2 ! 250: 241 00024E8C _mull3_2: ! 251: 242 00024E8C 0000 .word L253 ! 252: 243 00024E8E # ! 253: 244 00024E8E # ! 254: 245 00024E8E # ! 255: 246 00024E8E # /************************************************************************ ! 256: 247 00024E8E # * ! 257: 248 00024E8E # * SUBTEST 2 - cache addressing / double precsion accumulator ! 258: 249 00024E8E # * ! 259: 250 00024E8E # ************************************************************************/ ! 260: 251 00024E8E # mull3_2() ! 261: 252 00024E8E # { ! 262: 253 00024E8E 13 0201 jbr L255 ! 263: 254 00024E91 L256: ! 264: 255 00024E91 # force_loop = FALSE; ! 265: 256 00024E91 4d effffffdf5 clrl _force_loop ! 266: 257 00024E97 # subtest = 2; ! 267: 258 00024E97 0d 02 effffffdee movl $2,_subtest ! 268: 259 00024E9E # for( index = 0; index < max_mull_1_index; index++ ) { ! 269: 260 00024E9E 4d effffffde8 clrl _index ! 270: 261 00024EA4 L259: ! 271: 262 00024EA4 1d effffffde2 effffffddd cmpl _index,_max_mull_1_index ! 272: 263 00024EAF 91 03 13 01dd jgeq L258 ! 273: 264 00024EB4 # sgl_value_1 = mull_1_data[index].op_1; /* get operand 1 */ ! 274: 265 00024EB4 5c 0c effffffdd1 50 mull3 $12,_index,r0 ! 275: 266 00024EBC 0d e000000000 effffffdc5 movl _mull_1_data(r0),_sgl_value_1 ! 276: 267 00024EC7 # sgl_value_2 = mull_1_data[index].op_2; /* get operand 2 */ ! 277: 268 00024EC7 5c 0c effffffdbe 50 mull3 $12,_index,r0 ! 278: 269 00024ECF 0d e000000004 effffffdb2 movl _mull_1_data+4(r0),_sgl_value_2 ! 279: 270 00024EDA # sgl_value_4 = mull_1_data[index].exp; /* get expected results */ ! 280: 271 00024EDA 5c 0c effffffdab 50 mull3 $12,_index,r0 ! 281: 272 00024EE2 0d e000000008 effffffd9f movl _mull_1_data+8(r0),_sgl_value_4 ! 282: 273 00024EED # dbl_ld_acc.m = 0x12345678; /* set acc data pattern */ ! 283: 274 00024EED 0d 8f12345678 effffffd94 movl $305419896,_dbl_ld_acc ! 284: 275 00024EF8 # dbl_ld_acc.l = 0x9abcdef0; ! 285: 276 00024EF8 0d 8f9abcdef0 effffffd8d movl $-1698898192,_dbl_ld_acc+4 ! 286: 277 00024F03 # dbl_expected.m = dbl_ld_acc.m; /* final Acc expected */ ! 287: 278 00024F03 0d effffffd83 effffffd7e movl _dbl_ld_acc,_dbl_expected ! 288: 279 00024F0E # dbl_expected.l = dbl_ld_acc.l; ! 289: 280 00024F0E 0d effffffd7c effffffd77 movl _dbl_ld_acc+4,_dbl_expected+4 ! 290: 281 00024F19 # /* ! 291: 282 00024F19 # * If LOOP ON ERROR is set, this is the loop for this subtest. ! 292: 283 00024F19 # */ ! 293: 284 00024F19 # asm("_mull3_2_lp1:"); ! 294: 285 00024F19 _mull3_2_lp1: ! 295: 286 00024F19 # asm("ldd _dbl_ld_acc"); /* load the acc */ ! 296: 287 00024F19 07 effffffd6d ldd _dbl_ld_acc ! 297: 288 00024F1F # asm("mull3 _sgl_value_1,_sgl_value_2,_sgl_value_3"); ! 298: 289 00024F1F 5c effffffd67 effffffd62 mull3 _sgl_value_1,_sgl_value_2,_sgl_value_3 ! 299: effffffd5d ! 300: 290 00024F2F # asm("nop"); ! 301: 291 00024F2F 10 nop ! 302: 292 00024F30 # asm("std _dbl_st_acc"); /* save the acc */ ! 303: 293 00024F30 27 effffffd56 std _dbl_st_acc ! 304: 294 00024F36 # if( force_loop ) ! 305: 295 00024F36 5d effffffd50 tstl _force_loop ! 306: 296 00024F3C 31 02 jeql L260 ! 307: 297 00024F3E # asm("brb _mull3_2_lp1");; ! 308: 298 00024F3E 11 d9 brb _mull3_2_lp1 ! 309: 299 00024F40 L260: ! 310: 300 00024F40 # if( (dbl_expected.m != dbl_st_acc.m) || /* COMPARE the Acc */ ! 311: 301 00024F40 # (dbl_expected.l != dbl_st_acc.l) ) { ! 312: 302 00024F40 1d effffffd46 effffffd41 cmpl _dbl_expected,_dbl_st_acc ! 313: 303 00024F4B 21 10 jneq L9999 ! 314: 304 00024F4D 1d effffffd3d effffffd38 cmpl _dbl_expected+4,_dbl_st_acc+4 ! 315: 305 00024F58 21 03 13 00dd jeql L261 ! 316: 306 00024F5D L9999: ! 317: 307 00024F5D # errcnt++; /* bump the error count */ ! 318: 308 00024F5D 6d effffffd29 incl _errcnt ! 319: 309 00024F63 # if ( prt_error ) { ! 320: 310 00024F63 5d effffffd23 tstl _prt_error ! 321: 311 00024F69 21 03 13 00a6 jeql L262 ! 322: 312 00024F6E # print_mull3_error("(Memory data) -THE ACC WAS MODIFIED"); ! 323: 313 00024F6E .data 1 ! 324: 314 00000dd1 * L263: ! 325: 315 00000dd1 * 284D656D6F727920646174612 .ascii "(Memory data) -THE ACC WAS MODIFIED\0" ! 326: 9202D54484520414343205741 ! 327: 53204D4F44494649454400 ! 328: 316 00000df5 * .text ! 329: 317 00024F6E dd 8f00000dd1 pushl $L263 ! 330: 318 00024F74 fe 08 ef000007e7 callf $8,_print_mull3_error ! 331: 319 00024F7B # writes("initial Acc = "); ! 332: 320 00024F7B .data 1 ! 333: 321 00000df5 * L264: ! 334: 322 00000df5 * 696E697469616C20416363203 .ascii "initial Acc = \0" ! 335: D2000 ! 336: 323 00000e04 * .text ! 337: 324 00024F7B dd 8f00000df5 pushl $L264 ! 338: 325 00024F81 fe 08 effffffd04 callf $8,_writes ! 339: 326 00024F88 # write32h( dbl_ld_acc.m ); ! 340: 327 00024F88 dd effffffcfe pushl _dbl_ld_acc ! 341: 328 00024F8E fe 08 effffffcf7 callf $8,_write32h ! 342: 329 00024F95 # writec(' '); ! 343: 330 00024F95 dd 20 pushl $32 ! 344: 331 00024F97 fe 08 effffffcee callf $8,_writec ! 345: 332 00024F9E # write32h( dbl_ld_acc.l ); ! 346: 333 00024F9E dd effffffcec pushl _dbl_ld_acc+4 ! 347: 334 00024FA4 fe 08 effffffce1 callf $8,_write32h ! 348: 335 00024FAB # writes(", final Acc = "); ! 349: 336 00024FAB .data 1 ! 350: 337 00000e04 * L265: ! 351: 338 00000e04 * 2C202020202066696E616C204 .ascii ", final Acc = \0" ! 352: 16363203D2000 ! 353: 339 00000e17 * .text ! 354: 340 00024FAB dd 8f00000e04 pushl $L265 ! 355: 341 00024FB1 fe 08 effffffcd4 callf $8,_writes ! 356: 342 00024FB8 # write32h( dbl_st_acc.m ); ! 357: 343 00024FB8 dd effffffcce pushl _dbl_st_acc ! 358: 344 00024FBE fe 08 effffffcc7 callf $8,_write32h ! 359: 345 00024FC5 # writec(' '); ! 360: 346 00024FC5 dd 20 pushl $32 ! 361: 347 00024FC7 fe 08 effffffcbe callf $8,_writec ! 362: 348 00024FCE # write32h( dbl_st_acc.l ); ! 363: 349 00024FCE dd effffffcbc pushl _dbl_st_acc+4 ! 364: 350 00024FD4 fe 08 effffffcb1 callf $8,_write32h ! 365: 351 00024FDB # writes("\n expected Acc = "); ! 366: 352 00024FDB .data 1 ! 367: 353 00000e17 * L266: ! 368: 354 00000e17 * 0A20202020202020202020202 .ascii "\12 expected Acc = \0" ! 369: 0202020202020202020202020 ! 370: 2020202020202020202065787 ! 371: 0656374656420416363203D20 ! 372: 00 ! 373: 355 00000e4a * .text ! 374: 356 00024FDB dd 8f00000e17 pushl $L266 ! 375: 357 00024FE1 fe 08 effffffca4 callf $8,_writes ! 376: 358 00024FE8 # write32h( dbl_expected.m ); ! 377: 359 00024FE8 dd effffffc9e pushl _dbl_expected ! 378: 360 00024FEE fe 08 effffffc97 callf $8,_write32h ! 379: 361 00024FF5 # writec(' '); ! 380: 362 00024FF5 dd 20 pushl $32 ! 381: 363 00024FF7 fe 08 effffffc8e callf $8,_writec ! 382: 364 00024FFE # write32h( dbl_expected.l ); ! 383: 365 00024FFE dd effffffc8c pushl _dbl_expected+4 ! 384: 366 00025004 fe 08 effffffc81 callf $8,_write32h ! 385: 367 0002500B # writec('\n'); ! 386: 368 0002500B dd 0a pushl $10 ! 387: 369 0002500D fe 08 effffffc78 callf $8,_writec ! 388: 370 00025014 # } ! 389: 371 00025014 # if ( halt_flg ) /* halt on error? */ ! 390: 372 00025014 L262: ! 391: 373 00025014 5d effffffc72 tstl _halt_flg ! 392: 374 0002501A 31 09 jeql L267 ! 393: 375 0002501C # mull3_halt( 4 ); ! 394: 376 0002501C dd 04 pushl $4 ! 395: 377 0002501E fe 08 ef00000843 callf $8,_mull3_halt ! 396: 378 00025025 # if ( loop_on_err ) { ! 397: 379 00025025 L267: ! 398: 380 00025025 5d effffffc61 tstl _loop_on_err ! 399: 381 0002502B 31 0d jeql L268 ! 400: 382 0002502D # force_loop = TRUE; /* set the force loop flag */ ! 401: 383 0002502D 0d 01 effffffc58 movl $1,_force_loop ! 402: 384 00025034 # asm("jmp _mull3_2_lp1"); /* and loop */ ! 403: 385 00025034 71 effffffedf jmp _mull3_2_lp1 ! 404: 386 0002503A # } /* end of loop-on-error */ ! 405: 387 0002503A # } /* end of acc corr error */ ! 406: 388 0002503A L268: ! 407: 389 0002503A # if( sgl_value_4 != sgl_value_3 ) /* COMPARE the values */ ! 408: 390 0002503A L261: ! 409: 391 0002503A 1d effffffc4c effffffc47 cmpl _sgl_value_4,_sgl_value_3 ! 410: 392 00025045 31 41 jeql L269 ! 411: 393 00025047 # { ! 412: 394 00025047 # errcnt++; /* bump the error count */ ! 413: 395 00025047 6d effffffc3f incl _errcnt ! 414: 396 0002504D # if ( prt_error ) { ! 415: 397 0002504D 5d effffffc39 tstl _prt_error ! 416: 398 00025053 31 0d jeql L270 ! 417: 399 00025055 # print_mull3_error("(Memory data) -BAD MULTIPLY RESULT"); ! 418: 400 00025055 .data 1 ! 419: 401 00000e4a * L271: ! 420: 402 00000e4a * 284D656D6F727920646174612 .ascii "(Memory data) -BAD MULTIPLY RESULT\0" ! 421: 9202D424144204D554C544950 ! 422: 4C5920524553554C5400 ! 423: 403 00000e6d * .text ! 424: 404 00025055 dd 8f00000e4a pushl $L271 ! 425: 405 0002505B fe 08 ef00000700 callf $8,_print_mull3_error ! 426: 406 00025062 # } ! 427: 407 00025062 # if ( halt_flg ) /* halt on error? */ ! 428: 408 00025062 L270: ! 429: 409 00025062 5d effffffc24 tstl _halt_flg ! 430: 410 00025068 31 09 jeql L272 ! 431: 411 0002506A # mull3_halt( 1 ); ! 432: 412 0002506A dd 01 pushl $1 ! 433: 413 0002506C fe 08 ef000007f5 callf $8,_mull3_halt ! 434: 414 00025073 # if ( loop_on_err ) { ! 435: 415 00025073 L272: ! 436: 416 00025073 5d effffffc13 tstl _loop_on_err ! 437: 417 00025079 31 0d jeql L273 ! 438: 418 0002507B # force_loop = TRUE; /* set the force loop flag */ ! 439: 419 0002507B 0d 01 effffffc0a movl $1,_force_loop ! 440: 420 00025082 # asm("jmp _mull3_2_lp1"); /* and loop */ ! 441: 421 00025082 71 effffffe91 jmp _mull3_2_lp1 ! 442: 422 00025088 # } /* end of loop-on-error */ ! 443: 423 00025088 # } /* end of multiply error */ ! 444: 424 00025088 L273: ! 445: 425 00025088 # } ! 446: 426 00025088 L269: ! 447: 427 00025088 L257: ! 448: 428 00025088 6d effffffbfe incl _index ! 449: 429 0002508E 13 fe13 jbr L259 ! 450: 430 00025091 L258: ! 451: 431 00025091 # } /* end of subtest 2 */ ! 452: 432 00025091 40 ret#2 ! 453: 433 00025092 .set L253,0x0 ! 454: 434 00025092 L255: ! 455: 435 00025092 13 fdfc jbr L256 ! 456: 436 00025095 .data ! 457: 437 00000d38 * .text ! 458: 438 00025095 00 .align 1 ! 459: 439 00025096 .globl _mull3_3 ! 460: 440 00025096 _mull3_3: ! 461: 441 00025096 0000 .word L274 ! 462: 442 00025098 # ! 463: 443 00025098 # ! 464: 444 00025098 # ! 465: 445 00025098 # /************************************************************************ ! 466: 446 00025098 # * ! 467: 447 00025098 # * SUBTEST 3 - register corruption test ! 468: 448 00025098 # * ! 469: 449 00025098 # ************************************************************************/ ! 470: 450 00025098 # mull3_3() ! 471: 451 00025098 # { ! 472: 452 00025098 13 0188 jbr L276 ! 473: 453 0002509B L277: ! 474: 454 0002509B # force_loop = FALSE; ! 475: 455 0002509B 4d effffffbeb clrl _force_loop ! 476: 456 000250A1 # subtest = 2; ! 477: 457 000250A1 0d 02 effffffbe4 movl $2,_subtest ! 478: 458 000250A8 # fill_reg_buf( load_regs ); /* get pattern for registers */ ! 479: 459 000250A8 dd 8f00000000 pushl $_load_regs ! 480: 460 000250AE fe 08 effffffbd7 callf $8,_fill_reg_buf ! 481: 461 000250B5 # for( index = 0; index < max_mull_1_index; index++ ) { ! 482: 462 000250B5 4d effffffbd1 clrl _index ! 483: 463 000250BB L281: ! 484: 464 000250BB 1d effffffbcb effffffbc6 cmpl _index,_max_mull_1_index ! 485: 465 000250C6 91 03 13 0157 jgeq L280 ! 486: 466 000250CB # sgl_value_1 = mull_1_data[index].op_1; /* get operand 1 */ ! 487: 467 000250CB 5c 0c effffffbba 50 mull3 $12,_index,r0 ! 488: 468 000250D3 0d e000000000 effffffbae movl _mull_1_data(r0),_sgl_value_1 ! 489: 469 000250DE # sgl_value_2 = mull_1_data[index].op_2; /* get operand 2 */ ! 490: 470 000250DE 5c 0c effffffba7 50 mull3 $12,_index,r0 ! 491: 471 000250E6 0d e000000004 effffffb9b movl _mull_1_data+4(r0),_sgl_value_2 ! 492: 472 000250F1 # sgl_value_4 = mull_1_data[index].exp; /* get expected results */ ! 493: 473 000250F1 5c 0c effffffb94 50 mull3 $12,_index,r0 ! 494: 474 000250F9 0d e000000008 effffffb88 movl _mull_1_data+8(r0),_sgl_value_4 ! 495: 475 00025104 # /* ! 496: 476 00025104 # * If LOOP ON ERROR is set, this is the loop for this subtest. ! 497: 477 00025104 # */ ! 498: 478 00025104 # asm("_mull3_3_lp1:"); ! 499: 479 00025104 _mull3_3_lp1: ! 500: 480 00025104 # asm("loadr $0x1fff,_load_regs"); /* load regs 0 - 12 */ ! 501: 481 00025104 ab 891fff effffffb7f loadr $0x1fff,_load_regs ! 502: 482 0002510D # asm("mull3 _sgl_value_1,_sgl_value_2,_sgl_value_3"); ! 503: 483 0002510D 5c effffffb79 effffffb74 mull3 _sgl_value_1,_sgl_value_2,_sgl_value_3 ! 504: effffffb6f ! 505: 484 0002511D # asm("nop"); ! 506: 485 0002511D 10 nop ! 507: 486 0002511E # asm("storer $0x1fff,_store_regs"); /* store regs 0 - 12 */ ! 508: 487 0002511E bb 891fff effffffb65 storer $0x1fff,_store_regs ! 509: 488 00025127 # if( force_loop ) ! 510: 489 00025127 5d effffffb5f tstl _force_loop ! 511: 490 0002512D 31 02 jeql L282 ! 512: 491 0002512F # asm("brb _mull3_3_lp1"); ! 513: 492 0002512F 11 d3 brb _mull3_3_lp1 ! 514: 493 00025131 # /* ! 515: 494 00025131 # * Now check the result ! 516: 495 00025131 # */ ! 517: 496 00025131 # index2 = 0; ! 518: 497 00025131 L282: ! 519: 498 00025131 4d effffffb55 clrl _index2 ! 520: 499 00025137 # while( (load_regs[index2] == store_regs[index2]) && (index2 < 13) ) ! 521: 500 00025137 L283: ! 522: 501 00025137 0d effffffb4f 50 movl _index2,r0 ! 523: 502 0002513E 0d effffffb48 51 movl _index2,r1 ! 524: 503 00025145 1d 40effffffb40 cmpl _load_regs[r0],_store_regs[r1] ! 525: 41effffffb3a ! 526: 504 00025152 21 11 jneq L284 ! 527: 505 00025154 1d effffffb32 0d cmpl _index2,$13 ! 528: 506 0002515B 81 08 jgeq L284 ! 529: 507 0002515D # index2++; /* check reg values */ ! 530: 508 0002515D 6d effffffb29 incl _index2 ! 531: 509 00025163 11 d2 jbr L283 ! 532: 510 00025165 L284: ! 533: 511 00025165 # if( index2 < 13 ) { /* error if index2 < 13 */ ! 534: 512 00025165 1d effffffb21 0d cmpl _index2,$13 ! 535: 513 0002516C 91 03 13 00a8 jgeq L285 ! 536: 514 00025171 # errcnt++; /* bump the error count */ ! 537: 515 00025171 6d effffffb15 incl _errcnt ! 538: 516 00025177 # if ( prt_error ) { ! 539: 517 00025177 5d effffffb0f tstl _prt_error ! 540: 518 0002517D 31 74 jeql L286 ! 541: 519 0002517F # print_mull3_error(" -A REGISTER WAS MODIFIED"); ! 542: 520 0002517F .data 1 ! 543: 521 00000e6d * L287: ! 544: 522 00000e6d * 202D412052454749535445522 .ascii " -A REGISTER WAS MODIFIED\0" ! 545: 0574153204D4F444946494544 ! 546: 00 ! 547: 523 00000e87 * .text ! 548: 524 0002517F dd 8f00000e6d pushl $L287 ! 549: 525 00025185 fe 08 ef000005d6 callf $8,_print_mull3_error ! 550: 526 0002518C # writes("register "); ! 551: 527 0002518C .data 1 ! 552: 528 00000e87 * L288: ! 553: 529 00000e87 * 72656769737465722000 .ascii "register \0" ! 554: 530 00000e91 * .text ! 555: 531 0002518C dd 8f00000e87 pushl $L288 ! 556: 532 00025192 fe 08 effffffaf3 callf $8,_writes ! 557: 533 00025199 # writeh( index2 ); ! 558: 534 00025199 dd effffffaed pushl _index2 ! 559: 535 0002519F fe 08 effffffae6 callf $8,_writeh ! 560: 536 000251A6 # writes(" = "); ! 561: 537 000251A6 .data 1 ! 562: 538 00000e91 * L290: ! 563: 539 00000e91 * 203D2000 .ascii " = \0" ! 564: 540 00000e95 * .text ! 565: 541 000251A6 dd 8f00000e91 pushl $L290 ! 566: 542 000251AC fe 08 effffffad9 callf $8,_writes ! 567: 543 000251B3 # write32h( store_regs[index2] ); ! 568: 544 000251B3 0d effffffad3 50 movl _index2,r0 ! 569: 545 000251BA dd 40effffffacb pushl _store_regs[r0] ! 570: 546 000251C1 fe 08 effffffac4 callf $8,_write32h ! 571: 547 000251C8 # writes(", should be = "); ! 572: 548 000251C8 .data 1 ! 573: 549 00000e95 * L291: ! 574: 550 00000e95 * 2C202073686F756C642062652 .ascii ", should be = \0" ! 575: 03D2000 ! 576: 551 00000ea5 * .text ! 577: 552 000251C8 dd 8f00000e95 pushl $L291 ! 578: 553 000251CE fe 08 effffffab7 callf $8,_writes ! 579: 554 000251D5 # write32h( load_regs[index2] ); ! 580: 555 000251D5 0d effffffab1 50 movl _index2,r0 ! 581: 556 000251DC dd 40effffffaa9 pushl _load_regs[r0] ! 582: 557 000251E3 fe 08 effffffaa2 callf $8,_write32h ! 583: 558 000251EA # writec('\n'); ! 584: 559 000251EA dd 0a pushl $10 ! 585: 560 000251EC fe 08 effffffa99 callf $8,_writec ! 586: 561 000251F3 # } ! 587: 562 000251F3 # if ( halt_flg ) /* halt on error? */ ! 588: 563 000251F3 L286: ! 589: 564 000251F3 5d effffffa93 tstl _halt_flg ! 590: 565 000251F9 31 09 jeql L292 ! 591: 566 000251FB # mull3_halt( 2 ); ! 592: 567 000251FB dd 02 pushl $2 ! 593: 568 000251FD fe 08 ef00000664 callf $8,_mull3_halt ! 594: 569 00025204 # if ( loop_on_err ) { ! 595: 570 00025204 L292: ! 596: 571 00025204 5d effffffa82 tstl _loop_on_err ! 597: 572 0002520A 31 0d jeql L293 ! 598: 573 0002520C # force_loop = TRUE; /* set the force loop flag */ ! 599: 574 0002520C 0d 01 effffffa79 movl $1,_force_loop ! 600: 575 00025213 # asm("jmp _mull3_3_lp1"); /* and loop */ ! 601: 576 00025213 71 effffffeeb jmp _mull3_3_lp1 ! 602: 577 00025219 # }; /* end of loop-on-error */ ! 603: 578 00025219 L293: ! 604: 579 00025219 # } /* end of multiply error */ ! 605: 580 00025219 # } ! 606: 581 00025219 L285: ! 607: 582 00025219 L279: ! 608: 583 00025219 6d effffffa6d incl _index ! 609: 584 0002521F 13 fe99 jbr L281 ! 610: 585 00025222 L280: ! 611: 586 00025222 # } /* end of subtest 3 */ ! 612: 587 00025222 40 ret#2 ! 613: 588 00025223 .set L274,0x0 ! 614: 589 00025223 L276: ! 615: 590 00025223 13 fe75 jbr L277 ! 616: 591 00025226 .data ! 617: 592 00000d38 * .text ! 618: 593 00025226 .align 1 ! 619: 594 00025226 .globl _mull3_4 ! 620: 595 00025226 _mull3_4: ! 621: 596 00025226 0000 .word L294 ! 622: 597 00025228 # ! 623: 598 00025228 # ! 624: 599 00025228 # ! 625: 600 00025228 # /************************************************************************ ! 626: 601 00025228 # * ! 627: 602 00025228 # * SUBTEST 4 - PSL corruption test ! 628: 603 00025228 # * ! 629: 604 00025228 # ************************************************************************/ ! 630: 605 00025228 # mull3_4() ! 631: 606 00025228 # { ! 632: 607 00025228 13 019c jbr L296 ! 633: 608 0002522B L297: ! 634: 609 0002522B # force_loop = FALSE; ! 635: 610 0002522B 4d effffffa5b clrl _force_loop ! 636: 611 00025231 # subtest = 4; ! 637: 612 00025231 0d 04 effffffa54 movl $4,_subtest ! 638: 613 00025238 # status_index = 0; ! 639: 614 00025238 4d effffffa4e clrl _status_index ! 640: 615 0002523E # for( index = 0; index < max_mull_1_index; index++ ) { ! 641: 616 0002523E 4d effffffa48 clrl _index ! 642: 617 00025244 L300: ! 643: 618 00025244 1d effffffa42 effffffa3d cmpl _index,_max_mull_1_index ! 644: 619 0002524F 91 03 13 0172 jgeq L299 ! 645: 620 00025254 # sgl_value_1 = mull_1_data[index].op_1; /* get operand 1 */ ! 646: 621 00025254 5c 0c effffffa31 50 mull3 $12,_index,r0 ! 647: 622 0002525C 0d e000000000 effffffa25 movl _mull_1_data(r0),_sgl_value_1 ! 648: 623 00025267 # sgl_value_2 = mull_1_data[index].op_2; /* get operand 2 */ ! 649: 624 00025267 5c 0c effffffa1e 50 mull3 $12,_index,r0 ! 650: 625 0002526F 0d e000000004 effffffa12 movl _mull_1_data+4(r0),_sgl_value_2 ! 651: 626 0002527A # sgl_value_4 = mull_1_data[index].exp; /* get expected results */ ! 652: 627 0002527A 5c 0c effffffa0b 50 mull3 $12,_index,r0 ! 653: 628 00025282 0d e000000008 effffff9ff movl _mull_1_data+8(r0),_sgl_value_4 ! 654: 629 0002528D # sgl_dummy1 = status_array[status_index]; /* status = +, -, 0 */ ! 655: 630 0002528D 0d effffff9f9 50 movl _status_index,r0 ! 656: 631 00025294 0d 40effffff9f1 movl _status_array[r0],_sgl_dummy1 ! 657: effffff9ec ! 658: 632 000252A0 # /* ! 659: 633 000252A0 # * If LOOP ON ERROR is set, this is the loop for this subtest. ! 660: 634 000252A0 # */ ! 661: 635 000252A0 # asm("_mull3_4_lp1:"); ! 662: 636 000252A0 _mull3_4_lp1: ! 663: 637 000252A0 # asm("tstl _sgl_dummy1"); ! 664: 638 000252A0 5d effffff9e6 tstl _sgl_dummy1 ! 665: 639 000252A6 # asm("movpsl _init_psl"); /* save the initial PSL */ ! 666: 640 000252A6 cd effffff9e0 movpsl _init_psl ! 667: 641 000252AC # asm("mull3 _sgl_value_1,_sgl_value_2,_sgl_value_3"); ! 668: 642 000252AC 5c effffff9da effffff9d5 mull3 _sgl_value_1,_sgl_value_2,_sgl_value_3 ! 669: effffff9d0 ! 670: 643 000252BC # asm("movpsl _psl_val"); /* save the final PSL */ ! 671: 644 000252BC cd effffff9ca movpsl _psl_val ! 672: 645 000252C2 # if( force_loop ) ! 673: 646 000252C2 5d effffff9c4 tstl _force_loop ! 674: 647 000252C8 31 02 jeql L301 ! 675: 648 000252CA # asm("brb _mull3_4_lp1"); ! 676: 649 000252CA 11 d4 brb _mull3_4_lp1 ! 677: 650 000252CC # /* ! 678: 651 000252CC # * Now check the result ! 679: 652 000252CC # */ ! 680: 653 000252CC # exp_psl = init_psl & 0xffffff3; /* strip off the PSL status */ ! 681: 654 000252CC L301: ! 682: 655 000252CC bc 8f0ffffff3 effffff9b5 andl3 $268435443,_init_psl,r0 ! 683: 50 ! 684: 656 000252D8 0d 50 effffff9ad movl r0,_exp_psl ! 685: 657 000252DF # if( sgl_value_4 < 0 ) /* check the MULL result */ ! 686: 658 000252DF 5d effffff9a7 tstl _sgl_value_4 ! 687: 659 000252E5 81 07 jgeq L302 ! 688: 660 000252E7 # exp_psl |= PSL_N; /* set the NEGATIVE bit */ ! 689: 661 000252E7 8c 08 effffff99e orl2 $8,_exp_psl ! 690: 662 000252EE # if( !sgl_value_4 ) ! 691: 663 000252EE L302: ! 692: 664 000252EE 5d effffff998 tstl _sgl_value_4 ! 693: 665 000252F4 21 07 jneq L303 ! 694: 666 000252F6 # exp_psl |= PSL_Z; /* set the ZERO bit */ ! 695: 667 000252F6 8c 04 effffff98f orl2 $4,_exp_psl ! 696: 668 000252FD # if( psl_val != exp_psl ) { /* was the final PSL correct */ ! 697: 669 000252FD L303: ! 698: 670 000252FD 1d effffff989 effffff984 cmpl _psl_val,_exp_psl ! 699: 671 00025308 21 03 13 0098 jeql L304 ! 700: 672 0002530D # errcnt++; /* bump the error count */ ! 701: 673 0002530D 6d effffff979 incl _errcnt ! 702: 674 00025313 # if ( prt_error ) { ! 703: 675 00025313 5d effffff973 tstl _prt_error ! 704: 676 00025319 31 64 jeql L305 ! 705: 677 0002531B # print_mull3_error(" -INCORRECT FINAL PSL"); ! 706: 678 0002531B .data 1 ! 707: 679 00000ea5 * L306: ! 708: 680 00000ea5 * 202D494E434F5252454354204 .ascii " -INCORRECT FINAL PSL\0" ! 709: 6494E414C2050534C00 ! 710: 681 00000ebb * .text ! 711: 682 0002531B dd 8f00000ea5 pushl $L306 ! 712: 683 00025321 fe 08 ef0000043a callf $8,_print_mull3_error ! 713: 684 00025328 # writes("initial PSL = "); ! 714: 685 00025328 .data 1 ! 715: 686 00000ebb * L307: ! 716: 687 00000ebb * 696E697469616C2050534C203 .ascii "initial PSL = \0" ! 717: D2000 ! 718: 688 00000eca * .text ! 719: 689 00025328 dd 8f00000ebb pushl $L307 ! 720: 690 0002532E fe 08 effffff957 callf $8,_writes ! 721: 691 00025335 # write32h( init_psl ); ! 722: 692 00025335 dd effffff951 pushl _init_psl ! 723: 693 0002533B fe 08 effffff94a callf $8,_write32h ! 724: 694 00025342 # writes(", final PSL = "); ! 725: 695 00025342 .data 1 ! 726: 696 00000eca * L308: ! 727: 697 00000eca * 2C202066696E616C2050534C2 .ascii ", final PSL = \0" ! 728: 03D2000 ! 729: 698 00000eda * .text ! 730: 699 00025342 dd 8f00000eca pushl $L308 ! 731: 700 00025348 fe 08 effffff93d callf $8,_writes ! 732: 701 0002534F # write32h( psl_val ); ! 733: 702 0002534F dd effffff937 pushl _psl_val ! 734: 703 00025355 fe 08 effffff930 callf $8,_write32h ! 735: 704 0002535C # writes(", expected PSL = "); ! 736: 705 0002535C .data 1 ! 737: 706 00000eda * L309: ! 738: 707 00000eda * 2C20206578706563746564205 .ascii ", expected PSL = \0" ! 739: 0534C203D2000 ! 740: 708 00000eed * .text ! 741: 709 0002535C dd 8f00000eda pushl $L309 ! 742: 710 00025362 fe 08 effffff923 callf $8,_writes ! 743: 711 00025369 # write32h( exp_psl ); ! 744: 712 00025369 dd effffff91d pushl _exp_psl ! 745: 713 0002536F fe 08 effffff916 callf $8,_write32h ! 746: 714 00025376 # writec('\n'); ! 747: 715 00025376 dd 0a pushl $10 ! 748: 716 00025378 fe 08 effffff90d callf $8,_writec ! 749: 717 0002537F # } ! 750: 718 0002537F # if ( halt_flg ) /* halt on error? */ ! 751: 719 0002537F L305: ! 752: 720 0002537F 5d effffff907 tstl _halt_flg ! 753: 721 00025385 31 09 jeql L310 ! 754: 722 00025387 # mull3_halt( 3 ); ! 755: 723 00025387 dd 03 pushl $3 ! 756: 724 00025389 fe 08 ef000004d8 callf $8,_mull3_halt ! 757: 725 00025390 # if ( loop_on_err ) { ! 758: 726 00025390 L310: ! 759: 727 00025390 5d effffff8f6 tstl _loop_on_err ! 760: 728 00025396 31 0d jeql L311 ! 761: 729 00025398 # force_loop = TRUE; /* set the force loop flag */ ! 762: 730 00025398 0d 01 effffff8ed movl $1,_force_loop ! 763: 731 0002539F # asm("jmp _mull3_4_lp1"); /* and loop */ ! 764: 732 0002539F 71 effffffefb jmp _mull3_4_lp1 ! 765: 733 000253A5 # }; /* end of loop-on-error */ ! 766: 734 000253A5 L311: ! 767: 735 000253A5 # }; /* end of error */ ! 768: 736 000253A5 L304: ! 769: 737 000253A5 # if( ++status_index >= 3 ) ! 770: 738 000253A5 6d effffff8e1 incl _status_index ! 771: 739 000253AB 0d effffff8db 50 movl _status_index,r0 ! 772: 740 000253B2 1d 50 03 cmpl r0,$3 ! 773: 741 000253B5 91 06 jlss L312 ! 774: 742 000253B7 # status_index = 0; ! 775: 743 000253B7 4d effffff8cf clrl _status_index ! 776: 744 000253BD # } ! 777: 745 000253BD L312: ! 778: 746 000253BD L298: ! 779: 747 000253BD 6d effffff8c9 incl _index ! 780: 748 000253C3 13 fe7e jbr L300 ! 781: 749 000253C6 L299: ! 782: 750 000253C6 # } /* end of subtest 4 */ ! 783: 751 000253C6 40 ret#2 ! 784: 752 000253C7 .set L294,0x0 ! 785: 753 000253C7 L296: ! 786: 754 000253C7 13 fe61 jbr L297 ! 787: 755 000253CA .data ! 788: 756 00000d38 * .text ! 789: 757 000253CA .align 1 ! 790: 758 000253CA .globl _mull3_5 ! 791: 759 000253CA _mull3_5: ! 792: 760 000253CA 0000 .word L313 ! 793: 761 000253CC # ! 794: 762 000253CC # ! 795: 763 000253CC # ! 796: 764 000253CC # /************************************************************************ ! 797: 765 000253CC # * ! 798: 766 000253CC # * SUBTEST 5 - Pipelined Entry test ! 799: 767 000253CC # * ! 800: 768 000253CC # ************************************************************************/ ! 801: 769 000253CC # mull3_5() ! 802: 770 000253CC # { ! 803: 771 000253CC 13 01c3 jbr L315 ! 804: 772 000253CF L316: ! 805: 773 000253CF # force_loop = FALSE; ! 806: 774 000253CF 4d effffff8b7 clrl _force_loop ! 807: 775 000253D5 # subtest = 5; ! 808: 776 000253D5 0d 05 effffff8b0 movl $5,_subtest ! 809: 777 000253DC # for( index = 0; index < max_mull_1_index; index++ ) { ! 810: 778 000253DC 4d effffff8aa clrl _index ! 811: 779 000253E2 L319: ! 812: 780 000253E2 1d effffff8a4 effffff89f cmpl _index,_max_mull_1_index ! 813: 781 000253ED 91 03 13 019f jgeq L318 ! 814: 782 000253F2 # sgl_value_1 = mull_1_data[index].op_1; /* get operand 1 */ ! 815: 783 000253F2 5c 0c effffff893 50 mull3 $12,_index,r0 ! 816: 784 000253FA 0d e000000000 effffff887 movl _mull_1_data(r0),_sgl_value_1 ! 817: 785 00025405 # sgl_value_2 = mull_1_data[index].op_2; /* get operand 2 */ ! 818: 786 00025405 5c 0c effffff880 50 mull3 $12,_index,r0 ! 819: 787 0002540D 0d e000000004 effffff874 movl _mull_1_data+4(r0),_sgl_value_2 ! 820: 788 00025418 # sgl_value_4 = mull_1_data[index].exp; /* get expected results */ ! 821: 789 00025418 5c 0c effffff86d 50 mull3 $12,_index,r0 ! 822: 790 00025420 0d e000000008 effffff861 movl _mull_1_data+8(r0),_sgl_value_4 ! 823: 791 0002542B # sgl_ld_acc = 0x12345678; /* set acc data pattern */ ! 824: 792 0002542B 0d 8f12345678 effffff856 movl $305419896,_sgl_ld_acc ! 825: 793 00025436 # sgl_expected = sgl_ld_acc; /* final Acc expected */ ! 826: 794 00025436 0d effffff850 effffff84b movl _sgl_ld_acc,_sgl_expected ! 827: 795 00025441 # sgl_value_10 = 0x40800000; /* floating "1.0" */ ! 828: 796 00025441 0d 8f40800000 effffff840 movl $1082130432,_sgl_value_10 ! 829: 797 0002544C # /* ! 830: 798 0002544C # * If LOOP ON ERROR is set, this is the loop for this subtest. ! 831: 799 0002544C # */ ! 832: 800 0002544C # asm("_mull3_5_lp1:"); ! 833: 801 0002544C _mull3_5_lp1: ! 834: 802 0002544C # asm("ldf _sgl_ld_acc"); /* load the acc */ ! 835: 803 0002544C 06 effffff83a ldf _sgl_ld_acc ! 836: 804 00025452 # asm("mulf _sgl_value_10"); /* do a floating multiply */ ! 837: 805 00025452 e6 effffff834 mulf _sgl_value_10 ! 838: 806 00025458 # asm("mull3 _sgl_value_1,_sgl_value_2,_sgl_value_3"); ! 839: 807 00025458 5c effffff82e effffff829 mull3 _sgl_value_1,_sgl_value_2,_sgl_value_3 ! 840: effffff824 ! 841: 808 00025468 # asm("stf _sgl_st_acc"); /* save the acc */ ! 842: 809 00025468 26 effffff81e stf _sgl_st_acc ! 843: 810 0002546E # if( force_loop ) ! 844: 811 0002546E 5d effffff818 tstl _force_loop ! 845: 812 00025474 31 02 jeql L320 ! 846: 813 00025476 # asm("brb _mull3_5_lp1");; ! 847: 814 00025476 11 d4 brb _mull3_5_lp1 ! 848: 815 00025478 L320: ! 849: 816 00025478 # if( sgl_expected != sgl_st_acc ) { /* COMPARE the values */ ! 850: 817 00025478 1d effffff80e effffff809 cmpl _sgl_expected,_sgl_st_acc ! 851: 818 00025483 21 03 13 00b2 jeql L321 ! 852: 819 00025488 # errcnt++; /* bump the error count */ ! 853: 820 00025488 6d effffff7fe incl _errcnt ! 854: 821 0002548E # if ( prt_error ) { ! 855: 822 0002548E 5d effffff7f8 tstl _prt_error ! 856: 823 00025494 31 7e jeql L322 ! 857: 824 00025496 # print_mull3_error("(Piped Entry) -BAD FINAL ACC"); ! 858: 825 00025496 .data 1 ! 859: 826 00000eed * L323: ! 860: 827 00000eed * 28506970656420456E7472792 .ascii "(Piped Entry) -BAD FINAL ACC\0" ! 861: 9202D4241442046494E414C20 ! 862: 41434300 ! 863: 828 00000f0a * .text ! 864: 829 00025496 dd 8f00000eed pushl $L323 ! 865: 830 0002549C fe 08 ef000002bf callf $8,_print_mull3_error ! 866: 831 000254A3 # writes("initial Acc = "); ! 867: 832 000254A3 .data 1 ! 868: 833 00000f0a * L324: ! 869: 834 00000f0a * 696E697469616C20416363203 .ascii "initial Acc = \0" ! 870: D2000 ! 871: 835 00000f19 * .text ! 872: 836 000254A3 dd 8f00000f0a pushl $L324 ! 873: 837 000254A9 fe 08 effffff7dc callf $8,_writes ! 874: 838 000254B0 # write32h( sgl_ld_acc ); ! 875: 839 000254B0 dd effffff7d6 pushl _sgl_ld_acc ! 876: 840 000254B6 fe 08 effffff7cf callf $8,_write32h ! 877: 841 000254BD # writes(", final Acc = "); ! 878: 842 000254BD .data 1 ! 879: 843 00000f19 * L325: ! 880: 844 00000f19 * 2C202020202066696E616C204 .ascii ", final Acc = \0" ! 881: 16363203D2000 ! 882: 845 00000f2c * .text ! 883: 846 000254BD dd 8f00000f19 pushl $L325 ! 884: 847 000254C3 fe 08 effffff7c2 callf $8,_writes ! 885: 848 000254CA # write32h( sgl_st_acc ); ! 886: 849 000254CA dd effffff7bc pushl _sgl_st_acc ! 887: 850 000254D0 fe 08 effffff7b5 callf $8,_write32h ! 888: 851 000254D7 # writes("\nFPP operand = "); ! 889: 852 000254D7 .data 1 ! 890: 853 00000f2c * L326: ! 891: 854 00000f2c * 0A465050206F706572616E642 .ascii "\12FPP operand = \0" ! 892: 03D2000 ! 893: 855 00000f3c * .text ! 894: 856 000254D7 dd 8f00000f2c pushl $L326 ! 895: 857 000254DD fe 08 effffff7a8 callf $8,_writes ! 896: 858 000254E4 # write32h( sgl_value_10 ); ! 897: 859 000254E4 dd effffff7a2 pushl _sgl_value_10 ! 898: 860 000254EA fe 08 effffff79b callf $8,_write32h ! 899: 861 000254F1 # writes(", expected Acc = "); ! 900: 862 000254F1 .data 1 ! 901: 863 00000f3c * L327: ! 902: 864 00000f3c * 2C20206578706563746564204 .ascii ", expected Acc = \0" ! 903: 16363203D2000 ! 904: 865 00000f4f * .text ! 905: 866 000254F1 dd 8f00000f3c pushl $L327 ! 906: 867 000254F7 fe 08 effffff78e callf $8,_writes ! 907: 868 000254FE # write32h( sgl_expected ); ! 908: 869 000254FE dd effffff788 pushl _sgl_expected ! 909: 870 00025504 fe 08 effffff781 callf $8,_write32h ! 910: 871 0002550B # writec('\n'); ! 911: 872 0002550B dd 0a pushl $10 ! 912: 873 0002550D fe 08 effffff778 callf $8,_writec ! 913: 874 00025514 # } ! 914: 875 00025514 # if ( halt_flg ) /* halt on error? */ ! 915: 876 00025514 L322: ! 916: 877 00025514 5d effffff772 tstl _halt_flg ! 917: 878 0002551A 31 09 jeql L328 ! 918: 879 0002551C # mull3_halt( 5 ); ! 919: 880 0002551C dd 05 pushl $5 ! 920: 881 0002551E fe 08 ef00000343 callf $8,_mull3_halt ! 921: 882 00025525 # if ( loop_on_err ) { ! 922: 883 00025525 L328: ! 923: 884 00025525 5d effffff761 tstl _loop_on_err ! 924: 885 0002552B 31 0d jeql L329 ! 925: 886 0002552D # force_loop = TRUE; /* set the force loop flag */ ! 926: 887 0002552D 0d 01 effffff758 movl $1,_force_loop ! 927: 888 00025534 # asm("jmp _mull3_5_lp1"); /* and loop */ ! 928: 889 00025534 71 efffffff12 jmp _mull3_5_lp1 ! 929: 890 0002553A # } /* end of loop-on-error */ ! 930: 891 0002553A # } /* end of acc corr error */ ! 931: 892 0002553A L329: ! 932: 893 0002553A # if( sgl_value_4 != sgl_value_3 ) /* COMPARE the values */ ! 933: 894 0002553A L321: ! 934: 895 0002553A 1d effffff74c effffff747 cmpl _sgl_value_4,_sgl_value_3 ! 935: 896 00025545 31 41 jeql L330 ! 936: 897 00025547 # { ! 937: 898 00025547 # errcnt++; /* bump the error count */ ! 938: 899 00025547 6d effffff73f incl _errcnt ! 939: 900 0002554D # if ( prt_error ) { ! 940: 901 0002554D 5d effffff739 tstl _prt_error ! 941: 902 00025553 31 0d jeql L331 ! 942: 903 00025555 # print_mull3_error("(Piped Entry) -BAD MULTIPLY RESULT"); ! 943: 904 00025555 .data 1 ! 944: 905 00000f4f * L332: ! 945: 906 00000f4f * 28506970656420456E7472792 .ascii "(Piped Entry) -BAD MULTIPLY RESULT\0" ! 946: 9202D424144204D554C544950 ! 947: 4C5920524553554C5400 ! 948: 907 00000f72 * .text ! 949: 908 00025555 dd 8f00000f4f pushl $L332 ! 950: 909 0002555B fe 08 ef00000200 callf $8,_print_mull3_error ! 951: 910 00025562 # } ! 952: 911 00025562 # if ( halt_flg ) /* halt on error? */ ! 953: 912 00025562 L331: ! 954: 913 00025562 5d effffff724 tstl _halt_flg ! 955: 914 00025568 31 09 jeql L333 ! 956: 915 0002556A # mull3_halt( 1 ); ! 957: 916 0002556A dd 01 pushl $1 ! 958: 917 0002556C fe 08 ef000002f5 callf $8,_mull3_halt ! 959: 918 00025573 # if ( loop_on_err ) { ! 960: 919 00025573 L333: ! 961: 920 00025573 5d effffff713 tstl _loop_on_err ! 962: 921 00025579 31 0d jeql L334 ! 963: 922 0002557B # force_loop = TRUE; /* set the force loop flag */ ! 964: 923 0002557B 0d 01 effffff70a movl $1,_force_loop ! 965: 924 00025582 # asm("jmp _mull3_5_lp1"); /* and loop */ ! 966: 925 00025582 71 effffffec4 jmp _mull3_5_lp1 ! 967: 926 00025588 # } /* end of loop-on-error */ ! 968: 927 00025588 # } /* end of multiply error */ ! 969: 928 00025588 L334: ! 970: 929 00025588 # } ! 971: 930 00025588 L330: ! 972: 931 00025588 L317: ! 973: 932 00025588 6d effffff6fe incl _index ! 974: 933 0002558E 13 fe51 jbr L319 ! 975: 934 00025591 L318: ! 976: 935 00025591 # } /* end of subtest 5 */ ! 977: 936 00025591 40 ret#2 ! 978: 937 00025592 .set L313,0x0 ! 979: 938 00025592 L315: ! 980: 939 00025592 13 fe3a jbr L316 ! 981: 940 00025595 .data ! 982: 941 00000d38 * .text ! 983: 942 00025595 00 .align 1 ! 984: 943 00025596 .globl _mull3_6 ! 985: 944 00025596 _mull3_6: ! 986: 945 00025596 0000 .word L335 ! 987: 946 00025598 # ! 988: 947 00025598 # ! 989: 948 00025598 # ! 990: 949 00025598 # /************************************************************************ ! 991: 950 00025598 # * ! 992: 951 00025598 # * SUBTEST 6 - Pipelined Exit test ! 993: 952 00025598 # * ! 994: 953 00025598 # ************************************************************************/ ! 995: 954 00025598 # mull3_6() ! 996: 955 00025598 # { ! 997: 956 00025598 13 01c3 jbr L337 ! 998: 957 0002559B L338: ! 999: 958 0002559B # force_loop = FALSE; ! 1000: 959 0002559B 4d effffff6eb clrl _force_loop ! 1001: 960 000255A1 # subtest = 6; ! 1002: 961 000255A1 0d 06 effffff6e4 movl $6,_subtest ! 1003: 962 000255A8 # for( index = 0; index < max_mull_1_index; index++ ) { ! 1004: 963 000255A8 4d effffff6de clrl _index ! 1005: 964 000255AE L341: ! 1006: 965 000255AE 1d effffff6d8 effffff6d3 cmpl _index,_max_mull_1_index ! 1007: 966 000255B9 91 03 13 019f jgeq L340 ! 1008: 967 000255BE # sgl_value_1 = mull_1_data[index].op_1; /* get operand 1 */ ! 1009: 968 000255BE 5c 0c effffff6c7 50 mull3 $12,_index,r0 ! 1010: 969 000255C6 0d e000000000 effffff6bb movl _mull_1_data(r0),_sgl_value_1 ! 1011: 970 000255D1 # sgl_value_2 = mull_1_data[index].op_2; /* get operand 2 */ ! 1012: 971 000255D1 5c 0c effffff6b4 50 mull3 $12,_index,r0 ! 1013: 972 000255D9 0d e000000004 effffff6a8 movl _mull_1_data+4(r0),_sgl_value_2 ! 1014: 973 000255E4 # sgl_value_4 = mull_1_data[index].exp; /* get expected results */ ! 1015: 974 000255E4 5c 0c effffff6a1 50 mull3 $12,_index,r0 ! 1016: 975 000255EC 0d e000000008 effffff695 movl _mull_1_data+8(r0),_sgl_value_4 ! 1017: 976 000255F7 # sgl_ld_acc = 0x40800000; /* floating "1.0" */ ! 1018: 977 000255F7 0d 8f40800000 effffff68a movl $1082130432,_sgl_ld_acc ! 1019: 978 00025602 # sgl_value_10 = 0x12345678; /* set acc data pattern */ ! 1020: 979 00025602 0d 8f12345678 effffff67f movl $305419896,_sgl_value_10 ! 1021: 980 0002560D # sgl_expected = sgl_value_10; /* final Acc expected */ ! 1022: 981 0002560D 0d effffff679 effffff674 movl _sgl_value_10,_sgl_expected ! 1023: 982 00025618 # /* ! 1024: 983 00025618 # * If LOOP ON ERROR is set, this is the loop for this subtest. ! 1025: 984 00025618 # */ ! 1026: 985 00025618 # asm("_mull3_6_lp1:"); ! 1027: 986 00025618 _mull3_6_lp1: ! 1028: 987 00025618 # asm("ldf _sgl_ld_acc"); /* load the acc */ ! 1029: 988 00025618 06 effffff66e ldf _sgl_ld_acc ! 1030: 989 0002561E # asm("mull3 _sgl_value_1,_sgl_value_2,_sgl_value_3"); ! 1031: 990 0002561E 5c effffff668 effffff663 mull3 _sgl_value_1,_sgl_value_2,_sgl_value_3 ! 1032: effffff65e ! 1033: 991 0002562E # asm("mulf _sgl_value_10"); /* do a floating multiply */ ! 1034: 992 0002562E e6 effffff658 mulf _sgl_value_10 ! 1035: 993 00025634 # asm("stf _sgl_st_acc"); /* save the acc */ ! 1036: 994 00025634 26 effffff652 stf _sgl_st_acc ! 1037: 995 0002563A # if( force_loop ) ! 1038: 996 0002563A 5d effffff64c tstl _force_loop ! 1039: 997 00025640 31 02 jeql L342 ! 1040: 998 00025642 # asm("brb _mull3_6_lp1");; ! 1041: 999 00025642 11 d4 brb _mull3_6_lp1 ! 1042: 1000 00025644 L342: ! 1043: 1001 00025644 # if( sgl_expected != sgl_st_acc ) { /* COMPARE the values */ ! 1044: 1002 00025644 1d effffff642 effffff63d cmpl _sgl_expected,_sgl_st_acc ! 1045: 1003 0002564F 21 03 13 00b2 jeql L343 ! 1046: 1004 00025654 # errcnt++; /* bump the error count */ ! 1047: 1005 00025654 6d effffff632 incl _errcnt ! 1048: 1006 0002565A # if ( prt_error ) { ! 1049: 1007 0002565A 5d effffff62c tstl _prt_error ! 1050: 1008 00025660 31 7e jeql L344 ! 1051: 1009 00025662 # print_mull3_error("(Piped Exit) -BAD FINAL ACC"); ! 1052: 1010 00025662 .data 1 ! 1053: 1011 00000f72 * L345: ! 1054: 1012 00000f72 * 2850697065642045786974292 .ascii "(Piped Exit) -BAD FINAL ACC\0" ! 1055: 02D4241442046494E414C2041 ! 1056: 434300 ! 1057: 1013 00000f8e * .text ! 1058: 1014 00025662 dd 8f00000f72 pushl $L345 ! 1059: 1015 00025668 fe 08 ef000000f3 callf $8,_print_mull3_error ! 1060: 1016 0002566F # writes("initial Acc = "); ! 1061: 1017 0002566F .data 1 ! 1062: 1018 00000f8e * L346: ! 1063: 1019 00000f8e * 696E697469616C20416363203 .ascii "initial Acc = \0" ! 1064: D2000 ! 1065: 1020 00000f9d * .text ! 1066: 1021 0002566F dd 8f00000f8e pushl $L346 ! 1067: 1022 00025675 fe 08 effffff610 callf $8,_writes ! 1068: 1023 0002567C # write32h( sgl_ld_acc ); ! 1069: 1024 0002567C dd effffff60a pushl _sgl_ld_acc ! 1070: 1025 00025682 fe 08 effffff603 callf $8,_write32h ! 1071: 1026 00025689 # writes(", final Acc = "); ! 1072: 1027 00025689 .data 1 ! 1073: 1028 00000f9d * L347: ! 1074: 1029 00000f9d * 2C202020202066696E616C204 .ascii ", final Acc = \0" ! 1075: 16363203D2000 ! 1076: 1030 00000fb0 * .text ! 1077: 1031 00025689 dd 8f00000f9d pushl $L347 ! 1078: 1032 0002568F fe 08 effffff5f6 callf $8,_writes ! 1079: 1033 00025696 # write32h( sgl_st_acc ); ! 1080: 1034 00025696 dd effffff5f0 pushl _sgl_st_acc ! 1081: 1035 0002569C fe 08 effffff5e9 callf $8,_write32h ! 1082: 1036 000256A3 # writes("\nFPP operand = "); ! 1083: 1037 000256A3 .data 1 ! 1084: 1038 00000fb0 * L348: ! 1085: 1039 00000fb0 * 0A465050206F706572616E642 .ascii "\12FPP operand = \0" ! 1086: 03D2000 ! 1087: 1040 00000fc0 * .text ! 1088: 1041 000256A3 dd 8f00000fb0 pushl $L348 ! 1089: 1042 000256A9 fe 08 effffff5dc callf $8,_writes ! 1090: 1043 000256B0 # write32h( sgl_value_10 ); ! 1091: 1044 000256B0 dd effffff5d6 pushl _sgl_value_10 ! 1092: 1045 000256B6 fe 08 effffff5cf callf $8,_write32h ! 1093: 1046 000256BD # writes(", expected Acc = "); ! 1094: 1047 000256BD .data 1 ! 1095: 1048 00000fc0 * L349: ! 1096: 1049 00000fc0 * 2C20206578706563746564204 .ascii ", expected Acc = \0" ! 1097: 16363203D2000 ! 1098: 1050 00000fd3 * .text ! 1099: 1051 000256BD dd 8f00000fc0 pushl $L349 ! 1100: 1052 000256C3 fe 08 effffff5c2 callf $8,_writes ! 1101: 1053 000256CA # write32h( sgl_expected ); ! 1102: 1054 000256CA dd effffff5bc pushl _sgl_expected ! 1103: 1055 000256D0 fe 08 effffff5b5 callf $8,_write32h ! 1104: 1056 000256D7 # writec('\n'); ! 1105: 1057 000256D7 dd 0a pushl $10 ! 1106: 1058 000256D9 fe 08 effffff5ac callf $8,_writec ! 1107: 1059 000256E0 # } ! 1108: 1060 000256E0 # if ( halt_flg ) /* halt on error? */ ! 1109: 1061 000256E0 L344: ! 1110: 1062 000256E0 5d effffff5a6 tstl _halt_flg ! 1111: 1063 000256E6 31 09 jeql L350 ! 1112: 1064 000256E8 # mull3_halt( 5 ); ! 1113: 1065 000256E8 dd 05 pushl $5 ! 1114: 1066 000256EA fe 08 ef00000177 callf $8,_mull3_halt ! 1115: 1067 000256F1 # if ( loop_on_err ) { ! 1116: 1068 000256F1 L350: ! 1117: 1069 000256F1 5d effffff595 tstl _loop_on_err ! 1118: 1070 000256F7 31 0d jeql L351 ! 1119: 1071 000256F9 # force_loop = TRUE; /* set the force loop flag */ ! 1120: 1072 000256F9 0d 01 effffff58c movl $1,_force_loop ! 1121: 1073 00025700 # asm("jmp _mull3_6_lp1"); /* and loop */ ! 1122: 1074 00025700 71 efffffff12 jmp _mull3_6_lp1 ! 1123: 1075 00025706 # } /* end of loop-on-error */ ! 1124: 1076 00025706 # } /* end of acc corr error */ ! 1125: 1077 00025706 L351: ! 1126: 1078 00025706 # if( sgl_value_4 != sgl_value_3 ) /* COMPARE the values */ ! 1127: 1079 00025706 L343: ! 1128: 1080 00025706 1d effffff580 effffff57b cmpl _sgl_value_4,_sgl_value_3 ! 1129: 1081 00025711 31 41 jeql L352 ! 1130: 1082 00025713 # { ! 1131: 1083 00025713 # errcnt++; /* bump the error count */ ! 1132: 1084 00025713 6d effffff573 incl _errcnt ! 1133: 1085 00025719 # if ( prt_error ) { ! 1134: 1086 00025719 5d effffff56d tstl _prt_error ! 1135: 1087 0002571F 31 0d jeql L353 ! 1136: 1088 00025721 # print_mull3_error("(Piped Exit) -BAD MULTIPLY RESULT"); ! 1137: 1089 00025721 .data 1 ! 1138: 1090 00000fd3 * L354: ! 1139: 1091 00000fd3 * 2850697065642045786974292 .ascii "(Piped Exit) -BAD MULTIPLY RESULT\0" ! 1140: 02D424144204D554C5449504C ! 1141: 5920524553554C5400 ! 1142: 1092 00000ff5 * .text ! 1143: 1093 00025721 dd 8f00000fd3 pushl $L354 ! 1144: 1094 00025727 fe 08 ef00000034 callf $8,_print_mull3_error ! 1145: 1095 0002572E # } ! 1146: 1096 0002572E # if ( halt_flg ) /* halt on error? */ ! 1147: 1097 0002572E L353: ! 1148: 1098 0002572E 5d effffff558 tstl _halt_flg ! 1149: 1099 00025734 31 09 jeql L355 ! 1150: 1100 00025736 # mull3_halt( 1 ); ! 1151: 1101 00025736 dd 01 pushl $1 ! 1152: 1102 00025738 fe 08 ef00000129 callf $8,_mull3_halt ! 1153: 1103 0002573F # if ( loop_on_err ) { ! 1154: 1104 0002573F L355: ! 1155: 1105 0002573F 5d effffff547 tstl _loop_on_err ! 1156: 1106 00025745 31 0d jeql L356 ! 1157: 1107 00025747 # force_loop = TRUE; /* set the force loop flag */ ! 1158: 1108 00025747 0d 01 effffff53e movl $1,_force_loop ! 1159: 1109 0002574E # asm("jmp _mull3_6_lp1"); /* and loop */ ! 1160: 1110 0002574E 71 effffffec4 jmp _mull3_6_lp1 ! 1161: 1111 00025754 # } /* end of loop-on-error */ ! 1162: 1112 00025754 # } /* end of multiply error */ ! 1163: 1113 00025754 L356: ! 1164: 1114 00025754 # } ! 1165: 1115 00025754 L352: ! 1166: 1116 00025754 L339: ! 1167: 1117 00025754 6d effffff532 incl _index ! 1168: 1118 0002575A 13 fe51 jbr L341 ! 1169: 1119 0002575D L340: ! 1170: 1120 0002575D # } /* end of subtest 6 */ ! 1171: 1121 0002575D 40 ret#2 ! 1172: 1122 0002575E .set L335,0x0 ! 1173: 1123 0002575E L337: ! 1174: 1124 0002575E 13 fe3a jbr L338 ! 1175: 1125 00025761 .data ! 1176: 1126 00000d38 * .text ! 1177: 1127 00025761 00 .align 1 ! 1178: 1128 00025762 .globl _print_mull3_error ! 1179: 1129 00025762 _print_mull3_error: ! 1180: 1130 00025762 0000 .word L357 ! 1181: 1131 00025764 # ! 1182: 1132 00025764 # ! 1183: 1133 00025764 # ! 1184: 1134 00025764 # /***************************************************************************** ! 1185: 1135 00025764 # * ! 1186: 1136 00025764 # * Print an error message of the form: ! 1187: 1137 00025764 # * ! 1188: 1138 00025764 # * cycle: xx MULL3 test xx, subtest xx <"your message here"> ! 1189: 1139 00025764 # * operand 1 = xxxxxxxx, result = xxxxxxxx, data index = xx ! 1190: 1140 00025764 # * operand 2 = xxxxxxxx, expected = xxxxxxxx ! 1191: 1141 00025764 # * ! 1192: 1142 00025764 # *****************************************************************************/ ! 1193: 1143 00025764 # print_mull3_error(msg) ! 1194: 1144 00025764 # char *msg; /* addressing mode msg */ ! 1195: 1145 00025764 # { ! 1196: 1146 00025764 13 00fe jbr L359 ! 1197: 1147 00025767 L360: ! 1198: 1148 00025767 # writes(" \n"); /* start a new print line */ ! 1199: 1149 00025767 .data 1 ! 1200: 1150 00000ff5 * L361: ! 1201: 1151 00000ff5 * 200A00 .ascii " \12\0" ! 1202: 1152 00000ff8 * .text ! 1203: 1153 00025767 dd 8f00000ff5 pushl $L361 ! 1204: 1154 0002576D fe 08 effffff518 callf $8,_writes ! 1205: 1155 00025774 # writes("cycle: "); ! 1206: 1156 00025774 .data 1 ! 1207: 1157 00000ff8 * L362: ! 1208: 1158 00000ff8 * 6379636C653A2000 .ascii "cycle: \0" ! 1209: 1159 00001000 * .text ! 1210: 1160 00025774 dd 8f00000ff8 pushl $L362 ! 1211: 1161 0002577A fe 08 effffff50b callf $8,_writes ! 1212: 1162 00025781 # writed( cycle ); ! 1213: 1163 00025781 dd effffff505 pushl _cycle ! 1214: 1164 00025787 fe 08 effffff4fe callf $8,_writed ! 1215: 1165 0002578E # writes(" MULL3 test "); ! 1216: 1166 0002578E .data 1 ! 1217: 1167 00001000 * L364: ! 1218: 1168 00001000 * 20204D554C4C3320746573742 .ascii " MULL3 test \0" ! 1219: 000 ! 1220: 1169 0000100e * .text ! 1221: 1170 0002578E dd 8f00001000 pushl $L364 ! 1222: 1171 00025794 fe 08 effffff4f1 callf $8,_writes ! 1223: 1172 0002579B # writed( test_no ); ! 1224: 1173 0002579B dd effffff4eb pushl _test_no ! 1225: 1174 000257A1 fe 08 effffff4e4 callf $8,_writed ! 1226: 1175 000257A8 # writes(", subtest "); ! 1227: 1176 000257A8 .data 1 ! 1228: 1177 0000100e * L365: ! 1229: 1178 0000100e * 2C20737562746573742000 .ascii ", subtest \0" ! 1230: 1179 00001019 * .text ! 1231: 1180 000257A8 dd 8f0000100e pushl $L365 ! 1232: 1181 000257AE fe 08 effffff4d7 callf $8,_writes ! 1233: 1182 000257B5 # writed( subtest ); ! 1234: 1183 000257B5 dd effffff4d1 pushl _subtest ! 1235: 1184 000257BB fe 08 effffff4ca callf $8,_writed ! 1236: 1185 000257C2 # writes(" "); ! 1237: 1186 000257C2 .data 1 ! 1238: 1187 00001019 * L366: ! 1239: 1188 00001019 * 202000 .ascii " \0" ! 1240: 1189 0000101c * .text ! 1241: 1190 000257C2 dd 8f00001019 pushl $L366 ! 1242: 1191 000257C8 fe 08 effffff4bd callf $8,_writes ! 1243: 1192 000257CF # writes( msg ); ! 1244: 1193 000257CF dd ad04 pushl 4(fp) ! 1245: 1194 000257D2 fe 08 effffff4b3 callf $8,_writes ! 1246: 1195 000257D9 # writes("\n operand 1 = "); ! 1247: 1196 000257D9 .data 1 ! 1248: 1197 0000101c * L367: ! 1249: 1198 0000101c * 0A20206F706572616E6420312 .ascii "\12 operand 1 = \0" ! 1250: 03D2000 ! 1251: 1199 0000102c * .text ! 1252: 1200 000257D9 dd 8f0000101c pushl $L367 ! 1253: 1201 000257DF fe 08 effffff4a6 callf $8,_writes ! 1254: 1202 000257E6 # write32h( sgl_value_1 ); ! 1255: 1203 000257E6 dd effffff4a0 pushl _sgl_value_1 ! 1256: 1204 000257EC fe 08 effffff499 callf $8,_write32h ! 1257: 1205 000257F3 # writes(", result = "); ! 1258: 1206 000257F3 .data 1 ! 1259: 1207 0000102c * L368: ! 1260: 1208 0000102c * 2C20202020202020207265737 .ascii ", result = \0" ! 1261: 56C74203D2000 ! 1262: 1209 0000103f * .text ! 1263: 1210 000257F3 dd 8f0000102c pushl $L368 ! 1264: 1211 000257F9 fe 08 effffff48c callf $8,_writes ! 1265: 1212 00025800 # write32h( sgl_value_3 ); ! 1266: 1213 00025800 dd effffff486 pushl _sgl_value_3 ! 1267: 1214 00025806 fe 08 effffff47f callf $8,_write32h ! 1268: 1215 0002580D # writes(", data index = "); ! 1269: 1216 0002580D .data 1 ! 1270: 1217 0000103f * L369: ! 1271: 1218 0000103f * 2C2020206461746120696E646 .ascii ", data index = \0" ! 1272: 578203D2000 ! 1273: 1219 00001051 * .text ! 1274: 1220 0002580D dd 8f0000103f pushl $L369 ! 1275: 1221 00025813 fe 08 effffff472 callf $8,_writes ! 1276: 1222 0002581A # writed( index ); ! 1277: 1223 0002581A dd effffff46c pushl _index ! 1278: 1224 00025820 fe 08 effffff465 callf $8,_writed ! 1279: 1225 00025827 # writes("\n operand 2 = "); ! 1280: 1226 00025827 .data 1 ! 1281: 1227 00001051 * L370: ! 1282: 1228 00001051 * 0A20206F706572616E6420322 .ascii "\12 operand 2 = \0" ! 1283: 03D2000 ! 1284: 1229 00001061 * .text ! 1285: 1230 00025827 dd 8f00001051 pushl $L370 ! 1286: 1231 0002582D fe 08 effffff458 callf $8,_writes ! 1287: 1232 00025834 # write32h( sgl_value_2 ); ! 1288: 1233 00025834 dd effffff452 pushl _sgl_value_2 ! 1289: 1234 0002583A fe 08 effffff44b callf $8,_write32h ! 1290: 1235 00025841 # writes(", expected = "); ! 1291: 1236 00025841 .data 1 ! 1292: 1237 00001061 * L371: ! 1293: 1238 00001061 * 2C20202020202065787065637 .ascii ", expected = \0" ! 1294: 46564203D2000 ! 1295: 1239 00001074 * .text ! 1296: 1240 00025841 dd 8f00001061 pushl $L371 ! 1297: 1241 00025847 fe 08 effffff43e callf $8,_writes ! 1298: 1242 0002584E # write32h( sgl_value_4 ); ! 1299: 1243 0002584E dd effffff438 pushl _sgl_value_4 ! 1300: 1244 00025854 fe 08 effffff431 callf $8,_write32h ! 1301: 1245 0002585B # writec('\n'); ! 1302: 1246 0002585B dd 0a pushl $10 ! 1303: 1247 0002585D fe 08 effffff428 callf $8,_writec ! 1304: 1248 00025864 # } ! 1305: 1249 00025864 40 ret#2 ! 1306: 1250 00025865 .set L357,0x0 ! 1307: 1251 00025865 L359: ! 1308: 1252 00025865 13 feff jbr L360 ! 1309: 1253 00025868 .data ! 1310: 1254 00000d38 * .text ! 1311: 1255 00025868 .align 1 ! 1312: 1256 00025868 .globl _mull3_halt ! 1313: 1257 00025868 _mull3_halt: ! 1314: 1258 00025868 0000 .word L372 ! 1315: 1259 0002586A # ! 1316: 1260 0002586A # ! 1317: 1261 0002586A # ! 1318: 1262 0002586A # /*************************************************************************** ! 1319: 1263 0002586A # * ! 1320: 1264 0002586A # * HALT ON AN ERROR ! 1321: 1265 0002586A # * ! 1322: 1266 0002586A # ***************************************************************************/ ! 1323: 1267 0002586A # mull3_halt( code ) ! 1324: 1268 0002586A # int code; /* error code to use */ ! 1325: 1269 0002586A # { ! 1326: 1270 0002586A 13 0152 jbr L374 ! 1327: 1271 0002586D L375: ! 1328: 1272 0002586D # sgl_dummy1 = code; /* save the error code */ ! 1329: 1273 0002586D 0d ad04 effffff417 movl 4(fp),_sgl_dummy1 ! 1330: 1274 00025875 # asm("movl _test_no,r0"); /* r0 = test number */ ! 1331: 1275 00025875 0d effffff411 50 movl _test_no,r0 ! 1332: 1276 0002587C # asm("movl _subtest,r1"); /* r1 = subtest number */ ! 1333: 1277 0002587C 0d effffff40a 51 movl _subtest,r1 ! 1334: 1278 00025883 # asm("movl _sgl_dummy1,r2"); /* r2 = error code */ ! 1335: 1279 00025883 0d effffff403 52 movl _sgl_dummy1,r2 ! 1336: 1280 0002588A # asm("movl _cycle,r3"); /* r3 = cycle count */ ! 1337: 1281 0002588A 0d effffff3fc 53 movl _cycle,r3 ! 1338: 1282 00025891 # asm("movl _sgl_value_1,r4"); /* r4 = operand 1 */ ! 1339: 1283 00025891 0d effffff3f5 54 movl _sgl_value_1,r4 ! 1340: 1284 00025898 # asm("movl _sgl_value_2,r5"); /* r5 = operand 2 */ ! 1341: 1285 00025898 0d effffff3ee 55 movl _sgl_value_2,r5 ! 1342: 1286 0002589F # asm("movl _sgl_value_3,r6"); /* r6 = MULL3's result */ ! 1343: 1287 0002589F 0d effffff3e7 56 movl _sgl_value_3,r6 ! 1344: 1288 000258A6 # if( code == 1 ) { ! 1345: 1289 000258A6 1d ad04 01 cmpl 4(fp),$1 ! 1346: 1290 000258AA 21 11 jneq L376 ! 1347: 1291 000258AC # asm("movl _sgl_value_4,r7"); /* r7 = expected result */ ! 1348: 1292 000258AC 0d effffff3da 57 movl _sgl_value_4,r7 ! 1349: 1293 000258B3 # asm("movl _index,r8");; /* r8 = data index */ ! 1350: 1294 000258B3 0d effffff3d3 58 movl _index,r8 ! 1351: 1295 000258BA # } ! 1352: 1296 000258BA # else if( code == 2 ) { /* corrupted register */ ! 1353: 1297 000258BA 13 0100 jbr L377 ! 1354: 1298 000258BD L376: ! 1355: 1299 000258BD 1d ad04 02 cmpl 4(fp),$2 ! 1356: 1300 000258C1 21 3e jneq L378 ! 1357: 1301 000258C3 # sgl_dummy1 = store_regs[index2]; /* get the actual reg data */ ! 1358: 1302 000258C3 0d effffff3c3 50 movl _index2,r0 ! 1359: 1303 000258CA 0d 40effffff3bb movl _store_regs[r0],_sgl_dummy1 ! 1360: effffff3b6 ! 1361: 1304 000258D6 # sgl_dummy2 = load_regs[index2]; /* get the data expected */ ! 1362: 1305 000258D6 0d effffff3b0 50 movl _index2,r0 ! 1363: 1306 000258DD 0d 40effffff3a8 movl _load_regs[r0],_sgl_dummy2 ! 1364: effffff3a3 ! 1365: 1307 000258E9 # asm("movl _index2,r7"); /* r7 = register number */ ! 1366: 1308 000258E9 0d effffff39d 57 movl _index2,r7 ! 1367: 1309 000258F0 # asm("movl _sgl_dummy1,r8"); /* r8 = final reg value */ ! 1368: 1310 000258F0 0d effffff396 58 movl _sgl_dummy1,r8 ! 1369: 1311 000258F7 # asm("movl _sgl_dummy2,r9"); /* r9 = expected value */ ! 1370: 1312 000258F7 0d effffff38f 59 movl _sgl_dummy2,r9 ! 1371: 1313 000258FE # } ! 1372: 1314 000258FE # else if( code == 3 ) { /* corrupted PSL */ ! 1373: 1315 000258FE 13 00bc jbr L379 ! 1374: 1316 00025901 L378: ! 1375: 1317 00025901 1d ad04 03 cmpl 4(fp),$3 ! 1376: 1318 00025905 21 18 jneq L380 ! 1377: 1319 00025907 # asm("movl _init_psl,r7"); /* r7 = initial PSL */ ! 1378: 1320 00025907 0d effffff37f 57 movl _init_psl,r7 ! 1379: 1321 0002590E # asm("movl _psl_val,r8"); /* r8 = final PSL */ ! 1380: 1322 0002590E 0d effffff378 58 movl _psl_val,r8 ! 1381: 1323 00025915 # asm("movl _exp_psl,r9"); /* r9 = expected PSL */ ! 1382: 1324 00025915 0d effffff371 59 movl _exp_psl,r9 ! 1383: 1325 0002591C # } ! 1384: 1326 0002591C # else if( code == 4 ) { /* corrupted Acc */ ! 1385: 1327 0002591C 13 009e jbr L381 ! 1386: 1328 0002591F L380: ! 1387: 1329 0002591F 1d ad04 04 cmpl 4(fp),$4 ! 1388: 1330 00025923 21 6f jneq L382 ! 1389: 1331 00025925 # if( subtest == 1 ) { /* single precision */ ! 1390: 1332 00025925 1d effffff361 01 cmpl _subtest,$1 ! 1391: 1333 0002592C 21 33 jneq L383 ! 1392: 1334 0002592E # dbl_ld_acc.m = sgl_ld_acc; ! 1393: 1335 0002592E 0d effffff358 effffff353 movl _sgl_ld_acc,_dbl_ld_acc ! 1394: 1336 00025939 # dbl_ld_acc.l = 0; ! 1395: 1337 00025939 4d effffff351 clrl _dbl_ld_acc+4 ! 1396: 1338 0002593F # dbl_st_acc.m = sgl_st_acc; ! 1397: 1339 0002593F 0d effffff347 effffff342 movl _sgl_st_acc,_dbl_st_acc ! 1398: 1340 0002594A # dbl_st_acc.l = 0; ! 1399: 1341 0002594A 4d effffff340 clrl _dbl_st_acc+4 ! 1400: 1342 00025950 # dbl_expected.m = sgl_expected; ! 1401: 1343 00025950 0d effffff336 effffff331 movl _sgl_expected,_dbl_expected ! 1402: 1344 0002595B # dbl_expected.l = 0; ! 1403: 1345 0002595B 4d effffff32f clrl _dbl_expected+4 ! 1404: 1346 00025961 # }; ! 1405: 1347 00025961 L383: ! 1406: 1348 00025961 # asm("movl _index,r7"); /* r7 = data index */ ! 1407: 1349 00025961 0d effffff325 57 movl _index,r7 ! 1408: 1350 00025968 # asm("movl _dbl_ld_acc,r8"); /* r8 = MS initial Acc. */ ! 1409: 1351 00025968 0d effffff31e 58 movl _dbl_ld_acc,r8 ! 1410: 1352 0002596F # asm("movl _dbl_ld_acc+4,r9"); /* r9 = LS initial Acc. */ ! 1411: 1353 0002596F 0d effffff31b 59 movl _dbl_ld_acc+4,r9 ! 1412: 1354 00025976 # asm("movl _dbl_st_acc,r10"); /* r10 = MS final Acc. */ ! 1413: 1355 00025976 0d effffff310 5a movl _dbl_st_acc,r10 ! 1414: 1356 0002597D # asm("movl _dbl_st_acc+4,r11"); /* r11 = LS final Acc. */ ! 1415: 1357 0002597D 0d effffff30d 5b movl _dbl_st_acc+4,r11 ! 1416: 1358 00025984 # asm("movl _dbl_expected,r12"); /* r12 = MS expected Acc. */ ! 1417: 1359 00025984 0d effffff302 5c movl _dbl_expected,r12 ! 1418: 1360 0002598B # asm("movl _dbl_expected+4,r13"); /* r13 = LS expected Acc. */ ! 1419: 1361 0002598B 0d effffff2ff 5d movl _dbl_expected+4,r13 ! 1420: 1362 00025992 # } ! 1421: 1363 00025992 # else if( code == 5 ) { /* bad final Acc */ ! 1422: 1364 00025992 11 29 jbr L384 ! 1423: 1365 00025994 L382: ! 1424: 1366 00025994 1d ad04 05 cmpl 4(fp),$5 ! 1425: 1367 00025998 21 23 jneq L385 ! 1426: 1368 0002599A # asm("movl _index,r7"); /* r7 = data index */ ! 1427: 1369 0002599A 0d effffff2ec 57 movl _index,r7 ! 1428: 1370 000259A1 # asm("movl _sgl_ld_acc,r8"); /* r8 = initial Acc. */ ! 1429: 1371 000259A1 0d effffff2e5 58 movl _sgl_ld_acc,r8 ! 1430: 1372 000259A8 # asm("movl _sgl_value_10,r9"); /* r9 = fpp operand */ ! 1431: 1373 000259A8 0d effffff2de 59 movl _sgl_value_10,r9 ! 1432: 1374 000259AF # asm("movl _sgl_st_acc,r10"); /* r10 = final Acc. */ ! 1433: 1375 000259AF 0d effffff2d7 5a movl _sgl_st_acc,r10 ! 1434: 1376 000259B6 # asm("movl _sgl_expected,r11"); /* r11 = expected Acc. */ ! 1435: 1377 000259B6 0d effffff2d0 5b movl _sgl_expected,r11 ! 1436: 1378 000259BD # }; ! 1437: 1379 000259BD L385: ! 1438: 1380 000259BD L384: ! 1439: 1381 000259BD L381: ! 1440: 1382 000259BD L379: ! 1441: 1383 000259BD L377: ! 1442: 1384 000259BD # asm("halt"); /* HALT ... */ ! 1443: 1385 000259BD 00 halt ! 1444: 1386 000259BE # } ! 1445: 1387 000259BE 40 ret#2 ! 1446: 1388 000259BF .set L372,0x0 ! 1447: 1389 000259BF L374: ! 1448: 1390 000259BF 13 feab jbr L375 ! 1449: 1391 000259C2 .data ! 1450: 1391 0004A64E .data
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.