Commit e8766a39 by Stephane Carrez Committed by Stephane Carrez

larith.asm (__map_data_section): Fix condition and optimize for size.

	* 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
parent 42aacdfb
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> 2002-04-09 David S. Miller <davem@redhat.com>
* config/sparc/sparc.c (sparc_extra_constraint_check): New * config/sparc/sparc.c (sparc_extra_constraint_check): New
......
...@@ -1083,23 +1083,30 @@ A_low_B_low: ...@@ -1083,23 +1083,30 @@ A_low_B_low:
.sect .install2,"ax",@progbits .sect .install2,"ax",@progbits
.globl __map_data_section .globl __map_data_section
.globl __data_image .globl __data_image
#ifdef mc68hc12
.globl __data_section_size .globl __data_section_size
#endif
__map_data_section: __map_data_section:
ldd #__data_section_size #ifdef mc68hc12
beq Done
ldx #__data_image ldx #__data_image
ldy #__data_section_start ldy #__data_section_start
ldd #__data_section_size
beq Done
Loop: Loop:
#ifdef mc68hc12
movb 1,x+,1,y+ movb 1,x+,1,y+
dbne d,Loop dbne d,Loop
#else #else
ldx #__data_image
ldy #__data_section_start
bra Start_map
Loop:
ldaa 0,x ldaa 0,x
staa 0,y staa 0,y
inx inx
iny iny
Start_map:
cpx #__data_image_end cpx #__data_image_end
blt Loop blo Loop
#endif #endif
Done: Done:
...@@ -1139,7 +1146,7 @@ __do_global_ctors: ...@@ -1139,7 +1146,7 @@ __do_global_ctors:
ldx #__CTOR_END__-2 ldx #__CTOR_END__-2
ctors_loop: ctors_loop:
cpx #__CTOR_LIST__ cpx #__CTOR_LIST__
blt ctors_done blo ctors_done
pshx pshx
ldx 0,x ldx 0,x
jsr 0,x jsr 0,x
...@@ -1165,7 +1172,7 @@ __do_global_dtors: ...@@ -1165,7 +1172,7 @@ __do_global_dtors:
ldx #__DTOR_LIST__ ldx #__DTOR_LIST__
dtors_loop: dtors_loop:
cpx #__DTOR_END__ cpx #__DTOR_END__
bge dtors_done bhs dtors_done
pshx pshx
ldx 0,x ldx 0,x
jsr 0,x jsr 0,x
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment