@@ -4612,11 +4612,6 @@ let trans_visitor
4612
4612
let src_cell = need_cell src_oper in
4613
4613
let src_vec = deref src_cell in
4614
4614
let src_fill = get_element_ptr src_vec Abi. vec_elt_fill in
4615
- let dst_vec = deref dst_cell in
4616
- let dst_fill = get_element_ptr dst_vec Abi. vec_elt_fill in
4617
-
4618
- if trailing_null
4619
- then sub_from dst_fill (imm 1L );
4620
4615
4621
4616
aliasing true dst_cell
4622
4617
begin
@@ -4635,49 +4630,52 @@ let trans_visitor
4635
4630
* to add to.
4636
4631
*)
4637
4632
4638
- (* Reload dst vec, fill; might have changed. *)
4639
4633
let dst_vec = deref dst_cell in
4640
4634
let dst_fill = get_element_ptr dst_vec Abi. vec_elt_fill in
4641
4635
4642
- (* Copy loop: *)
4643
- let eltp_rty = Il. AddrTy (referent_type cx elt_ty) in
4644
- let dptr = next_vreg_cell eltp_rty in
4645
- let sptr = next_vreg_cell eltp_rty in
4646
- let dlim = next_vreg_cell eltp_rty in
4647
- let elt_sz = ty_sz_in_current_frame elt_ty in
4648
- let dst_data =
4649
- get_element_ptr_dyn_in_current_frame
4650
- dst_vec Abi. vec_elt_data
4651
- in
4652
- let src_data =
4653
- get_element_ptr_dyn_in_current_frame
4654
- src_vec Abi. vec_elt_data
4655
- in
4656
- lea dptr (fst (need_mem_cell dst_data));
4657
- lea sptr (fst (need_mem_cell src_data));
4658
- add_to dptr (Il. Cell dst_fill);
4659
- mov dlim (Il. Cell dptr);
4660
- add_to dlim (Il. Cell src_fill);
4661
- let fwd_jmp = mark () in
4662
- emit (Il. jmp Il. JMP Il. CodeNone );
4663
- let back_jmp_targ = mark () in
4664
- (* copy slot *)
4665
- trans_copy_ty
4666
- (get_ty_params_of_current_frame() ) true
4667
- (deref dptr) elt_ty
4668
- (deref sptr) elt_ty;
4669
- add_to dptr elt_sz;
4670
- add_to sptr elt_sz;
4671
- patch fwd_jmp;
4672
- check_interrupt_flag () ;
4673
- let back_jmp =
4674
- trans_compare_simple Il. JB (Il. Cell dptr) (Il. Cell dlim)
4675
- in
4676
- List. iter
4677
- (fun j -> patch_existing j back_jmp_targ) back_jmp;
4678
- let v = next_vreg_cell word_sty in
4679
- mov v (Il. Cell src_fill);
4680
- add_to dst_fill (Il. Cell v);
4636
+ if trailing_null
4637
+ then sub_from dst_fill (imm 1L );
4638
+
4639
+ (* Copy loop: *)
4640
+ let eltp_rty = Il. AddrTy (referent_type cx elt_ty) in
4641
+ let dptr = next_vreg_cell eltp_rty in
4642
+ let sptr = next_vreg_cell eltp_rty in
4643
+ let dlim = next_vreg_cell eltp_rty in
4644
+ let elt_sz = ty_sz_in_current_frame elt_ty in
4645
+ let dst_data =
4646
+ get_element_ptr_dyn_in_current_frame
4647
+ dst_vec Abi. vec_elt_data
4648
+ in
4649
+ let src_data =
4650
+ get_element_ptr_dyn_in_current_frame
4651
+ src_vec Abi. vec_elt_data
4652
+ in
4653
+ lea dptr (fst (need_mem_cell dst_data));
4654
+ lea sptr (fst (need_mem_cell src_data));
4655
+ add_to dptr (Il. Cell dst_fill);
4656
+ mov dlim (Il. Cell dptr);
4657
+ add_to dlim (Il. Cell src_fill);
4658
+ let fwd_jmp = mark () in
4659
+ emit (Il. jmp Il. JMP Il. CodeNone );
4660
+ let back_jmp_targ = mark () in
4661
+ (* copy slot *)
4662
+ trans_copy_ty
4663
+ (get_ty_params_of_current_frame() ) true
4664
+ (deref dptr) elt_ty
4665
+ (deref sptr) elt_ty;
4666
+ add_to dptr elt_sz;
4667
+ add_to sptr elt_sz;
4668
+ patch fwd_jmp;
4669
+ check_interrupt_flag () ;
4670
+ let back_jmp =
4671
+ trans_compare_simple
4672
+ Il. JB (Il. Cell dptr) (Il. Cell dlim)
4673
+ in
4674
+ List. iter
4675
+ (fun j -> patch_existing j back_jmp_targ) back_jmp;
4676
+ let v = next_vreg_cell word_sty in
4677
+ mov v (Il. Cell src_fill);
4678
+ add_to dst_fill (Il. Cell v);
4681
4679
4682
4680
| (Ast. TY_str , e)
4683
4681
| (Ast. TY_vec _, e)
0 commit comments