aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/i386/DEFS.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/i386/DEFS.h')
-rw-r--r--lib/libc/i386/DEFS.h57
1 files changed, 39 insertions, 18 deletions
diff --git a/lib/libc/i386/DEFS.h b/lib/libc/i386/DEFS.h
index a07b090d90f0..4b4df3e68ccb 100644
--- a/lib/libc/i386/DEFS.h
+++ b/lib/libc/i386/DEFS.h
@@ -35,28 +35,49 @@
*
* from: @(#)DEFS.h 5.1 (Berkeley) 4/23/90
*
- * $Id: DEFS.h,v 1.2 1993/10/09 08:30:43 davidg Exp $
+ * $Id: DEFS.h,v 1.3.2.1 1994/05/04 08:44:15 rgrimes Exp $
*/
+/* XXX should use align 4,0x90 for -m486. */
+#define _START_ENTRY .align 2,0x90;
+#if 0
+/* Data is not used, except perhaps by non-g prof, which we don't support. */
+#define _MID_ENTRY .data; .align 2; 8:; .long 0; \
+ .text; lea 8b,%eax;
+#else
+#define _MID_ENTRY
+#endif
+
#ifdef PROF
-#define ALTENTRY(x) .align 2,0x90; .globl _/**/x; _/**/x:; \
- .data; .align 2; 1:; .long 0; \
- .text; lea 1b,%eax; call mcount; jmp 2f
-#define ENTRY(x) .align 2,0x90; .globl _/**/x; _/**/x:; \
- .data; .align 2; 1:; .long 0; \
- .text; lea 1b,%eax ; call mcount; 2:
+#define ALTENTRY(x) _START_ENTRY \
+ .globl _/**/x; .type _/**/x,@function; _/**/x:; \
+ _MID_ENTRY \
+ call mcount; jmp 9f
-#define ALTASENTRY(x) .align 2,0x90; .globl x; x:; \
- .data; .align 2; 1:; .long 0; \
- .text; lea 1b,%eax; call mcount; jmp 2f
+#define ENTRY(x) _START_ENTRY \
+ .globl _/**/x; .type _/**/x,@function; _/**/x:; \
+ _MID_ENTRY \
+ call mcount; 9:
+
+
+#define ALTASENTRY(x) _START_ENTRY \
+ .globl x; .type x,@function; x:; \
+ _MID_ENTRY \
+ call mcount; jmp 9f
+
+#define ASENTRY(x) _START_ENTRY \
+ .globl x; .type x,@function; x:; \
+ _MID_ENTRY \
+ call mcount; 9:
+
+#else /* !PROF */
+
+#define ENTRY(x) _START_ENTRY .globl _/**/x; .type _/**/x,@function; \
+ _/**/x:
+#define ALTENTRY(x) ENTRY(x)
+
+#define ASENTRY(x) _START_ENTRY .globl x; .type x,@function; x:
+#define ALTASENTRY(x) ASENTRY(x)
-#define ASENTRY(x) .align 2,0x90; .globl x; x:; \
- .data; .align 2; 1:; .long 0; \
- .text; lea 1b,%eax; call mcount; 2:
-#else
-#define ALTENTRY(x) .align 2,0x90; .globl _/**/x; _/**/x:
-#define ENTRY(x) .align 2,0x90; .globl _/**/x; _/**/x:
-#define ALTASENTRY(x) .align 2,0x90; .globl x; x:
-#define ASENTRY(x) .align 2,0x90; .globl x; x:
#endif