Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/ibm4xx copy{in,out}str: "insn[TAB]operands;...



details:   https://anonhg.NetBSD.org/src/rev/795b4e3ef87b
branches:  trunk
changeset: 371737:795b4e3ef87b
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Oct 04 14:02:46 2022 +0000

description:
copy{in,out}str: "insn[TAB]operands;" for inline asm codes.

diffstat:

 sys/arch/powerpc/ibm4xx/copyinstr.c  |  30 +++++++++++++++---------------
 sys/arch/powerpc/ibm4xx/copyoutstr.c |  30 +++++++++++++++---------------
 2 files changed, 30 insertions(+), 30 deletions(-)

diffs (128 lines):

diff -r e3a6009d2b71 -r 795b4e3ef87b sys/arch/powerpc/ibm4xx/copyinstr.c
--- a/sys/arch/powerpc/ibm4xx/copyinstr.c       Tue Oct 04 13:58:54 2022 +0000
+++ b/sys/arch/powerpc/ibm4xx/copyinstr.c       Tue Oct 04 14:02:46 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copyinstr.c,v 1.20 2022/10/04 13:58:54 rin Exp $       */
+/*     $NetBSD: copyinstr.c,v 1.21 2022/10/04 14:02:46 rin Exp $       */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: copyinstr.c,v 1.20 2022/10/04 13:58:54 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copyinstr.c,v 1.21 2022/10/04 14:02:46 rin Exp $");
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>
@@ -72,32 +72,32 @@
 
        resid = len;
        __asm volatile(
-               "mtctr %[resid];"               /* Set up counter */
-               "mfmsr %[msr];"                 /* Save MSR */
-               "li %[pid],0x20;"               /* Disable IMMU */
-               "andc %[pid],%[msr],%[pid];"
-               "mtmsr %[pid];"
+               "mtctr  %[resid];"              /* Set up counter */
+               "mfmsr  %[msr];"                /* Save MSR */
+               "li     %[pid],0x20;"           /* Disable IMMU */
+               "andc   %[pid],%[msr],%[pid];"
+               "mtmsr  %[pid];"
                "isync;"
                MFPID(%[pid])                   /* Save old PID */
 
        "1:"    MTPID(%[ctx])                   /* Load user ctx */
                "isync;"
-               "lbz %[data],0(%[uaddr]);"      /* Load byte */
-               "addi %[uaddr],%[uaddr],1;"
+               "lbz    %[data],0(%[uaddr]);"   /* Load byte */
+               "addi   %[uaddr],%[uaddr],1;"
                "sync;"
 
                MTPID(%[pid])
                "isync;"
-               "stb %[data],0(%[kaddr]);"      /* Store kernel byte */
-               "addi %[kaddr],%[kaddr],1;"
-               "or. %[data],%[data],%[data];"
+               "stb    %[data],0(%[kaddr]);"   /* Store kernel byte */
+               "addi   %[kaddr],%[kaddr],1;"
+               "or.    %[data],%[data],%[data];"
                "sync;"
-               "bdnzf eq,1b;"                  /* while(ctr-- && !zero) */
+               "bdnzf  eq,1b;"                 /* while(ctr-- && !zero) */
 
                MTPID(%[pid])                   /* Restore PID, MSR */
-               "mtmsr %[msr];"
+               "mtmsr  %[msr];"
                "isync;"
-               "mfctr %[resid];"               /* Restore resid */
+               "mfctr  %[resid];"              /* Restore resid */
 
                : [msr] "=&r" (msr), [pid] "=&r" (pid), [data] "=&r" (data),
                  [resid] "+r" (resid)
diff -r e3a6009d2b71 -r 795b4e3ef87b sys/arch/powerpc/ibm4xx/copyoutstr.c
--- a/sys/arch/powerpc/ibm4xx/copyoutstr.c      Tue Oct 04 13:58:54 2022 +0000
+++ b/sys/arch/powerpc/ibm4xx/copyoutstr.c      Tue Oct 04 14:02:46 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copyoutstr.c,v 1.20 2022/10/04 13:58:54 rin Exp $      */
+/*     $NetBSD: copyoutstr.c,v 1.21 2022/10/04 14:02:46 rin Exp $      */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: copyoutstr.c,v 1.20 2022/10/04 13:58:54 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copyoutstr.c,v 1.21 2022/10/04 14:02:46 rin Exp $");
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>
@@ -72,32 +72,32 @@
 
        resid = len;
        __asm volatile(
-               "mtctr %[resid];"               /* Set up counter */
-               "mfmsr %[msr];"                 /* Save MSR */
-               "li %[pid],0x20;"               /* Disable IMMU */
-               "andc %[pid],%[msr],%[pid];"
-               "mtmsr %[pid];"
+               "mtctr  %[resid];"              /* Set up counter */
+               "mfmsr  %[msr];"                /* Save MSR */
+               "li     %[pid],0x20;"           /* Disable IMMU */
+               "andc   %[pid],%[msr],%[pid];"
+               "mtmsr  %[pid];"
                "isync;"
                MFPID(%[pid])                   /* Save old PID */
 
        "1:"    MTPID(%[pid])
                "isync;"
-               "lbz %[data],0(%[kaddr]);"      /* Load kernel byte */
-               "addi %[kaddr],%[kaddr],1;"
+               "lbz    %[data],0(%[kaddr]);"   /* Load kernel byte */
+               "addi   %[kaddr],%[kaddr],1;"
                "sync;"
 
                MTPID(%[ctx])                   /* Load user ctx */
                "isync;"
-               "stb %[data],0(%[uaddr]);"      /* Store byte */
-               "addi %[uaddr],%[uaddr],1;"
-               "or. %[data],%[data],%[data];"
+               "stb    %[data],0(%[uaddr]);"   /* Store byte */
+               "addi   %[uaddr],%[uaddr],1;"
+               "or.    %[data],%[data],%[data];"
                "sync;"
-               "bdnzf eq,1b;"                  /* while(ctr-- && !zero) */
+               "bdnzf  eq,1b;"                 /* while(ctr-- && !zero) */
 
                MTPID(%[pid])                   /* Restore PID, MSR */
-               "mtmsr %[msr];"
+               "mtmsr  %[msr];"
                "isync;"
-               "mfctr %[resid];"               /* Restore resid */
+               "mfctr  %[resid];"              /* Restore resid */
 
                : [msr] "=&r" (msr), [pid] "=&r" (pid), [data] "=&r" (data),
                  [resid] "+r" (resid)



Home | Main Index | Thread Index | Old Index