Use __asm in place of asm
authortholo <tholo@openbsd.org>
Sun, 24 Mar 1996 16:52:31 +0000 (16:52 +0000)
committertholo <tholo@openbsd.org>
Sun, 24 Mar 1996 16:52:31 +0000 (16:52 +0000)
sys/arch/i386/include/profile.h
sys/arch/m68k/include/profile.h
sys/arch/mvme88k/include/profile.h
sys/arch/pc532/include/profile.h
sys/arch/pica/include/profile.h
sys/arch/pmax/include/profile.h
sys/arch/sparc/include/profile.h
sys/arch/vax/include/profile.h

index 163ff3a..f7035d6 100644 (file)
  *     @(#)profile.h   8.1 (Berkeley) 6/11/93
  */
 
-#define        _MCOUNT_DECL static inline void _mcount
+#define        _MCOUNT_DECL static __inline void _mcount
 
 #define        MCOUNT \
-extern void mcount() asm("mcount");                                    \
+extern void mcount() __asm("mcount");                                  \
 void                                                                   \
 mcount()                                                               \
 {                                                                      \
@@ -49,11 +49,11 @@ mcount()                                                            \
         *                                                              \
         * selfpc = pc pushed by mcount call                            \
         */                                                             \
-       asm("movl 4(%%ebp),%0" : "=r" (selfpc));                        \
+       __asm("movl 4(%%ebp),%0" : "=r" (selfpc));                      \
        /*                                                              \
         * frompcindex = pc pushed by call into self.                   \
         */                                                             \
-       asm("movl (%%ebp),%0;movl 4(%0),%0" : "=r" (frompcindex));      \
+       __asm("movl (%%ebp),%0;movl 4(%0),%0" : "=r" (frompcindex));    \
        _mcount(frompcindex, selfpc);                                   \
 }
 
index 137da37..773f3a5 100644 (file)
  *     @(#)profile.h   8.1 (Berkeley) 6/10/93
  */
 
-#define        _MCOUNT_DECL static inline void _mcount
+#define        _MCOUNT_DECL static __inline void _mcount
 
 #define        MCOUNT \
-extern void mcount() asm("mcount"); void mcount() { \
+extern void mcount() __asm("mcount"); void mcount() { \
        int selfpc, frompcindex; \
-       asm("movl a6@(4),%0" : "=r" (selfpc)); \
-       asm("movl a6@(0)@(4),%0" : "=r" (frompcindex)); \
+       __asm("movl a6@(4),%0" : "=r" (selfpc)); \
+       __asm("movl a6@(0)@(4),%0" : "=r" (frompcindex)); \
        _mcount(frompcindex, selfpc); \
 }
 
@@ -53,9 +53,9 @@ extern void mcount() asm("mcount"); void mcount() { \
  * recursively.
  */
 #define MCOUNT_ENTER \
-       asm("movw       sr,%0" : "=g" (s)); \
-       asm("movw       #0x2700,sr")
+       __asm("movw     sr,%0" : "=g" (s)); \
+       __asm("movw     #0x2700,sr")
 
 #define MCOUNT_EXIT \
-       asm("movw       %0,sr" : : "g" (s))
+       __asm("movw     %0,sr" : : "g" (s))
 #endif /* _KERNEL */
index d7d727f..c6203ab 100644 (file)
  * SUCH DAMAGE.
  *
  *     from: @(#)profile.h     8.1 (Berkeley) 6/11/93
- *     $Id: profile.h,v 1.1.1.1 1995/10/18 10:54:24 deraadt Exp $
+ *     $Id: profile.h,v 1.2 1996/03/24 16:52:34 tholo Exp $
  */
 
 #define        _MCOUNT_DECL static inline void _mcount
 
 #define        MCOUNT \
-extern void mcount() asm("mcount");                                    \
+extern void mcount() __asm("mcount");                                  \
 void                                                                   \
 mcount()                                                               \
 {                                                                      \
@@ -48,7 +48,7 @@ mcount()                                                              \
         *                                                              \
         * selfret = ret pushed by mcount call                          \
         */                                                             \
-       asm volatile("ld %0,r31,36" : "=r" (selfret));                  \
+       __asm volatile("ld %0,r31,36" : "=r" (selfret));                        \
        /*                                                              \
         * callerret = ret pushed by call into self.                    \
         */                                                             \
@@ -56,8 +56,8 @@ mcount()                                                              \
         * This may not be right. It all depends on where the           \
         * caller stores the return address. XXX                        \
         */                                                             \
-       asm volatile("addu       r10,r31,48");                          \
-       asm volatile("ld %0,r10,36" : "=r" (callerret));                \
+       __asm volatile("addu     r10,r31,48");                          \
+       __asm volatile("ld %0,r10,36" : "=r" (callerret));              \
        _mcount(callerret, selfret);                                    \
 }
 
index 5f8490a..046cade 100644 (file)
 /*     pc532 version, 5/15/94.
  */
 
-#define        _MCOUNT_DECL static inline void _mcount
+#define        _MCOUNT_DECL static __inline void _mcount
 
 #define        MCOUNT \
-extern void mcount() asm("mcount");                                    \
+extern void mcount() __asm("mcount");                                  \
 void                                                                   \
 mcount()                                                               \
 {                                                                      \
@@ -52,11 +52,11 @@ mcount()                                                            \
         *                                                              \
         * selfpc = pc pushed by mcount call                            \
         */                                                             \
-       asm("movd 4(fp),%0" : "=r" (selfpc));                   \
+       __asm("movd 4(fp),%0" : "=r" (selfpc));                 \
        /*                                                              \
         * frompcindex = pc pushed by call into self.                   \
         */                                                             \
-       asm("movd 4(0(fp)),%0" : "=r" (frompcindex));   \
+       __asm("movd 4(0(fp)),%0" : "=r" (frompcindex)); \
        _mcount(frompcindex, selfpc);                                   \
 }
 
index 391357f..f518ceb 100644 (file)
  * SUCH DAMAGE.
  *
  *     from: @(#)profile.h     8.1 (Berkeley) 6/10/93
- *      $Id: profile.h,v 1.1.1.1 1995/10/18 10:39:13 deraadt Exp $
+ *      $Id: profile.h,v 1.2 1996/03/24 16:52:37 tholo Exp $
  */
 
 #define        _MCOUNT_DECL static void __mcount
 
 #define        MCOUNT \
-       asm(".globl _mcount;" \
+       __asm(".globl _mcount;" \
        "_mcount:;" \
        ".set noreorder;" \
        ".set noat;" \
index dc30bfd..6611835 100644 (file)
@@ -41,7 +41,7 @@
 #define        _MCOUNT_DECL static void __mcount
 
 #define        MCOUNT \
-       asm(".globl _mcount;" \
+       __asm(".globl _mcount;" \
        "_mcount:;" \
        ".set noreorder;" \
        ".set noat;" \
index 2e6ea9a..c342878 100644 (file)
 #ifdef PIC
 /* Inline expansion of PICCY_SET() (see <machine/asm.h>). */
 #define MCOUNT \
-       asm(".global mcount");\
-       asm("mcount:");\
-       asm("add %o7, 8, %o1");\
-       asm("1: call 2f; nop; 2:");\
-       asm("add %o7,__mcount-1b, %o2");\
-       asm("ld [%o2], %o2");\
-       asm("jmpl %o2, %g0");\
-       asm("add %i7, 8, %o0");
+       __asm(".global mcount");\
+       __asm("mcount:");\
+       __asm("add %o7, 8, %o1");\
+       __asm("1: call 2f; nop; 2:");\
+       __asm("add %o7,__mcount-1b, %o2");\
+       __asm("ld [%o2], %o2");\
+       __asm("jmpl %o2, %g0");\
+       __asm("add %i7, 8, %o0");
 #else
 #define MCOUNT \
-       asm(".global mcount");\
-       asm("mcount:");\
-       asm("add %i7, 8, %o0");\
-       asm("sethi %hi(__mcount), %o2");\
-       asm("jmpl %o2 + %lo(__mcount), %g0");\
-       asm("add %o7, 8, %o1");
+       __asm(".global mcount");\
+       __asm("mcount:");\
+       __asm("add %i7, 8, %o0");\
+       __asm("sethi %hi(__mcount), %o2");\
+       __asm("jmpl %o2 + %lo(__mcount), %g0");\
+       __asm("add %o7, 8, %o1");
 #endif
 
 #define        _MCOUNT_DECL    static void _mcount
index dc5e098..8640c00 100644 (file)
@@ -46,7 +46,7 @@
  * to __mcount, so that our return address won't get popped from stack.
  */
 #define MCOUNT \
-asm(".text; .globl mcount; mcount: pushl 16(fp); calls $1,__mcount; rsb");
+__asm(".text; .globl mcount; mcount: pushl 16(fp); calls $1,__mcount; rsb");
 
 #ifdef _KERNEL
 /*