Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu Add arm26 support to GCC. This is only very slightly te...
details: https://anonhg.NetBSD.org/src/rev/1fd046e14e25
branches: trunk
changeset: 494124:1fd046e14e25
user: bjh21 <bjh21%NetBSD.org@localhost>
date: Sun Jul 02 12:31:21 2000 +0000
description:
Add arm26 support to GCC. This is only very slightly tested at present.
diffstat:
gnu/dist/config.sub | 2 +-
gnu/dist/gcc/config/arm/aout.h | 108 ++++++--
gnu/dist/gcc/config/arm/arm.h | 4 +
gnu/dist/gcc/config/arm/elf.h | 391 ++++++++++++++++++++++++++++++++++
gnu/dist/gcc/config/arm/netbsd26.h | 125 ++++++++++
gnu/dist/gcc/configure | 11 +-
gnu/dist/gcc/configure.in | 9 +
gnu/usr.bin/egcs/arch/arm26/tconfig.h | 3 +
gnu/usr.bin/egcs/arch/arm26/tm.h | 3 +
gnu/usr.bin/egcs/common/Makefile | 5 +-
10 files changed, 625 insertions(+), 36 deletions(-)
diffs (truncated from 863 to 300 lines):
diff -r 789493d855ef -r 1fd046e14e25 gnu/dist/config.sub
--- a/gnu/dist/config.sub Sun Jul 02 10:01:30 2000 +0000
+++ b/gnu/dist/config.sub Sun Jul 02 12:31:21 2000 +0000
@@ -210,7 +210,7 @@
;;
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
- | m88k-* | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
+ | m88k-* | sparc-* | ns32k-* | fx80-* | armv2-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
| none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
| hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
diff -r 789493d855ef -r 1fd046e14e25 gnu/dist/gcc/config/arm/aout.h
--- a/gnu/dist/gcc/config/arm/aout.h Sun Jul 02 10:01:30 2000 +0000
+++ b/gnu/dist/gcc/config/arm/aout.h Sun Jul 02 12:31:21 2000 +0000
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for ARM with a.out
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rearnsha%armltd.co.uk@localhost).
This file is part of GNU CC.
@@ -24,6 +24,7 @@
#endif
/* The text to go at the start of the assembler file */
+#ifndef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
{ \
fprintf (STREAM,"%srfp\t.req\t%sr9\n", REGISTER_PREFIX, REGISTER_PREFIX); \
@@ -34,22 +35,35 @@
fprintf (STREAM,"%slr\t.req\t%sr14\n", REGISTER_PREFIX, REGISTER_PREFIX); \
fprintf (STREAM,"%spc\t.req\t%sr15\n", REGISTER_PREFIX, REGISTER_PREFIX); \
}
+#endif
-#define ASM_APP_ON ""
-#define ASM_APP_OFF ""
+#define ASM_APP_ON ""
+#define ASM_APP_OFF ""
/* Switch to the text or data segment. */
-#define TEXT_SECTION_ASM_OP ".text"
-#define DATA_SECTION_ASM_OP ".data"
-#define BSS_SECTION_ASM_OP ".bss"
+#define TEXT_SECTION_ASM_OP ".text"
+#define DATA_SECTION_ASM_OP ".data"
+#define BSS_SECTION_ASM_OP ".bss"
-#define REGISTER_PREFIX ""
-#define USER_LABEL_PREFIX "_"
-#define LOCAL_LABEL_PREFIX ""
+/* Note: If USER_LABEL_PREFIX or LOCAL_LABEL_PREFIX are changed,
+ make sure that this change is reflected in the function
+ coff_arm_is_local_label_name() in bfd/coff-arm.c */
+#ifndef REGISTER_PREFIX
+#define REGISTER_PREFIX ""
+#endif
+
+#ifndef USER_LABEL_PREFIX
+#define USER_LABEL_PREFIX "_"
+#endif
+
+#ifndef LOCAL_LABEL_PREFIX
+#define LOCAL_LABEL_PREFIX ""
+#endif
+
/* The assembler's names for the registers. */
#ifndef REGISTER_NAMES
-#define REGISTER_NAMES \
+#define REGISTER_NAMES \
{ \
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
"r8", "r9", "sl", "fp", "ip", "sp", "lr", "pc", \
@@ -93,7 +107,9 @@
/* Generate DBX debugging information. riscix.h will undefine this because
the native assembler does not support stabs. */
+#ifndef DBX_DEBUGGING_INFO
#define DBX_DEBUGGING_INFO 1
+#endif
/* Acorn dbx moans about continuation chars, so don't use any. */
#ifndef DBX_CONTIN_LENGTH
@@ -104,32 +120,45 @@
``desc'' field is set to compiler version number >= 315 (sic). */
#define DBX_OUTPUT_MAIN_SOURCE_FILENAME(STREAM,NAME) \
do { \
- fprintf (STREAM, ".stabs \"%s\",%d,0,315,%s\n", (NAME), N_SO, \
- <ext_label_name[1]); \
+ fprintf (STREAM, ".stabs "); \
+ output_quoted_string (STREAM, NAME); \
+ fprintf (STREAM, ",%d,0,315,%s\n", N_SO, <ext_label_name[1]); \
text_section (); \
ASM_OUTPUT_INTERNAL_LABEL (STREAM, "Ltext", 0); \
} while (0)
/* Output a function label definition. */
-#define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \
- ASM_OUTPUT_LABEL(STREAM, NAME)
+#ifndef ASM_DECLARE_FUNCTION_NAME
+#define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \
+{ \
+ if (TARGET_POKE_FUNCTION_NAME) \
+ arm_poke_function_name ((STREAM), (NAME)); \
+ ASM_OUTPUT_LABEL (STREAM, NAME); \
+}
+#endif
+#ifndef ASM_OUTPUT_LABEL
#define ASM_OUTPUT_LABEL(STREAM,NAME) \
do { \
assemble_name (STREAM,NAME); \
fputs (":\n", STREAM); \
} while (0)
-
+#endif
+
/* Output a globalising directive for a label. */
+#ifndef ASM_GLOBALIZE_LABEL
#define ASM_GLOBALIZE_LABEL(STREAM,NAME) \
(fprintf (STREAM, "\t.global\t"), \
assemble_name (STREAM, NAME), \
- fputc ('\n',STREAM)) \
+ fputc ('\n',STREAM))
+#endif
/* Make an internal label into a string. */
+#ifndef ASM_GENERATE_INTERNAL_LABEL
#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
- sprintf (STRING, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM)
-
+ sprintf (STRING, "*%s%s%u", LOCAL_LABEL_PREFIX, PREFIX, (unsigned int)(NUM))
+#endif
+
/* Nothing special is done about jump tables */
/* #define ASM_OUTPUT_CASE_LABEL(STREAM,PREFIX,NUM,TABLE) */
/* #define ASM_OUTPUT_CASE_END(STREAM,NUM,TABLE) */
@@ -196,17 +225,18 @@
output_addr_const (STREAM, (EXP)), \
fputc ('\n', STREAM))
-#define ASM_OUTPUT_BYTE(STREAM, VALUE) \
+#define ASM_OUTPUT_BYTE(STREAM, VALUE) \
fprintf (STREAM, "\t.byte\t%d\n", VALUE)
#define ASM_OUTPUT_ASCII(STREAM, PTR, LEN) \
output_ascii_pseudo_op ((STREAM), (unsigned char *)(PTR), (LEN))
/* Output a gap. In fact we fill it with nulls. */
-#define ASM_OUTPUT_SKIP(STREAM, NBYTES) \
+#define ASM_OUTPUT_SKIP(STREAM, NBYTES) \
fprintf (STREAM, "\t.space\t%d\n", NBYTES)
/* Align output to a power of two. Horrible /bin/as. */
+#ifndef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN(STREAM, POWER) \
do \
{ \
@@ -216,16 +246,23 @@
fprintf (STREAM, "\t.even\n"); \
else if (amount != 1) \
fprintf (STREAM, "\t.align\t%d\n", amount - 4); \
- } while (0)
+ } \
+ while (0)
+#endif
/* Output a common block */
+#ifndef ASM_OUTPUT_COMMON
#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
(fprintf (STREAM, "\t.comm\t"), \
assemble_name ((STREAM), (NAME)), \
- fprintf(STREAM, ", %d\t%s %d\n", ROUNDED, ASM_COMMENT_START, SIZE))
-
+ fprintf (STREAM, ", %d\t%s %d\n", ROUNDED, ASM_COMMENT_START, SIZE))
+#endif
+
/* Output a local common block. /bin/as can't do this, so hack a
- `.space' into the bss segment. Note that this is *bad* practice. */
+ `.space' into the bss segment. Note that this is *bad* practice,
+ which is guaranteed NOT to work since it doesn't define STATIC
+ COMMON space but merely STATIC BSS space. */
+#ifndef ASM_OUTPUT_ALIGNED_LOCAL
#define ASM_OUTPUT_ALIGNED_LOCAL(STREAM,NAME,SIZE,ALIGN) \
do { \
bss_section (); \
@@ -233,27 +270,32 @@
ASM_OUTPUT_LABEL (STREAM, NAME); \
fprintf (STREAM, "\t.space\t%d\n", SIZE); \
} while (0)
-
+#endif
+
/* Output a zero-initialized block. */
+#ifndef ASM_OUTPUT_ALIGNED_BSS
#define ASM_OUTPUT_ALIGNED_BSS(STREAM,DECL,NAME,SIZE,ALIGN) \
- asm_output_aligned_bss(STREAM, DECL, NAME, SIZE, ALIGN)
-
+ asm_output_aligned_bss (STREAM, DECL, NAME, SIZE, ALIGN)
+#endif
+
/* Output a source line for the debugger. */
/* #define ASM_OUTPUT_SOURCE_LINE(STREAM,LINE) */
/* Output a #ident directive. */
+#ifndef ASM_OUTPUT_IDENT
#define ASM_OUTPUT_IDENT(STREAM,STRING) \
- fprintf (STREAM,"- - - ident %s\n",STRING)
-
+ fprintf (STREAM, "%s - - - ident %s\n", ASM_COMMENT_START, STRING)
+#endif
+
/* The assembler's parentheses characters. */
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
+#define ASM_OPEN_PAREN "("
+#define ASM_CLOSE_PAREN ")"
#ifndef ASM_COMMENT_START
-#define ASM_COMMENT_START "@"
+#define ASM_COMMENT_START "@"
#endif
/* This works for GAS and some other assemblers. */
-#define SET_ASM_OP ".set"
+#define SET_ASM_OP ".set"
#include "arm/arm.h"
diff -r 789493d855ef -r 1fd046e14e25 gnu/dist/gcc/config/arm/arm.h
--- a/gnu/dist/gcc/config/arm/arm.h Sun Jul 02 10:01:30 2000 +0000
+++ b/gnu/dist/gcc/config/arm/arm.h Sun Jul 02 12:31:21 2000 +0000
@@ -565,7 +565,9 @@
/* This is for compatibility with ARMCC. ARM SDT Reference Manual
(ARM DUI 0020D) page 2-20 says "Structures are aligned on word
boundaries". */
+#ifndef STRUCTURE_SIZE_BOUNDARY
#define STRUCTURE_SIZE_BOUNDARY 32
+#endif
/* Non-zero if move instructions will actually fail to work
when given unaligned data. */
@@ -1825,6 +1827,7 @@
goto JUMPTO
/* Output an internal label definition. */
+#ifndef ASM_OUTPUT_INTERNAL_LABEL
#define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM) \
do \
{ \
@@ -1841,6 +1844,7 @@
ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM)); \
ASM_OUTPUT_LABEL (STREAM, s); \
} while (0)
+#endif
/* Output a push or a pop instruction (only used when profiling). */
#define ASM_OUTPUT_REG_PUSH(STREAM,REGNO) \
diff -r 789493d855ef -r 1fd046e14e25 gnu/dist/gcc/config/arm/elf.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/gcc/config/arm/elf.h Sun Jul 02 12:31:21 2000 +0000
@@ -0,0 +1,391 @@
+/* Definitions of target machine for GNU compiler,
+ for ARM with ELF obj format.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Contributed by Philip Blundell <philb%gnu.org@localhost> and
+ Catherine Moore <clm%cygnus.com@localhost>
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+
+#define OBJECT_FORMAT_ELF
+
+#ifndef LOCAL_LABEL_PREFIX
+#define LOCAL_LABEL_PREFIX "."
+#endif
+
+#ifndef USER_LABEL_PREFIX
+#define USER_LABEL_PREFIX ""
+#endif
+
+#ifndef CPP_PREDEFINES
+#define CPP_PREDEFINES "-Darm -Darm_elf -Acpu(arm) -Amachine(arm) -D__ELF__"
+#endif
Home |
Main Index |
Thread Index |
Old Index