larith.asm (__map_data_section): Fix condition and optimize for size.
authorStephane Carrez <Stephane.Carrez@worldnet.fr>
Tue, 9 Apr 2002 18:53:50 +0000 (20:53 +0200)
committerStephane Carrez <ciceron@gcc.gnu.org>
Tue, 9 Apr 2002 18:53:50 +0000 (20:53 +0200)
* config/m68hc11/larith.asm (__map_data_section): Fix condition
and optimize for size.
(__do_global_ctors): Fix pointer comparison.
(__do_global_dtors): Likewise.

From-SVN: r52086

gcc/ChangeLog
gcc/config/m68hc11/larith.asm

index c8dbbaf2c5ea7b94d8263309cc6c5000b6bf5127..cecfe5c0a3dc22d113010e13bcd9b60a3f735bb2 100644 (file)
@@ -1,3 +1,10 @@
+2002-04-09  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
+
+       * config/m68hc11/larith.asm (__map_data_section): Fix condition
+       and optimize for size.
+       (__do_global_ctors): Fix pointer comparison.
+       (__do_global_dtors): Likewise.
+
 2002-04-09  David S. Miller  <davem@redhat.com>
 
        * config/sparc/sparc.c (sparc_extra_constraint_check): New
index 94e1596e05513c8d1e9e2ed2f8dce31da41e1176..2a0727b3d4ee403bb378a1651783904682b96337 100644 (file)
@@ -1083,23 +1083,30 @@ A_low_B_low:
        .sect   .install2,"ax",@progbits
        .globl  __map_data_section
        .globl __data_image
+#ifdef mc68hc12
        .globl __data_section_size
+#endif
 __map_data_section:
-       ldd     #__data_section_size
-       beq     Done
+#ifdef mc68hc12
        ldx     #__data_image
        ldy     #__data_section_start
+       ldd     #__data_section_size
+       beq     Done
 Loop:
-#ifdef mc68hc12
        movb    1,x+,1,y+
        dbne    d,Loop
 #else
+       ldx     #__data_image
+       ldy     #__data_section_start
+       bra     Start_map
+Loop:
        ldaa    0,x
        staa    0,y
        inx
        iny
+Start_map:
        cpx     #__data_image_end
-       blt     Loop
+       blo     Loop
 #endif
 Done:
 
@@ -1139,7 +1146,7 @@ __do_global_ctors:
        ldx     #__CTOR_END__-2
 ctors_loop:
        cpx     #__CTOR_LIST__
-       blt     ctors_done
+       blo     ctors_done
        pshx
        ldx     0,x
        jsr     0,x
@@ -1165,7 +1172,7 @@ __do_global_dtors:
        ldx     #__DTOR_LIST__
 dtors_loop:
        cpx     #__DTOR_END__
-       bge     dtors_done
+       bhs     dtors_done
        pshx
        ldx     0,x
        jsr     0,x