Changeset 557 for trunk/ccl/lispkernel/spentry.s
 Timestamp:
 Feb 22, 2004, 1:27:13 AM (16 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/ccl/lispkernel/spentry.s
r529 r557 100 100 __(li fn,0) 101 101 __(add imm1,vsp,nargs) 102 __(la imm1, 4(imm1))102 __(la imm1,node_size(imm1)) 103 103 __(bne cr0,local_label(_throw_all_values)) 104 104 __(set_nargs(1)) … … 127 127 __(bne cr1,local_label(_throw_multiple)) 128 128 /* Catcher expects single value in arg_z */ 129 __(ldr(arg_z, 4(imm0)))129 __(ldr(arg_z,node_size(imm0))) 130 130 __(b local_label(_throw_pushed_values)) 131 131 local_label(_throw_multiple): … … 135 135 __(subi imm2,imm2,fixnum_one) 136 136 __(cmpri(imm2,0)) 137 __(l wzu temp0,4(imm0))137 __(ldru(temp0,node_size(imm0))) 138 138 __(push(temp0,imm1)) 139 139 __(bgt local_label(_throw_mvloop)) … … 190 190 __(b local_label(_nthrowv_push_test)) 191 191 local_label(_nthrowv_push_loop): 192 __(l wzu temp1,4(imm1))192 __(ldru(temp1,node_size(imm1))) 193 193 __(push(temp1,imm0)) 194 194 local_label(_nthrowv_push_test): … … 227 227 __(add imm1,nargs,vsp) 228 228 __(ldr(imm0,tsp_frame.backlink(tsp))) /* end of tsp frame */ 229 __(str(rzero, 4(imm0)))229 __(str(rzero,node_size(imm0))) 230 230 __(la imm0,tsp_frame.data_offset(tsp)) 231 231 __(str(nargs,0(imm0))) 232 232 __(b local_label(_nthrowv_tpushtest)) 233 233 local_label(_nthrowv_tpushloop): 234 __(l wzu temp0,4(imm1))235 __(stru(temp0, 4(imm0)))234 __(ldru(temp0,node_size(imm1))) 235 __(stru(temp0,node_size(imm0))) 236 236 __(subi imm2,imm2,fixnum_one) 237 237 local_label(_nthrowv_tpushtest): 238 238 __(cmpri(imm2,0)) 239 239 __(bne local_label(_nthrowv_tpushloop)) 240 __(stru(imm4, 4(imm0)))240 __(stru(imm4,node_size(imm0))) 241 241 __(ldr(vsp,lisp_frame.savevsp(sp))) 242 242 __(str(rzero,lisp_frame.savevsp(sp))) /* tell stack overflow code to skip this frame */ … … 251 251 __(b local_label(_nthrowv_tpoptest)) 252 252 local_label(_nthrowv_tpoploop): 253 __(l wzu temp0,4(imm0))253 __(ldru(temp0,node_size(imm0))) 254 254 __(vpush(temp0)) 255 255 __(subi imm2,imm2,fixnum_one) … … 257 257 __(cmpri(imm2,0)) 258 258 __(bne local_label(_nthrowv_tpoploop)) 259 __(ldr(imm4, 4(imm0)))259 __(ldr(imm4,node_size(imm0))) 260 260 __(unlink(tsp)) 261 261 __(b local_label(_nthrowv_nextframe)) … … 319 319 __(TSP_Alloc_Fixed_Boxed(8)) /* tsp overhead, value, throw count */ 320 320 __(str(arg_z,tsp_frame.data_offset(tsp))) 321 __(str(imm4,tsp_frame.data_offset+ 4(tsp)))321 __(str(imm4,tsp_frame.data_offset+node_size(tsp))) 322 322 __(ldr(vsp,lisp_frame.savevsp(sp))) 323 323 __(str(rzero,lisp_frame.savevsp(sp))) /* Tell stack overflow code to ignore this frame */ 324 324 __(bctrl) 325 325 __(ldr(arg_z,tsp_frame.data_offset(tsp))) 326 __(ldr(imm4,tsp_frame.data_offset+ 4(tsp)))326 __(ldr(imm4,tsp_frame.data_offset+node_size(tsp))) 327 327 __(ldr(fn,lisp_frame.savefn(sp))) 328 328 __(ldr(loc_pc,lisp_frame.savelr(sp))) … … 367 367 __(ldr(temp0,0(vsp))) 368 368 __(cmpri(nargs,fixnum_one)) 369 __(la vsp, 4(vsp))369 __(la vsp,node_size(vsp)) 370 370 __(Cons(arg_z,temp0,arg_z)) 371 371 __(subi nargs,nargs,fixnum_one) … … 382 382 __(ldr(temp0,0(vsp))) 383 383 __(cmpri(nargs,fixnum_one)) 384 __(la vsp, 4(vsp))384 __(la vsp,node_size(vsp)) 385 385 __(Cons(arg_z,temp0,arg_z)) 386 386 __(subi nargs,nargs,fixnum_one) … … 401 401 1: __(ldr(temp0,0(vsp))) 402 402 __(cmpri(cr1,nargs,fixnum_one)) 403 __(la vsp, 4(vsp))403 __(la vsp,node_size(vsp)) 404 404 __(rplaca(imm1,temp0)) 405 405 __(rplacd(imm1,arg_z)) … … 422 422 1: __(ldr(temp0,0(vsp))) 423 423 __(cmpri(cr1,nargs,fixnum_one)) 424 __(la vsp, 4(vsp))424 __(la vsp,node_size(vsp)) 425 425 __(rplaca(imm1,temp0)) 426 426 __(rplacd(imm1,arg_z)) … … 447 447 __(add imm1,imm0,nargs) 448 448 1: 449 __(la nargs, 4(nargs))449 __(la nargs,node_size(nargs)) 450 450 __(cmpri(cr1,nargs,0)) 451 451 __(ldr(temp1,0(vsp))) 452 __(la vsp, 4(vsp))453 __(st wu temp1,4(imm1))452 __(la vsp,node_size(vsp)) 453 __(stru(temp1,node_size(imm1))) 454 454 __(bne cr1,1b) 455 455 2: … … 504 504 heapcons the object if there's no room on the tstack.) */ 505 505 _spentry(stack_misc_alloc) 506 ifdef([PPC64],[ 507 ],[ 506 508 __(rlwinm. imm2,arg_y,32fixnumshift,0,(8+fixnumshift)1) 507 509 __(unbox_fixnum(imm0,arg_z)) … … 550 552 __(srwi imm2,imm2,fixnumshift+3) 551 553 __(b 1b) 552 554 ]) 555 553 556 /* subtype (boxed, of course) is vpushed, followed by nargs bytes worth of */ 554 557 /* initialcontents. Note that this can be used to cons any type of initialized */ … … 638 641 __(li arg_z,nil_value) 639 642 __(neg imm1,imm1) 640 __(subi imm1,imm1, 4)643 __(subi imm1,imm1,node_size) 641 644 __(bge 1f) 642 645 __(ldrx(arg_z,imm0,imm1)) 643 646 1: 644 __(la vsp, 4(imm0))647 __(la vsp,node_size(imm0)) 645 648 __(blr) 646 649 … … 665 668 __(add imm0,nargs,vsp) 666 669 __(blt cr0,1f) 667 __(ldr(arg_z, 4(imm0)))670 __(ldr(arg_z,node_size(imm0))) 668 671 1: 669 672 __(mr vsp,temp0) … … 696 699 __(cmpr(cr0,imm2,nargs)) 697 700 __(addi imm2,imm2,fixnum_one) 698 __(l wzu arg_z,4(imm1))701 __(ldru(arg_z,node_size(imm1))) 699 702 __(push(arg_z,imm0)) 700 703 __(bne cr0,5b) … … 756 759 __(ldr(temp0,0(vsp))) 757 760 __(cmpri(imm1,fixnum_one)) 758 __(la vsp, 4(vsp))761 __(la vsp,node_size(vsp)) 759 762 __(Cons(arg_z,temp0,arg_z)) 760 763 __(subi imm1,imm1,fixnum_one) … … 776 779 __(ldr(temp0,0(vsp))) 777 780 __(cmpri(imm1,fixnum_one)) 778 __(la vsp, 4(vsp))781 __(la vsp,node_size(vsp)) 779 782 __(Cons(arg_z,temp0,arg_z)) 780 783 __(subi imm1,imm1,fixnum_one) … … 793 796 __(ldr(temp0,0(vsp))) 794 797 __(cmpri(imm1,fixnum_one)) 795 __(la vsp, 4(vsp))798 __(la vsp,node_size(vsp)) 796 799 __(Cons(arg_z,temp0,arg_z)) 797 800 __(subi imm1,imm1,fixnum_one) … … 890 893 __(subi arg_z,arg_z,2<<fixnumshift) 891 894 __(cmplri(cr0,arg_z,0)) 892 __(ldr(arg_x, 0(varptr)))893 __(ldr(arg_y, 4(varptr)))894 __(str(imm4, 0(varptr)))895 __(str(imm4, 4(varptr)))896 __(la varptr, 8(varptr))897 __(str(arg_x, 0(valptr)))898 __(str(arg_y, 4(valptr)))899 __(la valptr, 8(valptr))895 __(ldr(arg_x,node_size*0(varptr))) 896 __(ldr(arg_y,node_size*1(varptr))) 897 __(str(imm4,node_size*0(varptr))) 898 __(str(imm4,node_size*1(varptr))) 899 __(la varptr,node_size*2(varptr)) 900 __(str(arg_x,node_size*0(valptr))) 901 __(str(arg_y,node_size*1(valptr))) 902 __(la valptr,node_size*2(valptr)) 900 903 __(bne cr0,4b) 901 904 … … 913 916 5: 914 917 __(cmpwi cr0,keyword_flags,16<<fixnumshift) /* seen :aok yet ? */ 915 __(l wzu arg_z,4(valptr))916 __(l wzu arg_y,4(valptr))918 __(ldru(arg_z,node_size(valptr))) 919 __(ldru(arg_y,node_size(valptr))) 917 920 __(cmpri(cr1,arg_y,nil_value)) 918 921 __(li arg_x,nrs.kallowotherkeys) … … 1337 1340 /* Argument in arg_z, result in imm0. May use temp0. */ 1338 1341 _spentry(getxlong) 1342 ifdef([PPC64],[ 1343 ],[ 1339 1344 __(extract_lisptag(imm0,arg_z)) 1340 1345 __(cmpri(cr0,imm0,tag_fixnum)) … … 1368 1373 local_label(error): 1369 1374 __(uuo_interr(error_object_not_integer,arg_z)) /* not quite right but what 68K MCL said */ 1370 1375 1376 ]) 1377 1371 1378 /* Everything up to the last arg has been vpushed, nargs is set to 1372 1379 the (boxed) count of things already pushed. … … 1375 1382 ppc2invokefn assumes that temp1 is preserved here. */ 1376 1383 _spentry(spreadargz) 1384 ifdef([PPC64],[ 1385 ],[ 1377 1386 __(extract_lisptag(imm1,arg_z)) 1378 1387 __(cmpri(cr1,imm1,tag_list)) … … 1408 1417 __(set_nargs(2)) 1409 1418 __(b _SPksignalerr) 1410 1419 ]) 1411 1420 1412 1421 /* Tailrecursively funcall temp0. */ … … 1424 1433 __(add imm1,imm1,vsp) 1425 1434 1: 1426 __(l wzu temp2,4(imm1))1435 __(ldru(temp2,node_size(imm1))) 1427 1436 __(cmpr(cr0,imm1,vsp)) 1428 1437 __(push(temp2,imm0)) … … 1448 1457 __(mtlr loc_pc) 1449 1458 1: 1450 __(l wzu temp2,4(imm1))1459 __(ldru(temp2,node_size(imm1))) 1451 1460 __(cmpr(cr0,imm1,vsp)) 1452 1461 __(push(temp2,imm0)) … … 1482 1491 __(add imm1,imm1,vsp) 1483 1492 1: 1484 __(l wzu temp2,4(imm1))1493 __(ldru(temp2,node_size(imm1))) 1485 1494 __(cmpr(cr0,imm1,vsp)) 1486 1495 __(push(temp2,imm0)) … … 1507 1516 __(add imm1,imm1,vsp) 1508 1517 1: 1509 __(l wzu temp2,4(imm1))1518 __(ldru(temp2,node_size(imm1))) 1510 1519 __(cmpr(cr0,imm1,vsp)) 1511 1520 __(push(temp2,imm0)) … … 1542 1551 __(add imm1,imm1,vsp) 1543 1552 1: 1544 __(l wzu fname,4(imm1))1553 __(ldru(fname,node_size(imm1))) 1545 1554 __(cmpr(cr0,imm1,vsp)) 1546 1555 __(push(fname,imm0)) … … 1558 1567 1559 1568 _spentry(misc_ref) 1569 ifdef([PPC64],[ 1570 ],[ 1560 1571 __(trap_unless_fulltag_equal(arg_y,fulltag_misc,imm0)) 1561 1572 __(trap_unless_lisptag_equal(arg_z,tag_fixnum,imm0)) … … 1568 1579 lisp object in arg_z. Do type and boundschecking. 1569 1580 */ 1570 1581 ]) 1571 1582 misc_ref_common: 1583 ifdef([PPC64],[ 1584 ],[ 1572 1585 __(extract_fulltag(imm2,imm1)) 1573 1586 __(cmpri(cr0,imm2,fulltag_nodeheader)) … … 1667 1680 __(str(imm1,double_float.value+4(arg_z))) 1668 1681 __(blr) 1682 ]) 1669 1683 1670 1684 … … 1687 1701 __(vpush(imm0)) 1688 1702 __(vpush(imm0)) 1689 __(andi. imm0,vsp,1<< 2) /* (oddp vsp ?) */1703 __(andi. imm0,vsp,1<<word_shift) /* (oddp vsp ?) */ 1690 1704 __(beq cr0,1f) 1691 __(str(arg_y, 8(vsp))) /* car */1692 __(str(arg_z, 4(vsp))) /* cdr */1693 __(la arg_z,fulltag_cons+ 4(vsp))1694 __(blr) 1695 1: 1696 __(str(arg_y, 4(vsp))) /* car, again */1705 __(str(arg_y,node_size*2(vsp))) /* car */ 1706 __(str(arg_z,node_size(vsp))) /* cdr */ 1707 __(la arg_z,fulltag_cons+node_size(vsp)) 1708 __(blr) 1709 1: 1710 __(str(arg_y,node_size(vsp))) /* car, again */ 1697 1711 __(str(arg_z,0(vsp))) 1698 1712 __(la arg_z,fulltag_cons(vsp)) … … 1815 1829 __(li arg_z,nil_value) 1816 1830 __(ldr(imm2,tsp_frame.backlink(tsp))) 1817 __(la imm2, 8+tag_list(imm2))1831 __(la imm2,tsp_frame.fixed_overhead+fulltag_cons(imm2)) 1818 1832 __(b 2f) 1819 1833 1: … … 1847 1861 1848 1862 _spentry(stkgvector) 1849 __(la imm0, 4(nargs))1863 __(la imm0,fixnum_one(nargs)) 1850 1864 __(cmpri(cr1,imm0,0)) 1851 1865 __(add imm1,vsp,nargs) 1852 __(l wzu temp0,4(imm1))1866 __(ldru(temp0,node_size(imm1))) 1853 1867 __(slwi imm2,imm0,num_subtag_bitsfixnumshift) 1854 1868 __(rlwimi imm2,temp0,32fixnumshift,32num_subtag_bits,31) … … 1863 1877 __(addi imm0,imm0,fixnum1) 1864 1878 __(cmpr(cr1,imm0,nargs)) 1865 __(l wzu temp0,4(imm1))1866 __(st wu temp0,4(imm3))1879 __(ldru(temp0,node_size(imm1))) 1880 __(stru(temp0,node_size(imm3))) 1867 1881 2: 1868 1882 __(bne cr1,1b) … … 1887 1901 1888 1902 _spentry(misc_alloc) 1903 ifdef([PPC64],[ 1904 ],[ 1889 1905 __(extract_unsigned_byte_bits_(imm2,arg_y,24)) 1890 1906 __(unbox_fixnum(imm0,arg_z)) … … 1919 1935 9: 1920 1936 __(uuo_interr(error_object_not_unsigned_byte_24,arg_y)) 1937 ]) 1921 1938 1922 1939 /* almost exactly as above, but "swap exception handling info" … … 1996 2013 __(b 1f) 1997 2014 0: __(mr imm1,imm2) 1998 __(ldr(temp0, 4(imm1)))2015 __(ldr(temp0,binding.sym(imm1))) 1999 2016 __(cmpr(temp0,arg_y)) 2000 __(ldr(imm2, 0(imm1)))2017 __(ldr(imm2,binding.link(imm1))) 2001 2018 __(cmpri(cr1,imm2,0)) 2002 2019 __(bne 1f) 2003 __(ldr(arg_z, 8(imm1)))2020 __(ldr(arg_z,binding.val(imm1))) 2004 2021 __(b 9f) 2005 2022 1: __(bne cr1,0b) … … 2032 2049 2033 2050 _spentry(macro_bind) 2051 ifdef([PPC64],[ 2052 ],[ 2034 2053 __(mr whole_reg,arg_reg) 2035 2054 __(extract_lisptag(imm0,arg_reg)) … … 2043 2062 __(set_nargs(2)) 2044 2063 __(b _SPksignalerr) 2045 2064 ]) 2046 2065 2047 2066 _spentry(destructuring_bind) … … 2051 2070 _spentry(destructuring_bind_inner) 2052 2071 __(mr whole_reg,arg_z) 2053 destbind1: 2072 destbind1: 2073 ifdef([PPC64],[ 2074 ],[ 2054 2075 /* Extract required arg count. */ 2055 2076 /* A bug in gas: can't handle shift count of "32" (= 0 */ … … 2227 2248 __(li temp0,t_value) 2228 2249 __(bne cr0,match_keys_loop) /* already saw this */ 2229 __(str(arg_y, 4(imm0)))2230 __(str(temp0, 0(imm0)))2250 __(str(arg_y,node_size*1(imm0))) 2251 __(str(temp0,node_size*2(imm0))) 2231 2252 __(b match_keys_loop) 2232 2253 match_test: … … 2259 2280 __(set_nargs(2)) 2260 2281 __(b _SPksignalerr) 2261 2282 ]) 2262 2283 /* vpush the values in the value set atop the vsp, incrementing nargs. */ 2263 2284 /* Discard the tsp frame; leave values atop the vsp. */ … … 2271 2292 __(mr imm2,tsp) /* last segment */ 2272 2293 local_label(walkloop): 2273 __(ldr(imm3, 12(imm1))) /* next segment */2294 __(ldr(imm3,tsp_frame.fixed_overhead+node_size(imm1))) /* next segment */ 2274 2295 __(cmpr(cr0,imm0,imm3)) /* last segment? */ 2275 __(str(imm2, 12(imm1))) /* reverse pointer */2296 __(str(imm2,tsp_frame.fixed_overhead+node_size(imm1))) /* reverse pointer */ 2276 2297 __(mr imm2,imm1) /* last segment < current segment */ 2277 2298 __(mr imm1,imm3) /* current segment < next segment */ … … 2281 2302 /* walk backwards, pushing values on VSP and incrementing NARGS */ 2282 2303 local_label(pushloop): 2283 __(ldr(imm0, 8(imm2))) /* nargs in segment */2304 __(ldr(imm0,tsp_frame.data_offset(imm2))) /* nargs in segment */ 2284 2305 __(cmpri(cr0,imm0,0)) 2285 2306 __(cmpr(cr1,imm2,tsp)) 2286 __(la imm3, 16(imm2))2307 __(la imm3,tsp_frame.data_offset+(2*node_size)(imm2)) 2287 2308 __(add imm3,imm3,imm0) 2288 2309 __(add nargs,nargs,imm0) 2289 2310 __(b 2f) 2290 2311 1: 2291 __(l wzu arg_z,4(imm3))2312 __(ldru(arg_z,node_size(imm3))) 2292 2313 __(cmpri(cr0,imm0,fixnum_one)) 2293 2314 __(subi imm0,imm0,fixnum_one) … … 2295 2316 2: 2296 2317 __(bne cr0,1b) 2297 __(ldr(imm2, 12(imm2))) /* previous segment */2318 __(ldr(imm2,tsp_frame.data_offset+node_size(imm2))) /* previous segment */ 2298 2319 __(bne cr1,local_label(pushloop)) 2299 2320 __(unlink(tsp)) … … 2309 2330 __(beq cr1,local_label(yz)) 2310 2331 __(blt cr1,local_label(z)) 2311 __(ldr(arg_z, 0(vsp)))2312 __(ldr(arg_y, 4(vsp)))2313 __(ldr(arg_x, 8(vsp)))2314 __(la vsp, 12(vsp))2332 __(ldr(arg_z,node_size*0(vsp))) 2333 __(ldr(arg_y,node_size*1(vsp))) 2334 __(ldr(arg_x,node_size*2(vsp))) 2335 __(la vsp,node_size*3(vsp)) 2315 2336 __(blr) 2316 2337 local_label(yz): 2317 __(ldr(arg_z, 0(vsp)))2318 __(ldr(arg_y, 4(vsp)))2319 __(la vsp, 8(vsp))2338 __(ldr(arg_z,node_size*0(vsp))) 2339 __(ldr(arg_y,node_size*1(vsp))) 2340 __(la vsp,node_size*2(vsp)) 2320 2341 __(blr) 2321 2342 local_label(z): 2322 __(ldr(arg_z, 0(vsp)))2323 __(la vsp, 4(vsp))2343 __(ldr(arg_z,node_size*0(vsp))) 2344 __(la vsp,node_size*1(vsp)) 2324 2345 __(blr) 2325 2346 … … 2347 2368 /* like misc_set, only pass the (boxed) subtag in temp0 */ 2348 2369 _spentry(subtag_misc_set) 2370 ifdef([PPC64],[ 2371 ],[ 2349 2372 __(trap_unless_fulltag_equal(arg_x,fulltag_misc,imm0)) 2350 2373 __(trap_unless_lisptag_equal(arg_y,tag_fixnum,imm0)) … … 2352 2375 __(trlge(arg_y,imm0)) 2353 2376 __(unbox_fixnum(imm1,temp0)) 2377 ]) 2354 2378 misc_set_common: 2379 ifdef([PPC64],[ 2380 ],[ 2355 2381 __(extract_fulltag(imm2,imm1)) 2356 2382 __(cmpri(cr0,imm2,fulltag_nodeheader)) … … 2514 2540 __(strx(imm2,arg_x,imm0)) 2515 2541 __(blr) 2516 2542 ]) 2517 2543 2518 2544 /* "spread" the lexpr in arg_z. … … 2527 2553 __(cmpri(cr1,nargs,0)) 2528 2554 __(cmpri(cr2,nargs,2<<fixnumshift)) 2529 __(la imm1, 4(imm1))2555 __(la imm1,node_size(imm1)) 2530 2556 __(bge cr3,9f) 2531 2557 __(beq cr4,2f) … … 2547 2573 __(cmpri(cr3,imm0,4<<fixnumshift)) 2548 2574 __(subi imm0,imm0,fixnumone) 2549 __(l wzu arg_z,4(imm1))2575 __(ldru(arg_z,node_size(imm1))) 2550 2576 __(vpush(arg_z)) 2551 2577 9: 2552 2578 __(bne cr3,8b) 2553 __(ldr(arg_x, 4(imm1)))2554 __(ldr(arg_y, 8(imm1)))2555 __(ldr(arg_z, 12(imm1)))2579 __(ldr(arg_x,node_size*1(imm1))) 2580 __(ldr(arg_y,node_size*2(imm1))) 2581 __(ldr(arg_z,node_size*3(imm1))) 2556 2582 __(blr) 2557 2583 … … 2559 2585 /* lexpr, maybe vpop arg_x */ 2560 2586 2: 2561 __(ldr(arg_y, 4(imm1)))2562 __(ldr(arg_z, 8(imm1)))2587 __(ldr(arg_y,node_size*1(imm1))) 2588 __(ldr(arg_z,node_size*2(imm1))) 2563 2589 __(beqlr cr2) /* return if (new) nargs = 2 */ 2564 2590 __(vpop(arg_x)) … … 2568 2594 /* maybe vpop arg_y, arg_x */ 2569 2595 1: 2570 __(ldr(arg_z, 4(imm1)))2596 __(ldr(arg_z,node_size(imm1))) 2571 2597 __(bltlr cr2) /* return if (new) nargs < 2 */ 2572 2598 __(vpop(arg_y)) … … 2603 2629 __(cmpri(cr0,imm3,1<<fixnumshift)) 2604 2630 __(subi imm3,imm3,1<<fixnumshift) 2605 __(l wzu temp0,4(imm0))2606 __(st wu temp0,4(imm2))2631 __(ldru(temp0,node_size(imm0))) 2632 __(stru(temp0,node_size(imm2))) 2607 2633 __(bne cr0,1b) 2608 2634 2: … … 2636 2662 __(str(imm1,tsp_frame.backlink(tsp))) /* keep one tsp "frame" as far as rest of lisp is concerned */ 2637 2663 __(str(nargs,tsp_frame.data_offset(tsp))) 2638 __(str(imm2,tsp_frame.data_offset+ 4(tsp))) /* previous tsp */2639 __(la imm3,tsp_frame.data_offset+ 8(tsp))2664 __(str(imm2,tsp_frame.data_offset+node_size(tsp))) /* previous tsp */ 2665 __(la imm3,tsp_frame.data_offset+node_size*2(tsp)) 2640 2666 __(add imm3,imm3,nargs) 2641 2667 __(add imm0,vsp,nargs) … … 2643 2669 __(b 2f) 2644 2670 1: 2645 __(l wzu arg_z,4(imm0))2671 __(ldru(arg_z,node_size(imm0))) 2646 2672 __(cmpr(cr0,imm0,vsp)) 2647 __(st wu arg_z,4(imm3))2673 __(stru(arg_z,node_size(imm3))) 2648 2674 2: 2649 2675 __(bne cr0,1b) … … 2861 2887 /* Next, determine the length of arg_y. We */ 2862 2888 /* know that it's a proper list. */ 2863 __(li imm0, 4)2889 __(li imm0,node_size) 2864 2890 __(mr temp0,arg_y) 2865 2891 1: 2866 2892 __(cmpri(cr0,temp0,nil_value)) 2867 __(la imm0, 4(imm0))2893 __(la imm0,node_size(imm0)) 2868 2894 __(_cdr(temp0,temp0)) 2869 2895 __(bne 1b) … … 3279 3305 3280 3306 _spentry(builtin_eql) 3307 ifdef([PPC64],[ 3308 ],[ 3281 3309 __(cmpr(cr0,arg_y,arg_z)) 3282 3310 __(extract_lisptag(imm0,arg_y)) … … 3292 3320 2: __(li arg_z,nil_value) 3293 3321 __(blr) 3322 ]) 3294 3323 3295 3324 _spentry(builtin_length) 3325 ifdef([PPC64],[ 3326 ],[ 3296 3327 __(extract_typecode(imm0,arg_z)) 3297 3328 __(cmpri(cr0,imm0,min_vector_subtag)) … … 3329 3360 __(mr arg_z,temp2) 3330 3361 __(blr) 3362 ]) 3331 3363 3332 3364 _spentry(builtin_seqtype) 3365 ifdef([PPC64],[ 3366 ],[ 3333 3367 __(extract_typecode(imm0,arg_z)) 3334 3368 __(cmpri(cr0,imm0,tag_list)) … … 3342 3376 2: 3343 3377 __(jump_builtin(_builtin_seqtype,1)) 3378 ]) 3344 3379 3345 3380 _spentry(builtin_assq) … … 4319 4354 /* Next, determine the length of arg_y. We */ 4320 4355 /* know that it's a proper list. */ 4321 __(li imm0, 4)4356 __(li imm0,node_size) 4322 4357 __(mr temp4,arg_y) 4323 4358 1: 4324 4359 __(cmpri(cr0,temp4,nil_value)) 4325 __(la imm0, 4(imm0))4360 __(la imm0,node_size(imm0)) 4326 4361 __(_cdr(temp4,temp4)) 4327 4362 __(bne 1b)
Note: See TracChangeset
for help on using the changeset viewer.