Changeset 13858
- Timestamp:
- Jun 19, 2010, 4:31:19 AM (9 years ago)
- Location:
- branches/arm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/arm/compiler/ARM/arm-vinsns.lisp
r13856 r13858 2836 2836 (other-temp :imm))) 2837 2837 ((:pred >= min-fixed $numarmargregs) 2838 (stm (:! vsp) (arg_z arg_y arg_x)))2838 (stmdb (:! vsp) (arg_z arg_y arg_x))) 2839 2839 ((:pred = min-fixed 2) ; at least 2 args 2840 2840 (cmp nargs (:$ (ash 2 arm::word-shift))) 2841 2841 (strne arg_x (:@! vsp (:$ -4))) 2842 (stm (:! vsp) (arg_z arg_y)))2842 (stmdb (:! vsp) (arg_z arg_y))) 2843 2843 ((:pred = min-fixed 1) ; at least one arg 2844 2844 (cmp nargs (:$ (ash 2 arm::word-shift))) 2845 2845 (strlo arg_z (:@! vsp (:$ (- arm::node-size)))) 2846 (stm eq (:! vsp) (arg_z arg_y))2847 (stm hi (:! vsp) (arg_z arg_y arg_x)))2846 (stmdbeq (:! vsp) (arg_z arg_y)) 2847 (stmdbhi (:! vsp) (arg_z arg_y arg_x))) 2848 2848 ((:pred = min-fixed 0) 2849 2849 (cmp nargs (:$ 0)) … … 2851 2851 (cmp nargs (:$ (ash 2 arm::word-shift))) 2852 2852 (strlo arg_z (:@! vsp (:$ (- arm::node-size)))) 2853 (stm eq (:! vsp) (arg_z arg_y))2854 (stm hi (:! vsp) (arg_z arg_y arg_x))2853 (stmdbeq (:! vsp) (arg_z arg_y)) 2854 (stmdbhi (:! vsp) (arg_z arg_y arg_x)) 2855 2855 :done 2856 2856 ) … … 2866 2866 (cmp other-temp lr) 2867 2867 (mov arg-temp (:$ arm::lisp-frame-marker)) 2868 (stmdb (:! vsp) (arg-temp entry-vsp fn lr))2868 (stmdb (:! sp) (arg-temp entry-vsp fn lr)) 2869 2869 (mov fn (:$ 0)) 2870 2870 (moveq lr (:$ (- arm::nil-value arm::fulltag-nil))) 2871 2871 (ldreq lr (:@ lr (:$ (arm::%kernel-global 'arm::lexpr-return)))) 2872 (stmdbeq (:! vsp) (arg-temp entry-vsp fn lr))2872 (stmdbeq (:! sp) (arg-temp entry-vsp fn lr)) 2873 2873 (moveq lr other-temp) 2874 2874 (movne lr (:$ (- arm::nil-value arm::fulltag-nil))) -
branches/arm/compiler/ARM/arm2.lisp
r13836 r13858 1343 1343 (if is-signed 1344 1344 (! misc-ref-c-s32 temp src index-known-fixnum) 1345 (! misc-ref-c-u32 temp src index-known-fixnum)))) )1346 (with-imm-target () idx-reg1347 (if index-known-fixnum1348 (arm2-absolute-natural seg idx-reg nil (+ (arch::target-misc-data-offset arch) (ash index-known-fixnum 2)))1349 (! scale-32bit-misc-index idx-reg unscaled-idx))1350 (cond ((eq type-keyword :single-float-vector)1351 (! misc-ref-single-float fp-val src idx-reg))1352 (t1353 (if is-signed1354 (! misc-ref-s32 temp src idx-reg)1355 (! misc-ref-u32 temp src idx-reg)))))1345 (! misc-ref-c-u32 temp src index-known-fixnum)))) 1346 (with-imm-target () idx-reg 1347 (if index-known-fixnum 1348 (arm2-absolute-natural seg idx-reg nil (+ (arch::target-misc-data-offset arch) (ash index-known-fixnum 2))) 1349 (! scale-32bit-misc-index idx-reg unscaled-idx)) 1350 (cond ((eq type-keyword :single-float-vector) 1351 (! misc-ref-single-float fp-val src idx-reg)) 1352 (t 1353 (if is-signed 1354 (! misc-ref-s32 temp src idx-reg) 1355 (! misc-ref-u32 temp src idx-reg)))))) 1356 1356 (case type-keyword 1357 1357 (:single-float-vector -
branches/arm/level-0/ARM/arm-pred.lisp
r13852 r13858 154 154 (mov y temp1) 155 155 (bl @top) 156 (cmp arg_z 'n ul)156 (cmp arg_z 'nil) 157 157 (mov nfn fn) 158 158 (restore-lisp-frame imm0) ; gets old fn to fn -
branches/arm/level-1/l1-clos-boot.lisp
r13779 r13858 2113 2113 (find-class 'double-float-vector)))) 2114 2114 2115 #+arm-target 2116 (defparameter *ivector-vector-classes* 2117 (vector (find-class 'short-float-vector) 2118 (find-class 'unsigned-long-vector) 2119 (find-class 'long-vector) 2120 (find-class 'fixnum-vector) 2121 (find-class 'base-string) 2122 (find-class 'unsigned-byte-vector) 2123 (find-class 'byte-vector) 2124 *t-class* ; old base-string 2125 (find-class 'unsigned-word-vector) 2126 (find-class 'word-vector) 2127 (find-class 'double-float-vector) 2128 (find-class 'bit-vector))) 2129 2130 2115 2131 2116 2132 … … 2325 2341 (%svref v (+ slice x8664::fulltag-tra-1)) *tagged-return-address-class* 2326 2342 (%svref v (+ slice x8664::fulltag-nil)) *null-class*)) 2343 #+arm-target 2344 (do* ((slice 0 (+ 8 slice))) 2345 ((= slice 256)) 2346 (declare (type (unsigned-byte 8) slice)) 2347 (setf (%svref v (+ slice arm::fulltag-even-fixnum)) *fixnum-class* 2348 (%svref v (+ slice arm::fulltag-odd-fixnum)) *fixnum-class* 2349 (%svref v (+ slice arm::fulltag-cons)) *cons-class* 2350 (%svref v (+ slice arm::fulltag-nil)) *null-class* 2351 (%svref v (+ slice arm::fulltag-imm)) *immediate-class*)) 2352 2327 2353 (macrolet ((map-subtag (subtag class-name) 2328 2354 `(setf (%svref v ,subtag) (find-class ',class-name)))) -
branches/arm/lisp-kernel/arm-spentry.s
r13854 r13858 379 379 __(ldr imm2,[rcontext,#tcr.tlb_pointer]) 380 380 __(ldr imm0,[rcontext,#tcr.db_link]) 381 __(ldr temp1,[imm2,imm 0])381 __(ldr temp1,[imm2,imm1]) 382 382 __(beq 9f) 383 383 __(vpush1(temp1)) … … 597 597 /* This takes N multiple values atop the vstack. */ 598 598 _spentry(nthrowvalues) 599 dnl __(mov imm1,#1) 600 dnl __(mov imm4,imm0) 601 dnl __(str(imm1,tcr.unwinding(rcontext))) 602 dnl local_label(_nthrowv_nextframe): 603 dnl __(subi imm4,imm4,fixnum_one) 604 dnl __(cmpri(cr1,imm4,0)) 605 dnl __(ldr temp0,[rcontext,#tcr.catch_top]) 606 dnl __(ldr imm1,[rcontext,#tcr.db_link]) 607 dnl __(blt cr1,local_label(_nthrowv_done)) 608 dnl __(ldr imm0,[temp0,#catch_frame.db_link]) 609 dnl __(ldr imm3,[temp0,#catch_frame.link]) 610 dnl __(cmpr(imm0,imm1)) 611 dnl __(str(imm3,tcr.catch_top(rcontext))) 612 dnl __(ldr temp1,[temp0,#catch_frame.catch_tag]) 613 dnl __(cmpri(cr7,temp1,unbound_marker)) /* unwind-protect ? */ 614 dnl __(ldr first_nvr,[temp0,#catch_frame.xframe]) 615 dnl __(str(first_nvr,tcr.xframe(rcontext))) 616 dnl __(ldr sp,[temp0,#catch_frame.csp]) 617 dnl __(beq local_label(_nthrowv_dont_unbind)) 618 dnl __(mflr loc_pc) 619 dnl __(bl _SPunbind_to) 620 dnl __(mtlr loc_pc) 621 dnl local_label(_nthrowv_dont_unbind): 622 dnl __(beq cr7,local_label(_nthrowv_do_unwind)) 623 dnl /* A catch frame. If the last one, restore context from there. */ 624 dnl __(bne cr1,local_label(_nthrowv_skip)) 625 dnl __(ldr imm0,[sp,#lisp_frame.savevsp]) 626 dnl __(str(rzero,lisp_frame.savevsp(sp))) /* marker for stack overflow code */ 627 dnl __(add imm1,vsp,nargs) 628 dnl __(mov imm2,nargs) 629 dnl __(b local_label(_nthrowv_push_test)) 630 dnl local_label(_nthrowv_push_loop): 631 dnl __(ldru(temp1,-node_size(imm1))) 632 dnl __(push(temp1,imm0)) 633 dnl local_label(_nthrowv_push_test): 634 dnl __(cmp imm2,#0)) 635 dnl __(subi imm2,imm2,fixnum_one) 636 dnl __(bne local_label(_nthrowv_push_loop)) 637 dnl __(mov vsp,imm0) 638 dnl __(restore_catch_nvrs(temp0)) 639 dnl 640 dnl local_label(_nthrowv_skip): 641 dnl __(la tsp,-(tsp_frame.fixed_overhead+fulltag_misc)(temp0)) 642 dnl __(unlink(tsp)) 643 dnl __(discard_lisp_frame()) 644 dnl __(b local_label(_nthrowv_nextframe)) 645 dnl local_label(_nthrowv_do_unwind): 646 dnl /* This is harder. Call the cleanup code with the multiple */ 647 dnl /* values (and nargs, which is a fixnum.) Remember the throw count */ 648 dnl /* (also a fixnum) as well. */ 649 dnl /* Save our caller's LR and FN in the csp frame created by the unwind- */ 650 dnl /* protect. (Clever, eh ?) */ 651 dnl __(ldr first_nvr,[temp0,#catch_frame.xframe]) 652 dnl __(str(first_nvr,tcr.xframe(rcontext))) 653 dnl __(restore_catch_nvrs(temp0)) 654 dnl __(la tsp,-(tsp_frame.fixed_overhead+fulltag_misc)(temp0)) 655 dnl __(unlink(tsp)) 656 dnl __(ldr loc_pc,[sp,#lisp_frame.savelr]) 657 dnl __(ldr nfn,[sp,#lisp_frame.savefn]) 658 dnl __(mtctr loc_pc) /* cleanup code address. */ 659 dnl __(str(fn,lisp_frame.savefn(sp))) 660 dnl __(mflr loc_pc) 661 dnl __(mov fn,nfn) 662 dnl __(str(loc_pc,lisp_frame.savelr(sp))) 663 dnl __(dnode_align(imm0,nargs,tsp_frame.fixed_overhead+(2*node_size))) /* tsp overhead, nargs, throw count */ 664 dnl __(TSP_Alloc_Var_Boxed_nz(imm0,imm1)) 665 dnl __(mov imm2,nargs) 666 dnl __(add imm1,nargs,vsp) 667 dnl __(la imm0,tsp_frame.data_offset(tsp)) 668 dnl __(str(nargs,0(imm0))) 669 dnl __(b local_label(_nthrowv_tpushtest)) 670 dnl local_label(_nthrowv_tpushloop): 671 dnl __(ldru(temp0,-node_size(imm1))) 672 dnl __(stru(temp0,node_size(imm0))) 673 dnl __(subi imm2,imm2,fixnum_one) 674 dnl local_label(_nthrowv_tpushtest): 675 dnl __(cmp imm2,#0) 676 dnl __(bne local_label(_nthrowv_tpushloop)) 677 dnl __(stru(imm4,node_size(imm0))) 678 dnl __(ldr vsp,[sp,#lisp_frame.savevsp]) 679 dnl /* Interrupts should be disabled here (we're calling and returning */ 680 dnl /* from the cleanup form. Clear the tcr.unwinding flag, so that */ 681 dnl /* interrupts can be taken if they're enabled in the cleanup form. */ 682 dnl __(str(rzero,tcr.unwinding(rcontext))) 683 dnl __(bctrl) 684 dnl __(mov imm1,#1) 685 dnl __(la imm0,tsp_frame.data_offset(tsp)) 686 dnl __(str(imm1,tcr.unwinding(rcontext))) 687 dnl __(ldr fn,[sp,#lisp_frame.savefn]) 688 dnl __(ldr loc_pc,[sp,#lisp_frame.savelr]) 689 dnl __(discard_lisp_frame()) 690 dnl __(mtlr loc_pc) 691 dnl __(ldr nargs,[imm0,#0]) 692 dnl __(mov imm2,nargs) 693 dnl __(b local_label(_nthrowv_tpoptest)) 694 dnl local_label(_nthrowv_tpoploop): 695 dnl __(ldru(temp0,node_size(imm0))) 696 dnl __(vpush1(temp0)) 697 dnl __(subi imm2,imm2,fixnum_one) 698 dnl local_label(_nthrowv_tpoptest): 699 dnl __(cmp imm2,#0) 700 dnl __(bne local_label(_nthrowv_tpoploop)) 701 dnl __(ldr imm4,[imm0,#node_size]) 702 dnl __(unlink(tsp)) 703 dnl __(b local_label(_nthrowv_nextframe)) 704 dnl local_label(_nthrowv_done): 705 dnl __(str(rzero,tcr.unwinding(rcontext))) 706 dnl /* Poll for a deferred interrupt. That clobbers nargs (which we've */ 707 dnl /* just expended a lot of effort to preserve), so expend a little * 708 dnl /* more effort. */ 709 dnl __(mov imm4,nargs) 710 dnl __(check_pending_interrupt()) 711 dnl __(mov nargs,imm4) 712 dnl __(bx lr) 599 __(mov imm1,#1) 600 __(mov temp2,imm0) 601 __(str imm1,[rcontext,#tcr.unwinding]) 602 __(b C(nthrownv)) 713 603 714 604 /* This is a (slight) optimization. When running an unwind-protect, */ … … 1109 999 1110 1000 _spentry(progvsave) 1001 __(uuo_debug_trap(al)) 1111 1002 dnl /* Error if arg_z isn't a proper list. That's unlikely, */ 1112 1003 dnl /* but it's better to check now than to crash later. */ … … 1943 1834 dnl 1944 1835 _spentry(recover_values) 1836 __(uuo_debug_trap(al)) 1945 1837 dnl 1946 1838 dnl /* First, walk the segments reversing the pointer to previous segment pointers */ … … 2126 2018 dnl 2127 2019 _spentry(save_values) 2020 __(uuo_debug_trap(al)) 2128 2021 dnl __(mov imm1,tsp) 2129 2022 dnl … … 2161 2054 dnl 2162 2055 _spentry(add_values) 2056 __(uuo_debug_trap(al)) 2163 2057 dnl __(cmpri(nargs,0)) 2164 2058 dnl __(ldr imm1,[tsp,#0]) … … 2821 2715 __(mov temp1,imm1) /* from comparison above */ 2822 2716 local_label(current_key_allow_other_keys_handled): 2823 __(getvheader(imm0,temp 1))2717 __(getvheader(imm0,temp2)) 2824 2718 __(header_length(arg_x,imm0)) 2825 2719 __(add imm0,arg_x,#misc_data_offset) … … 2864 2758 0: __(tst keyword_flags,#keyword_flag_rest) 2865 2759 __(beq local_label(discard_stack_vector)) 2866 __(mov nargs,#0)2760 __(mov imm0,#0) 2867 2761 __(add temp2,sp,#node_size) 2868 2762 __(b 2f) 2869 2763 1: __(ldr arg_x,[temp2],#node_size) 2870 2764 __(vpush1(arg_x)) 2871 __(add nargs,nargs,#fixnumone)2872 2: __(cmp nargs,key_value_count)2765 __(add imm0,imm0,#fixnumone) 2766 2: __(cmp imm0,key_value_count) 2873 2767 __(bne 1b) 2874 2768 local_label(discard_stack_vector): … … 4050 3944 popdef(`__') 4051 3945 4052 C(nthrow1v): 3946 _exportfn(C(nthrow1v)) 3947 new_local_labels() 4053 3948 local_label(_nthrow1v_nextframe): 4054 3949 __(subs temp2,temp2,#fixnum_one) … … 4068 3963 __(ldr temp1,[temp0,#catch_frame.catch_tag]) 4069 3964 __(cmp temp1,#unbound_marker) /* unwind-protect ? */ 3965 __(sub sp,temp0,#fulltag_misc) 4070 3966 __(beq local_label(_nthrow1v_do_unwind)) 4071 3967 /* A catch frame. If the last one, restore context from there. */ … … 4109 4005 __(check_pending_interrupt(nargs)) 4110 4006 __(bx lr) 4111 4007 _endfn 4008 4009 _exportfn(nthrownv) 4010 new_local_labels() 4011 local_label(nthrownv_nextframe): 4012 __(subs temp2,temp2,#fixnum_one) 4013 __(ldr temp0,[rcontext,#tcr.catch_top]) 4014 __(ldr imm1,[rcontext,#tcr.db_link]) 4015 __(blt local_label(nthrownv_done)) 4016 __(ldr arg_y,[temp0,#catch_frame.link]) 4017 __(ldr imm0,[temp0,#catch_frame.db_link]) 4018 __(cmp imm0,imm1) 4019 __(str arg_y,[rcontext,#tcr.catch_top]) 4020 __(ldr arg_y,[temp0,#catch_frame.xframe]) 4021 __(str arg_y,[rcontext,#tcr.xframe]) 4022 __(beq local_label(nthrownv_dont_unbind)) 4023 __(do_unbind_to(imm1,temp1,arg_x,arg_y)) 4024 local_label(nthrownv_dont_unbind): 4025 __(ldr temp1,[temp0,#catch_frame.catch_tag]) 4026 __(cmp temp1,#unbound_marker) /* unwind-protect ? */ 4027 __(sub sp,temp0,#fulltag_misc) 4028 __(beq local_label(nthrownv_do_unwind)) 4029 __(cmp temp2,#0) 4030 /* A catch frame. If the last one, restore context from there. */ 4031 __(bne local_label(nthrownv_skip)) 4032 __(ldr imm0,[sp,#catch_frame.size+lisp_frame.savevsp]) 4033 __(add imm1,vsp,nargs) 4034 __(movs arg_z,nargs) 4035 __(b local_label(nthrownv_push_test)) 4036 local_label(nthrownv_push_loop): 4037 __(subs arg_z,arg_z,#fixnumone) 4038 __(ldr temp1,[imm1,#-node_size]!) 4039 __(push1(temp1,imm0)) 4040 local_label(nthrownv_push_test): 4041 __(bne local_label(nthrownv_push_loop)) 4042 __(mov vsp,imm0) 4043 local_label(nthrownv_skip): 4044 __(add sp,sp,#catch_frame.size+lisp_frame.size) 4045 __(b local_label(nthrownv_nextframe)) 4046 local_label(nthrownv_do_unwind): 4047 __(ldr arg_x,[temp0,#catch_frame.xframe]) 4048 __(ldr arg_z,[temp0,#catch_frame.last_lisp_frame]) 4049 __(sub sp,temp0,#fulltag_misc) 4050 __(str arg_x,[rcontext,#tcr.xframe]) 4051 __(str arg_z,[rcontext,#tcr.last_lisp_frame]) 4052 __(add sp,sp,#catch_frame.size) 4053 __(add imm1,nargs,#node_size) 4054 __(mov arg_z,sp) 4055 __(dnode_align(imm0,imm1,node_size)) 4056 __(mov imm1,imm1,lsl #num_subtag_bits-fixnumshift) 4057 __(orr imm1,imm1,#subtag_u32_vector) 4058 __(stack_allocate_zeroed_ivector(imm1,imm0)) 4059 __(mov imm0,#subtag_simple_vector) 4060 __(strb imm0,[sp]) 4061 __(str temp2,[sp,#node_size]) 4062 __(add temp2,sp,#dnode_size) 4063 __(add temp2,temp2,nargs) 4064 __(add temp1,vsp,nargs) 4065 __(b local_label(nthrownv_tpushtest)) 4066 local_label(nthrownv_tpushloop): 4067 __(ldr temp0,[temp1,#-node_size]!) 4068 __(push1(temp0,temp2)) 4069 local_label(nthrownv_tpushtest): 4070 __(subs nargs,nargs,#fixnumone) 4071 __(bge local_label(nthrownv_tpushloop)) 4072 __(mov imm1,#0) 4073 __(add imm0,arg_z,#lisp_frame.savelr) 4074 __(swp lr,lr,[imm0]) 4075 __(ldr nfn,[arg_z,#lisp_frame.savefn]) 4076 __(str fn,[arg_z,#lisp_frame.savefn]) 4077 __(ldr vsp,[arg_z,#lisp_frame.savevsp]) 4078 __(str imm1,[rcontext,#tcr.unwinding]) 4079 __(mov fn,nfn) 4080 __(blx lr) 4081 __(mov imm1,#1) 4082 __(str imm1,[rcontext,#tcr.unwinding]) 4083 __(ldr imm0,[sp]) 4084 __(header_length(imm0,imm0)) 4085 __(subs nargs,imm0,#node_size) 4086 __(add imm0,imm0,#node_size) 4087 __(add temp0,sp,imm0) 4088 __(mov imm0,nargs) 4089 __(add arg_z,temp0,#node_size) 4090 __(bic arg_z,arg_z,#fulltagmask) 4091 __(b local_label(nthrownv_tpoptest)) 4092 local_label(nthrownv_tpoploop): 4093 __(subs imm0,imm0,#node_size) 4094 __(vpush1(temp2)) 4095 local_label(nthrownv_tpoptest): 4096 __(ldr temp2,[temp0,#-node_size]!) 4097 __(bne local_label(nthrownv_tpoploop)) 4098 __(mov sp,arg_z) 4099 __(ldr fn,[sp,#lisp_frame.savefn]) 4100 __(ldr lr,[sp,#lisp_frame.savelr]) 4101 __(discard_lisp_frame()) 4102 __(b local_label(nthrownv_nextframe)) 4103 local_label(nthrownv_done): 4104 __(mov imm0,#0) 4105 __(str imm0,[rcontext,#tcr.unwinding]) 4106 __(check_pending_interrupt(imm1)) 4107 __(bx lr) 4108 _endfn 4109 4110 4112 4111 /* Too large to safely fit on tstack. Heap-cons the vector, but make */ 4113 4112 /* sure that there's an empty tsp frame to keep the compiler happy. */ 4114 stack_misc_alloc_no_room: 4113 _exportfn(stack_misc_alloc_no_room) 4115 4114 __(mov imm0,#stack_alloc_marker) 4116 4115 __(mov imm1,sp) 4117 4116 __(stmdb sp!,{imm0,imm1}) 4118 4117 __(b _SPmisc_alloc) 4119 4118 _endfn 4120 4119 _endfile
Note: See TracChangeset
for help on using the changeset viewer.