Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
62b10bbc
Commit
62b10bbc
authored
Jul 05, 1999
by
Nick Clifton
Committed by
Nick Clifton
Jul 05, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add preliminary support for arm v5 architectures.
From-SVN: r27944
parent
32bebc43
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
213 additions
and
131 deletions
+213
-131
gcc/ChangeLog
+22
-0
gcc/config/arm/arm.c
+0
-0
gcc/config/arm/arm.h
+0
-0
gcc/config/arm/coff.h
+41
-33
gcc/config/arm/elf.h
+111
-93
gcc/invoke.texi
+39
-5
No files found.
gcc/ChangeLog
View file @
62b10bbc
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>
* gcc/configure.in (mips-sgi-irix6*): Handle --with-gnu-ld.
...
...
gcc/config/arm/arm.c
View file @
62b10bbc
This diff is collapsed.
Click to expand it.
gcc/config/arm/arm.h
View file @
62b10bbc
This diff is collapsed.
Click to expand it.
gcc/config/arm/coff.h
View file @
62b10bbc
...
...
@@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_DEFAULT
#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
versions of this toolchain was 8, which produces more compact structures. The
...
...
@@ -50,7 +50,7 @@ extern int arm_structure_size_boundary;
is a valid machine specific attribute for DECL.
The attributes in ATTRIBUTES have previously been assigned to DECL. */
#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. */
#define SDB_DEBUGGING_INFO
...
...
@@ -68,31 +68,35 @@ arm_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS)
ordinary symbol, or gdb won't see it. The stabs entry must be
before the N_SO in order for gdb to find it. */
#define ASM_IDENTIFY_GCC(STREAM) \
fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX )
fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX )
/* This outputs a lot of .req's to define alias for various registers.
Let's try to avoid this. */
#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
extern char *version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/coff\n", \
ASM_COMMENT_START, version_string); \
} while (0)
#define ASM_FILE_START(STREAM) \
do \
{ \
extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/coff\n", \
ASM_COMMENT_START, version_string); \
} \
while (0)
/* 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
NULL_TREE. Some target formats do not support arbitrary sections. Do not
define this macro in such cases. */
#define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC) \
do { \
if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \
fprintf (STREAM, "\t.section %s,\"x\"\n", (NAME)); \
else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
fprintf (STREAM, "\t.section %s,\"\"\n", (NAME)); \
else \
fprintf (STREAM, "\t.section %s,\"w\"\n", (NAME)); \
} while (0)
#define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC) \
do \
{ \
if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \
fprintf (STREAM, "\t.section %s,\"x\"\n", (NAME)); \
else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
fprintf (STREAM, "\t.section %s,\"\"\n", (NAME)); \
else \
fprintf (STREAM, "\t.section %s,\"w\"\n", (NAME)); \
} \
while (0)
/* Support the ctors/dtors and other sections. */
...
...
@@ -171,24 +175,28 @@ dtors_section () \
/* A C statement (sans semicolon) to output an element in the table of
global constructors. */
#undef ASM_OUTPUT_CONSTRUCTOR
#define ASM_OUTPUT_CONSTRUCTOR(STREAM,NAME) \
do { \
ctors_section (); \
fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \
assemble_name (STREAM, NAME); \
fprintf (STREAM, "\n"); \
} while (0)
#define ASM_OUTPUT_CONSTRUCTOR(STREAM, NAME) \
do \
{ \
ctors_section (); \
fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \
assemble_name (STREAM, NAME); \
fprintf (STREAM, "\n"); \
} \
while (0)
/* A C statement (sans semicolon) to output an element in the table of
global destructors. */
#undef ASM_OUTPUT_DESTRUCTOR
#define ASM_OUTPUT_DESTRUCTOR(STREAM,NAME) \
do { \
dtors_section (); \
fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \
assemble_name (STREAM, NAME); \
fprintf (STREAM, "\n"); \
} while (0)
#define ASM_OUTPUT_DESTRUCTOR(STREAM, NAME) \
do \
{ \
dtors_section (); \
fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \
assemble_name (STREAM, NAME); \
fprintf (STREAM, "\n"); \
} \
while (0)
/* __CTOR_LIST__ and __DTOR_LIST__ must be defined by the linker script. */
#define CTOR_LISTS_DEFINED_EXTERNALLY
...
...
@@ -205,5 +213,5 @@ do { \
#define HAVE_ATEXIT
/* The ARM development system defines __main. */
#define NAME__MAIN "__gccmain"
#define NAME__MAIN
"__gccmain"
#define SYMBOL__MAIN __gccmain
gcc/config/arm/elf.h
View file @
62b10bbc
...
...
@@ -76,69 +76,75 @@ Boston, MA 02111-1307, USA. */
while (0)
/* Write the extra assembler code needed to declare an object properly. */
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
do { \
fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
assemble_name (FILE, NAME); \
putc (',', FILE); \
fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
putc ('\n', FILE); \
size_directive_output = 0; \
if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
{ \
size_directive_output = 1; \
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
assemble_name (FILE, NAME); \
putc (',', FILE); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \
int_size_in_bytes (TREE_TYPE (DECL))); \
fputc ('\n', FILE); \
} \
ASM_OUTPUT_LABEL(FILE, NAME); \
} while (0)
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
do \
{ \
fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
assemble_name (FILE, NAME); \
putc (',', FILE); \
fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
putc ('\n', FILE); \
size_directive_output = 0; \
if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
{ \
size_directive_output = 1; \
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
assemble_name (FILE, NAME); \
putc (',', FILE); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \
int_size_in_bytes (TREE_TYPE (DECL))); \
fputc ('\n', FILE); \
} \
ASM_OUTPUT_LABEL(FILE, NAME); \
} \
while (0)
/* Output the size directive for a decl in rest_of_decl_compilation
in the case where we did not do so before the initializer.
Once we find the error_mark_node, we know that the value of
size_directive_output was set
by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
do { \
char * name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
&& ! AT_END && TOP_LEVEL \
&& DECL_INITIAL (DECL) == error_mark_node \
&& !size_directive_output) \
{ \
size_directive_output = 1; \
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
assemble_name (FILE, name); \
putc (',', FILE); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \
int_size_in_bytes (TREE_TYPE (DECL))); \
fputc ('\n', FILE); \
} \
} while (0)
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
do \
{ \
char * name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
&& ! AT_END && TOP_LEVEL \
&& DECL_INITIAL (DECL) == error_mark_node \
&& !size_directive_output) \
{ \
size_directive_output = 1; \
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
assemble_name (FILE, name); \
putc (',', FILE); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \
int_size_in_bytes (TREE_TYPE (DECL))); \
fputc ('\n', FILE); \
} \
} \
while (0)
/* This is how to declare the size of a function. */
#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
do { \
if (!flag_inhibit_size_directive) \
{ \
char label[256]; \
static int labelno; \
labelno ++; \
ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
assemble_name (FILE, (FNAME)); \
fprintf (FILE, ","); \
assemble_name (FILE, label); \
fprintf (FILE, "-"); \
assemble_name (FILE, (FNAME)); \
putc ('\n', FILE); \
} \
} while (0)
#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
do \
{ \
if (!flag_inhibit_size_directive) \
{ \
char label[256]; \
static int labelno; \
labelno ++; \
ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
assemble_name (FILE, (FNAME)); \
fprintf (FILE, ","); \
assemble_name (FILE, label); \
fprintf (FILE, "-"); \
assemble_name (FILE, (FNAME)); \
putc ('\n', FILE); \
} \
} \
while (0)
/* Define this macro if jump tables (for `tablejump' insns) should be
output in the text section, along with the assembler instructions.
...
...
@@ -180,7 +186,7 @@ extern int arm_structure_size_boundary;
is a valid machine specific attribute for DECL.
The attributes in ATTRIBUTES have previously been assigned to DECL. */
#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
...
...
@@ -193,39 +199,42 @@ arm_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS)
before the N_SO in order for gdb to find it. */
#ifndef ASM_IDENTIFY_GCC
#define ASM_IDENTIFY_GCC(STREAM) \
fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX )
fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX )
#endif
/* This outputs a lot of .req's to define alias for various registers.
Let's try to avoid this. */
#ifndef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/elf\n", \
ASM_COMMENT_START, version_string); \
output_file_directive ((STREAM), main_input_filename); \
} while (0)
#define ASM_FILE_START(STREAM) \
do \
{ \
extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/elf\n", \
ASM_COMMENT_START, version_string); \
output_file_directive ((STREAM), main_input_filename); \
} \
while (0)
#endif
/* Output an internal label definition. */
#ifndef ASM_OUTPUT_INTERNAL_LABEL
#define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM) \
do
\
{
\
do
\
{
\
char * s = (char *) alloca (40 + strlen (PREFIX)); \
extern int arm_target_label, arm_ccfsm_state;
\
extern int arm_target_label, arm_ccfsm_state; \
extern rtx arm_target_insn; \
\
if (arm_ccfsm_state == 3 && arm_target_label == (NUM)
\
\
if (arm_ccfsm_state == 3 && arm_target_label == (NUM) \
&& !strcmp (PREFIX, "L")) \
{ \
arm_ccfsm_state = 0;
\
arm_ccfsm_state = 0;
\
arm_target_insn = NULL; \
} \
ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM)); \
ASM_OUTPUT_LABEL (STREAM, s); \
} while (0)
ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM)); \
arm_asm_output_label (STREAM, s); \
} \
while (0)
#endif
/* Support the ctors/dtors and other sections. */
...
...
@@ -308,32 +317,41 @@ dtors_section () \
/* A C statement (sans semicolon) to output an element in the table of
global constructors. */
#ifndef ASM_OUTPUT_CONSTRUCTOR
#define ASM_OUTPUT_CONSTRUCTOR(STREAM,NAME) \
do { \
ctors_section (); \
fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \
assemble_name (STREAM, NAME); \
fprintf (STREAM, "\n"); \
} while (0)
#define ASM_OUTPUT_CONSTRUCTOR(STREAM, NAME) \
do \
{ \
ctors_section (); \
fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \
assemble_name (STREAM, NAME); \
fprintf (STREAM, "\n"); \
} \
while (0)
#endif
/* A C statement (sans semicolon) to output an element in the table of
global destructors. */
#ifndef ASM_OUTPUT_DESTRUCTOR
#define ASM_OUTPUT_DESTRUCTOR(STREAM,NAME) \
do { \
dtors_section (); \
fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \
assemble_name (STREAM, NAME); \
fprintf (STREAM, "\n"); \
} while (0)
#define ASM_OUTPUT_DESTRUCTOR(STREAM, NAME) \
do \
{ \
dtors_section (); \
fprintf (STREAM, "\t%s\t ", INT_ASM_OP); \
assemble_name (STREAM, NAME); \
fprintf (STREAM, "\n"); \
} \
while (0)
#endif
/* This is how we tell the assembler that a symbol is weak. */
#define ASM_WEAKEN_LABEL(FILE,NAME) \
do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
fputc ('\n', FILE); } while (0)
#define ASM_WEAKEN_LABEL(FILE, NAME) \
do \
{ \
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. */
#define NEED_PLT_GOT flag_pic
...
...
@@ -345,10 +363,10 @@ do { \
machine. Use this macro to limit the alignment which can be
specified using the `__attribute__ ((aligned (N)))' construct. If
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. */
#define ASM_OUTPUT_ALIGN(STREAM, POWER) \
fprintf (STREAM, "\t.align\t%d\n", POWER)
fprintf (STREAM, "\t.align\t%d\n", POWER)
#include "arm/aout.h"
gcc/invoke.texi
View file @
62b10bbc
...
...
@@ -263,6 +263,7 @@ in the following sections.
-mbsd -mxopen -mno-symrename
-mabort-on-noreturn
-mno-sched-prolog
-mnop-fun-dllimport -mno-nop-fun-dllimport
@emph{Thumb Options}
-mtpcs-frame -mno-tpcs-frame
...
...
@@ -270,6 +271,9 @@ in the following sections.
-mlittle-endian -mbig-endian
-mthumb-interwork -mno-thumb-interwork
-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}
-mrelax
...
...
@@ -3853,17 +3857,25 @@ suppresses this pass. The post-processor is never run when the
compiler is built for cross-compilation.
@item -mcpu=<name>
@itemx -mtune=<name>
@kindex -mcpu=
@kindex -mtune=
This specifies the name of the target ARM processor. GCC uses this name
to determine what kind of instructions it can use when generating
assembly code. Permissable names are: arm2, arm250, arm3, arm6, arm60,
arm600, arm610, arm620, arm7, arm7m, arm7d, arm7dm, arm7di, arm7dmi,
arm70, arm700, arm700i, arm710, arm710c, arm7100, arm7500, arm7500fe,
arm7tdmi, arm8, strongarm, strongarm110, strongarm1100, arm8, arm810,
arm9, arm9tdmi. @samp{-mtune=} is a synonym for @samp{-mcpue=} to
support older versions of GCC.
arm9, arm920, arm920t, arm9tdmi.
@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>
@kindex -march=
...
...
@@ -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
assembly code. This option can be used in conjunction with or instead
of the @samp{-mcpu=} option. Permissable names are: armv2, armv2a,
armv3, armv3m, armv4, armv4t
armv3, armv3m, armv4, armv4t
, armv5.
@item -mfpe=<number>
@itemx -mfp=<number>
...
...
@@ -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.
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
@node Thumb Options
...
...
@@ -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
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
@node MN10200 Options
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment