/* Definitions of target machine for GNU compiler, for Advanced RISC Machines
ARM compilation, AOF Assembler.
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rearnsha@armltd.co.uk)
This file is part of GNU CC.
char *aof_text_section ();
#define TEXT_SECTION_ASM_OP aof_text_section ()
-#define SELECT_RTX_SECTION(MODE,RTX) text_section ();
+#define SELECT_RTX_SECTION(MODE,RTX,ALIGN) text_section ();
char *aof_data_section ();
#define DATA_SECTION_ASM_OP aof_data_section ()
-#define EXTRA_SECTIONS in_zero_init, in_ctor, in_dtor, in_common
+#define EXTRA_SECTIONS in_zero_init, in_common
#define EXTRA_SECTION_FUNCTIONS \
ZERO_INIT_SECTION \
-CTOR_SECTION \
-DTOR_SECTION \
COMMON_SECTION
#define ZERO_INIT_SECTION \
} \
}
-#define CTOR_SECTION \
-void \
-ctor_section () \
-{ \
- static int ctors_once = 0; \
- if (in_section != in_ctor) \
- { \
- if (ctors_once) \
- { \
- fprintf (stderr, \
- "Attempt to output more than one ctor section\n"); \
- abort (); \
- } \
- fprintf (asm_out_file, "\t%s\n", CTORS_SECTION_ASM_OP); \
- in_section = in_ctor; \
- ctors_once = 1; \
- } \
-}
-
-#define DTOR_SECTION \
-void \
-dtor_section () \
-{ \
- static int dtors_once = 0; \
- if (in_section != in_dtor) \
- { \
- if (dtors_once) \
- { \
- fprintf (stderr, \
- "Attempt to output more than one dtor section\n"); \
- abort (); \
- } \
- fprintf (asm_out_file, "\t%s\n", DTORS_SECTION_ASM_OP); \
- in_section = in_dtor; \
- dtors_once = 1; \
- } \
-}
-
/* Used by ASM_OUTPUT_COMMON (below) to tell varasm.c that we've
changed areas. */
#define COMMON_SECTION \
#define ASM_FILE_START(STREAM) \
{ \
- extern char *version_string; \
fprintf ((STREAM), "%s Generated by gcc %s for ARM/%s\n", \
ASM_COMMENT_START, version_string, ARM_OS_NAME); \
+ fprintf ((STREAM), "__r0\tRN\t0\n"); \
fprintf ((STREAM), "__a1\tRN\t0\n"); \
fprintf ((STREAM), "__a2\tRN\t1\n"); \
fprintf ((STREAM), "__a3\tRN\t2\n"); \
fputs ("\tEND\n", (STREAM)); \
} while (0);
-#define ASM_IDENTIFY_GCC(STREAM) fputs ("|gcc2_compiled.|\n", (STREAM))
-
#define ASM_COMMENT_START ";"
#define ASM_APP_ON ""
#define ASM_OUTPUT_ASCII(STREAM,PTR,LEN) \
{ \
int i; \
- char *ptr = (PTR); \
+ const char *ptr = (PTR); \
fprintf ((STREAM), "\tDCB"); \
for (i = 0; i < (LEN); i++) \
fprintf ((STREAM), " &%02x%s", \
#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '\n')
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
/* Output of Uninitialized Variables */
#define ASM_OUTPUT_COMMON(STREAM,NAME,SIZE,ROUNDED) \
#define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \
{ \
+ if (TARGET_POKE_FUNCTION_NAME) \
+ arm_poke_function_name ((STREAM), (NAME)); \
ASM_OUTPUT_LABEL (STREAM, NAME); \
if (! TREE_PUBLIC (DECL)) \
{ \
/* How initialization functions are handled */
-#define CTORS_SECTION_ASM_OP "AREA\t|C$$gnu_ctorsvec|, DATA, READONLY"
-#define DTORS_SECTION_ASM_OP "AREA\t|C$$gnu_dtorsvec|, DATA, READONLY"
-
-#define ASM_OUTPUT_CONSTRUCTOR(STREAM,NAME) \
-do { \
- ctor_section (); \
- fprintf ((STREAM), "\tDCD\t"); \
- assemble_name ((STREAM), (NAME)); \
- fputc ('\n', (STREAM)); \
-} while (0);
-
-#define ASM_OUTPUT_DESTRUCTOR(STREAM,NAME) \
-do { \
- dtor_section (); \
- fprintf ((STREAM), "\tDCD\t"); \
- assemble_name ((STREAM), (NAME)); \
- fputc ('\n', (STREAM)); \
-} while (0);
+#define CTORS_SECTION_ASM_OP "\tAREA\t|C$$gnu_ctorsvec|, DATA, READONLY"
+#define DTORS_SECTION_ASM_OP "\tAREA\t|C$$gnu_dtorsvec|, DATA, READONLY"
/* Output of Assembler Instructions */
#define USER_LABEL_PREFIX ""
#define LOCAL_LABEL_PREFIX ""
+/* AOF does not prefix user function names with an underscore. */
+#define ARM_MCOUNT_NAME "_mcount"
+
/* Output of Dispatch Tables */
#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,BODY,VALUE,REL) \