Commit 62b10bbc by Nick Clifton Committed by Nick Clifton

Add preliminary support for arm v5 architectures.

From-SVN: r27944
parent 32bebc43
Fri Jul 2 18:49:51 1999 Nick Clifton <nickc@cygnus.com>
Add framework to support armv5 architecture when it becomes
available:
* config/arm/arm.c (FL_ARCH5): New processor capability flag.
(arm_arch5): New variable.
(all_architectures): Add armv5 line.
* config/arm/arm.h (CPP_CPU_ARCH_SPEC): Define __ARM_ARCH_5__ if
-march=armv5 is specified on the command line.
(arm_arch5): Export this variable.
* invoke.texi: Document new string accepted by -march= switch for
ARM ports.
* config/arm/arm.h: Replace use of constant 12 as a register
number with IP_REGNUM. Similarly 14 and LR_REGNUM.
* config/arm/arm.c: Replace use of constant 12 as a register
number with IP_REGNUM. Similarly 14 and LR_REGNUM.
* config/arm/elf.h: Tidy up.
* config/arm/coff.h: Tidy up.
Thu Jul 1 19:08:13 1999 Mark P. Mitchell <mark@codesourcery.com> Thu Jul 1 19:08:13 1999 Mark P. Mitchell <mark@codesourcery.com>
* gcc/configure.in (mips-sgi-irix6*): Handle --with-gnu-ld. * gcc/configure.in (mips-sgi-irix6*): Handle --with-gnu-ld.
......
...@@ -65,7 +65,7 @@ enum arm_cond_code ...@@ -65,7 +65,7 @@ enum arm_cond_code
ARM_HI, ARM_LS, ARM_GE, ARM_LT, ARM_GT, ARM_LE, ARM_AL, ARM_NV ARM_HI, ARM_LS, ARM_GE, ARM_LT, ARM_GT, ARM_LE, ARM_AL, ARM_NV
}; };
extern enum arm_cond_code arm_current_cc; extern enum arm_cond_code arm_current_cc;
extern char *arm_condition_codes[]; extern char * arm_condition_codes[];
#define ARM_INVERSE_CONDITION_CODE(X) ((enum arm_cond_code) (((int)X) ^ 1)) #define ARM_INVERSE_CONDITION_CODE(X) ((enum arm_cond_code) (((int)X) ^ 1))
...@@ -153,6 +153,7 @@ Unrecognized value in TARGET_CPU_DEFAULT. ...@@ -153,6 +153,7 @@ Unrecognized value in TARGET_CPU_DEFAULT.
%{march=armv3m:-D__ARM_ARCH_3M__} \ %{march=armv3m:-D__ARM_ARCH_3M__} \
%{march=armv4:-D__ARM_ARCH_4__} \ %{march=armv4:-D__ARM_ARCH_4__} \
%{march=armv4t:-D__ARM_ARCH_4T__} \ %{march=armv4t:-D__ARM_ARCH_4T__} \
%{march=armv5:-D__ARM_ARCH_5__} \
%{!march=*: \ %{!march=*: \
%{mcpu=arm2:-D__ARM_ARCH_2__} \ %{mcpu=arm2:-D__ARM_ARCH_2__} \
%{mcpu=arm250:-D__ARM_ARCH_2__} \ %{mcpu=arm250:-D__ARM_ARCH_2__} \
...@@ -459,6 +460,9 @@ extern int arm_fast_multiply; ...@@ -459,6 +460,9 @@ extern int arm_fast_multiply;
/* Nonzero if this chip supports the ARM Architecture 4 extensions */ /* Nonzero if this chip supports the ARM Architecture 4 extensions */
extern int arm_arch4; extern int arm_arch4;
/* Nonzero if this chip supports the ARM Architecture 5 extensions */
extern int arm_arch5;
/* Nonzero if this chip can benefit from load scheduling. */ /* Nonzero if this chip can benefit from load scheduling. */
extern int arm_ld_sched; extern int arm_ld_sched;
...@@ -785,6 +789,12 @@ extern const char * structure_size_string; ...@@ -785,6 +789,12 @@ extern const char * structure_size_string;
should point to a special register that we will make sure is eliminated. */ should point to a special register that we will make sure is eliminated. */
#define HARD_FRAME_POINTER_REGNUM 11 #define HARD_FRAME_POINTER_REGNUM 11
/* Register which holds return address from a subroutine call. */
#define LR_REGNUM 14
/* Scratch register - used in all kinds of places, eg trampolines. */
#define IP_REGNUM 12
/* Value should be nonzero if functions must have frame pointers. /* Value should be nonzero if functions must have frame pointers.
Zero means the frame pointer need not be set up (and parms may be accessed Zero means the frame pointer need not be set up (and parms may be accessed
via the stack pointer) in functions that seem suitable. via the stack pointer) in functions that seem suitable.
...@@ -944,8 +954,9 @@ enum reg_class ...@@ -944,8 +954,9 @@ enum reg_class
For the ARM, we wish to handle large displacements off a base For the ARM, we wish to handle large displacements off a base
register by splitting the addend across a MOV and the mem insn. register by splitting the addend across a MOV and the mem insn.
This can cut the number of reloads needed. */ This can cut the number of reloads needed. */
#define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_LEVELS,WIN) \ #define LEGITIMIZE_RELOAD_ADDRESS(X, MODE, OPNUM, TYPE, IND_LEVELS, WIN) \
do { \ do \
{ \
if (GET_CODE (X) == PLUS \ if (GET_CODE (X) == PLUS \
&& GET_CODE (XEXP (X, 0)) == REG \ && GET_CODE (XEXP (X, 0)) == REG \
&& REGNO (XEXP (X, 0)) < FIRST_PSEUDO_REGISTER \ && REGNO (XEXP (X, 0)) < FIRST_PSEUDO_REGISTER \
...@@ -988,7 +999,8 @@ do { \ ...@@ -988,7 +999,8 @@ do { \
OPNUM, TYPE); \ OPNUM, TYPE); \
goto WIN; \ goto WIN; \
} \ } \
} while (0) } \
while (0)
/* Return the maximum number of consecutive registers /* Return the maximum number of consecutive registers
needed to represent mode MODE in a register of class CLASS. needed to represent mode MODE in a register of class CLASS.
...@@ -1189,8 +1201,8 @@ do { \ ...@@ -1189,8 +1201,8 @@ do { \
rtx sym; \ rtx sym; \
\ \
fprintf ((STREAM), "\tmov\t%s%s, %s%s\n\tbl\t", \ fprintf ((STREAM), "\tmov\t%s%s, %s%s\n\tbl\t", \
REGISTER_PREFIX, reg_names[12] /* ip */, \ REGISTER_PREFIX, reg_names[IP_REGNUM] /* ip */, \
REGISTER_PREFIX, reg_names[14] /* lr */); \ REGISTER_PREFIX, reg_names[LR_REGNUM] /* lr */); \
assemble_name ((STREAM), ARM_MCOUNT_NAME); \ assemble_name ((STREAM), ARM_MCOUNT_NAME); \
fputc ('\n', (STREAM)); \ fputc ('\n', (STREAM)); \
ASM_GENERATE_INTERNAL_LABEL (temp, "LP", (LABELNO)); \ ASM_GENERATE_INTERNAL_LABEL (temp, "LP", (LABELNO)); \
...@@ -1280,7 +1292,7 @@ do { \ ...@@ -1280,7 +1292,7 @@ do { \
if (! frame_pointer_needed) \ if (! frame_pointer_needed) \
offset -= 16; \ offset -= 16; \
if (! volatile_func \ if (! volatile_func \
&& (regs_ever_live[14] || saved_hard_reg)) \ && (regs_ever_live[LR_REGNUM] || saved_hard_reg)) \
offset += 4; \ offset += 4; \
offset += current_function_outgoing_args_size; \ offset += current_function_outgoing_args_size; \
(OFFSET) = ((get_frame_size () + 3) & ~3) + offset; \ (OFFSET) = ((get_frame_size () + 3) & ~3) + offset; \
...@@ -1459,8 +1471,8 @@ do { \ ...@@ -1459,8 +1471,8 @@ do { \
used by the macro GO_IF_LEGITIMATE_ADDRESS. Floating point indices can used by the macro GO_IF_LEGITIMATE_ADDRESS. Floating point indices can
only be small constants. */ only be small constants. */
#define GO_IF_LEGITIMATE_INDEX(MODE, BASE_REGNO, INDEX, LABEL) \ #define GO_IF_LEGITIMATE_INDEX(MODE, BASE_REGNO, INDEX, LABEL) \
do \ do \
{ \ { \
HOST_WIDE_INT range; \ HOST_WIDE_INT range; \
enum rtx_code code = GET_CODE (INDEX); \ enum rtx_code code = GET_CODE (INDEX); \
\ \
...@@ -1505,7 +1517,8 @@ do \ ...@@ -1505,7 +1517,8 @@ do \
&& INTVAL (INDEX) > -range) \ && INTVAL (INDEX) > -range) \
goto LABEL; \ goto LABEL; \
} \ } \
} while (0) } \
while (0)
/* Jump to LABEL if X is a valid address RTX. This must also take /* Jump to LABEL if X is a valid address RTX. This must also take
REG_OK_STRICT into account when deciding about valid registers, but it uses REG_OK_STRICT into account when deciding about valid registers, but it uses
...@@ -1588,7 +1601,6 @@ do \ ...@@ -1588,7 +1601,6 @@ do \
On the ARM, try to convert [REG, #BIGCONST] On the ARM, try to convert [REG, #BIGCONST]
into ADD BASE, REG, #UPPERCONST and [BASE, #VALIDCONST], into ADD BASE, REG, #UPPERCONST and [BASE, #VALIDCONST],
where VALIDCONST == 0 in case of TImode. */ where VALIDCONST == 0 in case of TImode. */
extern struct rtx_def *legitimize_pic_address ();
#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \ #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \
{ \ { \
if (GET_CODE (X) == PLUS) \ if (GET_CODE (X) == PLUS) \
...@@ -1767,7 +1779,7 @@ extern struct rtx_def *legitimize_pic_address (); ...@@ -1767,7 +1779,7 @@ extern struct rtx_def *legitimize_pic_address ();
((X) == frame_pointer_rtx || (X) == stack_pointer_rtx \ ((X) == frame_pointer_rtx || (X) == stack_pointer_rtx \
|| (X) == arg_pointer_rtx) || (X) == arg_pointer_rtx)
#define DEFAULT_RTX_COSTS(X,CODE,OUTER_CODE) \ #define DEFAULT_RTX_COSTS(X, CODE, OUTER_CODE) \
return arm_rtx_costs (X, CODE); return arm_rtx_costs (X, CODE);
/* Moves to and from memory are quite expensive */ /* Moves to and from memory are quite expensive */
...@@ -1851,9 +1863,9 @@ extern int making_const_table; ...@@ -1851,9 +1863,9 @@ extern int making_const_table;
#define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode) #define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode)
#define CANONICALIZE_COMPARISON(CODE,OP0,OP1) \ #define CANONICALIZE_COMPARISON(CODE, OP0, OP1) \
do \ do \
{ \ { \
if (GET_CODE (OP1) == CONST_INT \ if (GET_CODE (OP1) == CONST_INT \
&& ! (const_ok_for_arm (INTVAL (OP1)) \ && ! (const_ok_for_arm (INTVAL (OP1)) \
|| (const_ok_for_arm (- INTVAL (OP1))))) \ || (const_ok_for_arm (- INTVAL (OP1))))) \
...@@ -1862,7 +1874,8 @@ do \ ...@@ -1862,7 +1874,8 @@ do \
CODE = arm_canonicalize_comparison ((CODE), &const_op); \ CODE = arm_canonicalize_comparison ((CODE), &const_op); \
OP1 = const_op; \ OP1 = const_op; \
} \ } \
} while (0) } \
while (0)
#define STORE_FLAG_VALUE 1 #define STORE_FLAG_VALUE 1
...@@ -1870,7 +1883,8 @@ do \ ...@@ -1870,7 +1883,8 @@ do \
stored from the compare operation. Note that we can't use "rtx" here stored from the compare operation. Note that we can't use "rtx" here
since it hasn't been defined! */ since it hasn't been defined! */
extern struct rtx_def *arm_compare_op0, *arm_compare_op1; extern struct rtx_def * arm_compare_op0;
extern struct rtx_def * arm_compare_op1;
/* Define the codes that are matched by predicates in arm.c */ /* Define the codes that are matched by predicates in arm.c */
#define PREDICATE_CODES \ #define PREDICATE_CODES \
...@@ -1929,7 +1943,8 @@ extern struct rtx_def *arm_compare_op0, *arm_compare_op1; ...@@ -1929,7 +1943,8 @@ extern struct rtx_def *arm_compare_op0, *arm_compare_op1;
} \ } \
ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM)); \ ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM)); \
ASM_OUTPUT_LABEL (STREAM, s); \ ASM_OUTPUT_LABEL (STREAM, s); \
} while (0) } \
while (0)
#endif #endif
/* Output a push or a pop instruction (only used when profiling). */ /* Output a push or a pop instruction (only used when profiling). */
...@@ -2077,11 +2092,12 @@ extern struct rtx_def *arm_compare_op0, *arm_compare_op1; ...@@ -2077,11 +2092,12 @@ extern struct rtx_def *arm_compare_op0, *arm_compare_op1;
/* Output code to add DELTA to the first argument, and then jump to FUNCTION. /* Output code to add DELTA to the first argument, and then jump to FUNCTION.
Used for C++ multiple inheritance. */ Used for C++ multiple inheritance. */
#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
do { \ do \
{ \
int mi_delta = (DELTA); \ int mi_delta = (DELTA); \
char *mi_op = mi_delta < 0 ? "sub" : "add"; \ char * mi_op = mi_delta < 0 ? "sub" : "add"; \
int shift = 0; \ int shift = 0; \
int this_regno = (aggregate_value_p (TREE_TYPE (TREE_TYPE (FUNCTION)))\ int this_regno = (aggregate_value_p (TREE_TYPE (TREE_TYPE (FUNCTION))) \
? 1 : 0); \ ? 1 : 0); \
if (mi_delta < 0) mi_delta = -mi_delta; \ if (mi_delta < 0) mi_delta = -mi_delta; \
while (mi_delta != 0) \ while (mi_delta != 0) \
...@@ -2103,7 +2119,8 @@ do { \ ...@@ -2103,7 +2119,8 @@ do { \
if (NEED_PLT_GOT) \ if (NEED_PLT_GOT) \
fputs ("(PLT)", FILE); \ fputs ("(PLT)", FILE); \
fputc ('\n', FILE); \ fputc ('\n', FILE); \
} while (0) } \
while (0)
/* A C expression whose value is RTL representing the value of the return /* A C expression whose value is RTL representing the value of the return
address for the frame COUNT steps up from the current frame. */ address for the frame COUNT steps up from the current frame. */
......
...@@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_DEFAULT #undef TARGET_DEFAULT
#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32) #define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32)
#define MULTILIB_DEFAULTS { "mlittle-endian", "msoft-float", "mapcs-32" } #define MULTILIB_DEFAULTS { "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
/* Setting this to 32 produces more efficient code, but the value set in previous /* Setting this to 32 produces more efficient code, but the value set in previous
versions of this toolchain was 8, which produces more compact structures. The versions of this toolchain was 8, which produces more compact structures. The
...@@ -50,7 +50,7 @@ extern int arm_structure_size_boundary; ...@@ -50,7 +50,7 @@ extern int arm_structure_size_boundary;
is a valid machine specific attribute for DECL. is a valid machine specific attribute for DECL.
The attributes in ATTRIBUTES have previously been assigned to DECL. */ The attributes in ATTRIBUTES have previously been assigned to DECL. */
#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \ #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
arm_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS) arm_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS)
/* This is COFF, but prefer stabs. */ /* This is COFF, but prefer stabs. */
#define SDB_DEBUGGING_INFO #define SDB_DEBUGGING_INFO
...@@ -74,25 +74,29 @@ arm_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS) ...@@ -74,25 +74,29 @@ arm_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS)
Let's try to avoid this. */ Let's try to avoid this. */
#undef ASM_FILE_START #undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \ #define ASM_FILE_START(STREAM) \
do { \ do \
extern char *version_string; \ { \
extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/coff\n", \ fprintf (STREAM, "%s Generated by gcc %s for ARM/coff\n", \
ASM_COMMENT_START, version_string); \ ASM_COMMENT_START, version_string); \
} while (0) } \
while (0)
/* A C statement to output something to the assembler file to switch to section /* A C statement to output something to the assembler file to switch to section
NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
NULL_TREE. Some target formats do not support arbitrary sections. Do not NULL_TREE. Some target formats do not support arbitrary sections. Do not
define this macro in such cases. */ define this macro in such cases. */
#define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC) \ #define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC) \
do { \ do \
{ \
if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \ if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \
fprintf (STREAM, "\t.section %s,\"x\"\n", (NAME)); \ fprintf (STREAM, "\t.section %s,\"x\"\n", (NAME)); \
else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \ else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
fprintf (STREAM, "\t.section %s,\"\"\n", (NAME)); \ fprintf (STREAM, "\t.section %s,\"\"\n", (NAME)); \
else \ else \
fprintf (STREAM, "\t.section %s,\"w\"\n", (NAME)); \ fprintf (STREAM, "\t.section %s,\"w\"\n", (NAME)); \
} while (0) } \
while (0)
/* Support the ctors/dtors and other sections. */ /* Support the ctors/dtors and other sections. */
...@@ -171,24 +175,28 @@ dtors_section () \ ...@@ -171,24 +175,28 @@ dtors_section () \
/* A C statement (sans semicolon) to output an element in the table of /* A C statement (sans semicolon) to output an element in the table of
global constructors. */ global constructors. */
#undef ASM_OUTPUT_CONSTRUCTOR #undef ASM_OUTPUT_CONSTRUCTOR
#define ASM_OUTPUT_CONSTRUCTOR(STREAM,NAME) \ #define ASM_OUTPUT_CONSTRUCTOR(STREAM, NAME) \
do { \ do \
{ \
ctors_section (); \ ctors_section (); \
fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \ fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \
assemble_name (STREAM, NAME); \ assemble_name (STREAM, NAME); \
fprintf (STREAM, "\n"); \ fprintf (STREAM, "\n"); \
} while (0) } \
while (0)
/* A C statement (sans semicolon) to output an element in the table of /* A C statement (sans semicolon) to output an element in the table of
global destructors. */ global destructors. */
#undef ASM_OUTPUT_DESTRUCTOR #undef ASM_OUTPUT_DESTRUCTOR
#define ASM_OUTPUT_DESTRUCTOR(STREAM,NAME) \ #define ASM_OUTPUT_DESTRUCTOR(STREAM, NAME) \
do { \ do \
{ \
dtors_section (); \ dtors_section (); \
fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \ fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \
assemble_name (STREAM, NAME); \ assemble_name (STREAM, NAME); \
fprintf (STREAM, "\n"); \ fprintf (STREAM, "\n"); \
} while (0) } \
while (0)
/* __CTOR_LIST__ and __DTOR_LIST__ must be defined by the linker script. */ /* __CTOR_LIST__ and __DTOR_LIST__ must be defined by the linker script. */
#define CTOR_LISTS_DEFINED_EXTERNALLY #define CTOR_LISTS_DEFINED_EXTERNALLY
......
...@@ -77,7 +77,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -77,7 +77,8 @@ Boston, MA 02111-1307, USA. */
/* Write the extra assembler code needed to declare an object properly. */ /* Write the extra assembler code needed to declare an object properly. */
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
do { \ do \
{ \
fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
assemble_name (FILE, NAME); \ assemble_name (FILE, NAME); \
putc (',', FILE); \ putc (',', FILE); \
...@@ -95,7 +96,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -95,7 +96,8 @@ Boston, MA 02111-1307, USA. */
fputc ('\n', FILE); \ fputc ('\n', FILE); \
} \ } \
ASM_OUTPUT_LABEL(FILE, NAME); \ ASM_OUTPUT_LABEL(FILE, NAME); \
} while (0) } \
while (0)
/* Output the size directive for a decl in rest_of_decl_compilation /* Output the size directive for a decl in rest_of_decl_compilation
in the case where we did not do so before the initializer. in the case where we did not do so before the initializer.
...@@ -103,7 +105,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -103,7 +105,8 @@ Boston, MA 02111-1307, USA. */
size_directive_output was set size_directive_output was set
by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
do { \ do \
{ \
char * name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ char * name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
&& ! AT_END && TOP_LEVEL \ && ! AT_END && TOP_LEVEL \
...@@ -118,11 +121,13 @@ do { \ ...@@ -118,11 +121,13 @@ do { \
int_size_in_bytes (TREE_TYPE (DECL))); \ int_size_in_bytes (TREE_TYPE (DECL))); \
fputc ('\n', FILE); \ fputc ('\n', FILE); \
} \ } \
} while (0) } \
while (0)
/* This is how to declare the size of a function. */ /* This is how to declare the size of a function. */
#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
do { \ do \
{ \
if (!flag_inhibit_size_directive) \ if (!flag_inhibit_size_directive) \
{ \ { \
char label[256]; \ char label[256]; \
...@@ -138,7 +143,8 @@ do { \ ...@@ -138,7 +143,8 @@ do { \
assemble_name (FILE, (FNAME)); \ assemble_name (FILE, (FNAME)); \
putc ('\n', FILE); \ putc ('\n', FILE); \
} \ } \
} while (0) } \
while (0)
/* Define this macro if jump tables (for `tablejump' insns) should be /* Define this macro if jump tables (for `tablejump' insns) should be
output in the text section, along with the assembler instructions. output in the text section, along with the assembler instructions.
...@@ -180,7 +186,7 @@ extern int arm_structure_size_boundary; ...@@ -180,7 +186,7 @@ extern int arm_structure_size_boundary;
is a valid machine specific attribute for DECL. is a valid machine specific attribute for DECL.
The attributes in ATTRIBUTES have previously been assigned to DECL. */ The attributes in ATTRIBUTES have previously been assigned to DECL. */
#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \ #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
arm_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS) arm_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS)
/* A C statement to output assembler commands which will identify the /* A C statement to output assembler commands which will identify the
...@@ -200,12 +206,14 @@ arm_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS) ...@@ -200,12 +206,14 @@ arm_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS)
Let's try to avoid this. */ Let's try to avoid this. */
#ifndef ASM_FILE_START #ifndef ASM_FILE_START
#define ASM_FILE_START(STREAM) \ #define ASM_FILE_START(STREAM) \
do { \ do \
{ \
extern char * version_string; \ extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/elf\n", \ fprintf (STREAM, "%s Generated by gcc %s for ARM/elf\n", \
ASM_COMMENT_START, version_string); \ ASM_COMMENT_START, version_string); \
output_file_directive ((STREAM), main_input_filename); \ output_file_directive ((STREAM), main_input_filename); \
} while (0) } \
while (0)
#endif #endif
/* Output an internal label definition. */ /* Output an internal label definition. */
...@@ -224,8 +232,9 @@ do { \ ...@@ -224,8 +232,9 @@ do { \
arm_target_insn = NULL; \ arm_target_insn = NULL; \
} \ } \
ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM)); \ ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM)); \
ASM_OUTPUT_LABEL (STREAM, s); \ arm_asm_output_label (STREAM, s); \
} while (0) } \
while (0)
#endif #endif
/* Support the ctors/dtors and other sections. */ /* Support the ctors/dtors and other sections. */
...@@ -308,32 +317,41 @@ dtors_section () \ ...@@ -308,32 +317,41 @@ dtors_section () \
/* A C statement (sans semicolon) to output an element in the table of /* A C statement (sans semicolon) to output an element in the table of
global constructors. */ global constructors. */
#ifndef ASM_OUTPUT_CONSTRUCTOR #ifndef ASM_OUTPUT_CONSTRUCTOR
#define ASM_OUTPUT_CONSTRUCTOR(STREAM,NAME) \ #define ASM_OUTPUT_CONSTRUCTOR(STREAM, NAME) \
do { \ do \
{ \
ctors_section (); \ ctors_section (); \
fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \ fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \
assemble_name (STREAM, NAME); \ assemble_name (STREAM, NAME); \
fprintf (STREAM, "\n"); \ fprintf (STREAM, "\n"); \
} while (0) } \
while (0)
#endif #endif
/* A C statement (sans semicolon) to output an element in the table of /* A C statement (sans semicolon) to output an element in the table of
global destructors. */ global destructors. */
#ifndef ASM_OUTPUT_DESTRUCTOR #ifndef ASM_OUTPUT_DESTRUCTOR
#define ASM_OUTPUT_DESTRUCTOR(STREAM,NAME) \ #define ASM_OUTPUT_DESTRUCTOR(STREAM, NAME) \
do { \ do \
{ \
dtors_section (); \ dtors_section (); \
fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \ fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \
assemble_name (STREAM, NAME); \ assemble_name (STREAM, NAME); \
fprintf (STREAM, "\n"); \ fprintf (STREAM, "\n"); \
} while (0) } \
while (0)
#endif #endif
/* This is how we tell the assembler that a symbol is weak. */ /* This is how we tell the assembler that a symbol is weak. */
#define ASM_WEAKEN_LABEL(FILE,NAME) \ #define ASM_WEAKEN_LABEL(FILE, NAME) \
do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ do \
fputc ('\n', FILE); } while (0) { \
fputs ("\t.weak\t", FILE); \
assemble_name (FILE, NAME); \
fputc ('\n', FILE); \
} \
while (0)
/* For PIC code we need to explicitly specify (PLT) and (GOT) relocs. */ /* For PIC code we need to explicitly specify (PLT) and (GOT) relocs. */
#define NEED_PLT_GOT flag_pic #define NEED_PLT_GOT flag_pic
...@@ -345,7 +363,7 @@ do { \ ...@@ -345,7 +363,7 @@ do { \
machine. Use this macro to limit the alignment which can be machine. Use this macro to limit the alignment which can be
specified using the `__attribute__ ((aligned (N)))' construct. If specified using the `__attribute__ ((aligned (N)))' construct. If
not defined, the default value is `BIGGEST_ALIGNMENT'. */ not defined, the default value is `BIGGEST_ALIGNMENT'. */
#define MAX_OFILE_ALIGNMENT (32768*8) #define MAX_OFILE_ALIGNMENT (32768 * 8)
/* Align output to a power of two. */ /* Align output to a power of two. */
#define ASM_OUTPUT_ALIGN(STREAM, POWER) \ #define ASM_OUTPUT_ALIGN(STREAM, POWER) \
......
...@@ -263,6 +263,7 @@ in the following sections. ...@@ -263,6 +263,7 @@ in the following sections.
-mbsd -mxopen -mno-symrename -mbsd -mxopen -mno-symrename
-mabort-on-noreturn -mabort-on-noreturn
-mno-sched-prolog -mno-sched-prolog
-mnop-fun-dllimport -mno-nop-fun-dllimport
@emph{Thumb Options} @emph{Thumb Options}
-mtpcs-frame -mno-tpcs-frame -mtpcs-frame -mno-tpcs-frame
...@@ -270,6 +271,9 @@ in the following sections. ...@@ -270,6 +271,9 @@ in the following sections.
-mlittle-endian -mbig-endian -mlittle-endian -mbig-endian
-mthumb-interwork -mno-thumb-interwork -mthumb-interwork -mno-thumb-interwork
-mstructure-size-boundary= -mstructure-size-boundary=
-mnop-fun-dllimport -mno-nop-fun-dllimport
-mcallee-super-interworking -mno-callee-super-interworking
-mcaller-super-interworking -mno-caller-super-interworking
@emph{MN10200 Options} @emph{MN10200 Options}
-mrelax -mrelax
...@@ -3853,17 +3857,25 @@ suppresses this pass. The post-processor is never run when the ...@@ -3853,17 +3857,25 @@ suppresses this pass. The post-processor is never run when the
compiler is built for cross-compilation. compiler is built for cross-compilation.
@item -mcpu=<name> @item -mcpu=<name>
@itemx -mtune=<name>
@kindex -mcpu= @kindex -mcpu=
@kindex -mtune=
This specifies the name of the target ARM processor. GCC uses this name This specifies the name of the target ARM processor. GCC uses this name
to determine what kind of instructions it can use when generating to determine what kind of instructions it can use when generating
assembly code. Permissable names are: arm2, arm250, arm3, arm6, arm60, assembly code. Permissable names are: arm2, arm250, arm3, arm6, arm60,
arm600, arm610, arm620, arm7, arm7m, arm7d, arm7dm, arm7di, arm7dmi, arm600, arm610, arm620, arm7, arm7m, arm7d, arm7dm, arm7di, arm7dmi,
arm70, arm700, arm700i, arm710, arm710c, arm7100, arm7500, arm7500fe, arm70, arm700, arm700i, arm710, arm710c, arm7100, arm7500, arm7500fe,
arm7tdmi, arm8, strongarm, strongarm110, strongarm1100, arm8, arm810, arm7tdmi, arm8, strongarm, strongarm110, strongarm1100, arm8, arm810,
arm9, arm9tdmi. @samp{-mtune=} is a synonym for @samp{-mcpue=} to arm9, arm920, arm920t, arm9tdmi.
support older versions of GCC.
@itemx -mtune=<name>
@kindex -mtune=
This option is very similar to the @samp{-mcpu=} option, except that
instead of specifying the actual target processor type, and hence
restricting which instructions can be used, it specifies that GCC should
tune the performance of the code as if the target were of the type
specified in this option, but still choosing the instructions that it
will generate based on the cpu specified by a @samp{-mcpu=} option.
For some arm implementations better performance can be obtained by using
this option.
@item -march=<name> @item -march=<name>
@kindex -march= @kindex -march=
...@@ -3871,7 +3883,7 @@ This specifies the name of the target ARM architecture. GCC uses this ...@@ -3871,7 +3883,7 @@ This specifies the name of the target ARM architecture. GCC uses this
name to determine what kind of instructions it can use when generating name to determine what kind of instructions it can use when generating
assembly code. This option can be used in conjunction with or instead assembly code. This option can be used in conjunction with or instead
of the @samp{-mcpu=} option. Permissable names are: armv2, armv2a, of the @samp{-mcpu=} option. Permissable names are: armv2, armv2a,
armv3, armv3m, armv4, armv4t armv3, armv3m, armv4, armv4t, armv5.
@item -mfpe=<number> @item -mfpe=<number>
@itemx -mfp=<number> @itemx -mfp=<number>
...@@ -3900,6 +3912,10 @@ value as future versions of the toolchain may default to this value. ...@@ -3900,6 +3912,10 @@ value as future versions of the toolchain may default to this value.
Generate a call to the function abort at the end of a noreturn function. Generate a call to the function abort at the end of a noreturn function.
It will be executed if the function tries to return. It will be executed if the function tries to return.
@item -mnop-fun-dllimport
@kindex -mnop-fun-dllimport
Disable the support for the @emph{dllimport} attribute.
@end table @end table
@node Thumb Options @node Thumb Options
...@@ -3953,6 +3969,24 @@ libraries compiled with the other value, if they exchange information ...@@ -3953,6 +3969,24 @@ libraries compiled with the other value, if they exchange information
using structures or unions. Programmers are encouraged to use the 32 using structures or unions. Programmers are encouraged to use the 32
value as future versions of the toolchain may default to this value. value as future versions of the toolchain may default to this value.
@item -mnop-fun-dllimport
@kindex -mnop-fun-dllimport
Disable the support for the @emph{dllimport} attribute.
@item -mcallee-super-interworking
@kindex -mcallee-super-interworking
Gives all externally visible functions in the file being compiled an ARM
instruction set header which switches to Thumb mode before executing the
rest of the function. This allows these functions to be called from
non-interworking code.
@item -mcaller-super-interworking
@kindex -mcaller-super-interworking
Allows calls via function pointers (including virtual functions) to
execute correctly regardless of whether the target code has been
compiled for interworking or not. There is a small overhead in the cost
of executing a funciton pointer if this option is enabled.
@end table @end table
@node MN10200 Options @node MN10200 Options
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment