CVS: gcc/gcc-3.3/gcc/config/msp430 libgcc.S, 1.13, 1.14 msp430.h, 1.44, 1.45
Chris Liechti <[email protected]> Fri, 30 May 2008 16:01:35 -0700
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mspgcc/gcc/gcc-3.3/gcc/config/msp430
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv10690
Modified Files:
libgcc.S msp430.h
Log Message:
updates from Sergey, improves data/bss segment handling
Index: libgcc.S
===================================================================
RCS file: /cvsroot/mspgcc/gcc/gcc-3.3/gcc/config/msp430/libgcc.S,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -w -d -r1.13 -r1.14
--- libgcc.S 28 May 2008 01:43:39 -0000 1.13
+++ libgcc.S 30 May 2008 23:01:32 -0000 1.14
@@ -568,6 +568,8 @@
; .global __init_stack
.global __low_level_init
+ .global __do_copy_data
+ .global __do_clear_bss
.global __jump_to_main
.endfunc
@@ -582,7 +584,6 @@
.global __init_stack
.weak __init_stack
- .extern __stack
.func __init_stack
@@ -620,21 +621,21 @@
.global __do_copy_data
.weak __do_copy_data
- .extern __data_load_start
- .extern __data_start
- .extern __data_size
.func __do_copy_data
__do_copy_data:
mov #__data_size, r15
+ tst r15
+ jz .L__copy_data_end
.L__copy_data_loop:
decd r15
mov.w __data_load_start(r15), __data_start(r15) ; data section is word-aligned, so word transfer is acceptable
jne .L__copy_data_loop
+.L__copy_data_end:
.endfunc
-#endif /* defined(L__do_copy_data) */
+#endif /* defined(L_copy_data) */
#if defined(L_clear_bss)
/*****************************************************************
@@ -645,17 +646,18 @@
.global __do_clear_bss
.weak __do_clear_bss
- .extern __bss_start
- .extern __bss_size
.func __do_clear_bss
__do_clear_bss:
mov #__bss_size, r15
+ tst r15
+ jz .L__clear_bss_end
.L__clear_bss_loop:
dec r15
clr.b __bss_start(r15)
jne .L__clear_bss_loop
+.L__clear_bss_end:
.endfunc
#endif /* defined(L_clear_bss) */
@@ -668,12 +670,10 @@
.section .init6, "ax", @progbits
.global __do_global_ctors
.weak __do_global_ctors
- .extern __ctors_start
- .extern __ctors_end
.func __do_global_ctors
+ .global __init_stack ; stack has to be set before constructors calling
- mov #__stack, r1 ; can be removed, if stack initialization in .init2 uncommented
__do_global_ctors:
mov #__ctors_start, r11
@@ -695,7 +695,6 @@
.global __jump_to_main
.weak __jump_to_main
- .extern _main
.func __jump_to_main
@@ -728,8 +727,6 @@
.section .fini6,"ax",@progbits
.global __do_global_dtors
.weak __do_global_dtors
- .extern __dtors_start
- .extern __dtors_end
.func _dtors
Index: msp430.h
===================================================================
RCS file: /cvsroot/mspgcc/gcc/gcc-3.3/gcc/config/msp430/msp430.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -w -d -r1.44 -r1.45
--- msp430.h 29 May 2008 08:10:05 -0000 1.44
+++ msp430.h 30 May 2008 23:01:32 -0000 1.45
@@ -1752,7 +1752,7 @@
operation that should precede instructions and read-only data.
Normally `"\t.text"' is right. */
-#define DATA_SECTION_ASM_OP "\t.global\t__do_copy_data\n\t.data"
+#define DATA_SECTION_ASM_OP "\t.data"
/* A C expression whose value is a string containing the assembler
operation to identify the following data as writable initialized
data. Normally `"\t.data"' is right. */
@@ -2086,7 +2086,6 @@
if (IN_NAMED_SECTION (DECL)) \
{ \
/* case where -fdata-sections is specified */ \
- fputs ("\t.global\t__do_clear_bss\n", (FILE)); \
named_section (DECL, NULL, 0); \
ASM_GLOBALIZE_LABEL (FILE, NAME); \
ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \
@@ -2097,7 +2096,7 @@
else \
{ \
/* default case */ \
- fputs ("\t.global\t__do_clear_bss\n\t.comm ", (FILE)); \
+ fputs ("\t.comm ", (FILE)); \
assemble_name ((FILE), (NAME)); \
fprintf ((FILE), ",%d%s", (SIZE), (SIZE)>1?",2\n":"\n"); \
} \
@@ -2114,10 +2113,7 @@
if(*p == '*' || *p == '@' ) p++; \
if(*p >= '0' && *p <= '9' ) break; \
if (IN_NAMED_SECTION (DECL)) \
- { \
- fputs ("\t.global\t__do_clear_bss\n", (FILE)); \
named_section (DECL, NULL, 0); \
- } \
else \
bss_section (); \
\
@@ -2138,10 +2134,7 @@
if(*p == '*' || *p == '@' ) p++; \
if(*p >= '0' && *p <= '9' ) break; \
if ((DECL) != NULL && IN_NAMED_SECTION (DECL)) \
- { \
- fputs ("\t.global\t__do_clear_bss\n", (FILE)); \
named_section (DECL, NULL, 0); \
- } \
else \
bss_section (); \
\
@@ -2151,7 +2144,7 @@
} \
while (0)
-#define BSS_SECTION_ASM_OP "\t.global\t__do_clear_bss\n\t.section\t.bss"
+#define BSS_SECTION_ASM_OP "\t.section\t.bss"
/* If defined, a C expression whose value is a string containing the
assembler operation to identify the following data as
uninitialized global data. If not defined, and neither
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/