summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
authorTobias Anderberg <tobias.anderberg@axis.com>2002-09-23 12:21:14 +0000
committerTobias Anderberg <tobias.anderberg@axis.com>2002-09-23 12:21:14 +0000
commit3e2f4de2b24ce2e3bc1733f55292cf496eb4bd83 (patch)
tree147c8098a97ab6b47524755062c52e185c2080f3 /libc/sysdeps
parent3a5a812fd610a5bfacadac212c35bdf04c852e26 (diff)
Cosmetic cleanup.
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/linux/cris/Makefile1
-rw-r--r--libc/sysdeps/linux/cris/__init_brk.c6
-rw-r--r--libc/sysdeps/linux/cris/brk.c6
-rw-r--r--libc/sysdeps/linux/cris/crt0.c35
-rw-r--r--libc/sysdeps/linux/cris/sbrk.c6
-rw-r--r--libc/sysdeps/linux/cris/sysdep.h6
6 files changed, 32 insertions, 28 deletions
diff --git a/libc/sysdeps/linux/cris/Makefile b/libc/sysdeps/linux/cris/Makefile
index 0955be53c..737ca1f9e 100644
--- a/libc/sysdeps/linux/cris/Makefile
+++ b/libc/sysdeps/linux/cris/Makefile
@@ -53,7 +53,6 @@ $(COBJS): %.o : %.c
headers:
@(TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > bits/syscall.h )
-# cd $(TOPDIR)/include/sys && ln -fs ../../libc/sysdeps/linux/m68k/reg.h .
clean:
rm -f *.[oa] *~ core
diff --git a/libc/sysdeps/linux/cris/__init_brk.c b/libc/sysdeps/linux/cris/__init_brk.c
index 0f5624b85..15decd12b 100644
--- a/libc/sysdeps/linux/cris/__init_brk.c
+++ b/libc/sysdeps/linux/cris/__init_brk.c
@@ -11,10 +11,10 @@ int
__init_brk (void)
{
if (___brk_addr == 0) {
- /* Notice that we don't need to save/restore the GOT
- * register since that is not call clobbered by the syscall
+ /*
+ * Notice that we don't need to save/restore the GOT
+ * register since that is not call clobbered by the syscall.
*/
-
asm ("clear.d $r10\n\t"
"movu.w " STR(__NR_brk) ",$r9\n\t"
"break 13\n\t"
diff --git a/libc/sysdeps/linux/cris/brk.c b/libc/sysdeps/linux/cris/brk.c
index 7814d52c3..d94f85726 100644
--- a/libc/sysdeps/linux/cris/brk.c
+++ b/libc/sysdeps/linux/cris/brk.c
@@ -10,10 +10,10 @@ extern int __init_brk (void);
int brk(void * end_data_seg)
{
if (__init_brk () == 0) {
- /* Notice that we don't need to save/restore the GOT
- * register since that is not call clobbered by the syscall
+ /*
+ * Notice that we don't need to save/restore the GOT
+ * register since that is not call clobbered by the syscall.
*/
-
asm ("move.d %1,$r10\n\t"
"movu.w " STR(__NR_brk) ",$r9\n\t"
"break 13\n\t"
diff --git a/libc/sysdeps/linux/cris/crt0.c b/libc/sysdeps/linux/cris/crt0.c
index 03b0d6ff3..4fe68ce05 100644
--- a/libc/sysdeps/linux/cris/crt0.c
+++ b/libc/sysdeps/linux/cris/crt0.c
@@ -1,24 +1,22 @@
-/* $Id: crt0.c,v 1.1 2002/09/16 08:08:33 tobiasa Exp $ */
-
-/* C base for Linux/CRIS 2.0/2.4
- */
-
-//#define DEBUG
+/* Startup code compliant to the ELF CRIS ABI */
/* The first piece of initialized data. */
int __data_start = 0;
-/* N.B.: It is important that this be the first function.
- This file is the first thing in the text section. */
-
+/*
+ * It is important that this be the first function.
+ * This file is the first thing in the text section.
+ */
void
_start ()
{
- /* on the stack we have argc. we can calculate argv/envp
+ /*
+ * On the stack we have argc. We can calculate argv/envp
* from that and the succeeding stack location, but fix so
- * we get the right calling convention (regs in r10/r11)
+ * we get the right calling convention (regs in r10/r11).
*
- * to understand this you really ought to read fs/binfmt_elf.c
+ * Please view linux/fs/binfmt_elf.c for a complete
+ * understanding of this.
*/
__asm__ volatile("pop $r10");
__asm__ volatile("move.d $sp, $r11");
@@ -36,14 +34,17 @@ start1 (int argc, char **argv)
/* The environment starts just after ARGV. */
environ = &argv[argc + 1];
- /* If the first thing after ARGV is the arguments
- themselves, there is no environment. */
+ /*
+ * If the first thing after ARGV is the arguments
+ * themselves, there is no environment.
+ */
if ((char *) environ == *argv)
- /* The environment is empty. Make environ
- point at ARGV[ARGC], which is NULL. */
+ /*
+ * The environment is empty. Make environ
+ * point at ARGV[ARGC], which is NULL.
+ */
--environ;
/* Leave control to the libc */
-
__uClibc_main(argc, argv, environ);
}
diff --git a/libc/sysdeps/linux/cris/sbrk.c b/libc/sysdeps/linux/cris/sbrk.c
index 79d924a44..cec93420e 100644
--- a/libc/sysdeps/linux/cris/sbrk.c
+++ b/libc/sysdeps/linux/cris/sbrk.c
@@ -15,10 +15,10 @@ sbrk(intptr_t increment)
if (__init_brk () == 0) {
void * tmp = ___brk_addr + increment;
- /* Notice that we don't need to save/restore the GOT
- * register since that is not call clobbered by the syscall
+ /*
+ * Notice that we don't need to save/restore the GOT
+ * register since that is not call clobbered by the syscall.
*/
-
asm ("move.d %1,$r10\n\t"
"movu.w " STR(__NR_brk) ",$r9\n\t"
"break 13\n\t"
diff --git a/libc/sysdeps/linux/cris/sysdep.h b/libc/sysdeps/linux/cris/sysdep.h
index 2068557c5..f905c7fb3 100644
--- a/libc/sysdeps/linux/cris/sysdep.h
+++ b/libc/sysdeps/linux/cris/sysdep.h
@@ -17,6 +17,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SYSDEP_H_
+#define _SYSDEP_H_
+
#ifndef C_LABEL
/* Define a macro we can use to construct the asm name for a C symbol. */
@@ -138,4 +141,5 @@
#define syscall_error __syscall_error
#define mcount _mcount
-#endif /* __ASSEMBLER__ */
+#endif /* __ASSEMBLER__ */
+#endif /* _SYSDEP_H_ */