#define TARGET_OBJECT_FORMAT OBJECT_XCOFF
#define XCOFF_DEBUGGING_INFO 1
#define OBJECT_FORMAT_COFF
#define MY_ISCOFF(magic) \
((magic) == U802WRMAGIC || (magic) == U802ROMAGIC \
|| (magic) == U802TOCMAGIC || (magic) == 0757 || (magic) == 0767 \
|| (magic) == 0x2321)
#define FASCIST_ASSEMBLER
#define NO_DOLLAR_IN_LABEL
#define DOLLARS_IN_IDENTIFIERS 0
#define EXTRA_SECTIONS \
read_only_data, private_data, read_only_private_data, toc, bss
#define EXTRA_SECTION_FUNCTIONS \
\
void \
read_only_data_section () \
{ \
if (in_section != read_only_data) \
{ \
fprintf (asm_out_file, "\t.csect %s[RO],3\n", \
xcoff_read_only_section_name); \
in_section = read_only_data; \
} \
} \
\
void \
private_data_section () \
{ \
if (in_section != private_data) \
{ \
fprintf (asm_out_file, "\t.csect %s[RW],3\n", \
xcoff_private_data_section_name); \
in_section = private_data; \
} \
} \
\
void \
read_only_private_data_section () \
{ \
if (in_section != read_only_private_data) \
{ \
fprintf (asm_out_file, "\t.csect %s[RO],3\n", \
xcoff_private_data_section_name); \
in_section = read_only_private_data; \
} \
} \
\
void \
toc_section () \
{ \
if (TARGET_MINIMAL_TOC) \
{ \
\
if (! toc_initialized) \
{ \
fputs ("\t.toc\nLCTOC..1:\n", asm_out_file); \
fputs ("\t.tc toc_table[TC],toc_table[RW]\n", asm_out_file); \
toc_initialized = 1; \
} \
\
if (in_section != toc) \
fprintf (asm_out_file, "\t.csect toc_table[RW]%s\n", \
(TARGET_32BIT ? "" : ",3")); \
} \
else \
{ \
if (in_section != toc) \
fputs ("\t.toc\n", asm_out_file); \
} \
in_section = toc; \
}
#define READONLY_DATA_SECTION read_only_data_section
#define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \
(TARGET_TOC \
&& (GET_CODE (X) == SYMBOL_REF \
|| (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \
&& GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \
|| GET_CODE (X) == LABEL_REF \
|| (GET_CODE (X) == CONST_INT \
&& GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \
|| (GET_CODE (X) == CONST_DOUBLE \
&& (TARGET_POWERPC64 \
|| TARGET_MINIMAL_TOC \
|| (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
&& ! TARGET_NO_FP_IN_TOC)))))
#define TARGET_ASM_GLOBALIZE_LABEL rs6000_xcoff_asm_globalize_label
#define TARGET_ASM_NAMED_SECTION rs6000_xcoff_asm_named_section
#define TARGET_ASM_SELECT_SECTION rs6000_xcoff_select_section
#define TARGET_ASM_SELECT_RTX_SECTION rs6000_xcoff_select_rtx_section
#define TARGET_ASM_UNIQUE_SECTION rs6000_xcoff_unique_section
#define TARGET_ENCODE_SECTION_INFO rs6000_xcoff_encode_section_info
#define TARGET_STRIP_NAME_ENCODING rs6000_xcoff_strip_name_encoding
#define TARGET_SECTION_TYPE_FLAGS rs6000_xcoff_section_type_flags
#define SAVE_FP_PREFIX "._savef"
#define SAVE_FP_SUFFIX ""
#define RESTORE_FP_PREFIX "._restf"
#define RESTORE_FP_SUFFIX ""
#undef RS6000_MCOUNT
#define RS6000_MCOUNT ".__mcount"
#undef RS6000_ITRUNC
#define RS6000_ITRUNC "__itrunc"
#undef RS6000_UITRUNC
#define RS6000_UITRUNC "__uitrunc"
#define RS6000_OUTPUT_BASENAME(FILE, NAME) \
assemble_name ((FILE), (*targetm.strip_name_encoding) (NAME))
#define ASM_OUTPUT_LABEL(FILE,NAME) \
do { RS6000_OUTPUT_BASENAME (FILE, NAME); fputs (":\n", FILE); } while (0)
#define GLOBAL_ASM_OP "\t.globl "
#define ASM_FILE_START(FILE) \
{ \
rs6000_gen_section_name (&xcoff_bss_section_name, \
main_input_filename, ".bss_"); \
rs6000_gen_section_name (&xcoff_private_data_section_name, \
main_input_filename, ".rw_"); \
rs6000_gen_section_name (&xcoff_read_only_section_name, \
main_input_filename, ".ro_"); \
\
fputs ("\t.file\t", FILE); \
output_quoted_string (FILE, main_input_filename); \
fputc ('\n', FILE); \
if (TARGET_64BIT) \
fputs ("\t.machine\t\"ppc64\"\n", FILE); \
toc_section (); \
if (write_symbols != NO_DEBUG) \
private_data_section (); \
text_section (); \
if (profile_flag) \
fprintf (FILE, "\t.extern %s\n", RS6000_MCOUNT); \
rs6000_file_start (FILE, TARGET_CPU_DEFAULT); \
}
#define ASM_FILE_END(FILE) \
{ \
text_section (); \
fputs ("_section_.text:\n", FILE); \
data_section (); \
fputs (TARGET_32BIT \
? "\t.long _section_.text\n" : "\t.llong _section_.text\n", FILE); \
}
#define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \
{ rtx sym_ref = XEXP (DECL_RTL (DECL), 0); \
if ((*targetm.binds_local_p) (DECL)) \
SYMBOL_REF_FLAG (sym_ref) = 1; \
if (TREE_PUBLIC (DECL)) \
{ \
if (!RS6000_WEAK || !DECL_WEAK (decl)) \
{ \
fputs ("\t.globl .", FILE); \
RS6000_OUTPUT_BASENAME (FILE, NAME); \
putc ('\n', FILE); \
} \
} \
else \
{ \
fputs ("\t.lglobl .", FILE); \
RS6000_OUTPUT_BASENAME (FILE, NAME); \
putc ('\n', FILE); \
} \
fputs ("\t.csect ", FILE); \
RS6000_OUTPUT_BASENAME (FILE, NAME); \
fputs (TARGET_32BIT ? "[DS]\n" : "[DS],3\n", FILE); \
RS6000_OUTPUT_BASENAME (FILE, NAME); \
fputs (":\n", FILE); \
fputs (TARGET_32BIT ? "\t.long ." : "\t.llong .", FILE); \
RS6000_OUTPUT_BASENAME (FILE, NAME); \
fputs (", TOC[tc0], 0\n", FILE); \
in_section = no_section; \
function_section(DECL); \
putc ('.', FILE); \
RS6000_OUTPUT_BASENAME (FILE, NAME); \
fputs (":\n", FILE); \
if (write_symbols == XCOFF_DEBUG \
\
&& !(current_function_is_thunk && !no_new_pseudos)) \
xcoffout_declare_function (FILE, DECL, NAME); \
}
#define ASM_OUTPUT_SYMBOL_REF(FILE, SYM) \
rs6000_output_symbol_ref (FILE, SYM)
#undef ASM_OUTPUT_EXTERNAL
#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
{ rtx _symref = XEXP (DECL_RTL (DECL), 0); \
if ((TREE_CODE (DECL) == VAR_DECL \
|| TREE_CODE (DECL) == FUNCTION_DECL) \
&& (NAME)[strlen (NAME) - 1] != ']') \
{ \
XSTR (_symref, 0) = concat (XSTR (_symref, 0), \
(TREE_CODE (DECL) == FUNCTION_DECL \
? "[DS]" : "[RW]"), \
NULL); \
} \
}
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
fprintf (FILE, "%s..%u:\n", (PREFIX), (unsigned) (NUM))
#define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \
fprintf (FILE, "%s..", PREFIX)
#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN) \
{ ASM_OUTPUT_ALIGN (FILE, 2); ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); }
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*%s..%u", (PREFIX), (unsigned) (NUM))
#define ASM_OUTPUT_ASCII(FILE, P, N) output_ascii ((FILE), (P), (N))
#define SKIP_ASM_OP "\t.space "
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
fprintf (FILE, "%s%u\n", SKIP_ASM_OP, (SIZE))
#define COMMON_ASM_OP "\t.comm "
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
do { fputs (COMMON_ASM_OP, (FILE)); \
RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
if ((ALIGN) > 32) \
fprintf ((FILE), ",%u,%u\n", (SIZE), \
exact_log2 ((ALIGN) / BITS_PER_UNIT)); \
else if ((SIZE) > 4) \
fprintf ((FILE), ",%u,3\n", (SIZE)); \
else \
fprintf ((FILE), ",%u\n", (SIZE)); \
} while (0)
#define LOCAL_COMMON_ASM_OP "\t.lcomm "
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
do { fputs (LOCAL_COMMON_ASM_OP, (FILE)); \
RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
fprintf ((FILE), ",%u,%s\n", (TARGET_32BIT ? (SIZE) : (ROUNDED)), \
xcoff_bss_section_name); \
} while (0)
#define SET_ASM_OP "\t.set "
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
do { fprintf ((FILE), "%s", SET_ASM_OP); \
RS6000_OUTPUT_BASENAME (FILE, LABEL1); \
fprintf (FILE, ","); \
RS6000_OUTPUT_BASENAME (FILE, LABEL2); \
fprintf (FILE, "\n"); \
} while (0)
#define DOUBLE_INT_ASM_OP "\t.llong\t"
#define TEXT_SECTION_ASM_OP "\t.csect .text[PR]"
#define DATA_SECTION_ASM_OP "\t.csect .data[RW],3"
#define TARGET_ASM_EXCEPTION_SECTION data_section
#define EH_FRAME_IN_DATA_SECTION 1