Changeset 13804
- Timestamp:
- Jun 10, 2010, 4:22:13 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/arm/lisp-kernel/arm-spentry.s
r13789 r13804 1752 1752 __(unbox_fixnum(imm1,arg_z)) 1753 1753 __(dnode_align(imm1,imm1,0)) 1754 __(add imm1,imm1,# macptr.size+node_size)1754 __(add imm1,imm1,#node_size) 1755 1755 __(add imm0,imm1,#node_size) 1756 __(cmp imm0,#stack_alloc_limit) 1757 __(mov temp0,sp) 1758 __(bhs 1f) 1756 1759 __(mov imm1,imm1,lsl #num_subtag_bits) 1757 1760 __(orr imm1,imm1,#subtag_u8_vector) 1758 __(cmp imm0,#stack_alloc_limit)1759 __(bhs 1f)1760 1761 __(stack_allocate_ivector(imm1,imm0)) 1762 __(add temp1,sp,#dnode_size) 1761 1763 __(movc16(imm1,make_header(macptr.element_count,subtag_macptr))) 1762 __(str imm1,[sp,#dnode_size]) 1764 __(str imm1,[sp,#-macptr.size]!) 1765 __(add arg_z,sp,#fulltag_misc) 1766 __(str temp1,[arg_z,#macptr.address]) 1763 1767 __(mov imm0,#0) 1764 __(str imm0,[sp,#dnode_size+macptr.type-fulltag_misc]) 1765 __(str imm0,[sp,#dnode_size+macptr.domain-fulltag_misc]) 1766 __(add imm0,sp,#macptr.size+dnode_size) 1767 __(str imm0,[sp,#dnode_size+macptr.address-fulltag_misc]) 1768 __(add arg_z,sp,#dnode_size+fulltag_misc) 1768 __(mov imm1,#stack_alloc_marker) 1769 __(str imm0,[arg_z,#macptr.type]) 1770 __(str imm0,[arg_z,#macptr.domain]) 1771 __(stmdb sp!,{imm1,temp0}) 1769 1772 __(bx lr) 1770 1773 1771 1774 /* Too big. Heap cons a gcable macptr */ 1772 1775 1: 1773 __(mov imm1,#s ubtag_u8_vector)1774 __(st r imm1,[sp,#-dnode_size]!)1776 __(mov imm1,#stack_alloc_marker) 1777 __(stmdb sp!,{imm1,temp0}) 1775 1778 __(set_nargs(1)) 1776 1779 __(ref_nrs_symbol(fname,new_gcable_ptr,imm0)) … … 1781 1784 __(unbox_fixnum(imm1,arg_z)) 1782 1785 __(dnode_align(imm1,imm1,0)) 1783 __(add imm1,imm1,# macptr.size+node_size)1786 __(add imm1,imm1,#node_size) 1784 1787 __(add imm0,imm1,#node_size) 1788 __(cmp imm0,#stack_alloc_limit) 1789 __(mov temp0,sp) 1790 __(bhs 1f) 1785 1791 __(mov imm1,imm1,lsl #num_subtag_bits) 1786 1792 __(orr imm1,imm1,#subtag_u8_vector) 1787 __(cmp imm0,#stack_alloc_limit) 1788 __(bhs 1f) 1789 __(stack_allocate_zeroed_ivector(imm1,imm0)) 1793 __(stack_allocate_ivector(imm1,imm0)) 1794 __(add temp1,sp,#dnode_size) 1790 1795 __(movc16(imm1,make_header(macptr.element_count,subtag_macptr))) 1791 __(str imm1,[sp,#dnode_size]) 1792 __(add imm0,sp,#macptr.size+dnode_size) 1793 __(str imm0,[sp,#dnode_size+macptr.address-fulltag_misc]) 1794 __(add arg_z,sp,#dnode_size+fulltag_misc) 1795 __(bx lr) 1796 __(str imm1,[sp,#-macptr.size]!) 1797 __(add arg_z,sp,#fulltag_misc) 1798 __(str temp1,[arg_z,#macptr.address]) 1799 __(mov imm0,#0) 1800 __(mov imm1,#stack_alloc_marker) 1801 __(str imm0,[arg_z,#macptr.type]) 1802 __(str imm0,[arg_z,#macptr.domain]) 1803 __(stmdb sp!,{imm1,temp0}) 1804 __(bx lr) 1805 1796 1806 /* Too big. Heap cons a gcable macptr */ 1797 1807 1: 1798 __(mov imm1,#s ubtag_u8_vector)1799 __(st r imm1,[sp,#-dnode_size]!)1808 __(mov imm1,#stack_alloc_marker) 1809 __(stmdb sp!,{imm1,temp0}) 1800 1810 __(mov arg_y,arg_z) /* save block size */ 1801 1811 __(mov arg_z,#nil_value) /* clear-p arg to %new-gcable-ptr */ … … 1970 1980 __(cmp imm0,#subtag_bignum) 1971 1981 __(uuo_error_reg_not_xtype(ne,arg_z,xtype_integer)) 1972 __(getvheader(imm 0,arg_z))1973 __(header_length(imm0,imm 0)) /* boxed length = scaled size */1982 __(getvheader(imm1,arg_z)) 1983 __(header_length(imm0,imm1)) /* boxed length = scaled size */ 1974 1984 __(add imm0,imm0,#misc_data_offset-4) /* bias, less 1 element */ 1975 1985 __(ldr imm0,[arg_z,imm0]) … … 2728 2738 __(vpush1(imm1)) 2729 2739 3: __(subs imm0,imm0,#1) 2730 __(bge 2 f)2740 __(bge 2b) 2731 2741 /* Save nargs and temp1 so that we can use them in the loop(s) */ 2732 2742 __(stmdb vsp!,{imm2,temp1}) … … 2763 2773 local_label(current_key_allow_other_keys_handled): 2764 2774 __(getvheader(imm0,temp1)) 2765 __(header_length( imm0,imm0))2766 __(add imm0, imm0,#misc_data_offset)2775 __(header_length(arg_x,imm0)) 2776 __(add imm0,arg_x,#misc_data_offset) 2767 2777 __(b local_label(defined_keyword_compare_test)) 2768 2778 local_label(defined_keyword_compare_loop): … … 2780 2790 local_label(defined_keyword_found): 2781 2791 __(sub imm0,temp0,imm0,lsl #1) 2782 __(ldr arg_x,[imm0,#- 4])2792 __(ldr arg_x,[imm0,#-8]) 2783 2793 __(cmp arg_x,#nil_value) /* seen this keyword yet ? */ 2784 2794 __(bne local_label(nextkeyvalpairnext)) 2785 2795 __(add arg_x,arg_x,#t_offset) 2786 __(str arg_x,[imm0,#- 4])2796 __(str arg_x,[imm0,#-8]) 2787 2797 __(add temp1,sp,#8) 2788 2798 __(ldr temp1,[temp1,imm2]) 2789 __(str temp1,[imm0,# 0])2799 __(str temp1,[imm0,#-4]) 2790 2800 local_label(nextkeyvalpairnext): 2791 2801 __(add imm2,imm2,#8) … … 2966 2976 __(str temp0,[rcontext,#tcr.last_lisp_frame]) 2967 2977 __(mov temp0,rcontext) 2978 __(test_fixnum(arg_z)) 2979 __(moveq imm1,arg_z,asr #fixnumshift) 2980 __(ldrne imm1,[arg_z,#misc_data_offset]) 2968 2981 __(mov imm0,#TCR_STATE_FOREIGN) 2969 2982 __(str imm0,[rcontext,#tcr.valence]) 2983 __(mov r4,imm1) 2970 2984 __(add sp,sp,#dnode_size) 2971 2985 __(ldmia sp!,{r0,r1,r2,r3}) 2972 __(blx arg_z) /* fix this */2986 __(blx r4) 2973 2987 __(mov temp1,#0) 2974 2988 __(mov temp2,#0) … … 3112 3126 local_label(not_aok): 3113 3127 __(getvheader(imm0,keyvect_reg)) 3114 __(header_length( imm0,imm0))3115 __(add imm0, imm0,#misc_data_offset)3128 __(header_length(arg_y,imm0)) 3129 __(add imm0,arg_y,#misc_data_offset) 3116 3130 __(b local_label(match_key_test)) 3117 3131 local_label(match_key_loop): … … 4051 4065 __(str arg_y,[rcontext,#tcr.xframe]) 4052 4066 __(beq local_label(_nthrow1v_dont_unbind)) 4053 __(do_unbind_to(imm 0,temp1,arg_x,arg_y))4067 __(do_unbind_to(imm1,temp1,arg_x,arg_y)) 4054 4068 local_label(_nthrow1v_dont_unbind): 4055 4069 __(ldr temp1,[temp0,#catch_frame.catch_tag]) … … 4058 4072 /* A catch frame. If the last one, restore context from there. */ 4059 4073 __(cmp temp2,#0) 4060 __(ldreq vsp,[sp,# lisp_frame.savevsp])4074 __(ldreq vsp,[sp,#catch_frame.size+lisp_frame.savevsp]) 4061 4075 __(add sp,sp,#catch_frame.size+lisp_frame.size) 4062 4076 __(b local_label(_nthrow1v_nextframe)) 4063 4077 local_label(_nthrow1v_do_unwind): 4064 pushdef(`__',`4065 .word 04066 ')4067 4078 /* This is harder, but not as hard (not as much BLTing) as the */ 4068 4079 /* multiple-value case. */ 4069 4080 /* Save our caller's LR and FN in the csp frame created by the unwind- */ 4070 4081 /* protect. (Clever, eh ?) */ 4071 4072 __(la tsp,-(tsp_frame.fixed_overhead+fulltag_misc)(temp0)) 4073 __(unlink(tsp)) 4074 __(ldr loc_pc,[sp,#lisp_frame.savelr]) 4075 __(ldr nfn,[sp,#lisp_frame.savefn]) 4076 __(mtctr loc_pc) /* cleanup code address. */ 4077 __(str(fn,lisp_frame.savefn(sp))) 4078 __(mflr loc_pc) 4082 __(add sp,sp,#catch_frame.size) 4083 /* swp is deprecated on ARMv6+. It's not useful as a basis 4084 for synchronization, but that's not why we're using it here. */ 4085 __(mov imm1,#0) 4086 __(mov temp0,sp) 4087 __(mov imm0,#3<<num_subtag_bits) 4088 __(orr imm0,imm0,#subtag_simple_vector) 4089 __(stmdb sp!,{imm0,imm1,arg_z,temp2}) 4090 __(add imm0,temp0,#lisp_frame.savelr) 4091 __(swp lr,lr,[imm0]) 4092 __(ldr nfn,[temp0,#lisp_frame.savefn]) 4093 __(str fn,[temp0,#lisp_frame.savefn]) 4094 __(ldr vsp,[temp0,#lisp_frame.savevsp]) 4079 4095 __(mov fn,nfn) 4080 __(str(loc_pc,lisp_frame.savelr(sp))) 4081 __(TSP_Alloc_Fixed_Boxed(2*node_size)) /* tsp overhead, value, throw count */ 4082 __(str(arg_z,tsp_frame.data_offset(tsp))) 4083 __(str(temp2,tsp_frame.data_offset+node_size(tsp))) 4084 __(ldr vsp,[sp,#lisp_frame.savevsp]) 4085 __(str(rzero,tcr.unwinding(rcontext))) 4086 __(bctrl) 4096 __(str imm1,[rcontext,#tcr.unwinding]) 4097 __(blx lr) 4087 4098 __(mov imm1,#1) 4088 __(ldr arg_z,[tsp,#tsp_frame.data_offset]) 4089 __(str(imm1,tcr.unwinding(rcontext))) 4090 __(ldr temp2,[tsp,#tsp_frame.data_offset+node_size]) 4091 __(ldr fn,[sp,#lisp_frame.savefn]) 4092 __(ldr loc_pc,[sp,#lisp_frame.savelr]) 4093 __(discard_lisp_frame()) 4094 __(mtlr loc_pc) 4095 __(unlink(tsp)) 4099 __(ldr arg_z,[sp,#8]) 4100 __(str imm1,[rcontext,#tcr.unwinding]) 4101 __(ldr temp2,[sp,#12]) 4102 __(add sp,sp,#4*node_size) 4103 __(restore_lisp_frame(imm0)) 4096 4104 __(b local_label(_nthrow1v_nextframe)) 4097 popdef(`__')4098 4105 local_label(_nthrow1v_done): 4099 4106 __(mov imm0,#0)
Note: See TracChangeset
for help on using the changeset viewer.