Changeset 13845
- Timestamp:
- Jun 15, 2010, 6:57:02 PM (14 years ago)
- File:
-
- 1 edited
-
branches/arm/lisp-kernel/arm-spentry.s (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/arm/lisp-kernel/arm-spentry.s
r13827 r13845 1192 1192 __(dnode_align(imm1,arg_y,node_size)) 1193 1193 __(cmp imm1,#stack_alloc_limit) 1194 __(b ge 9f)1194 __(bhs stack_misc_alloc_no_room) 1195 1195 __(mov imm0,#subtag_u32_vector) 1196 1196 __(orr imm0,imm0,arg_y,lsl #num_subtag_bits-fixnumshift) 1197 __(mov temp0,#stack_alloc_marker) 1198 __(mov temp1,sp) 1197 1199 __(stack_allocate_zeroed_ivector(imm0,imm1)) 1198 1200 __(unbox_fixnum(imm0,arg_z)) 1199 1201 __(strb imm0,[sp]) 1200 1202 __(add arg_z,sp,#fulltag_misc) 1203 __(stmdb sp!,{temp0,temp1}) 1201 1204 __(bx lr) 1202 1205 1: __(mov imm0,arg_y,lsl #num_subtag_bits-fixnumshift) … … 1218 1221 8: __(dnode_align(imm1,imm1,node_size)) 1219 1222 __(cmp imm1,#stack_alloc_limit) 1220 __(bhs 9f) 1223 __(bhs stack_misc_alloc_no_room) 1224 __(mov temp0,#stack_alloc_marker) 1225 __(mov temp1,sp) 1221 1226 __(stack_allocate_zeroed_ivector(imm0,imm1)) 1222 1227 __(add arg_z,sp,#fulltag_misc) 1223 __(bx lr) 1224 9: 1225 1226 /* Too large to safely fit on tstack. Heap-cons the vector, but make */ 1227 /* sure that there's an empty tsp frame to keep the compiler happy. */ 1228 0: 1229 __(movc16(imm0,make_header(1,subtag_u32_vector))) 1230 __(mov imm1,#0) 1231 __(stmdb sp!,{imm0,imm1}) 1232 __(b _SPmisc_alloc) 1228 __(stmdb sp!,{temp0,temp1}) 1229 __(bx lr) 1230 1231 1233 1232 1234 1233 … … 1624 1623 /* the current frame, then do funcall. */ 1625 1624 _spentry(tfuncallslide) 1626 __(restore_lisp_frame(imm0)) 1625 __(ldr fn,[sp,#lisp_frame.savefn]) 1626 __(ldr imm0,[sp,#lisp_frame.savevsp]) 1627 __(ldr lr,[sp,#lisp_frame.savelr]) 1628 __(discard_lisp_frame()) 1627 1629 /* can use temp0 as a temporary */ 1628 1630 __(sub imm1,nargs,#nargregs<<fixnumshift) … … 1861 1863 __(mov imm1,imm0,lsl #num_subtag_bits-fixnumshift) 1862 1864 __(orr imm1,imm1,#subtag_u32_vector) 1865 __(mov temp2,sp) 1866 __(mov arg_x,#stack_alloc_marker) 1863 1867 __(stack_allocate_zeroed_ivector(imm1,temp1)) 1864 1868 __(unbox_fixnum(imm1,temp0)) … … 1866 1870 __(add arg_z,sp,#fulltag_misc) 1867 1871 __(add imm0,sp,nargs) 1872 __(stmdb sp!,{arg_x,temp2}) 1868 1873 __(b 2f) 1869 1874 1: … … 2174 2179 __(bl _SPmisc_alloc) 2175 2180 __(restore_lisp_frame(imm0)) 2181 __(mov arg_y,temp2) 2182 initialize_vector: 2176 2183 __(ref_nrs_symbol(fname,init_misc,imm0)) 2177 2184 __(set_nargs(2)) 2178 __(mov arg_y,temp2)2179 2185 __(jump_fname()) 2180 2186 2181 2187 /* As in stack_misc_alloc above, only with a non-default initial-value. */ 2182 /* The funny part here is that we build a lisp frame, then push a vector 2183 /* on top of it. Shuffle things around, carefully. */ 2184 2188 /* Note that this effectively inlines _SPstack_misc_alloc. */ 2185 2189 2186 2190 _spentry(stack_misc_alloc_init) 2187 __(build_lisp_frame(imm0)) 2188 __(mov arg_x,sp) 2189 __(mov fn,#0) 2190 __(mov temp2,arg_z) /* initval */ 2191 __(mov arg_z,arg_y) /* subtag */ 2192 __(mov arg_y,arg_x) /* element-count */ 2193 __(bl _SPstack_misc_alloc) 2194 __(mov imm0,#0) 2195 __(ldr lr,[arg_x,#lisp_frame.savelr]) 2196 __(ldr fn,[arg_x,#lisp_frame.savefn]) 2197 __(ldr vsp,[arg_x,#lisp_frame.savevsp]) 2198 __(ldr imm1,[sp]) 2199 __(add imm2,imm1,#lisp_frame.size) 2200 __(str imm2,[sp]) 2201 __(str imm0,[arg_x,#lisp_frame.savelr]) 2202 __(str imm0,[arg_x,#lisp_frame.savefn]) 2203 __(str imm0,[arg_x,#lisp_frame.savevsp]) 2204 __(str imm0,[arg_x,#lisp_frame.marker]) 2205 __(str imm1,[sp,#lisp_frame.size]!) 2206 __(add arg_z,arg_z,#lisp_frame.size) 2207 __(ref_nrs_symbol(fname,init_misc,imm0)) 2208 __(set_nargs(2)) 2209 __(mov arg_y,temp2) 2210 __(jump_fname()) 2191 __(tst arg_x,#unsigned_byte_24_mask) 2192 __(uuo_error_reg_not_xtype(ne,arg_x,xtype_unsigned_byte_24)) 2193 __(unbox_fixnum(imm0,arg_y)) 2194 __(extract_fulltag(imm1,imm0)) 2195 __(cmp imm1,#fulltag_nodeheader) 2196 __(bne 1f) 2197 __(dnode_align(imm1,arg_x,node_size)) 2198 __(cmp imm1,#stack_alloc_limit) 2199 __(bge 0f) 2200 __(mov imm0,#subtag_u32_vector) 2201 __(orr imm0,imm0,arg_x,lsl #num_subtag_bits-fixnumshift) 2202 __(mov temp0,#stack_alloc_marker) 2203 __(mov temp1,sp) 2204 __(stack_allocate_zeroed_ivector(imm0,imm1)) 2205 __(unbox_fixnum(imm0,arg_y)) 2206 __(strb imm0,[sp]) 2207 __(mov arg_y,arg_z) 2208 __(add arg_z,sp,#fulltag_misc) 2209 __(stmdb sp!,{temp0,temp1}) 2210 __(b initialize_vector) 2211 1: __(mov imm0,arg_x,lsl #num_subtag_bits-fixnumshift) 2212 __(orr imm0,imm0,arg_y,lsr #fixnumshift) 2213 __(cmp arg_z,#max_32_bit_ivector_subtag<<fixnumshift) 2214 __(movle imm1,arg_x) 2215 __(ble 8f) 2216 __(cmp arg_z,#max_8_bit_ivector_subtag<<fixnumshift) 2217 __(movle imm1,arg_x,lsr #fixnumshift) 2218 __(ble 8f) 2219 __(cmp arg_z,#max_16_bit_ivector_subtag<<fixnumshift) 2220 __(movle imm1,arg_x,lsr #1) 2221 __(ble 8f) 2222 __(cmp arg_z,#subtag_double_float) 2223 __(moveq imm1,arg_x,lsl #1) 2224 __(addeq imm1,imm1,#node_size) 2225 __(addne imm1,arg_x,#7<<fixnumshift) 2226 __(movne imm1,imm1,lsr#3+fixnumshift) 2227 8: __(dnode_align(imm1,imm1,node_size)) 2228 __(cmp imm1,#stack_alloc_limit) 2229 __(bhs 0f) 2230 __(mov temp0,#stack_alloc_marker) 2231 __(mov temp1,sp) 2232 __(stack_allocate_zeroed_ivector(imm0,imm1)) 2233 __(mov arg_y,arg_z) 2234 __(add arg_z,sp,#fulltag_misc) 2235 __(stmdb sp!,{temp0,temp1}) 2236 __(b initialize_vector) 2237 2211 2238 2212 2239 _spentry(popj) … … 2214 2241 C(popj): 2215 2242 __(return_lisp_frame(imm0)) 2243 2244 /* Too large to safely fit on tstack. Heap-cons the vector, but make */ 2245 /* sure that there's an empty tsp frame to keep the compiler happy. */ 2246 0: 2247 __(mov imm0,#stack_alloc_marker) 2248 __(mov imm1,sp) 2249 __(stmdb sp!,{imm0,imm1}) 2250 __(b _SPmisc_alloc_init) 2216 2251 2217 2252 … … 4075 4110 __(bx lr) 4076 4111 4112 /* Too large to safely fit on tstack. Heap-cons the vector, but make */ 4113 /* sure that there's an empty tsp frame to keep the compiler happy. */ 4114 stack_misc_alloc_no_room: 4115 __(mov imm0,#stack_alloc_marker) 4116 __(mov imm1,sp) 4117 __(stmdb sp!,{imm0,imm1}) 4118 __(b _SPmisc_alloc) 4077 4119 4078 4120 _endfile
Note:
See TracChangeset
for help on using the changeset viewer.
