Changeset 8350
- Timestamp:
- Jan 28, 2008, 11:22:34 PM (17 years ago)
- File:
-
- 1 edited
-
branches/ia32/lisp-kernel/x86-spentry32.s (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/ia32/lisp-kernel/x86-spentry32.s
r8260 r8350 577 577 578 578 _spentry(nthrow1value) 579 __(int $3) 579 __(movb $1,%rcontext:tcr.unwinding) 580 local_label(_nthrow1v_nextframe): 581 __(subl $fixnumone,%imm0) 582 __(js local_label(_nthrow1v_done)) 583 __(movd %imm0,%mm0) 584 __(movl %rcontext:tcr.catch_top,%temp1) 585 __(movl catch_frame.link(%temp1),%imm0) 586 __(movl %imm0,%rcontext:tcr.catch_top) 587 __(movl catch_frame.db_link(%temp1),%imm0) 588 __(cmpl %imm0,%rcontext:tcr.db_link) 589 __(jz local_label(_nthrow1v_dont_unbind)) 590 __(push %temp1) 591 __(push %temp0) 592 __(push %arg_z) 593 __(push [$]local_label(_nthrow1v_back_from_unbind)) 594 __(jmp _SPunbind_to) 595 __(tra(local_label(_nthrow1v_back_from_unbind))) 596 __(pop %arg_z) 597 __(pop %temp0) 598 __(pop %temp1) 599 local_label(_nthrow1v_dont_unbind): 600 __(cmpb $unbound_marker,catch_frame.catch_tag(%temp1)) 601 __(je local_label(_nthrow1v_do_unwind)) 602 /* A catch frame. If the last one, restore context from there. */ 603 __(movd %mm0,%imm0) 604 __(test %imm0,%imm0) /* last catch frame? */ 605 __(jne local_label(_nthrow1v_skip)) 606 __(movl catch_frame.xframe(%temp1),%arg_y) 607 __(movl %arg_y,%rcontext:tcr.xframe) 608 __(movl catch_frame.esp(%temp1),%esp) 609 __(movl catch_frame.ebp(%temp1),%ebp) 610 __(movd catch_frame.foreign_sp(%temp1),%stack_temp) 611 __(movd %stack_temp,%rcontext:tcr.foreign_sp) 612 local_label(_nthrow1v_skip): 613 __(movl -(tsp_frame.fixed_overhead+fulltag_misc)(%temp1),%imm0) 614 __(movl %imm0,%rcontext:tcr.save_tsp) 615 __(movl %imm0,%rcontext:tcr.next_tsp) 616 __(movd %mm0,%imm0) 617 __(jmp local_label(_nthrow1v_nextframe)) 618 local_label(_nthrow1v_do_unwind): 619 /* This is harder, but not as hard (not as much BLTing) as the */ 620 /* multiple-value case. */ 621 __(movl catch_frame.xframe(%temp1),%arg_y) 622 __(movl %arg_y,%rcontext:tcr.xframe) 623 __(movl catch_frame.ebp(%temp1),%ebp) 624 __(movl catch_frame.esp(%temp1),%esp) 625 __(movd catch_frame.foreign_sp(%temp1),%stack_temp) 626 __(movd %stack_temp,%rcontext:tcr.foreign_sp) 627 /* Discard the catch frame so we can build a temp frame. */ 628 __(movl -(tsp_frame.fixed_overhead+fulltag_misc)(%temp1),%imm0) 629 __(movl %imm0,%rcontext:tcr.save_tsp) 630 __(movl %imm0,%rcontext:tcr.next_tsp) 631 __(movl catch_frame.pc(%temp1),%xfn) /* xfn is temp1 */ 632 __(TSP_Alloc_Fixed((3*node_size),%imm0)) 633 __(addl $tsp_frame.fixed_overhead,%imm0) 634 __(movl %ra0,(%imm0)) 635 __(movd %mm0,node_size*1(%imm0)) 636 __(movl %arg_z,node_size*2(%imm0)) 637 /* Ready to call cleanup code. Set up tra, jmp to %xfn. */ 638 __(push $local_label(_nthrow1v_called_cleanup)) 639 __(movb $0,%rcontext:tcr.unwinding) 640 __(jmp *%xfn) 641 __(tra(local_label(_nthrow1v_called_cleanup))) 642 __(movb $1,%rcontext:tcr.unwinding) 643 __(movl %rcontext:tcr.save_tsp,%imm0) 644 __(movl tsp_frame.data_offset+(0*node_size)(%imm0),%ra0) 645 __(movd tsp_frame.data_offset+(1*node_size)(%imm0),%mm0) 646 __(movl tsp_frame.data_offset+(2*node_size)(%imm0),%arg_z) 647 __(movl (%imm0),%imm0) 648 __(movl %imm0,%rcontext:tcr.save_tsp) 649 __(movl %imm0,%rcontext:tcr.next_tsp) 650 __(movd %mm0,%imm0) 651 __(jmp local_label(_nthrow1v_nextframe)) 652 local_label(_nthrow1v_done): 653 __(movb $0,%rcontext:tcr.unwinding) 654 __(check_pending_interrupt(%imm0)) 655 local_label(_nthrow1v_return): 656 __(jmp *%ra0) 580 657 _endsubp(nthrow1value) 581 658 … … 1025 1102 __(int $3) 1026 1103 _endsubp(makeu64) 1027 1104 1105 /* on entry: arg_z = symbol. On exit, arg_z = value (possibly */ 1106 /* unbound_marker), arg_y = symbol */ 1028 1107 _spentry(specref) 1029 1108 __(int $3) … … 1047 1126 1048 1127 _spentry(specrefcheck) 1049 __(movl %rcontext:tcr.tlb_pointer,%temp1)1050 1128 __(mov %arg_z,%arg_y) 1051 1129 __(movl symbol.binding_index(%arg_z),%imm0) 1052 1130 __(cmp %rcontext:tcr.tlb_limit,%imm0) 1053 1131 __(jae 7f) 1132 __(movl %rcontext:tcr.tlb_pointer,%temp1) 1054 1133 __(movl (%temp1,%imm0),%arg_z) 1055 1134 __(cmpb $no_thread_local_binding_marker,%arg_z_b) … … 1082 1161 _endsubp(mvpasssym) 1083 1162 1163 /* */ 1084 1164 _spentry(unbind) 1085 1165 __(int $3) … … 1091 1171 1092 1172 _spentry(unbind_to) 1093 __(int $3) 1173 __(movl %rcontext:tcr.db_link,%temp0) 1174 __(movl %rcontext:tcr.tlb_pointer,%arg_z) 1175 1: 1176 __(movl binding.sym(%temp0),%temp1) 1177 __(movl binding.val(%temp0),%arg_y) 1178 __(movl binding.link(%temp0),%temp0) 1179 __(movl %arg_y,(%arg_z,%temp1)) 1180 __(cmpl %temp0,%imm0) 1181 __(jne 1b) 1182 __(movl %temp0,%rcontext:tcr.db_link) 1183 __(ret) 1094 1184 _endsubp(unbind_to) 1095 1185 … … 1127 1217 _endsubp(bind_interrupt_level) 1128 1218 1219 /* Unbind CCL::*INTERRUPT-LEVEL*. If the value changes from negative to */ 1220 /* non-negative, check for pending interrupts. */ 1129 1221 _spentry(unbind_interrupt_level) 1130 __(int $3) 1222 __(movl %rcontext:tcr.tlb_pointer,%arg_y) 1223 __(movl INTERRUPT_LEVEL_BINDING_INDEX(%arg_y),%imm0) 1224 __(test %imm0,%imm0) 1225 __(movl %rcontext:tcr.db_link,%imm0) 1226 __(movl binding.val(%imm0),%temp0) 1227 __(movl binding.link(%imm0),%imm0) 1228 __(movl %temp0,INTERRUPT_LEVEL_BINDING_INDEX(%arg_y)) 1229 __(movl %imm0,%rcontext:tcr.db_link) 1230 __(js,pn 1f) 1231 0: __(repret) 1232 1: __(test %temp0,%temp0) 1233 __(js 0b) 1234 __(check_pending_enabled_interrupt(2f)) 1235 2: __(repret) 1131 1236 _endsubp(unbind_interrupt_level) 1132 1237
Note:
See TracChangeset
for help on using the changeset viewer.
