To: akpm, linus Cc: lkml Subject: [PATCH] M68k new gcc M68k: Fixes for when compiling with modern gcc (from Roman Zippel): - Avoid warning 'use of memory input without lvalue in asm operand 0 is deprecated' of newer gcc - Replace some '%/' with offical '%%' to escape a '%' Signed-off-by: Geert Uytterhoeven --- arch/m68k/kernel/signal.c | 34 +++++++++++++++++----------------- include/asm-m68k/ucontext.h | 6 ++---- 2 files changed, 19 insertions(+), 21 deletions(-) --- linux-2.6.7/arch/m68k/kernel/signal.c 2004-05-03 11:01:24.000000000 +0200 +++ linux-m68k-2.6.7/arch/m68k/kernel/signal.c 2004-05-23 10:55:54.000000000 +0200 @@ -228,8 +228,8 @@ goto out; __asm__ volatile (".chip 68k/68881\n\t" - "fmovemx %0,%/fp0-%/fp1\n\t" - "fmoveml %1,%/fpcr/%/fpsr/%/fpiar\n\t" + "fmovemx %0,%%fp0-%%fp1\n\t" + "fmoveml %1,%%fpcr/%%fpsr/%%fpiar\n\t" ".chip 68k" : /* no outputs */ : "m" (*sc->sc_fpregs), "m" (*sc->sc_fpcntl)); @@ -258,7 +258,7 @@ if (FPU_IS_EMU) { /* restore fpu control register */ if (__copy_from_user(current->thread.fpcntl, - &uc->uc_mcontext.fpregs.f_pcr, 12)) + uc->uc_mcontext.fpregs.f_fpcntl, 12)) goto out; /* restore all other fpu register */ if (__copy_from_user(current->thread.fp, @@ -298,12 +298,12 @@ sizeof(fpregs))) goto out; __asm__ volatile (".chip 68k/68881\n\t" - "fmovemx %0,%/fp0-%/fp7\n\t" - "fmoveml %1,%/fpcr/%/fpsr/%/fpiar\n\t" + "fmovemx %0,%%fp0-%%fp7\n\t" + "fmoveml %1,%%fpcr/%%fpsr/%%fpiar\n\t" ".chip 68k" : /* no outputs */ : "m" (*fpregs.f_fpregs), - "m" (fpregs.f_pcr)); + "m" (*fpregs.f_fpcntl)); } if (context_size && __copy_from_user(fpstate + 4, (long *)&uc->uc_fpstate + 1, @@ -586,12 +586,12 @@ sc->sc_fpstate[0x38] |= 1 << 3; } __asm__ volatile (".chip 68k/68881\n\t" - "fmovemx %/fp0-%/fp1,%0\n\t" - "fmoveml %/fpcr/%/fpsr/%/fpiar,%1\n\t" + "fmovemx %%fp0-%%fp1,%0\n\t" + "fmoveml %%fpcr/%%fpsr/%%fpiar,%1\n\t" ".chip 68k" - : /* no outputs */ - : "m" (*sc->sc_fpregs), - "m" (*sc->sc_fpcntl) + : "=m" (*sc->sc_fpregs), + "=m" (*sc->sc_fpcntl) + : /* no inputs */ : "memory"); } } @@ -604,7 +604,7 @@ if (FPU_IS_EMU) { /* save fpu control register */ - err |= copy_to_user(&uc->uc_mcontext.fpregs.f_pcr, + err |= copy_to_user(uc->uc_mcontext.fpregs.f_fpcntl, current->thread.fpcntl, 12); /* save all other fpu register */ err |= copy_to_user(uc->uc_mcontext.fpregs.f_fpregs, @@ -631,12 +631,12 @@ fpstate[0x38] |= 1 << 3; } __asm__ volatile (".chip 68k/68881\n\t" - "fmovemx %/fp0-%/fp7,%0\n\t" - "fmoveml %/fpcr/%/fpsr/%/fpiar,%1\n\t" + "fmovemx %%fp0-%%fp7,%0\n\t" + "fmoveml %%fpcr/%%fpsr/%%fpiar,%1\n\t" ".chip 68k" - : /* no outputs */ - : "m" (*fpregs.f_fpregs), - "m" (fpregs.f_pcr) + : "=m" (*fpregs.f_fpregs), + "=m" (*fpregs.f_fpcntl) + : /* no inputs */ : "memory"); err |= copy_to_user(&uc->uc_mcontext.fpregs, &fpregs, sizeof(fpregs)); --- linux-2.6.7/include/asm-m68k/ucontext.h 1998-02-13 01:30:13.000000000 +0100 +++ linux-m68k-2.6.7/include/asm-m68k/ucontext.h 2004-05-23 10:56:37.000000000 +0200 @@ -6,10 +6,8 @@ typedef greg_t gregset_t[NGREG]; typedef struct fpregset { - int f_pcr; - int f_psr; - int f_fpiaddr; - int f_fpregs[8][3]; + int f_fpcntl[3]; + int f_fpregs[8*3]; } fpregset_t; struct mcontext {