00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef config_asm_INCLUDED
00037 #define config_asm_INCLUDED
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 #ifdef _KEEP_RCS_ID
00066 static char *config_asm_rcs_id = "$Source$ $Revision$";
00067 #endif
00068
00069 #define LABEL_PREFIX ".L"
00070 #define Label_Name_Separator "_"
00071 #define Temp_Symbol_Prefix Label_Name_Separator "temp" Label_Name_Separator
00072
00073
00074 #define Symbol_Name_Suffix ""
00075
00076
00077
00078
00079
00080 #define BB_Label_Format ".LBB%d_%s"
00081 #define END_Label_Format ".LDWend_%s"
00082
00083
00084
00085
00086 #define User_Label_Format ".L_%s_%s"
00087 #define User_Label_Number_Format ".L_%d_%d_%s"
00088
00089
00090
00091
00092 #define Ret_Block_Label_Format ".RET_%s"
00093
00094
00095
00096
00097 #define Entry_Point_Alignment_Format "\t.align\t4\n"
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128 #define Intrinsic_Proc_Format "%s"
00129 #define Ftn_Extern_Data_Format "%s_"
00130 #define C_Extern_Data_Format "%s"
00131 #define Ftn_Extern_Proc_Format "%s_"
00132 #define C_Extern_Proc_Format "%s"
00133 #define C_Global_Static_Format "GS.%s"
00134 #define C_Local_Static_Format "LS.%1d.%s"
00135 #define Deferred_Ref_Format "%s"
00136 #define Deferred_Ref_Ofst_Format "%s%c%d"
00137 #define Local_Ret_Buf_Format "%s.RBUF"
00138
00139 #define DFLT_FTN_MAIN "MAIN"
00140 #define DFLT_FTN_LOWMAIN "main"
00141 #define BLANK_COM_NAME "_BLNK__"
00142 #define RDATA_RAW_NAME ".rdata"
00143 #define SDATA_RAW_NAME ".sdata"
00144 #define DATA_RAW_NAME ".data"
00145 #define GOT_RAW_NAME ".got"
00146 #define BSS_RAW_NAME ".bss"
00147 #define LIT4_RAW_NAME ".lit4"
00148 #define LIT8_RAW_NAME ".lit8"
00149 #define LIT16_RAW_NAME ".lit16"
00150
00151 #define ASM_CMNT_LINE " #"
00152 #define ASM_CMNT "#"
00153
00154 #define AS_STOP_BIT NULL
00155
00156
00157 #define AS_ALIGN ".align"
00158 #define AS_BYTE ".byte"
00159 #define AS_COM ".comm"
00160 #define AS_DATA ".data"
00161 #define AS_DOUBLE ".double"
00162 #define AS_DWORD ".quad"
00163 #define AS_DWORD_UNALIGNED ".quad"
00164 #define AS_DYNSYM NULL
00165 #define AS_END NULL
00166 #define AS_ENT NULL
00167 #define AS_AENT "# .aproc"
00168 #define AS_FLOAT ".float"
00169 #define AS_FILE ".file"
00170 #define AS_FMASK ".fmask"
00171 #define AS_FRAME "# .frame"
00172 #define AS_GLOBAL ".globl"
00173 #define AS_GPVALUE ".gpvalue"
00174 #define AS_HALF ".short"
00175 #define AS_HALF_UNALIGNED ".short"
00176 #define AS_BSS ".lcomm"
00177 #define AS_MASK "//.mask"
00178 #define AS_ORIGIN ".org"
00179 #define AS_RDATA ".rdata"
00180 #define AS_SDATA ".sdata"
00181 #define AS_SECTION ".section"
00182 #define AS_SIZE ".size"
00183 #if defined(BUILD_OS_DARWIN)
00184 #define AS_SPACE ".space"
00185 #define AS_STRING ".asciz"
00186 #else
00187 #define AS_SPACE ".skip"
00188 #define AS_STRING ".string"
00189 #endif
00190 #define AS_TEXT ".text"
00191 #define AS_TYPE ".type"
00192 #define AS_TYPE_FUNC "@function"
00193 #define AS_TYPE_OBJECT "@object"
00194 #define AS_WEAK ".weak"
00195 #if defined(BUILD_OS_DARWIN)
00196 #define AS_WORD ".long"
00197 #define AS_WORD_UNALIGNED ".long"
00198 #else
00199 #define AS_WORD ".4byte"
00200 #define AS_WORD_UNALIGNED ".4byte"
00201 #endif
00202 #define AS_IDENT "#ident"
00203 #define AS_HIDDEN ".hidden"
00204
00205 extern BOOL CG_emit_non_gas_syntax;
00206
00207
00208
00209
00210 extern const char *AS_ADDRESS;
00211 extern const char *AS_ADDRESS_UNALIGNED;
00212
00213
00214 #define AS_GPREL NULL
00215 #define AS_LTOFF NULL
00216 #define AS_FPTR NULL
00217 #define AS_GP_REL NULL
00218 #define AS_NEGATE NULL
00219
00220
00221
00222
00223 #define ASM_NAME_FUNC(kind,name) "%s(%s)", kind, name
00224 #define ASM_DIR_NOTRANSFORM() ;
00225 #define ASM_DIR_TRANSFORM() ;
00226 #define ASM_DIR_NOREORDER() ;
00227 #define ASM_DIR_NOAT() ;
00228 #define ASM_DIR_STOINTERNAL(n) ;
00229 #define ASM_DIR_GPVALUE() ;
00230 #define ASM_DIR_FILE(count, file, name) \
00231 fprintf(Asm_File, "\t%s\t\"%s/%s\"\n", AS_FILE, incl_table[DST_FILE_NAME_dir(file)], name);
00232 #define ASM_DIR_ALIGN(p, s) \
00233 fprintf(Asm_File, "\t%s %lld\n", AS_ALIGN,(INT64)STB_align(s));
00234
00235
00236 #define ASM_DIR_ZERO(fl, l) fprintf(fl, "\t%s %lld\n", AS_SPACE, (INT64)l)
00237 #define ASM_DIR_SKIP(fl, l) fprintf(fl, "\t%s %lld\n", AS_SPACE, (INT64)l)
00238
00239 #ifdef __cplusplus
00240 }
00241 #endif
00242 #endif