bare asm -> __asm

This commit is contained in:
perry 2005-12-24 22:59:39 +00:00
parent 12ffdb00a2
commit 00d6acb4b6
4 changed files with 33 additions and 33 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_machdep.c,v 1.24 2005/12/11 12:20:16 christos Exp $ */
/* $NetBSD: linux_machdep.c,v 1.25 2005/12/24 22:59:39 perry Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.24 2005/12/11 12:20:16 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.25 2005/12/24 22:59:39 perry Exp $");
#define COMPAT_LINUX 1
@ -188,17 +188,17 @@ setup_linux_sigframe(frame, sig, mask, usp)
break;
#ifdef M68060
case FPU_68060:
asm("fsave %0" : "=m" (kf.sf_c.c_sc.sc_ss.ss_fpstate.FPF_u1)
__asm("fsave %0" : "=m" (kf.sf_c.c_sc.sc_ss.ss_fpstate.FPF_u1)
: : "memory");
if (((struct fpframe060 *)&kf.sf_c.c_sc.sc_ss.ss_fpstate.FPF_u1)
->fpf6_frmfmt != FPF6_FMT_NULL) {
asm("fmovem %%fp0-%%fp1,%0" :
__asm("fmovem %%fp0-%%fp1,%0" :
"=m" (kf.sf_c.c_sc.sc_ss.ss_fpstate.fpf_regs[0][0]));
/*
* On 060, "fmovem fpcr/fpsr/fpi,<ea>" is
* emulated by software and slow.
*/
asm("fmovem %%fpcr,%0; fmovem %%fpsr,%1; fmovem %%fpi,%2" :
__asm("fmovem %%fpcr,%0; fmovem %%fpsr,%1; fmovem %%fpi,%2" :
"=m" (kf.sf_c.c_sc.sc_ss.ss_fpstate.fpf_fpcr),
"=m" (kf.sf_c.c_sc.sc_ss.ss_fpstate.fpf_fpsr),
"=m" (kf.sf_c.c_sc.sc_ss.ss_fpstate.fpf_fpiar));
@ -206,10 +206,10 @@ setup_linux_sigframe(frame, sig, mask, usp)
break;
#endif
default:
asm("fsave %0" : "=m" (kf.sf_c.c_sc.sc_ss.ss_fpstate.FPF_u1)
__asm("fsave %0" : "=m" (kf.sf_c.c_sc.sc_ss.ss_fpstate.FPF_u1)
: : "memory");
if (kf.sf_c.c_sc.sc_ss.ss_fpstate.fpf_version) {
asm("fmovem %%fp0-%%fp1,%0; fmovem %%fpcr/%%fpsr/%%fpi,%1" :
__asm("fmovem %%fp0-%%fp1,%0; fmovem %%fpcr/%%fpsr/%%fpi,%1" :
"=m" (kf.sf_c.c_sc.sc_ss.ss_fpstate.fpf_regs[0][0]),
"=m" (kf.sf_c.c_sc.sc_ss.ss_fpstate.fpf_fpcr)
: : "memory");
@ -352,17 +352,17 @@ setup_linux_rt_sigframe(frame, sig, mask, usp, l)
break;
#ifdef M68060
case FPU_68060:
asm("fsave %0" : "=m" (kf.sf_uc.uc_ss.ss_fpstate));
__asm("fsave %0" : "=m" (kf.sf_uc.uc_ss.ss_fpstate));
/* See note below. */
if (((struct fpframe060 *) &kf.sf_uc.uc_ss.ss_fpstate.FPF_u1)
->fpf6_frmfmt != FPF6_FMT_NULL) {
asm("fmovem %%fp0-%%fp7,%0" :
__asm("fmovem %%fp0-%%fp7,%0" :
"=m" (kf.sf_uc.uc_mc.mc_fpregs.fpr_regs[0][0]));
/*
* On 060, "fmovem fpcr/fpsr/fpi,<ea>" is
* emulated by software and slow.
*/
asm("fmovem %%fpcr,%0; fmovem %%fpsr,%1; fmovem %%fpi,%2" :
__asm("fmovem %%fpcr,%0; fmovem %%fpsr,%1; fmovem %%fpi,%2" :
"=m" (kf.sf_uc.uc_mc.mc_fpregs.fpr_fpcr),
"=m" (kf.sf_uc.uc_mc.mc_fpregs.fpr_fpsr),
"=m" (kf.sf_uc.uc_mc.mc_fpregs.fpr_fpiar));
@ -372,16 +372,16 @@ setup_linux_rt_sigframe(frame, sig, mask, usp, l)
default:
/*
* NOTE: We give whole of the "struct linux_rt_fpframe"
* to the asm("fsave") argument; not the FPF_u1 element only.
* to the __asm("fsave") argument; not the FPF_u1 element only.
* Unlike the non-RT version of this structure,
* this contains only the FPU state used by "fsave"
* (and whole of the information is in the structure).
* This gives the correct dependency information to the asm(),
* This gives the correct dependency information to the __asm(),
* and no "memory" is required to the ``clobberd'' list.
*/
asm("fsave %0" : "=m" (kf.sf_uc.uc_ss.ss_fpstate));
__asm("fsave %0" : "=m" (kf.sf_uc.uc_ss.ss_fpstate));
if (kf.sf_uc.uc_ss.ss_fpstate.fpf_version) {
asm("fmovem %%fp0-%%fp7,%0; fmovem %%fpcr/%%fpsr/%%fpi,%1" :
__asm("fmovem %%fp0-%%fp7,%0; fmovem %%fpcr/%%fpsr/%%fpi,%1" :
"=m" (kf.sf_uc.uc_mc.mc_fpregs.fpr_regs[0][0]),
"=m" (kf.sf_uc.uc_mc.mc_fpregs.fpr_fpcr)
: : "memory");
@ -617,23 +617,23 @@ bad: sigexit(l, SIGSEGV);
* On 060, "fmovem <ea>,fpcr/fpsr/fpi" is
* emulated by software and slow.
*/
asm("fmovem %0,%%fpcr; fmovem %1,%%fpsr; fmovem %2,%%fpi"::
__asm("fmovem %0,%%fpcr; fmovem %1,%%fpsr; fmovem %2,%%fpi"::
"m" (scp->sc_ss.ss_fpstate.fpf_fpcr),
"m" (scp->sc_ss.ss_fpstate.fpf_fpsr),
"m" (scp->sc_ss.ss_fpstate.fpf_fpiar));
asm("fmovem %0,%%fp0-%%fp1" : :
__asm("fmovem %0,%%fp0-%%fp1" : :
"m" (scp->sc_ss.ss_fpstate.fpf_regs[0][0]));
}
asm("frestore %0" : : "m" (scp->sc_ss.ss_fpstate.FPF_u1));
__asm("frestore %0" : : "m" (scp->sc_ss.ss_fpstate.FPF_u1));
break;
#endif
default:
if (scp->sc_ss.ss_fpstate.fpf_version) {
asm("fmovem %0,%%fpcr/%%fpsr/%%fpi; fmovem %1,%%fp0-%%fp1"::
__asm("fmovem %0,%%fpcr/%%fpsr/%%fpi; fmovem %1,%%fp0-%%fp1"::
"m" (scp->sc_ss.ss_fpstate.fpf_fpcr),
"m" (scp->sc_ss.ss_fpstate.fpf_regs[0][0]));
}
asm("frestore %0" : : "m" (scp->sc_ss.ss_fpstate.FPF_u1));
__asm("frestore %0" : : "m" (scp->sc_ss.ss_fpstate.FPF_u1));
break;
}
@ -758,23 +758,23 @@ bad: sigexit(l, SIGSEGV);
* On 060, "fmovem <ea>,fpcr/fpsr/fpi" is
* emulated by software and slow.
*/
asm("fmovem %0,%%fpcr; fmovem %1,%%fpsr; fmovem %2,%%fpi"::
__asm("fmovem %0,%%fpcr; fmovem %1,%%fpsr; fmovem %2,%%fpi"::
"m" (tuc.uc_mc.mc_fpregs.fpr_fpcr),
"m" (tuc.uc_mc.mc_fpregs.fpr_fpsr),
"m" (tuc.uc_mc.mc_fpregs.fpr_fpiar));
asm("fmovem %0,%%fp0-%%fp1" : :
__asm("fmovem %0,%%fp0-%%fp1" : :
"m" (tuc.uc_mc.mc_fpregs.fpr_regs[0][0]));
}
asm("frestore %0" : : "m" (tuc.uc_ss.ss_fpstate.FPF_u1));
__asm("frestore %0" : : "m" (tuc.uc_ss.ss_fpstate.FPF_u1));
break;
#endif
default:
if (tuc.uc_ss.ss_fpstate.fpf_version) {
asm("fmovem %0,%%fpcr/%%fpsr/%%fpi; fmovem %1,%%fp0-%%fp1"::
__asm("fmovem %0,%%fpcr/%%fpsr/%%fpi; fmovem %1,%%fp0-%%fp1"::
"m" (tuc.uc_mc.mc_fpregs.fpr_fpcr),
"m" (tuc.uc_mc.mc_fpregs.fpr_regs[0][0]));
}
asm("frestore %0" : : "m" (tuc.uc_ss.ss_fpstate.FPF_u1));
__asm("frestore %0" : : "m" (tuc.uc_ss.ss_fpstate.FPF_u1));
break;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: gtidma.c,v 1.7 2005/12/24 20:27:41 perry Exp $ */
/* $NetBSD: gtidma.c,v 1.8 2005/12/24 23:00:49 perry Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gtidma.c,v 1.7 2005/12/24 20:27:41 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: gtidma.c,v 1.8 2005/12/24 23:00:49 perry Exp $");
#include "opt_idma.h"
#include "opt_ddb.h"
@ -131,7 +131,7 @@ _mftb()
u_long scratch;
u_int64_t tb;
asm volatile ("1: mftbu %0; mftb %0+1; mftbu %1; cmpw 0,%0,%1; bne 1b"
__asm volatile ("1: mftbu %0; mftb %0+1; mftbu %1; cmpw 0,%0,%1; bne 1b"
: "=r"(tb), "=r"(scratch));
return tb;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: gtidmareg.h,v 1.3 2005/12/11 12:22:16 christos Exp $ */
/* $NetBSD: gtidmareg.h,v 1.4 2005/12/24 23:00:49 perry Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@ -60,7 +60,7 @@ idma_desc_read(u_int32_t *ip)
{
u_int32_t rv;
asm volatile ("lwbrx %0,0,%1; eieio;"
__asm volatile ("lwbrx %0,0,%1; eieio;"
: "=r"(rv) : "r"(ip));
return rv;
}
@ -68,7 +68,7 @@ idma_desc_read(u_int32_t *ip)
static volatile inline void
idma_desc_write(u_int32_t *ip, u_int32_t val)
{
asm volatile ("stwbrx %0,0,%1; eieio;"
__asm volatile ("stwbrx %0,0,%1; eieio;"
:: "r"(val), "r"(ip));
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_plip.c,v 1.8 2005/12/24 20:27:52 perry Exp $ */
/* $NetBSD: if_plip.c,v 1.9 2005/12/24 23:00:49 perry Exp $ */
/*-
* Copyright (c) 1997 Poul-Henning Kamp
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.8 2005/12/24 20:27:52 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.9 2005/12/24 23:00:49 perry Exp $");
/*
* Parallel port TCP/IP interfaces added. I looked at the driver from
@ -74,7 +74,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.8 2005/12/24 20:27:52 perry Exp $");
* Expect transfer-rates up to 75 kbyte/sec.
*
* If GCC could correctly grok
* register int port asm("edx")
* register int port __asm("edx")
* the code would be cleaner
*
* Poul-Henning Kamp <phk@freebsd.org>