add macros to designate the end of asm functions. ok by Andrew Doran.

This commit is contained in:
yamt 2008-05-03 05:54:52 +00:00
parent 02777bca8a
commit 5b453874fc
1 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: asm.h,v 1.37 2007/12/20 23:46:12 ad Exp $ */ /* $NetBSD: asm.h,v 1.38 2008/05/03 05:54:52 yamt Exp $ */
/*- /*-
* Copyright (c) 1990 The Regents of the University of California. * Copyright (c) 1990 The Regents of the University of California.
@ -107,17 +107,25 @@
#ifdef __STDC__ #ifdef __STDC__
#define IDTVEC(name) \ #define IDTVEC(name) \
ALIGN_TEXT; .globl X ## name; .type X ## name,@function; X ## name: ALIGN_TEXT; .globl X ## name; .type X ## name,@function; X ## name:
#define IDTVEC_END(name) \
.size X ## name, . - X ## name
#else #else
#define IDTVEC(name) \ #define IDTVEC(name) \
ALIGN_TEXT; .globl X/**/name; .type X/**/name,@function; X/**/name: ALIGN_TEXT; .globl X/**/name; .type X/**/name,@function; X/**/name:
#define IDTVEC_END(name) \
.size X/**/name, . - X/**/name
#endif /* __STDC__ */ #endif /* __STDC__ */
#else #else
#ifdef __STDC__ #ifdef __STDC__
#define IDTVEC(name) \ #define IDTVEC(name) \
ALIGN_TEXT; .globl _X ## name; .type _X ## name,@function; _X ## name: ALIGN_TEXT; .globl _X ## name; .type _X ## name,@function; _X ## name:
#define IDTVEC_END(name) \
.size _X ## name, . - _X ## name
#else #else
#define IDTVEC(name) \ #define IDTVEC(name) \
ALIGN_TEXT; .globl _X/**/name; .type _X/**/name,@function; _X/**/name: ALIGN_TEXT; .globl _X/**/name; .type _X/**/name,@function; _X/**/name:
#define IDTVEC_END(name) \
.size _X/**/name, . - _X/**/name
#endif /* __STDC__ */ #endif /* __STDC__ */
#endif /* __ELF__ */ #endif /* __ELF__ */
@ -167,6 +175,7 @@
#define NENTRY(y) _ENTRY(_C_LABEL(y)) #define NENTRY(y) _ENTRY(_C_LABEL(y))
#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE #define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
#define LABEL(y) _LABEL(_C_LABEL(y)) #define LABEL(y) _LABEL(_C_LABEL(y))
#define END(y) .size y, . - y
#define ASMSTR .asciz #define ASMSTR .asciz