Back to index

glibc  2.9
sysdep.h
Go to the documentation of this file.
00001 /* Copyright (C) 2000 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003      Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #include <sysdeps/generic/sysdep.h>
00021 
00022 #ifdef __ASSEMBLER__
00023 
00024 /* Macros to help writing .prologue directives in assembly code.  */
00025 #define ASM_UNW_PRLG_RP                   0x8
00026 #define ASM_UNW_PRLG_PFS           0x4
00027 #define ASM_UNW_PRLG_PSP           0x2
00028 #define ASM_UNW_PRLG_PR                   0x1
00029 #define ASM_UNW_PRLG_GRSAVE(ninputs)      (32+(ninputs))
00030 
00031 #define ENTRY(name)                       \
00032        .text;                             \
00033        .align 32;                         \
00034        .proc C_SYMBOL_NAME(name);         \
00035        .global C_SYMBOL_NAME(name);              \
00036        C_LABEL(name)                      \
00037        CALL_MCOUNT
00038 
00039 #define LOCAL_ENTRY(name)                 \
00040        .text;                             \
00041        .align 32;                         \
00042        .proc C_SYMBOL_NAME(name);         \
00043        C_LABEL(name)                      \
00044        CALL_MCOUNT
00045 
00046 #define LEAF(name)                        \
00047   .text;                                  \
00048   .align 32;                              \
00049   .proc C_SYMBOL_NAME(name);                     \
00050   .global name;                                  \
00051   C_LABEL(name)
00052 
00053 #define LOCAL_LEAF(name)                  \
00054   .text;                                  \
00055   .align 32;                              \
00056   .proc C_SYMBOL_NAME(name);                     \
00057   C_LABEL(name)
00058 
00059 /* Mark the end of function SYM.  */
00060 #undef END
00061 #define END(sym)     .endp C_SYMBOL_NAME(sym)
00062 
00063 #endif /* ASSEMBLER */