summaryrefslogtreecommitdiffstats
path: root/lib/libm/arch/m88k/fenv.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2013-01-05 11:20:52 +0000
committermiod <miod@openbsd.org>2013-01-05 11:20:52 +0000
commit0b514a0798ffc86c581fc3611e7adb25cce99305 (patch)
tree2b36cbda37a019f9cf96e473dab56a2daf9a1761 /lib/libm/arch/m88k/fenv.c
parentif defined(NOPIC), do not attempt to .include arch/Makefile.inc for it may (diff)
downloadwireguard-openbsd-0b514a0798ffc86c581fc3611e7adb25cce99305.tar.xz
wireguard-openbsd-0b514a0798ffc86c581fc3611e7adb25cce99305.zip
Switch m88k ports to ELF.
Diffstat (limited to 'lib/libm/arch/m88k/fenv.c')
-rw-r--r--lib/libm/arch/m88k/fenv.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/lib/libm/arch/m88k/fenv.c b/lib/libm/arch/m88k/fenv.c
index 771c6b9c968..3902c577e9a 100644
--- a/lib/libm/arch/m88k/fenv.c
+++ b/lib/libm/arch/m88k/fenv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fenv.c,v 1.4 2012/12/05 23:20:02 deraadt Exp $ */
+/* $OpenBSD: fenv.c,v 1.5 2013/01/05 11:20:55 miod Exp $ */
/*
* Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org>
@@ -44,13 +44,13 @@ feclearexcept(int excepts)
excepts &= FE_ALL_EXCEPT;
/* Store the current floating-point status register */
- __asm__ __volatile__ ("fldcr %0, fcr62" : "=r" (fpsr));
+ __asm__ __volatile__ ("fldcr %0, %%fcr62" : "=r" (fpsr));
/* Clear the requested floating-point exceptions */
fpsr &= ~excepts;
/* Load the floating-point status register */
- __asm__ __volatile__ ("fstcr %0, fcr62" : : "r" (fpsr));
+ __asm__ __volatile__ ("fstcr %0, %%fcr62" : : "r" (fpsr));
return (0);
}
@@ -68,7 +68,7 @@ fegetexceptflag(fexcept_t *flagp, int excepts)
excepts &= FE_ALL_EXCEPT;
/* Store the current floating-point status register */
- __asm__ __volatile__ ("fldcr %0, fcr62" : "=r" (fpsr));
+ __asm__ __volatile__ ("fldcr %0, %%fcr62" : "=r" (fpsr));
/* Store the results in flagp */
*flagp = fpsr & excepts;
@@ -130,14 +130,14 @@ fesetexceptflag(const fexcept_t *flagp, int excepts)
excepts &= FE_ALL_EXCEPT;
/* Store the current floating-point status register */
- __asm__ __volatile__ ("fldcr %0, fcr62" : "=r" (fpsr));
+ __asm__ __volatile__ ("fldcr %0, %%fcr62" : "=r" (fpsr));
/* Set the requested status flags */
fpsr &= ~excepts;
fpsr |= *flagp & excepts;
/* Load the floating-point status register */
- __asm__ __volatile__ ("fstcr %0, fcr62" : : "r" (fpsr));
+ __asm__ __volatile__ ("fstcr %0, %%fcr62" : : "r" (fpsr));
return (0);
}
@@ -155,7 +155,7 @@ fetestexcept(int excepts)
excepts &= FE_ALL_EXCEPT;
/* Store the current floating-point status register */
- __asm__ __volatile__ ("fldcr %0, fcr62" : "=r" (fpsr));
+ __asm__ __volatile__ ("fldcr %0, %%fcr62" : "=r" (fpsr));
return (fpsr & excepts);
}
@@ -169,7 +169,7 @@ fegetround(void)
unsigned int fpcr;
/* Store the current floating-point control register */
- __asm__ __volatile__ ("fldcr %0, fcr63" : "=r" (fpcr));
+ __asm__ __volatile__ ("fldcr %0, %%fcr63" : "=r" (fpcr));
return (fpcr & _ROUND_MASK);
}
@@ -189,14 +189,14 @@ fesetround(int round)
return (-1);
/* Store the current floating-point control register */
- __asm__ __volatile__ ("fldcr %0, fcr63" : "=r" (fpcr));
+ __asm__ __volatile__ ("fldcr %0, %%fcr63" : "=r" (fpcr));
/* Set the rounding direction */
fpcr &= ~_ROUND_MASK;
fpcr |= round;
/* Load the floating-point control register */
- __asm__ __volatile__ ("fstcr %0, fcr63" : : "r" (fpcr));
+ __asm__ __volatile__ ("fstcr %0, %%fcr63" : : "r" (fpcr));
return (0);
}
@@ -209,8 +209,8 @@ int
fegetenv(fenv_t *envp)
{
/* Store the current floating-point control and status registers */
- __asm__ __volatile__ ("fldcr %0, fcr63" : "=r" (envp->__control));
- __asm__ __volatile__ ("fldcr %0, fcr62" : "=r" (envp->__status));
+ __asm__ __volatile__ ("fldcr %0, %%fcr63" : "=r" (envp->__control));
+ __asm__ __volatile__ ("fldcr %0, %%fcr62" : "=r" (envp->__status));
return (0);
}
@@ -227,18 +227,18 @@ feholdexcept(fenv_t *envp)
unsigned int fpsr, fpcr;
/* Store the current floating-point control and status registers */
- __asm__ __volatile__ ("fldcr %0, fcr63" : "=r" (envp->__control));
- __asm__ __volatile__ ("fldcr %0, fcr62" : "=r" (envp->__status));
+ __asm__ __volatile__ ("fldcr %0, %%fcr63" : "=r" (envp->__control));
+ __asm__ __volatile__ ("fldcr %0, %%fcr62" : "=r" (envp->__status));
/* Clear exception flags in FPSR */
fpsr = envp->__status;
fpsr &= ~FE_ALL_EXCEPT;
- __asm__ __volatile__ ("fstcr %0, fcr62" : : "r" (fpsr));
+ __asm__ __volatile__ ("fstcr %0, %%fcr62" : : "r" (fpsr));
/* Mask all exceptions */
fpcr = envp->__control;
fpcr &= ~FE_ALL_EXCEPT;
- __asm__ __volatile__ ("fstcr %0, fcr63" : : "r" (fpcr));
+ __asm__ __volatile__ ("fstcr %0, %%fcr63" : : "r" (fpcr));
return (0);
}
@@ -257,8 +257,8 @@ fesetenv(const fenv_t *envp)
fenv_t fenv;
/* Store the current floating-point control and status registers */
- __asm__ __volatile__ ("fldcr %0, fcr63" : "=r" (fenv.__control));
- __asm__ __volatile__ ("fldcr %0, fcr62" : "=r" (fenv.__status));
+ __asm__ __volatile__ ("fldcr %0, %%fcr63" : "=r" (fenv.__control));
+ __asm__ __volatile__ ("fldcr %0, %%fcr62" : "=r" (fenv.__status));
/* Set the requested control flags */
fenv.__control &= ~(FE_ALL_EXCEPT | _ROUND_MASK);
@@ -269,8 +269,8 @@ fesetenv(const fenv_t *envp)
fenv.__status |= envp->__status & FE_ALL_EXCEPT;
/* Load the floating-point control and status registers */
- __asm__ __volatile__ ("fstcr %0, fcr63" : : "r" (fenv.__control));
- __asm__ __volatile__ ("fstcr %0, fcr62" : : "r" (fenv.__status));
+ __asm__ __volatile__ ("fstcr %0, %%fcr63" : : "r" (fenv.__control));
+ __asm__ __volatile__ ("fstcr %0, %%fcr62" : : "r" (fenv.__status));
return (0);
}
@@ -289,7 +289,7 @@ feupdateenv(const fenv_t *envp)
unsigned int fpsr;
/* Store the current floating-point status register */
- __asm__ __volatile__ ("fldcr %0, fcr62" : "=r" (fpsr));
+ __asm__ __volatile__ ("fldcr %0, %%fcr62" : "=r" (fpsr));
/* Install new floating-point environment */
fesetenv(envp);
@@ -311,13 +311,13 @@ feenableexcept(int mask)
mask &= FE_ALL_EXCEPT;
/* Store the current floating-point control register */
- __asm__ __volatile__ ("fldcr %0, fcr63" : "=r" (fpcr));
+ __asm__ __volatile__ ("fldcr %0, %%fcr63" : "=r" (fpcr));
omask = fpcr & FE_ALL_EXCEPT;
fpcr |= mask;
/* Load the floating-point control register */
- __asm__ __volatile__ ("fstcr %0, fcr63" : : "r" (fpcr));
+ __asm__ __volatile__ ("fstcr %0, %%fcr63" : : "r" (fpcr));
return (omask);
@@ -331,13 +331,13 @@ fedisableexcept(int mask)
mask &= FE_ALL_EXCEPT;
/* Store the current floating-point control register */
- __asm__ __volatile__ ("fldcr %0, fcr63" : "=r" (fpcr));
+ __asm__ __volatile__ ("fldcr %0, %%fcr63" : "=r" (fpcr));
omask = fpcr & FE_ALL_EXCEPT;
fpcr &= ~mask;
/* Load the floating-point control register */
- __asm__ __volatile__ ("fstcr %0, fcr63" : : "r" (fpcr));
+ __asm__ __volatile__ ("fstcr %0, %%fcr63" : : "r" (fpcr));
return (omask);
}
@@ -348,7 +348,7 @@ fegetexcept(void)
unsigned int fpcr;
/* Store the current floating-point control register */
- __asm__ __volatile__ ("fldcr %0, fcr63" : "=r" (fpcr));
+ __asm__ __volatile__ ("fldcr %0, %%fcr63" : "=r" (fpcr));
return (fpcr & FE_ALL_EXCEPT);
}