bare asm -> __asm

This commit is contained in:
perry 2005-12-24 21:51:51 +00:00
parent f2bc845517
commit 0db47b5ca1
13 changed files with 71 additions and 71 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dot_init.h,v 1.3 2002/11/22 16:47:20 thorpej Exp $ */
/* $NetBSD: dot_init.h,v 1.4 2005/12/24 21:51:51 perry Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
@ -80,7 +80,7 @@
/* We assume we need to reload our GP. */
#define MD_CALL_STATIC_FUNCTION(section, func) \
asm(".section " #section "\n" \
__asm(".section " #section "\n" \
" br $29, 1f \n" \
"1: ldgp $29, 0($29) \n" \
" unop \n" \

View File

@ -1,4 +1,4 @@
/* $NetBSD: c++rt0.c,v 1.2 1999/07/02 15:53:55 simonb Exp $ */
/* $NetBSD: c++rt0.c,v 1.3 2005/12/24 21:54:01 perry Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -112,11 +112,11 @@ __ctors()
}
#ifdef ARM32_BROKEN_RELOCATIONS /* XXX ARM32_BROKEN_RELOCATIONS */
extern void __init __P((long)) asm(".init"); /* XXX ARM32_BROKEN_RELOCATIONS */
extern void __fini __P((long)) asm(".fini"); /* XXX ARM32_BROKEN_RELOCATIONS */
extern void __init __P((long)) __asm(".init"); /* XXX ARM32_BROKEN_RELOCATIONS */
extern void __fini __P((long)) __asm(".fini"); /* XXX ARM32_BROKEN_RELOCATIONS */
#else /* XXX ARM32_BROKEN_RELOCATIONS */
extern void __init __P((void)) asm(".init");
extern void __fini __P((void)) asm(".fini");
extern void __init __P((void)) __asm(".init");
extern void __fini __P((void)) __asm(".fini");
#endif
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: crt0.c,v 1.10 2001/02/18 23:03:34 simonb Exp $ */
/* $NetBSD: crt0.c,v 1.11 2005/12/24 21:54:43 perry Exp $ */
/*
* Copyright (C) 1997 Mark Brinicombe
@ -42,7 +42,7 @@
__syscall(SYS_mmap, (addr), (len), (prot), (flags), \
(fd), 0, (off_t)(off))
extern void start(void) asm("start");
extern void start(void) __asm("start");
void __start(int, char *[], char *[]);
__asm("
@ -69,7 +69,7 @@ Lps_strings:
");
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: crt0.c,v 1.10 2001/02/18 23:03:34 simonb Exp $");
__RCSID("$NetBSD: crt0.c,v 1.11 2005/12/24 21:54:43 perry Exp $");
#endif /* LIBC_SCCS and not lint */
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: c++rt0.c,v 1.9 1999/07/02 15:53:55 simonb Exp $ */
/* $NetBSD: c++rt0.c,v 1.10 2005/12/24 22:02:10 perry Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -84,8 +84,8 @@ __ctors()
(**p++)();
}
extern void __init __P((void)) asm(".init");
extern void __fini __P((void)) asm(".fini");
extern void __init __P((void)) __asm(".init");
extern void __fini __P((void)) __asm(".fini");
void
__init()

View File

@ -1,4 +1,4 @@
/* $NetBSD: crt0.c,v 1.32 1999/07/02 15:53:55 simonb Exp $ */
/* $NetBSD: crt0.c,v 1.33 2005/12/24 22:02:10 perry Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -40,7 +40,7 @@
#include "common.h"
extern void start __P((void)) asm("start");
extern void start __P((void)) __asm("start");
void __start __P((int, char *[], char *[]));
__asm("
@ -59,7 +59,7 @@ start:
");
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: crt0.c,v 1.32 1999/07/02 15:53:55 simonb Exp $");
__RCSID("$NetBSD: crt0.c,v 1.33 2005/12/24 22:02:10 perry Exp $");
#endif /* LIBC_SCCS and not lint */
void
@ -98,7 +98,7 @@ __asm("__callmain:"); /* Defined for the benefit of debuggers */
}
#ifdef DYNAMIC
asm("
__asm("
.text
.align 2
___syscall:

View File

@ -1,4 +1,4 @@
/* $NetBSD: dot_init.h,v 1.3 2002/11/22 06:45:00 thorpej Exp $ */
/* $NetBSD: dot_init.h,v 1.4 2005/12/24 22:02:10 perry Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
@ -69,4 +69,4 @@
#define MD_FINI_SECTION_EPILOGUE MD_SECTION_EPILOGUE(.fini)
#define MD_CALL_STATIC_FUNCTION(section, func) \
asm(".section " #section "; call " #func "; .previous");
__asm(".section " #section "; call " #func "; .previous");

View File

@ -1,4 +1,4 @@
/* $NetBSD: crt0.c,v 1.21 1999/01/22 11:29:16 mycroft Exp $ */
/* $NetBSD: crt0.c,v 1.22 2005/12/24 22:02:10 perry Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -40,7 +40,7 @@
#include "common.h"
extern void start __P((void)) asm("start");
extern void start __P((void)) __asm("start");
void __start __P((int, char *[], char *[]));
__asm("
@ -59,7 +59,7 @@ start:
");
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: crt0.c,v 1.21 1999/01/22 11:29:16 mycroft Exp $");
__RCSID("$NetBSD: crt0.c,v 1.22 2005/12/24 22:02:10 perry Exp $");
#endif /* LIBC_SCCS and not lint */
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: crt0.c,v 1.18 2005/12/24 21:11:15 perry Exp $ */
/* $NetBSD: crt0.c,v 1.19 2005/12/24 22:02:10 perry Exp $ */
/*
* Copyright (c) 1995 Christopher G. Demetriou
@ -55,7 +55,7 @@
void __start(u_long, void (*)(void), const Obj_Entry *,
struct ps_strings *);
asm(".text; .align 4; .globl _start; _start:");
__asm(".text; .align 4; .globl _start; _start:");
void
__start(u_long sp,
@ -157,7 +157,7 @@ __start(u_long sp,
* is the entrypoint. (Only needed for old toolchains).
*/
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: crt0.c,v 1.18 2005/12/24 21:11:15 perry Exp $");
__RCSID("$NetBSD: crt0.c,v 1.19 2005/12/24 22:02:10 perry Exp $");
#endif /* LIBC_SCCS and not lint */
#include "common.c"

View File

@ -1,4 +1,4 @@
/* $NetBSD: crt0.c,v 1.1 1999/10/07 11:56:28 msaitoh Exp $ */
/* $NetBSD: crt0.c,v 1.2 2005/12/24 22:02:10 perry Exp $ */
/*
* Copyright (c) 1996 Charles M. Hannum. All rights reserved.
@ -37,7 +37,7 @@
#include "common.h"
extern void start __P((void)) asm("start");
extern void start __P((void)) __asm("start");
void __start __P((int, char *[], char *[]));
__asm("
@ -50,7 +50,7 @@ start:
");
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: crt0.c,v 1.1 1999/10/07 11:56:28 msaitoh Exp $");
__RCSID("$NetBSD: crt0.c,v 1.2 2005/12/24 22:02:10 perry Exp $");
#endif /* LIBC_SCCS and not lint */
void
@ -89,7 +89,7 @@ __asm("__callmain:"); /* Defined for the benefit of debuggers */
}
#ifdef DYNAMIC
asm("
__asm("
.text
.align 2
___syscall:

View File

@ -1,4 +1,4 @@
/* $NetBSD: dot_init.h,v 1.2 2002/11/22 06:45:00 thorpej Exp $ */
/* $NetBSD: dot_init.h,v 1.3 2005/12/24 22:02:10 perry Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
@ -79,7 +79,7 @@
* pool (otherwise it might be too far away to reference).
*/
#define MD_CALL_STATIC_FUNCTION(section, func) \
asm(".section " #section "\n" \
__asm(".section " #section "\n" \
" mov.l 1f, r1 \n" \
" mova 2f, r0 \n" \
" braf r1 \n" \

View File

@ -1,4 +1,4 @@
/* $NetBSD: crt0.c,v 1.14 2002/05/16 19:38:21 wiz Exp $ */
/* $NetBSD: crt0.c,v 1.15 2005/12/24 22:02:10 perry Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -40,7 +40,7 @@
#include "common.h"
extern void start __P((void)) asm("start");
extern void start __P((void)) __asm("start");
struct kframe {
int kargc;
char *kargv[1]; /* size depends on kargc */
@ -48,15 +48,15 @@ struct kframe {
char kenvstr[1]; /* size varies */
};
asm(" .text");
asm(" .align 2");
asm(" .globl start");
asm(" .type start,@function");
asm(" start:");
asm(" .word 0x0101"); /* two nops just in case */
asm(" pushl %sp"); /* no registers to save */
asm(" calls $1,___start"); /* do the real start */
asm(" halt");
__asm(" .text");
__asm(" .align 2");
__asm(" .globl start");
__asm(" .type start,@function");
__asm(" start:");
__asm(" .word 0x0101"); /* two nops just in case */
__asm(" pushl %sp"); /* no registers to save */
__asm(" calls $1,___start"); /* do the real start */
__asm(" halt");
void
__start(kfp)
@ -86,41 +86,41 @@ __start(kfp)
__load_rtld(&_DYNAMIC);
#endif /* DYNAMIC */
asm("eprol:");
__asm("eprol:");
#ifdef MCRT0
atexit(_mcleanup);
monstartup((u_long)&eprol, (u_long)&etext);
#endif /* MCRT0 */
asm ("__callmain:"); /* Defined for the benefit of debuggers */
__asm ("__callmain:"); /* Defined for the benefit of debuggers */
exit(main(kfp->kargc, argv, environ));
}
#ifdef DYNAMIC
asm(" ___syscall:");
asm(" .word 0"); /* no registers to save */
asm(" addl2 $4,%ap"); /* n-1 args to syscall */
asm(" movl (%ap),r0"); /* get syscall number */
asm(" subl3 $1,-4(%ap),(%ap)"); /* n-1 args to syscall */
asm(" chmk %r0"); /* do system call */
asm(" jcc 1f"); /* check error */
asm(" mnegl $1,%r0");
asm(" ret");
asm(" 1: movpsl -(%sp)"); /* flush the icache */
asm(" pushab 2f"); /* by issuing an REI */
asm(" rei");
asm(" 2: ret");
__asm(" ___syscall:");
__asm(" .word 0"); /* no registers to save */
__asm(" addl2 $4,%ap"); /* n-1 args to syscall */
__asm(" movl (%ap),r0"); /* get syscall number */
__asm(" subl3 $1,-4(%ap),(%ap)"); /* n-1 args to syscall */
__asm(" chmk %r0"); /* do system call */
__asm(" jcc 1f"); /* check error */
__asm(" mnegl $1,%r0");
__asm(" ret");
__asm(" 1: movpsl -(%sp)"); /* flush the icache */
__asm(" pushab 2f"); /* by issuing an REI */
__asm(" rei");
__asm(" 2: ret");
#endif /* DYNAMIC */
#include "common.c"
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: crt0.c,v 1.14 2002/05/16 19:38:21 wiz Exp $");
__RCSID("$NetBSD: crt0.c,v 1.15 2005/12/24 22:02:10 perry Exp $");
#endif /* LIBC_SCCS and not lint */
#ifdef MCRT0
asm (" .text");
asm ("_eprol:");
__asm (" .text");
__asm ("_eprol:");
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: dot_init.h,v 1.2 2002/11/22 06:45:01 thorpej Exp $ */
/* $NetBSD: dot_init.h,v 1.3 2005/12/24 22:02:10 perry Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
@ -69,4 +69,4 @@
#define MD_FINI_SECTION_EPILOGUE MD_SECTION_EPILOGUE(.fini)
#define MD_CALL_STATIC_FUNCTION(section, func) \
asm(".section " #section "; call " #func "; .previous");
__asm(".section " #section "; call " #func "; .previous");

View File

@ -1,4 +1,4 @@
/* $NetBSD: md-static-funcs.c,v 1.2 1998/01/05 22:00:41 cgd Exp $ */
/* $NetBSD: md-static-funcs.c,v 1.3 2005/12/24 22:04:11 perry Exp $ */
/*
* Called by ld.so when onanating.
@ -9,14 +9,14 @@
#define write(fd, s, n) __syscall(SYS_write, (fd), (s), (n))
#define _exit(n) __syscall(SYS_exit, (n))
asm("___syscall:");
asm(" movd tos,r1"); /* return address */
asm(" movd tos,r0"); /* syscall number */
asm(" movd r1,tos");
asm(" svc"); /* do system call */
asm(" bcc 1f"); /* check error */
asm(" movqd -1,r0");
asm("1: jump 0(0(sp))"); /* return */
__asm("___syscall:");
__asm(" movd tos,r1"); /* return address */
__asm(" movd tos,r0"); /* syscall number */
__asm(" movd r1,tos");
__asm(" svc"); /* do system call */
__asm(" bcc 1f"); /* check error */
__asm(" movqd -1,r0");
__asm("1: jump 0(0(sp))"); /* return */
static void
md_relocate_simple(r, relocation, addr)