summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-01-08 18:55:03 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-01-08 18:55:03 +0000
commitd6e3f036697796bf7af2cb3e1e6798efad7c598c (patch)
tree7a4de50ee95bb69e7b36ec66261ce28fbe971dab
parent3ae6d4a20cdaccc0771c055bf35bd74d34677175 (diff)
from ragge; Changed to work correctly with both K&R and ANSI cpp.
-rw-r--r--sys/arch/vax/include/asm.h77
1 files changed, 42 insertions, 35 deletions
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