Changeset 141 for trunk/Softwares/Test
- Timestamp:
- Aug 2, 2010, 8:56:05 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Softwares/Test/Test_010/src/sys/crt0.s
r101 r141 37 37 _start: 38 38 /* 39 A (r1) B (r2) - D (r3 wait)CY OV (SR = r6, mask SR = r5) 40 (r4) (r7) 41 1) 0x00000000 0x00000000 - 0x00000000 0 0 42 2) 0x14011959 0x25071959 - 0x390832b2 0 0 43 3) 0xebfee6a7 0xdaf8e6a7 - 0xc6f7cd4e 1 0 44 4) 0xebfee6a7 0x25071959 - 0x11060001 1 0 45 5) 0x14011959 0xdaf8e6a7 - 0xeefa0001 0 0 46 6) 0x87654321 0xabcdef01 - 0x33333222 1 1 47 7) 0x789abcde 0x08765432 - 0x81111111 0 1 48 */ 39 A (r1) B (r2) CY - D (r3 wait)CY OV (SR = r6, mask SR = r5) 40 (r4) (r7) 41 1) 0x00000000 0x00000000 0 - 0x00000000 0 0 42 0x00000000 0x00000000 1 - 0x00000001 0 0 43 2) 0x14011959 0x25071959 0 - 0x390832b2 0 0 44 0x14011959 0x25071959 1 - 0x390832b3 0 0 45 3) 0xebfee6a7 0xdaf8e6a7 0 - 0xc6f7cd4e 1 0 46 0xebfee6a7 0xdaf8e6a7 1 - 0xc6f7cd4f 1 0 47 4) 0xebfee6a7 0x25071959 0 - 0x11060000 1 0 48 0xebfee6a7 0x25071959 1 - 0x11060001 1 0 49 5) 0x14011959 0xdaf8e6a7 0 - 0xeefa0000 0 0 50 0x14011959 0xdaf8e6a7 1 - 0xeefa0001 0 0 51 6) 0x87654321 0xabcdef01 0 - 0x33333222 1 1 52 0x87654321 0xabcdef01 1 - 0x33333223 1 1 53 7) 0x789abcde 0x08765432 0 - 0x81111110 0 1 54 0x789abcde 0x08765432 1 - 0x81111111 0 1 55 8) 0xffffffff 0x00000000 0 - 0xffffffff 0 0 56 0xffffffff 0x00000000 1 - 0x00000000 1 0 57 9) 0x7fffffff 0x00000000 0 - 0x7fffffff 0 0 58 0x7fffffff 0x00000000 1 - 0x80000000 0 1 59 60 */ 49 61 50 62 /* Mask to read OV (SR[11]), CY (SR[10]) and not F (SR[9]) */ 51 63 l.movhi r5, hi(0x00000c00) 52 64 l.ori r5, r5, lo(0x00000c00) 65 l.movhi r8, hi(0x80000000) 66 l.ori r8, r8, lo(0x80000000) 53 67 54 68 /**********/ 55 69 /* Test 1 */ 56 70 /**********/ 71 l.add r0,r0,r0 /* unset carry */ 57 72 l.movhi r1, hi(0x00000000) /* RA */ 58 73 l.ori r1, r1, lo(0x00000000) … … 79 94 l.nop 80 95 96 l.add r0,r8,r8 /* set carry */ 97 l.movhi r3, hi(0x00000001) /* RD wait */ 98 l.ori r3, r3, lo(0x00000001) 99 l.movhi r6, hi(0x00000000) /* SR wait */ 100 l.ori r6, r6, lo(0x00000000) 101 102 l.addc r4, r1, r2 103 104 /* Test flag */ 105 l.mfspr r7, r0, 17 106 l.and r7, r7, r5 107 108 l.sfeq r6, r7 109 l.bnf _end_ko 110 l.nop 111 112 /* Test result */ 113 l.sfeq r3, r4 114 l.bnf _end_ko 115 l.nop 116 81 117 /**********/ 82 118 /* Test 2 */ 83 119 /**********/ 120 l.add r0,r0,r0 /* unset carry */ 84 121 l.movhi r1, hi(0x14011959) /* RA */ 85 122 l.ori r1, r1, lo(0x14011959) … … 106 143 l.nop 107 144 145 l.add r0,r8,r8 /* set carry */ 146 l.movhi r3, hi(0x390832b3) /* RD wait */ 147 l.ori r3, r3, lo(0x390832b3) 148 l.movhi r6, hi(0x00000000) /* SR wait */ 149 l.ori r6, r6, lo(0x00000000) 150 151 l.addc r4, r1, r2 152 153 /* Test flag */ 154 l.mfspr r7, r0, 17 155 l.and r7, r7, r5 156 157 l.sfeq r6, r7 158 l.bnf _end_ko 159 l.nop 160 161 /* Test result */ 162 l.sfeq r3, r4 163 l.bnf _end_ko 164 l.nop 165 108 166 /**********/ 109 167 /* Test 3 */ 110 168 /**********/ 169 l.add r0,r0,r0 /* unset carry */ 111 170 l.movhi r1, hi(0xebfee6a7) /* RA */ 112 171 l.ori r1, r1, lo(0xebfee6a7) … … 133 192 l.nop 134 193 194 l.add r0,r8,r8 /* set carry */ 195 l.movhi r3, hi(0xc6f7cd4f) /* RD wait */ 196 l.ori r3, r3, lo(0xc6f7cd4f) 197 l.movhi r6, hi(0x00000400) /* SR wait */ 198 l.ori r6, r6, lo(0x00000400) 199 200 l.addc r4, r1, r2 201 202 /* Test flag */ 203 l.mfspr r7, r0, 17 204 l.and r7, r7, r5 205 206 l.sfeq r6, r7 207 l.bnf _end_ko 208 l.nop 209 210 /* Test result */ 211 l.sfeq r3, r4 212 l.bnf _end_ko 213 l.nop 214 135 215 /**********/ 136 216 /* Test 4 */ 137 217 /**********/ 218 l.add r0,r0,r0 /* unset carry */ 138 219 l.movhi r1, hi(0xebfee6a7) /* RA */ 139 220 l.ori r1, r1, lo(0xebfee6a7) 140 221 l.movhi r2, hi(0x25071959) /* RB */ 141 222 l.ori r2, r2, lo(0x25071959) 223 l.movhi r3, hi(0x11060000) /* RD wait */ 224 l.ori r3, r3, lo(0x11060000) 225 l.movhi r6, hi(0x00000400) /* SR wait */ 226 l.ori r6, r6, lo(0x00000400) 227 228 l.addc r4, r1, r2 229 230 /* Test flag */ 231 l.mfspr r7, r0, 17 232 l.and r7, r7, r5 233 234 l.sfeq r6, r7 235 l.bnf _end_ko 236 l.nop 237 238 /* Test result */ 239 l.sfeq r3, r4 240 l.bnf _end_ko 241 l.nop 242 243 l.add r0,r8,r8 /* set carry */ 142 244 l.movhi r3, hi(0x11060001) /* RD wait */ 143 245 l.ori r3, r3, lo(0x11060001) … … 159 261 l.bnf _end_ko 160 262 l.nop 161 263 162 264 /**********/ 163 265 /* Test 5 */ 164 266 /**********/ 267 l.add r0,r0,r0 /* unset carry */ 165 268 l.movhi r1, hi(0x14011959) /* RA */ 166 269 l.ori r1, r1, lo(0x14011959) 167 270 l.movhi r2, hi(0xdaf8e6a7) /* RB */ 168 271 l.ori r2, r2, lo(0xdaf8e6a7) 272 l.movhi r3, hi(0xeefa0000) /* RD wait */ 273 l.ori r3, r3, lo(0xeefa0000) 274 l.movhi r6, hi(0x00000000) /* SR wait */ 275 l.ori r6, r6, lo(0x00000000) 276 277 l.addc r4, r1, r2 278 279 /* Test flag */ 280 l.mfspr r7, r0, 17 281 l.and r7, r7, r5 282 283 l.sfeq r6, r7 284 l.bnf _end_ko 285 l.nop 286 287 /* Test result */ 288 l.sfeq r3, r4 289 l.bnf _end_ko 290 l.nop 291 292 l.add r0,r8,r8 /* set carry */ 169 293 l.movhi r3, hi(0xeefa0001) /* RD wait */ 170 294 l.ori r3, r3, lo(0xeefa0001) … … 186 310 l.bnf _end_ko 187 311 l.nop 188 312 189 313 /**********/ 190 314 /* Test 6 */ 191 315 /**********/ 316 l.add r0,r0,r0 /* unset carry */ 192 317 l.movhi r1, hi(0x87654321) /* RA */ 193 318 l.ori r1, r1, lo(0x87654321) … … 214 339 l.nop 215 340 341 l.add r0,r8,r8 /* set carry */ 342 l.movhi r3, hi(0x33333223) /* RD wait */ 343 l.ori r3, r3, lo(0x33333223) 344 l.movhi r6, hi(0x00000c00) /* SR wait */ 345 l.ori r6, r6, lo(0x00000c00) 346 347 l.addc r4, r1, r2 348 349 /* Test flag */ 350 l.mfspr r7, r0, 17 351 l.and r7, r7, r5 352 353 l.sfeq r6, r7 354 l.bnf _end_ko 355 l.nop 356 357 /* Test result */ 358 l.sfeq r3, r4 359 l.bnf _end_ko 360 l.nop 361 216 362 /**********/ 217 363 /* Test 7 */ 218 364 /**********/ 365 l.add r0,r0,r0 /* unset carry */ 219 366 l.movhi r1, hi(0x789abcde) /* RA */ 220 367 l.ori r1, r1, lo(0x789abcde) 221 368 l.movhi r2, hi(0x08765432) /* RB */ 222 369 l.ori r2, r2, lo(0x08765432) 370 l.movhi r3, hi(0x81111110) /* RD wait */ 371 l.ori r3, r3, lo(0x81111110) 372 l.movhi r6, hi(0x00000800) /* SR wait */ 373 l.ori r6, r6, lo(0x00000800) 374 375 l.addc r4, r1, r2 376 377 /* Test flag */ 378 l.mfspr r7, r0, 17 379 l.and r7, r7, r5 380 381 l.sfeq r6, r7 382 l.bnf _end_ko 383 l.nop 384 385 /* Test result */ 386 l.sfeq r3, r4 387 l.bnf _end_ko 388 l.nop 389 390 l.add r0,r8,r8 /* unset carry */ 223 391 l.movhi r3, hi(0x81111111) /* RD wait */ 224 392 l.ori r3, r3, lo(0x81111111) … … 242 410 243 411 /**********/ 412 /* Test 8 */ 413 /**********/ 414 l.add r0,r0,r0 /* unset carry */ 415 l.movhi r1, hi(0xffffffff) /* RA */ 416 l.ori r1, r1, lo(0xffffffff) 417 l.movhi r2, hi(0x00000000) /* RB */ 418 l.ori r2, r2, lo(0x00000000) 419 l.movhi r3, hi(0xffffffff) /* RD wait */ 420 l.ori r3, r3, lo(0xffffffff) 421 l.movhi r6, hi(0x00000000) /* SR wait */ 422 l.ori r6, r6, lo(0x00000000) 423 424 l.addc r4, r1, r2 425 426 /* Test flag */ 427 l.mfspr r7, r0, 17 428 l.and r7, r7, r5 429 430 l.sfeq r6, r7 431 l.bnf _end_ko 432 l.nop 433 434 /* Test result */ 435 l.sfeq r3, r4 436 l.bnf _end_ko 437 l.nop 438 439 l.add r0,r8,r8 /* unset carry */ 440 l.movhi r3, hi(0x00000000) /* RD wait */ 441 l.ori r3, r3, lo(0x00000000) 442 l.movhi r6, hi(0x00000400) /* SR wait */ 443 l.ori r6, r6, lo(0x00000400) 444 445 l.addc r4, r1, r2 446 447 /* Test flag */ 448 l.mfspr r7, r0, 17 449 l.and r7, r7, r5 450 451 l.sfeq r6, r7 452 l.bnf _end_ko 453 l.nop 454 455 /* Test result */ 456 l.sfeq r3, r4 457 l.bnf _end_ko 458 l.nop 459 460 /**********/ 461 /* Test 9 */ 462 /**********/ 463 l.add r0,r0,r0 /* unset carry */ 464 l.movhi r1, hi(0x7fffffff) /* RA */ 465 l.ori r1, r1, lo(0x7fffffff) 466 l.movhi r2, hi(0x00000000) /* RB */ 467 l.ori r2, r2, lo(0x00000000) 468 l.movhi r3, hi(0x7fffffff) /* RD wait */ 469 l.ori r3, r3, lo(0x7fffffff) 470 l.movhi r6, hi(0x00000000) /* SR wait */ 471 l.ori r6, r6, lo(0x00000000) 472 473 l.addc r4, r1, r2 474 475 /* Test flag */ 476 l.mfspr r7, r0, 17 477 l.and r7, r7, r5 478 479 l.sfeq r6, r7 480 l.bnf _end_ko 481 l.nop 482 483 /* Test result */ 484 l.sfeq r3, r4 485 l.bnf _end_ko 486 l.nop 487 488 l.add r0,r8,r8 /* unset carry */ 489 l.movhi r3, hi(0x80000000) /* RD wait */ 490 l.ori r3, r3, lo(0x80000000) 491 l.movhi r6, hi(0x00000800) /* SR wait */ 492 l.ori r6, r6, lo(0x00000800) 493 494 l.addc r4, r1, r2 495 496 /* Test flag */ 497 l.mfspr r7, r0, 17 498 l.and r7, r7, r5 499 500 l.sfeq r6, r7 501 l.bnf _end_ko 502 l.nop 503 504 /* Test result */ 505 l.sfeq r3, r4 506 l.bnf _end_ko 507 l.nop 508 509 /**********/ 244 510 /* End */ 245 511 /**********/
Note: See TracChangeset
for help on using the changeset viewer.