From: deraadt Date: Mon, 8 Jan 1996 18:55:02 +0000 (+0000) Subject: from ragge; Changed to work correctly with both K&R and ANSI cpp. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=315555b6e630906136c65f410c4acbfa599bdd13;p=openbsd from ragge; Changed to work correctly with both K&R and ANSI cpp. --- diff --git a/sys/arch/vax/include/asm.h b/sys/arch/vax/include/asm.h index e175b77bdc2..b77cf3d421a 100644 --- a/sys/arch/vax/include/asm.h +++ b/sys/arch/vax/include/asm.h @@ -1,11 +1,7 @@ -/* $NetBSD: asm.h,v 1.3 1995/05/03 19:53:40 ragge Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. +/* $NetBSD: asm.h,v 1.4 1996/01/06 18:37:35 ragge Exp $ */ +/* + * Copyright (c) 1982, 1993 + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -35,42 +31,53 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)asm.h 5.5 (Berkeley) 5/7/91 - * @(#)DEFS.h 5.3 (Berkeley) 6/1/90 + * @(#)DEFS.h 8.1 (Berkeley) 6/4/93 */ #ifndef _MACHINE_ASM_H_ #define _MACHINE_ASM_H_ -#define R0 0x001 -#define R1 0x002 -#define R2 0x004 -#define R3 0x008 -#define R4 0x010 -#define R5 0x020 -#define R6 0x040 -#define R7 0x080 -#define R8 0x100 -#define R9 0x200 -#define R10 0x400 -#define R11 0x800 +#define R0 0x001 +#define R1 0x002 +#define R2 0x004 +#define R3 0x008 +#define R4 0x010 +#define R5 0x020 +#define R6 0x040 +#define R7 0x080 +#define R8 0x100 +#define R9 0x200 +#define R10 0x400 +#define R11 0x800 #ifdef __STDC__ -# define _FUNC(x) _ ## x ## : -# define _GLOB(x) .globl _ ## x +#ifdef PROF +#define ENTRY(x, regs) \ + .globl _ ## x ## ; .align 2; _ ## x ## : .word regs; \ + .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount +#define ASENTRY(x, regs) \ + .globl x; .align 2; x ## : .word regs; \ + .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount #else -# define _FUNC(x) _/**/x: -# define _GLOB(x) .globl _/**/x +#define ENTRY(x, regs) \ + .globl _ ## x; .align 2; _ ## x ## : .word regs +#define ASENTRY(x, regs) \ + .globl x; .align 2; x ## : .word regs #endif - +# else #ifdef PROF -#define ENTRY(x,regs) \ - _GLOB(x);.align 2;_FUNC(x);.word regs;jsb mcount; -#else -#define ENTRY(x,regs) \ - _GLOB(x);.align 2;_FUNC(x);.word regs; +#define ENTRY(x, regs) \ + .globl _/**/x; .align 2; _/**/x: .word regs; \ + .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount +#define ASENTRY(x, regs) \ + .globl x; .align 2; x: .word regs; \ + .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount +#else +#define ENTRY(x, regs) \ + .globl _/**/x; .align 2; _/**/x: .word regs +#define ASENTRY(x, regs) \ + .globl x; .align 2; x: .word regs +#endif #endif -#define ASMSTR .asciz - -#endif /* !_MACHINE_ASM_H_ */ +#endif