libgloss/sparc multiline asm fix
J. Johnston
jjohnstn@redhat.com
Tue Apr 16 11:15:00 GMT 2002
Joel Sherrill wrote:
>
> OK to commit this to fix the libgloss/sparc for gcc 3.2?
>
> 2002-04-16 Joel Sherrill <joel@OARcorp.com>
>
> * sparc/cygmon-salib.c, sparc/erc32-stub.c: Don't use multiline
> strings.
>
Yes. Thanks.
-- Jeff J.
> --
> Joel Sherrill, Ph.D. Director of Research & Development
> joel@OARcorp.com On-Line Applications Research
> Ask me about RTEMS: a free RTOS Huntsville AL 35805
> Support Available (256) 722-9985
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------
> Index: cygmon-salib.c
> ===================================================================
> RCS file: /cvs/src/src/libgloss/sparc/cygmon-salib.c,v
> retrieving revision 1.1
> diff -u -r1.1 cygmon-salib.c
> --- cygmon-salib.c 17 Mar 2000 22:48:52 -0000 1.1
> +++ cygmon-salib.c 16 Apr 2002 16:33:00 -0000
> @@ -7,9 +7,9 @@
> putTtyChar(int c)
> {
> /* 2 is fork under solaris; bad juju */
> - asm(" mov %i0,%o0
> - or %g0,2,%g1
> - ta 8
> + asm(" mov %i0,%o0 \n\
> + or %g0,2,%g1 \n\
> + ta 8 \n\
> nop");
> }
>
> @@ -20,8 +20,8 @@
> {
> return -1;
> }
> - asm(" or %g0, 4, %g1
> - ta 8
> + asm(" or %g0, 4, %g1 \n\
> + ta 8 \n\
> nop");
> return amt;
> }
> @@ -33,8 +33,8 @@
> {
> return -1;
> }
> - asm(" or %g0, 3, %g1
> - ta 8
> + asm(" or %g0, 3, %g1 \n\
> + ta 8 \n\
> nop");
> return amt;
> }
> @@ -43,19 +43,19 @@
> _exit(int code)
> {
> while(1) {
> - asm(" or %g0,1,%g1
> - ta 8
> - nop
> - ta 1
> - nop");
> + asm(" or %g0,1,%g1 \n\
> + ta 8 \n\
> + nop \n\
> + ta 1 \n\
> + nop");
> }
> }
>
> int
> setitimer(int which, const struct itimerval *value, struct itimerval *ovalue)
> {
> - asm(" or %g0, 158, %g1
> - ta 8
> + asm(" or %g0, 158, %g1 \n\
> + ta 8 \n\
> nop");
> }
>
> @@ -138,8 +138,8 @@
> int
> kill (int pid, int signal)
> {
> - asm ("or %g0, 37, %g1
> - ta 8
> + asm ("or %g0, 37, %g1 \n\
> + ta 8 \n\
> nop");
> }
>
> @@ -152,50 +152,50 @@
> int
> getitimer (int which, struct itimerval *value)
> {
> - asm ("or %g0, 157, %g1
> - ta 8
> + asm ("or %g0, 157, %g1 \n\
> + ta 8 \n\
> nop");
> }
>
> void
> __install_signal_handler (void *func)
> {
> - asm ("mov %o0, %o1
> - mov %g0, %o0
> - or %g0, 48, %g1
> - ta 8
> + asm ("mov %o0, %o1 \n\
> + mov %g0, %o0 \n\
> + or %g0, 48, %g1 \n\
> + ta 8 \n\
> nop");
> }
>
> int
> gettimeofday (struct timeval *tp, struct timezone *tzp)
> {
> - asm ("or %g0, 156, %g1
> - ta 8
> + asm ("or %g0, 156, %g1 \n\
> + ta 8 \n\
> nop");
> }
>
> int
> stime (long *seconds)
> {
> - asm ("or %g0, 25, %g1
> - ta 8
> + asm ("or %g0, 25, %g1 \n\
> + ta 8 \n\
> nop");
> }
>
> int
> add_mapping (long vma, long pma, long size)
> {
> - asm ("or %g0, 115, %g1
> - ta 8
> + asm ("or %g0, 115, %g1 \n\
> + ta 8 \n\
> nop");
> }
>
> int
> remove_mapping (long vma, long vma_end)
> {
> - asm ("or %g0, 117, %g1
> - ta 8
> + asm ("or %g0, 117, %g1 \n\
> + ta 8 \n\
> nop");
> }
>
> @@ -211,10 +211,10 @@
> int *res;
>
> /* 184 is tsolsys under solaris; bad juju */
> - asm ("mov %1, %%o0
> - or %%g0, 184, %%g1
> - ta 8
> - nop
> + asm ("mov %1, %%o0 \n\
> + or %%g0, 184, %%g1 \n\
> + ta 8 \n\
> + nop \n\
> mov %%o0, %0" : "=r" (res) : "r" (argv): "g1");
> return res;
> }
> Index: erc32-stub.c
> ===================================================================
> RCS file: /cvs/src/src/libgloss/sparc/erc32-stub.c,v
> retrieving revision 1.1
> diff -u -r1.1 erc32-stub.c
> --- erc32-stub.c 17 Mar 2000 22:48:52 -0000 1.1
> +++ erc32-stub.c 16 Apr 2002 16:33:00 -0000
> @@ -136,22 +136,22 @@
> DEBUG (1, "Entering handle_exception()");
>
> /* asm("mov %g0, %wim ; nop; nop; nop"); */
> - asm(" save %sp, -64, %sp
> - save %sp, -64, %sp
> - save %sp, -64, %sp
> - save %sp, -64, %sp
> - save %sp, -64, %sp
> - save %sp, -64, %sp
> - save %sp, -64, %sp
> - save %sp, -64, %sp
> - restore
> - restore
> - restore
> - restore
> - restore
> - restore
> - restore
> - restore
> + asm(" save %sp, -64, %sp \n\
> + save %sp, -64, %sp \n\
> + save %sp, -64, %sp \n\
> + save %sp, -64, %sp \n\
> + save %sp, -64, %sp \n\
> + save %sp, -64, %sp \n\
> + save %sp, -64, %sp \n\
> + save %sp, -64, %sp \n\
> + restore \n\
> + restore \n\
> + restore \n\
> + restore \n\
> + restore \n\
> + restore \n\
> + restore \n\
> + restore \n\
> ");
>
> if (registers[PC] == (unsigned long)breakinst) {
> @@ -180,10 +180,10 @@
> if (!initialized)
> return;
>
> - asm(" .globl " STRINGSYM(breakinst) "
> - " STRINGSYM(breakinst) ": ta 128+1
> - nop
> - nop
> + asm(" .globl " STRINGSYM(breakinst) " \n\
> + " STRINGSYM(breakinst) ": ta 128+1 \n\
> + nop \n\
> + nop \n\
> ");
> }
>
> @@ -197,9 +197,9 @@
> print ("Got a bad trap #");
> outbyte (tt);
> outbyte ('\n');
> - asm("ta 0
> - nop
> - nop
> + asm("ta 0 \n\
> + nop \n\
> + nop \n\
> ");
> }
>
> @@ -213,9 +213,9 @@
> print ("Got a soft trap #");
> outbyte (tt);
> outbyte ('\n');
> - asm("ta 0
> - nop
> - nop
> + asm("ta 0 \n\
> + nop \n\
> + nop \n\
> ");
> }
>
> @@ -239,7 +239,7 @@
> void
> target_reset()
> {
> - asm ("call 0
> + asm ("call 0 \n\
> nop ");
> }
>
More information about the Newlib
mailing list