1 /* PowerPC asm definitions for GNU C. */
2 /* Under winnt, 1) gas suppports the following as names and 2) in particular
3 defining "toc" breaks the FUNC_START macro as ".toc" becomes ".2" */
5 #if !defined(__WINNT__)
41 * Macros to glue together two tokens.
45 #define XGLUE(a,b) a##b
47 #define XGLUE(a,b) a/**/b
50 #define GLUE(a,b) XGLUE(a,b)
53 * Macros to begin and end a function written in assembler. If -mcall-aixdesc
54 * or -mcall-nt, create a function descriptor with the given name, and create
55 * the real function with one or two leading periods respectively.
59 #define DESC_SECTION ".got2"
61 #define DESC_SECTION ".got1"
64 #if defined(_CALL_AIXDESC)
65 #define FUNC_NAME(name) GLUE(.,name)
66 #define FUNC_START(name) \
67 .section DESC_SECTION,"aw"; \
70 .long _GLOBAL_OFFSET_TABLE_; \
73 .type GLUE(.,name),@function; \
75 .globl GLUE(.,name); \
78 #define FUNC_END(name) \
80 .size GLUE(.,name),GLUE(.L,name)-GLUE(.,name)
82 #elif defined(__WINNT__)
83 #define FUNC_NAME(name) GLUE(..,name)
84 #define FUNC_START(name) \
87 .ualong GLUE(..,name),GLUE(name,.e),0,0,GLUE(..,name); \
90 .ualong GLUE(..,name),.toc; \
93 .globl GLUE(..,name); \
96 #define FUNC_END(name) \
98 GLUE(FE_MOT_RESVD..,name):
100 #elif defined(_CALL_NT)
101 #define FUNC_NAME(name) GLUE(..,name)
102 #define FUNC_START(name) \
103 .section DESC_SECTION,"aw"; \
105 .long GLUE(..,name); \
106 .long _GLOBAL_OFFSET_TABLE_; \
108 .type GLUE(..,name),@function; \
110 .globl GLUE(..,name); \
113 #define FUNC_END(name) \
115 .size GLUE(..,name),GLUE(.L,name)-GLUE(..,name)
118 #define FUNC_NAME(name) name
119 #define FUNC_START(name) \
120 .type name,@function; \
124 #define FUNC_END(name) \
126 .size name,GLUE(.L,name)-name