1 /* $NetBSD: asm.h,v 1.20 2008/08/29 18:25:01 matt Exp $ */
3 * Copyright (c) 1982, 1993
4 * The Regents of the University of California. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors
15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * @(#)DEFS.h 8.1 (Berkeley) 6/4/93
51 #define _ASM_LABEL(x) x
54 # define __CONCAT(x,y) x ## y
55 # define __STRING(x) #x
57 # define __CONCAT(x,y) x/**/y
58 # define __STRING(x) "x"
61 /* let kernels and others override entrypoint alignment */
63 # define _ALIGN_TEXT .align 4
66 #define _ENTRY(x, regs) \
67 .text; _ALIGN_TEXT; .globl x; .type x@function; x: .word regs
70 # define _PROF_PROLOGUE \
71 .data; 1:; .long 0; .text; moval 1b,%r0; jsb _ASM_LABEL(__mcount)
73 # define _PROF_PROLOGUE
76 #define ENTRY(x, regs) _ENTRY(_C_LABEL(x), regs); _PROF_PROLOGUE
77 #define NENTRY(x, regs) _ENTRY(_C_LABEL(x), regs)
78 #define ASENTRY(x, regs) _ENTRY(_ASM_LABEL(x), regs); _PROF_PROLOGUE
80 #define ALTENTRY(x) .globl _C_LABEL(x); _C_LABEL(x):
81 #define RCSID(name) .pushsection ".ident"; .asciz name; .popsection
84 #define WEAK_ALIAS(alias,sym) \
89 * STRONG_ALIAS: create a strong alias.
91 #define STRONG_ALIAS(alias,sym) \
96 #define WARN_REFERENCES(sym,msg) \
97 .stabs msg ## ,30,0,0,0 ; \
98 .stabs __STRING(_C_LABEL(sym)) ## ,1,0,0,0
100 #define WARN_REFERENCES(sym,msg) \
101 .stabs msg,30,0,0,0 ; \
102 .stabs __STRING(_C_LABEL(sym)),1,0,0,0
103 #endif /* __STDC__ */
105 #endif /* !_VAX_ASM_H_ */