1 /* PowerPC asm definitions for GNU C. */
2 /* Under winnt, 1) gas supports the following as names and 2) in particular
3 defining "toc" breaks the FUNC_START macro as ".toc" becomes ".2" */
81 * Macros to glue together two tokens.
85 #define XGLUE(a,b) a##b
87 #define XGLUE(a,b) a/**/b
90 #define GLUE(a,b) XGLUE(a,b)
93 * Macros to begin and end a function written in assembler. If -mcall-aixdesc
94 * or -mcall-nt, create a function descriptor with the given name, and create
95 * the real function with one or two leading periods respectively.
98 #if defined (__powerpc64__)
99 #define FUNC_NAME(name) GLUE(.,name)
100 #define JUMP_TARGET(name) FUNC_NAME(name)
101 #define FUNC_START(name) \
102 .section ".opd","aw"; \
104 .quad GLUE(.,name); \
105 .quad .TOC.@tocbase; \
108 .type GLUE(.,name),@function; \
110 .globl GLUE(.,name); \
113 #define FUNC_END(name) \
115 .size GLUE(.,name),GLUE(.L,name)-GLUE(.,name)
117 #elif defined(_CALL_AIXDESC)
120 #define DESC_SECTION ".got2"
122 #define DESC_SECTION ".got1"
125 #define FUNC_NAME(name) GLUE(.,name)
126 #define JUMP_TARGET(name) FUNC_NAME(name)
127 #define FUNC_START(name) \
128 .section DESC_SECTION,"aw"; \
130 .long GLUE(.,name); \
131 .long _GLOBAL_OFFSET_TABLE_; \
134 .type GLUE(.,name),@function; \
136 .globl GLUE(.,name); \
139 #define FUNC_END(name) \
141 .size GLUE(.,name),GLUE(.L,name)-GLUE(.,name)
145 #define FUNC_NAME(name) GLUE(__USER_LABEL_PREFIX__,name)
146 #if defined __PIC__ || defined __pic__
147 #define JUMP_TARGET(name) FUNC_NAME(name@plt)
149 #define JUMP_TARGET(name) FUNC_NAME(name)
151 #define FUNC_START(name) \
152 .type FUNC_NAME(name),@function; \
153 .globl FUNC_NAME(name); \
156 #define FUNC_END(name) \
158 .size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name)
161 #if defined __linux__ && !defined __powerpc64__
162 .section
.note
.GNU
-stack