--- hlk.mac.org Fri Jul 16 02:23:32 1999 +++ hlk.mac Thu Nov 16 12:03:58 2000 @@ -283,8 +283,10 @@ *LBL&_xdef_0b: .reg (161+_OFF_,_REG_) LBL&_doctor_flag:.reg (162+_OFF_,_REG_) LBL&_dodtor_flag:.reg (163+_OFF_,_REG_) +LBL&_ctor_size:.reg (164+_OFF_,_REG_) +LBL&_dtor_size:.reg (168+_OFF_,_REG_) .endm -__obj_list__: .equ 164 +__obj_list__: .equ 172 *------------------------------------------------------------------------------ --- make_exe.org Fri Mar 20 00:11:04 1998 +++ make_exe.s Thu Nov 16 12:06:16 2000 @@ -281,14 +281,14 @@ beq @f bsr get_system_data_pos adda.l (CTOR_LIST_PTR,a0),a3 - addq.l #4,a3 ;move.l #-1,(a3)+ + addq.l #4,a3 ;moveq.l #-1,(a3)+ move.l a3,(CTOR_LIST_PTR,a0) @@: tst.b (DO_DTOR_FLAG,a0) beq @f bsr get_system_data_pos adda.l (DTOR_LIST_PTR,a0),a3 - addq.l #4,a3 ;move.l #-1,(a3)+ + addq.l #4,a3 ;moveq.l #-1,(a3)+ move.l a3,(DTOR_LIST_PTR,a0) @@: @@ -441,7 +441,7 @@ suba.l (CTOR_SIZE,a0),a3 move.l d0,-(a3) ;top of table @@: -* ___CTOR_LIST__のheader/footer書き込み +* ___DTOR_LIST__のheader/footer書き込み tst.b (DO_DTOR_FLAG,a0) beq @f movea.l (DTOR_LIST_PTR,a0),a3 --- object.org Thu Sep 10 13:56:06 1998 +++ object.s Thu Nov 16 11:23:34 2000 @@ -231,9 +231,10 @@ move.l d4,obj_list_xdef_00 move.l d4,obj_list_xdef_04 move.l d4,obj_list_xdef_08 - -* move.b d4,obj_list_doctor_flag -* move.b d4,obj_list_dodtor_flag +* patched KQ + move.l d4,obj_list_ctor_size + move.l d4,obj_list_dtor_size +* --- end --- move d4,obj_list_doctor_flag move.l a5,d0 * d0.l = obj_list --- label.org Fri Jul 16 03:48:08 1999 +++ label.s Thu Nov 16 12:39:08 2000 @@ -352,16 +352,25 @@ obj_head_c00c: - move.l a1,-(sp) - lea (workbuf+CTOR_SIZE,pc),a1 - bra @f +* patched KQ +* move.l a1,-(sp) + addq.l #2,a0 + move.l (a0)+,d0 + andi #$ffff,d0 + move.l d0,obj_list_ctor_size + bra make_xdef_l_ss +* lea (workbuf+CTOR_SIZE,pc),a1 +* bra @f obj_head_c00d: - move.l a1,-(sp) - lea (workbuf+DTOR_SIZE,pc),a1 -@@: addq.l #2,a0 +* move.l a1,-(sp) +* lea (workbuf+DTOR_SIZE,pc),a1 +*@@: addq.l #2,a0 + addq.l #2,a0 move.l (a0)+,d0 - add.l d0,(a1) - movea.l (sp)+,a1 + andi #$ffff,d0 + move.l d0,obj_list_dtor_size +* add.l d0,(a1) +* movea.l (sp)+,a1 bra make_xdef_l_ss req_obj_e00c: --- main.org Wed Nov 24 00:53:38 1999 +++ main.s Fri Nov 17 10:21:14 2000 @@ -325,14 +325,33 @@ bne main_end * ctor/dtor関係はg2lkモード専用. - move.l (CTOR_SIZE,a6),d0 - add.l (DTOR_SIZE,a6),d0 +* KQ patched ----------------- +calc_xtor_size: + move.l (LINK_LIST_HEAD,a6),d0 + beq calc_xtor_size_end + clr.l d6 + clr.l d7 +calc_xtor_size_loop: + movea.l d0,a1 ;a1.l = link_list + movea.l link_list_obj_list,a0 ;a0.l = obj_list + + add.l obj_list_ctor_size,d6 + add.l obj_list_dtor_size,d7 + move.l link_list_next,d0 + bne calc_xtor_size_loop +calc_xtor_size_end: + move.l d6,(CTOR_SIZE,a6) + move.l d7,(DTOR_SIZE,a6) +* ----------------------------- +* move.l (CTOR_SIZE,a6),d0 +* add.l (DTOR_SIZE,a6),d0 + add.l d6,d7 tst.b (G2LK_MODE_FLAG,a6) bne @f tst (DO_CTOR_FLAG,a6) do_ctor_flag|do_dtor_flag bne no_g2lk_error ;-0 && .do?torあり - tst.l d0 + tst.l d7 bne no_g2lk_error ;-0 && .?torあり bra g2lk_mode_check_ok @@: