Changeset 9426f7c4 in mainline for kernel/arch/sparc32/src/trap_table.S
- Timestamp:
- 2013-11-12T22:24:04Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a3b034b
- Parents:
- bf677f6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc32/src/trap_table.S
rbf677f6 r9426f7c4 88 88 or %l3, %l4, %l3 89 89 and %l3, 0xff, %l3 90 91 90 mov %g0, %wim 91 92 mov %l5, %g5 93 mov %l6, %g6 94 mov %l7, %g7 95 92 96 save 93 97 std %l0, [%sp + 0] … … 99 103 std %i4, [%sp + 48] 100 104 std %i6, [%sp + 56] 105 mov %g5, %l5 106 mov %g6, %l6 107 mov %g7, %l7 101 108 restore 102 109 mov %l3, %wim … … 109 116 or %l3, %l4, %l3 110 117 and %l3, 0xff, %l3 118 mov %g0, %wim 111 119 mov \uwb, %g3 120 121 mov %l5, %g5 122 mov %l6, %g6 123 mov %l7, %g7 112 124 113 125 save … … 120 132 std %i4, [%g3 + 48] 121 133 std %i6, [%g3 + 56] 134 mov %g5, %l5 135 mov %g6, %l6 136 mov %g7, %l7 122 137 add \uwb, 64, \uwb 123 138 restore … … 223 238 224 239 window_overflow_trap: 240 mov %g7, %l0 241 225 242 /* rotate WIM on bit right, we have 8 windows */ 226 243 mov %wim, %l3 … … 240 257 241 258 /* Check whether previous mode was usermode */ 242 and %l0, (1 << 6), %l0 243 cmp %l0, 0 259 mov %psr, %l4 260 and %l4, (1 << 6), %l4 261 cmp %l4, 0 244 262 beq 1f 245 263 nop … … 305 323 306 324 /* go home */ 325 mov %l0, %g7 307 326 jmp %l1 308 327 rett %l2 309 328 310 329 window_underflow_trap: 330 mov %g7, %l0 331 311 332 /* rotate WIM on bit LEFT, we have 8 windows */ 312 333 mov %wim,%l3 … … 321 342 322 343 /* Check whether previous mode was usermode */ 323 mov %psr, %l 0324 and %l 0, (1 << 6), %l0325 cmp %l 0, 0344 mov %psr, %l4 345 and %l4, (1 << 6), %l4 346 cmp %l4, 0 326 347 beq 1f 327 348 nop … … 373 394 374 395 /* go home */ 396 mov %l0, %g7 375 397 jmp %l1 376 398 rett %l2 377 399 378 400 preemptible_trap: 401 /* Save %g7 */ 402 mov %g7, %l0 403 379 404 /* Check whether we landed in invalid window */ 380 405 get_wim_number %g6 … … 407 432 /* Load kernel stack pointer from invalid window */ 408 433 switch_to_invalid %g5, %g6 434 409 435 /* set uspace window mark */ 410 436 mov %g6, %l7 … … 412 438 and %l7, 0x7, %l7 413 439 or %l7, 0x10, %l7 440 414 441 /* Save stack pointer */ 415 442 mov %l5, %g7 … … 419 446 420 447 5: /* Set up stack frame */ 421 sub %sp, 12 0, %sp448 sub %sp, 128, %sp 422 449 423 450 /* Save trap data on stack */ 424 mov %psr, %l 0451 mov %psr, %l5 425 452 st %l1, [%sp + 92] 426 453 st %l2, [%sp + 96] 427 st %l 0, [%sp + 100]454 st %l5, [%sp + 100] 428 455 st %g1, [%sp + 104] 429 456 st %g2, [%sp + 108] 430 457 st %g3, [%sp + 112] 431 458 st %g4, [%sp + 116] 459 st %l0, [%sp + 120] 432 460 433 461 /* Enable traps */ … … 448 476 ld [%sp + 96], %l2 449 477 ld [%sp + 100], %l0 450 ld [%sp + 104], %g1451 ld [%sp + 108], %g2452 ld [%sp + 112], %g3453 ld [%sp + 116], %g4454 478 mov %l0, %psr 455 479 nop … … 486 510 7: inline_restore_kernel 487 511 488 8: jmp %l1 512 8: ld [%sp + 104], %g1 513 ld [%sp + 108], %g2 514 ld [%sp + 112], %g3 515 ld [%sp + 116], %g4 516 ld [%sp + 120], %g7 517 jmp %l1 489 518 rett %l2 490 519 … … 565 594 566 595 syscall_trap: 596 /* Save %g7 */ 597 mov %g7, %l0 598 567 599 /* Check whether we landed in invalid window */ 568 600 get_wim_number %g6 … … 609 641 610 642 5: /* Set up stack frame */ 611 sub %sp, 12 0, %sp643 sub %sp, 128, %sp 612 644 613 645 /* Save trap data on stack */ 614 mov %psr, %l 0646 mov %psr, %l5 615 647 st %l1, [%sp + 92] 616 648 st %l2, [%sp + 96] 617 st %l 0, [%sp + 100]649 st %l5, [%sp + 100] 618 650 st %g1, [%sp + 104] 619 651 st %g2, [%sp + 108] 620 652 st %g3, [%sp + 112] 621 653 st %g4, [%sp + 116] 654 st %l0, [%sp + 120] 622 655 623 656 /* Enable traps */ … … 645 678 ld [%sp + 96], %l2 646 679 ld [%sp + 100], %l0 647 ld [%sp + 104], %g1648 ld [%sp + 108], %g2649 ld [%sp + 112], %g3650 ld [%sp + 116], %g4651 652 680 mov %o0, %i0 653 681 mov %l0, %psr … … 685 713 7: inline_restore_kernel 686 714 687 8: jmp %l2 715 8: ld [%sp + 104], %g1 716 ld [%sp + 108], %g2 717 ld [%sp + 112], %g3 718 ld [%sp + 116], %g4 719 ld [%sp + 120], %g7 720 jmp %l2 688 721 rett %l2 + 4 689 722
Note:
See TracChangeset
for help on using the changeset viewer.