Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/csu fix multiline string literal. from gcc3



details:   https://anonhg.NetBSD.org/src/rev/9b97e1685195
branches:  trunk
changeset: 522066:9b97e1685195
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Feb 11 06:08:23 2002 +0000

description:
fix multiline string literal.  from gcc3

diffstat:

 lib/csu/sparc64/crt0.c   |  46 ++++++++++++++++++++++++----------------------
 lib/csu/sparc_elf/crt0.c |  41 ++++++++++++++++++++---------------------
 2 files changed, 44 insertions(+), 43 deletions(-)

diffs (129 lines):

diff -r 7d8f9369b25c -r 9b97e1685195 lib/csu/sparc64/crt0.c
--- a/lib/csu/sparc64/crt0.c    Mon Feb 11 04:56:27 2002 +0000
+++ b/lib/csu/sparc64/crt0.c    Mon Feb 11 06:08:23 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.c,v 1.17 2001/02/21 00:47:22 eeh Exp $ */
+/* $NetBSD: crt0.c,v 1.18 2002/02/11 06:08:41 mrg Exp $ */
 
 /*
  * Copyright (c) 1995 Christopher G. Demetriou
@@ -44,26 +44,28 @@
  *     %g1 instead of a termination routine.
  */
 
-__asm__("
-       .data
-__data_start:                                  ! Start of data section
-       .text
-       .align 4
-       .global start
-       .global _start
-       .global __start
-start:
-_start:
-__start:
-       setx    __data_start, %o0, %g4          ! Point %g4 to start of data section
-       clr     %g4                             ! egcs thinks this is zero. XXX
-       clr     %fp
-       add     %sp, 8*16 + 0x7ff, %o0          ! start of stack
-       mov     %g1, %o1                        ! Cleanup routine
-       mov     %g3, %o1                        ! XXXX our rtld uses %g3
-       mov     %g2, %o2                        ! XXXX obj from rtld.
-       ba,pt   %icc, ___start                  ! XXXX jump over the retl egcs 2.96 inserts
-       mov     %g1, %o3                        ! ps_strings XXXX
+__asm__("\n\
+       .data\n\
+__data_start:                                  ! Start of data section\n\
+       .text\n\
+       .align 4\n\
+       .global start\n\
+       .global _start\n\
+       .global __start\n\
+       .register %g3,#scratch\n\
+       .register %g2,#scratch\n\
+start:\n\
+_start:\n\
+__start:\n\
+       setx    __data_start, %o0, %g4          ! Point %g4 to start of data section\n\
+       clr     %g4                             ! egcs thinks this is zero. XXX\n\
+       clr     %fp\n\
+       add     %sp, 8*16 + 0x7ff, %o0          ! start of stack\n\
+       mov     %g1, %o1                        ! Cleanup routine\n\
+       mov     %g3, %o1                        ! XXXX our rtld uses %g3\n\
+       mov     %g2, %o2                        ! XXXX obj from rtld.\n\
+       ba,pt   %icc, ___start                  ! XXXX jump over the retl egcs 2.96 inserts\n\
+       mov     %g1, %o3                        ! ps_strings XXXX\n\
 ");
 
 void ___start __P((char **, void (*cleanup) __P((void)), const Obj_Entry *,
@@ -114,7 +116,7 @@
  * NOTE: Leave the RCS ID _after_ _start(), in case it gets placed in .text.
  */
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: crt0.c,v 1.17 2001/02/21 00:47:22 eeh Exp $");
+__RCSID("$NetBSD: crt0.c,v 1.18 2002/02/11 06:08:41 mrg Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 /* XXX XXX XXX THIS SHOULD GO AWAY XXX XXX XXX
diff -r 7d8f9369b25c -r 9b97e1685195 lib/csu/sparc_elf/crt0.c
--- a/lib/csu/sparc_elf/crt0.c  Mon Feb 11 04:56:27 2002 +0000
+++ b/lib/csu/sparc_elf/crt0.c  Mon Feb 11 06:08:23 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.c,v 1.9 2000/06/14 22:52:50 cgd Exp $ */
+/* $NetBSD: crt0.c,v 1.10 2002/02/11 06:08:23 mrg Exp $ */
 
 /*
  * Copyright (c) 1998 Christos Zoulas
@@ -40,25 +40,24 @@
 void ___start __P((int, char **, char **, void (*cleanup) __P((void)),
     const Obj_Entry *, struct ps_strings *));
 
-__asm("
-       .text
-       .align  4
-       .global __start
-       .global _start
-__start:
-_start:
-       mov     0, %fp
-       ld      [%sp + 64], %o0         ! get argc
-       add     %sp, 68, %o1            ! get argv
-       sll     %o0, 2, %o2             !
-       add     %o2, 4, %o2             ! envp = argv + (argc << 2) + 4
-       add     %o1, %o2, %o2           !
-       andn    %sp, 7, %sp             ! align
-       sub     %sp, 24, %sp            ! expand to standard stack frame size
-       mov     %g3, %o3
-       mov     %g2, %o4
-       call    ___start
-        mov    %g1, %o5
+__asm("        .text\n\
+       .align  4\n\
+       .global __start\n\
+       .global _start\n\
+__start:\n\
+_start:\n\
+       mov     0, %fp\n\
+       ld      [%sp + 64], %o0         ! get argc\n\
+       add     %sp, 68, %o1            ! get argv\n\
+       sll     %o0, 2, %o2             !\n\
+       add     %o2, 4, %o2             ! envp = argv + (argc << 2) + 4\n\
+       add     %o1, %o2, %o2           !\n\
+       andn    %sp, 7, %sp             ! align\n\
+       sub     %sp, 24, %sp            ! expand to standard stack frame size\n\
+       mov     %g3, %o3\n\
+       mov     %g2, %o4\n\
+       call    ___start\n\
+        mov    %g1, %o5\n\
 ");
 
 void
@@ -102,7 +101,7 @@
  * NOTE: Leave the RCS ID _after_ __start(), in case it gets placed in .text.
  */
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: crt0.c,v 1.9 2000/06/14 22:52:50 cgd Exp $");
+__RCSID("$NetBSD: crt0.c,v 1.10 2002/02/11 06:08:23 mrg Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "common.c"



Home | Main Index | Thread Index | Old Index