This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/29141] static constructors beyond 64k fail



------- Comment #2 from joerg dot diederich at graffiti dot net  2006-09-19 13:36 -------
thanks to joerg wunsch, additional information is already available.

#ifdef L_ctors
        .section .init6,"ax",@progbits
        .global __do_global_ctors
__do_global_ctors:
        ldi     r17, hi8(__ctors_start)
        ldi     r28, lo8(__ctors_end)
        ldi     r29, hi8(__ctors_end)
        rjmp    .do_global_ctors_start
.do_global_ctors_loop:
        sbiw    r28, 2
        mov_h   r31, r29
        mov_l   r30, r28
        XCALL   __tablejump__
.do_global_ctors_start:
        cpi     r28, lo8(__ctors_start)
        cpc     r29, r17
        brne    .do_global_ctors_loop
#endif /* L_ctors */

using r28/r29 only works for data <64k. r30/r31 are filled with wrong data in
return, in detail 64k less than intended.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29141


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]