svn commit: trunk/uClibc/libc/sysdeps/linux/cris

pkj at uclibc.org pkj at uclibc.org
Wed Feb 22 08:54:47 UTC 2006


Author: pkj
Date: 2006-02-22 00:54:46 -0800 (Wed, 22 Feb 2006)
New Revision: 14196

Log:
Cleaned up the assembler code a little.


Modified:
   trunk/uClibc/libc/sysdeps/linux/cris/crt1.S
   trunk/uClibc/libc/sysdeps/linux/cris/crti.S
   trunk/uClibc/libc/sysdeps/linux/cris/crtn.S


Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/cris/crt1.S
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/cris/crt1.S	2006-02-22 08:51:58 UTC (rev 14195)
+++ trunk/uClibc/libc/sysdeps/linux/cris/crt1.S	2006-02-22 08:54:46 UTC (rev 14196)
@@ -2,28 +2,30 @@
 
 #include <features.h>
 
+	.syntax no_register_prefix
+
 /* The first piece of initialized data.  */
-.data
-.global __data_start
-.align 2
-.type	__data_start, @object
-.size	__data_start, 4
+	.data
+	.global	__data_start
+	.align	2
+	.type	__data_start, @object
+	.size	__data_start, 4
 __data_start:
 	.dword	0
 
-.text
-.align 1
-.global _start
-.type   _start,%function
+	.text
+	.align	1
+	.global	_start
+	.type	_start, %function
 #if defined(__UCLIBC_CTOR_DTOR__)
-.type   _init,%function
-.type   _fini,%function
+	.type	_init, %function
+	.type	_fini, %function
 #else
-.weak   _init
-.weak   _fini
+	.weak	_init
+	.weak	_fini
 #endif
-.type   main,%function
-.type   __uClibc_main,%function
+	.type	main, %function
+	.type	__uClibc_main, %function
 
 /*
  * On the stack we have argc. We can calculate argv/envp
@@ -39,20 +41,16 @@
  */
 
 _start:
-	pop $r10
-	move.d $sp, $r11
-	jump .L1
-
-.L1:
-	Push $srp
-	Subq 4,$sp
-	move.d $r10,$r9
-	move.d $r11,$r12
-	move.d _fini,$r13
-	move.d $r13,[$sp]
-	move.d main,$r10
-	move.d $r9,$r11
-	move.d _init,$r13
+	move.d	main, r10
+	move.d	[sp+], r11
+	move.d	sp, r12
+	subq	4, sp
+	move	srp, [sp]
+	subq	4, sp
+	move.d	_fini, r13
+	move.d	r13, [sp]
+	move.d	_init, r13
 	/* Leave control to the libc */
-	jsr __uClibc_main
-.size _start,.-_start
+	jsr	__uClibc_main
+	nop
+	.size	_start, .-_start

Modified: trunk/uClibc/libc/sysdeps/linux/cris/crti.S
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/cris/crti.S	2006-02-22 08:51:58 UTC (rev 14195)
+++ trunk/uClibc/libc/sysdeps/linux/cris/crti.S	2006-02-22 08:54:46 UTC (rev 14196)
@@ -1,36 +1,29 @@
-#NO_APP
-	.file	"initfini.c"
-#APP
-	
-	.section .init
-#NO_APP
-	.align 1
-	.global _init
+/* glibc's sysdeps/cris/elf/initfini.c used for reference [PROLOG] */
+
+	.section	.init
+	.align	1
+	.global	_init
 	.type	_init, @function
 _init:
-	Push $srp
-	subq 4,$sp
-	movem $r0,[$sp]
-	move.d $pc,$r0
-	sub.d .:GOTOFF,$r0
-#APP
-	
-	.align 1
-	
-	
-	.section .fini
-#NO_APP
-	.align 1
-	.global _fini
+	subq	4,$sp
+	move.d	$r1,[$sp]
+	move	$srp,$r1
+	subq	4,$sp
+	move.d	$r0,[$sp]
+	move.d	$pc,$r0
+	sub.d	.:GOTOFF,$r0
+	.align	1
+
+	.section	.fini
+	.align	1
+	.global	_fini
 	.type	_fini, @function
 _fini:
-	Push $srp
-	subq 4,$sp
-	movem $r0,[$sp]
-	move.d $pc,$r0
-	sub.d .:GOTOFF,$r0
-#APP
-	.align 1
-	
-	
-/*@TRAILER_BEGINS*/
+	subq	4,$sp
+	move.d	$r1,[$sp]
+	move	$srp,$r1
+	subq	4,$sp
+	move.d	$r0,[$sp]
+	move.d	$pc,$r0
+	sub.d	.:GOTOFF,$r0
+	.align	1

Modified: trunk/uClibc/libc/sysdeps/linux/cris/crtn.S
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/cris/crtn.S	2006-02-22 08:51:58 UTC (rev 14195)
+++ trunk/uClibc/libc/sysdeps/linux/cris/crtn.S	2006-02-22 08:54:46 UTC (rev 14196)
@@ -1,27 +1,23 @@
-#NO_APP
-	.file	"initfini.c"
-#APP
-	
-	.section .init
-#NO_APP
-	.align 1
-	.global _init
+/* glibc's sysdeps/cris/elf/initfini.c used for reference [EPILOG] */
+
+	.section	.init
+	.align	1
+	.global	_init
 	.type	_init, @function
-#NO_APP
-	movem [$sp+],$r0
-	Jump [$sp+]
+	move.d	[$sp+],$r0
+	move	$r1,$srp
+	move.d	[$sp+],$r1
+	Ret
+	nop
 	.size	_init, .-_init
-#APP
-	
-	.section .fini
-#NO_APP
-	.align 1
-	.global _fini
+
+	.section	.fini
+	.align	1
+	.global	_fini
 	.type	_fini, @function
-#NO_APP
-	movem [$sp+],$r0
-	Jump [$sp+]
+	move.d	[$sp+],$r0
+	move	$r1,$srp
+	move.d	[$sp+],$r1
+	Ret
+	nop
 	.size	_fini, .-_fini
-#APP
-	
-/*@TRAILER_BEGINS*/




More information about the uClibc-cvs mailing list