This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc 2.95 RTEMS patch
- To: egcs@sourceware.cygnus.com
- Subject: gcc 2.95 RTEMS patch
- From: <joel@OARcorp.com>
- Date: Fri, 6 Aug 1999 11:46:11 -0500 (CDT)
The attached file is the RTEMS patch for gcc 2.95. It includes two
patches that are already on the gcc 2.95.1 release branch:
+ an m68k CPU32 stack problem (Jeff?)
+ an sh build problem (J"orn Rennecke <amylaar@cygnus.co.uk>)
The general description of this patch is that it it moves most of the
RTEMS targets to elf, renames the previous CPU-rtems target to something
like CPU-rtemscoff or CPU-rtemsaout, and generally improves RTEMS
support for C++
The ChangeLog changes are also included in the attached patch.
The patch itself is about 800 lines. configure will have to be
regenerated after applying this. That part of the diff was 1500 lines so
I left it out.
+ Wed Jul 28 09:14:33 CDT 1999 Joel Sherrill <joel@OARcorp.com>
+
+ * configure.in (m68k-*-rtemscoff*): Added.
+ * configure.in (mips64orion-*-rtems*): Converted to ELF.
+ * configure.in (sparc-*-rtemsaout*): Added as alias for old
+ sparc-rtems configuration.
+ * configure.in (sparc-*-rtemself*): Added.
+ * configure.in (sparc-*-rtems*): Now ELF not a.out.
+ * config/i386/rtems.h: Added comment.
+ * config/sparc/rtemself.h: New file.
+
+ Tue Jul 13 20:57:02 1999 Charles-Antoine Gauthier
<charles.gauthier@iit.nrc.ca>
+
+ * configure.in (m68k-rtemself): Added.
+ * config/elfos.h: Added ifndef wrapper for DWARF2_DEBUGGING_INFO
+ and DWARF_DEBUGGING_INFO.
+ * config/m68k/crti.s: New file.
+ * config/m68k/crtn.s: New file.
+ * config/m68k/t-crtstuff: New file.
+ * config/m68k/rtemself.h: New file.
+
+ Fri May 14 09:28:07 CDT 1999 Rosimildo DaSilva
<rdasilva@connecttel.com>
+
+ * configure.in (i[[34567]]86-*-rtemself*): Now uses crtstuff for
+ global ctor/dtor and C++ exception handling.
+ * config/i386/rtemself.h: Now uses crtstuff (crti.o + crtbegin.o)
+ for STARTFILE_SPEC and crtstuff (crtend.o + crtn.o) for
+ ENDFILE_SPEC.
+ * config/i386/t-rtems-i386: New File.
+
--joel
Joel Sherrill, Ph.D. Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/ChangeLog gcc-2.95/gcc/ChangeLog
*** /usr1/rtems/work/original/gcc-2.95/gcc/ChangeLog Thu Jul 29 04:41:17 1999
--- gcc-2.95/gcc/ChangeLog Tue Aug 3 08:20:16 1999
***************
*** 1,3 ****
--- 1,43 ----
+ Fri Jun 4 03:20:40 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
+ * sh.c (fixup_addr_diff_vecs): Emit braf reference label.
+ (braf_label_ref_operand): Delete.
+ * sh.h (PREDICATE_CODES): Remove braf_label_ref_operand.
+ * sh.md (casesi_jump_2): Operand1 is now the inside of a
+ label_ref, and has no predicate.
+ The patten has a predicate to guard against invalid substitutions.
+ (dummy_jump): Delete.
+ (casesi): Update use of casesi_jump_2.
+
+ Wed Jul 28 09:14:33 CDT 1999 Joel Sherrill <joel@OARcorp.com>
+
+ * configure.in (m68k-*-rtemscoff*): Added.
+ * configure.in (mips64orion-*-rtems*): Converted to ELF.
+ * configure.in (sparc-*-rtemsaout*): Added as alias for old
+ sparc-rtems configuration.
+ * configure.in (sparc-*-rtemself*): Added.
+ * configure.in (sparc-*-rtems*): Now ELF not a.out.
+ * config/i386/rtems.h: Added comment.
+ * config/sparc/rtemself.h: New file.
+
+ Tue Jul 13 20:57:02 1999 Charles-Antoine Gauthier <charles.gauthier@iit.nrc.ca>
+
+ * configure.in (m68k-rtemself): Added.
+ * config/elfos.h: Added ifndef wrapper for DWARF2_DEBUGGING_INFO
+ and DWARF_DEBUGGING_INFO.
+ * config/m68k/crti.s: New file.
+ * config/m68k/crtn.s: New file.
+ * config/m68k/t-crtstuff: New file.
+ * config/m68k/rtemself.h: New file.
+
+ Fri May 14 09:28:07 CDT 1999 Rosimildo DaSilva <rdasilva@connecttel.com>
+
+ * configure.in (i[[34567]]86-*-rtemself*): Now uses crtstuff for
+ global ctor/dtor and C++ exception handling.
+ * config/i386/rtemself.h: Now uses crtstuff (crti.o + crtbegin.o)
+ for STARTFILE_SPEC and crtstuff (crtend.o + crtn.o) for
+ ENDFILE_SPEC.
+ * config/i386/t-rtems-i386: New File.
+
Wed Jul 28 21:39:31 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95 Released.
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/config/elfos.h gcc-2.95/gcc/config/elfos.h
*** /usr1/rtems/work/original/gcc-2.95/gcc/config/elfos.h Fri Mar 26 04:45:26 1999
--- gcc-2.95/gcc/config/elfos.h Mon Aug 2 12:22:37 1999
***************
*** 69,79 ****
/* System V Release 4 uses DWARF debugging info. */
! #define DWARF_DEBUGGING_INFO
/* All ELF targets can support DWARF-2. */
! #define DWARF2_DEBUGGING_INFO
/* Also allow them to support STABS debugging. */
--- 69,83 ----
/* System V Release 4 uses DWARF debugging info. */
! #ifndef DWARF_DEBUGGING_INFO
! #define DWARF_DEBUGGING_INFO 1
! #endif
/* All ELF targets can support DWARF-2. */
! #ifndef DWARF2_DEBUGGING_INFO
! #define DWARF2_DEBUGGING_INFO 1
! #endif
/* Also allow them to support STABS debugging. */
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/config/i386/rtems.h gcc-2.95/gcc/config/i386/rtems.h
*** /usr1/rtems/work/original/gcc-2.95/gcc/config/i386/rtems.h Wed Dec 16 15:03:56 1998
--- gcc-2.95/gcc/config/i386/rtems.h Mon Aug 2 12:22:37 1999
***************
*** 32,34 ****
--- 32,35 ----
#define TARGET_MEM_FUNCTIONS
#endif
+ /* end of i386/rtems.h */
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/config/i386/rtemself.h gcc-2.95/gcc/config/i386/rtemself.h
*** /usr1/rtems/work/original/gcc-2.95/gcc/config/i386/rtemself.h Wed Dec 16 15:03:57 1998
--- gcc-2.95/gcc/config/i386/rtemself.h Mon Aug 2 12:22:37 1999
***************
*** 163,169 ****
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
#undef STARTFILE_SPEC
! #define STARTFILE_SPEC "crt0.o%s"
#undef ENDFILE_SPEC
--- 163,171 ----
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
#undef STARTFILE_SPEC
! #define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
#undef ENDFILE_SPEC
+ #define ENDFILE_SPEC "crtend.o%s crtn.o%s"
+
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/config/i386/t-rtems-i386 gcc-2.95/gcc/config/i386/t-rtems-i386
*** /usr1/rtems/work/original/gcc-2.95/gcc/config/i386/t-rtems-i386 Wed Dec 31 18:00:00 1969
--- gcc-2.95/gcc/config/i386/t-rtems-i386 Mon Aug 2 12:22:37 1999
***************
*** 0 ****
--- 1,17 ----
+ #
+ # This file was based on t-sol2 - x68 Solaris implementation. Actually,
+ # the source code to create crti.o anf crtn.o are exactly the same
+ # as the ones for Solaris. Later, we might want to have a RTEMS's
+ # version of these files.
+ #
+
+ LIBGCC1 =
+ CROSS_LIBGCC1 =
+
+ crti.o: $(srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES)
+ sed -e '/^!/d' <$(srcdir)/config/i386/sol2-ci.asm >crti.s
+ $(GCC_FOR_TARGET) -c -o crti.o crti.s
+ crtn.o: $(srcdir)/config/i386/sol2-cn.asm $(GCC_PASSES)
+ sed -e '/^!/d' <$(srcdir)/config/i386/sol2-cn.asm >crtn.s
+ $(GCC_FOR_TARGET) -c -o crtn.o crtn.s
+
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/config/m68k/crti.s gcc-2.95/gcc/config/m68k/crti.s
*** /usr1/rtems/work/original/gcc-2.95/gcc/config/m68k/crti.s Wed Dec 31 18:00:00 1969
--- gcc-2.95/gcc/config/m68k/crti.s Mon Aug 2 12:22:37 1999
***************
*** 0 ****
--- 1,47 ----
+ /* Specialized code needed to support construction and destruction of
+ file-scope objects in C++ and Java code, and to support exception handling.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ Contributed by Charles-Antoine Gauthier (charles.gauthier@iit.nrc.ca).
+
+ 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. */
+
+ /* As a special exception, if you link this library with files
+ compiled with GCC to produce an executable, this does not cause
+ the resulting executable to be covered by the GNU General Public License.
+ This exception does not however invalidate any other reasons why
+ the executable file might be covered by the GNU General Public License. */
+
+ /*
+ * This file just supplies function prologues for the .init and .fini
+ * sections. It is linked in before crtbegin.o.
+ */
+
+ .file "crti.o"
+ .ident "GNU C crti.o"
+
+ .section .init
+ .globl _init
+ .type _init,@function
+ _init:
+ linkw %fp,#0
+
+ .section .fini
+ .globl _fini
+ .type _fini,@function
+ _fini:
+ linkw %fp,#0
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/config/m68k/crtn.s gcc-2.95/gcc/config/m68k/crtn.s
*** /usr1/rtems/work/original/gcc-2.95/gcc/config/m68k/crtn.s Wed Dec 31 18:00:00 1969
--- gcc-2.95/gcc/config/m68k/crtn.s Mon Aug 2 12:22:37 1999
***************
*** 0 ****
--- 1,43 ----
+ /* Specialized code needed to support construction and destruction of
+ file-scope objects in C++ and Java code, and to support exception handling.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ Contributed by Charles-Antoine Gauthier (charles.gauthier@iit.nrc.ca).
+
+ 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. */
+
+ /* As a special exception, if you link this library with files
+ compiled with GCC to produce an executable, this does not cause
+ the resulting executable to be covered by the GNU General Public License.
+ This exception does not however invalidate any other reasons why
+ the executable file might be covered by the GNU General Public License. */
+
+ /*
+ * This file supplies function epilogues for the .init and .fini sections.
+ * It is linked in after all other files.
+ */
+
+ .file "crtn.o"
+ .ident "GNU C crtn.o"
+
+ .section .init
+ unlk %fp
+ rts
+
+ .section .fini
+ unlk %fp
+ rts
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/config/m68k/m68k.c gcc-2.95/gcc/config/m68k/m68k.c
*** /usr1/rtems/work/original/gcc-2.95/gcc/config/m68k/m68k.c Fri Jul 16 02:41:30 1999
--- gcc-2.95/gcc/config/m68k/m68k.c Mon Aug 2 12:24:26 1999
***************
*** 242,251 ****
/* asm_fprintf() cannot handle %. */
#ifdef MOTOROLA
asm_fprintf (stream, "\tsubq.w %0I8,%Rsp\n\tsubq.w %0I%d,%Rsp\n",
! fsize + 4);
#else
asm_fprintf (stream, "\tsubqw %0I8,%Rsp\n\tsubqw %0I%d,%Rsp\n",
! fsize + 4);
#endif
}
else
--- 242,251 ----
/* asm_fprintf() cannot handle %. */
#ifdef MOTOROLA
asm_fprintf (stream, "\tsubq.w %0I8,%Rsp\n\tsubq.w %0I%d,%Rsp\n",
! fsize - 4);
#else
asm_fprintf (stream, "\tsubqw %0I8,%Rsp\n\tsubqw %0I%d,%Rsp\n",
! fsize - 4);
#endif
}
else
***************
*** 790,799 ****
/* asm_fprintf() cannot handle %. */
#ifdef MOTOROLA
asm_fprintf (stream, "\taddq.w %0I8,%Rsp\n\taddq.w %0I%d,%Rsp\n",
! fsize + 4);
#else
asm_fprintf (stream, "\taddqw %0I8,%Rsp\n\taddqw %0I%d,%Rsp\n",
! fsize + 4);
#endif
}
else
--- 790,799 ----
/* asm_fprintf() cannot handle %. */
#ifdef MOTOROLA
asm_fprintf (stream, "\taddq.w %0I8,%Rsp\n\taddq.w %0I%d,%Rsp\n",
! fsize - 4);
#else
asm_fprintf (stream, "\taddqw %0I8,%Rsp\n\taddqw %0I%d,%Rsp\n",
! fsize - 4);
#endif
}
else
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/config/m68k/rtemself.h gcc-2.95/gcc/config/m68k/rtemself.h
*** /usr1/rtems/work/original/gcc-2.95/gcc/config/m68k/rtemself.h Wed Dec 31 18:00:00 1969
--- gcc-2.95/gcc/config/m68k/rtemself.h Mon Aug 2 12:22:37 1999
***************
*** 0 ****
--- 1,67 ----
+ /* Definitions for rtems targeting a Motorola m68k using elf.
+ Copyright (C) 1999, National Research Council of Canada.
+ Contributed by Charles-Antoine Gauthier (charles.gauthier@nrc.ca).
+
+ 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 MOTOROLA /* Use Motorola syntax rather than MIT. */
+
+ #include "m68k/m68020-elf.h"
+
+ /* Specify predefined symbols in preprocessor. */
+
+ #undef CPP_PREDEFINES
+ #define CPP_PREDEFINES "-Dmc68000 -Drtems -D__rtems__ -D__ELF__ \
+ -Asystem(rtems) -Acpu(mc68000) -Acpu(m68k) -Amachine(m68k)"
+
+ /* Generate calls to memcpy, memcmp and memset. */
+ #ifndef TARGET_MEM_FUNCTIONS
+ #define TARGET_MEM_FUNCTIONS
+ #endif
+
+ /*
+ * Each RTEMS BSP provides its own crt0 and linker script. Unfortunately
+ * this means that crt0 and the linker script are not available as
+ * each tool is configured. Without a crt0 and linker script, m68k ELF
+ * targets do not successfully link "conftest.c" during the configuration
+ * process. RTEMS supplies a crt0.c that provides all the symbols required
+ * to successfully link a program. The resulting program will not run
+ * but this is enough to satisfy the autoconf macro AC_PROG_CC.
+ * Override STARTFILE_SPEC to use the fake crt0.o supplied by rtems.
+ */
+ #undef STARTFILE_SPEC
+ #define STARTFILE_SPEC "crt0.o%s"
+
+ /*
+ * Redefine INIT_SECTION_ASM_OP and FINI_SECTION_ASM_OP. This is the easiest
+ * way to process constructors, destructors, and the exception frame
+ * information at startup.
+ */
+ #undef INIT_SECTION_ASM_OP
+ #define INIT_SECTION_ASM_OP ".section\t.init"
+ #undef FINI_SECTION_ASM_OP
+ #define FINI_SECTION_ASM_OP ".section\t.fini"
+
+ #undef EH_FRAME_SECTION_ASM_OP
+ #define EH_FRAME_SECTION_ASM_OP ".section\t.eh_frame"
+
+ /* Do I need this? */
+ #undef INVOKE__main
+
+
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/config/m68k/t-crtstuff gcc-2.95/gcc/config/m68k/t-crtstuff
*** /usr1/rtems/work/original/gcc-2.95/gcc/config/m68k/t-crtstuff Wed Dec 31 18:00:00 1969
--- gcc-2.95/gcc/config/m68k/t-crtstuff Mon Aug 2 12:22:37 1999
***************
*** 0 ****
--- 1,11 ----
+ # from ../t-svr4
+ EXTRA_PARTS=crtbegin.o crtend.o crti.o crtn.o
+
+ # Add flags here as required.
+ CRTSTUFF_T_CFLAGS =
+
+ # Assemble startup files.
+ crti.o: $(srcdir)/config/m68k/crti.s $(GCC_PASSES)
+ $(GCC_FOR_TARGET) -c -o crti.o $(srcdir)/config/m68k/crti.s
+ crtn.o: $(srcdir)/config/m68k/crtn.s $(GCC_PASSES)
+ $(GCC_FOR_TARGET) -c -o crtn.o $(srcdir)/config/m68k/crtn.s
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/config/sh/sh.c gcc-2.95/gcc/config/sh/sh.c
*** /usr1/rtems/work/original/gcc-2.95/gcc/config/sh/sh.c Wed Mar 10 05:07:30 1999
--- gcc-2.95/gcc/config/sh/sh.c Tue Aug 3 08:19:17 1999
***************
*** 2641,2647 ****
for (insn = first; insn; insn = NEXT_INSN (insn))
{
! rtx vec_lab, pat, prev, prevpat, x;
if (GET_CODE (insn) != JUMP_INSN
|| GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC)
--- 2641,2647 ----
for (insn = first; insn; insn = NEXT_INSN (insn))
{
! rtx vec_lab, pat, prev, prevpat, x, braf_label;
if (GET_CODE (insn) != JUMP_INSN
|| GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC)
***************
*** 2664,2673 ****
if (GET_CODE (x) == LABEL_REF && XEXP (x, 0) == vec_lab)
break;
}
/* Fix up the ADDR_DIF_VEC to be relative
to the reference address of the braf. */
! XEXP (XEXP (pat, 0), 0)
! = XEXP (XEXP (SET_SRC (XVECEXP (prevpat, 0, 0)), 1), 0);
}
}
--- 2664,2678 ----
if (GET_CODE (x) == LABEL_REF && XEXP (x, 0) == vec_lab)
break;
}
+
+ /* Emit the reference label of the braf where it belongs, right after
+ the casesi_jump_2 (i.e. braf). */
+ braf_label = XEXP (XEXP (SET_SRC (XVECEXP (prevpat, 0, 0)), 1), 0);
+ emit_label_after (braf_label, prev);
+
/* Fix up the ADDR_DIF_VEC to be relative
to the reference address of the braf. */
! XEXP (XEXP (pat, 0), 0) = braf_label;
}
}
***************
*** 4301,4329 ****
REAL_VALUE_FROM_CONST_DOUBLE (r, op);
return REAL_VALUES_EQUAL (r, dconst1);
- }
-
- int
- braf_label_ref_operand(op, mode)
- rtx op;
- enum machine_mode mode;
- {
- rtx prev;
-
- if (GET_CODE (op) != LABEL_REF)
- return 0;
- prev = prev_real_insn (XEXP (op, 0));
- if (GET_CODE (prev) != JUMP_INSN)
- return 0;
- prev = PATTERN (prev);
- if (GET_CODE (prev) != PARALLEL || XVECLEN (prev, 0) != 2)
- return 0;
- prev = XVECEXP (prev, 0, 0);
- if (GET_CODE (prev) != SET)
- return 0;
- prev = SET_SRC (prev);
- if (GET_CODE (prev) != PLUS || XEXP (prev, 1) != op)
- return 0;
}
int
--- 4306,4311 ----
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/config/sh/sh.h gcc-2.95/gcc/config/sh/sh.h
*** /usr1/rtems/work/original/gcc-2.95/gcc/config/sh/sh.h Fri Mar 5 05:28:33 1999
--- gcc-2.95/gcc/config/sh/sh.h Tue Aug 3 08:19:23 1999
***************
*** 2120,2126 ****
{"arith_reg_operand", {SUBREG, REG}}, \
{"arith_reg_or_0_operand", {SUBREG, REG, CONST_INT}}, \
{"binary_float_operator", {PLUS, MULT}}, \
- {"braf_label_ref_operand", {LABEL_REF}}, \
{"commutative_float_operator", {PLUS, MULT}}, \
{"fp_arith_reg_operand", {SUBREG, REG}}, \
{"fp_extended_operand", {SUBREG, REG, FLOAT_EXTEND}}, \
--- 2120,2125 ----
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/config/sh/sh.md gcc-2.95/gcc/config/sh/sh.md
*** /usr1/rtems/work/original/gcc-2.95/gcc/config/sh/sh.md Tue Apr 27 07:23:20 1999
--- gcc-2.95/gcc/config/sh/sh.md Tue Aug 3 08:19:19 1999
***************
*** 3203,3221 ****
;; For all later processors.
(define_insn "casesi_jump_2"
[(set (pc) (plus:SI (match_operand:SI 0 "register_operand" "r")
! (match_operand 1 "braf_label_ref_operand" "")))
(use (label_ref (match_operand 2 "" "")))]
! ""
"braf %0%#"
[(set_attr "needs_delay_slot" "yes")
(set_attr "type" "jump_ind")])
- (define_insn "dummy_jump"
- [(set (pc) (const_int 0))]
- ""
- ""
- [(set_attr "length" "0")])
-
;; Call subroutine returning any type.
;; ??? This probably doesn't work.
--- 3203,3215 ----
;; For all later processors.
(define_insn "casesi_jump_2"
[(set (pc) (plus:SI (match_operand:SI 0 "register_operand" "r")
! (label_ref (match_operand 1 "" ""))))
(use (label_ref (match_operand 2 "" "")))]
! "! INSN_UID (operands[1]) || prev_real_insn (operands[1]) == insn"
"braf %0%#"
[(set_attr "needs_delay_slot" "yes")
(set_attr "type" "jump_ind")])
;; Call subroutine returning any type.
;; ??? This probably doesn't work.
***************
*** 3302,3321 ****
reg));
emit_insn (gen_casesi_worker_0 (reg2, reg, operands[3]));
if (TARGET_SH2)
! {
! rtx lab = gen_label_rtx ();
! emit_jump_insn (gen_casesi_jump_2 (reg2,
! gen_rtx (LABEL_REF, VOIDmode, lab),
! operands[3]));
! emit_label (lab);
! /* Put a fake jump after the label, lest some optimization might
! delete the barrier and LAB. */
! emit_jump_insn (gen_dummy_jump ());
! }
else
! {
! emit_jump_insn (gen_casesi_jump_1 (reg2, operands[3]));
! }
/* For SH2 and newer, the ADDR_DIFF_VEC is not actually relative to
operands[3], but to lab. We will fix this up in
machine_dependent_reorg. */
--- 3296,3304 ----
reg));
emit_insn (gen_casesi_worker_0 (reg2, reg, operands[3]));
if (TARGET_SH2)
! emit_jump_insn (gen_casesi_jump_2 (reg2, gen_label_rtx (), operands[3]));
else
! emit_jump_insn (gen_casesi_jump_1 (reg2, operands[3]));
/* For SH2 and newer, the ADDR_DIFF_VEC is not actually relative to
operands[3], but to lab. We will fix this up in
machine_dependent_reorg. */
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/config/sparc/rtemself.h gcc-2.95/gcc/config/sparc/rtemself.h
*** /usr1/rtems/work/original/gcc-2.95/gcc/config/sparc/rtemself.h Wed Dec 31 18:00:00 1969
--- gcc-2.95/gcc/config/sparc/rtemself.h Mon Aug 2 12:22:37 1999
***************
*** 0 ****
--- 1,35 ----
+ /* Definitions for rtems targeting a SPARC using a.out.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (joel@OARcorp.com).
+
+ 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. */
+
+ #include "sparc/elf.h"
+
+ /* Specify predefined symbols in preprocessor. */
+
+ #undef CPP_PREDEFINES
+ #define CPP_PREDEFINES "-Dsparc -D__GCC_NEW_VARARGS__ -Drtems -D__rtems__ \
+ -Asystem(rtems) -Acpu(sparc) -Amachine(sparc)"
+
+ /* Generate calls to memcpy, memcmp and memset. */
+ #ifndef TARGET_MEM_FUNCTIONS
+ #define TARGET_MEM_FUNCTIONS
+ #endif
+
+ /* end of sparc/rtems.h */
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/configure.in gcc-2.95/gcc/configure.in
*** /usr1/rtems/work/original/gcc-2.95/gcc/configure.in Tue Jul 13 19:39:26 1999
--- gcc-2.95/gcc/configure.in Wed Aug 4 13:06:32 1999
***************
*** 1327,1340 ****
tmake_file="i386/t-go32 t-rtems"
;;
changequote(,)dnl
! i[34567]86-*-rtemself*)
changequote([,])dnl
cpu_type=i386
tm_file=i386/rtemself.h
! tmake_file="i386/t-i386bare t-rtems"
;;
changequote(,)dnl
! i[34567]86-*-rtems*)
changequote([,])dnl
cpu_type=i386
tm_file=i386/rtems.h
--- 1327,1341 ----
tmake_file="i386/t-go32 t-rtems"
;;
changequote(,)dnl
! i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
changequote([,])dnl
cpu_type=i386
tm_file=i386/rtemself.h
! extra_parts="crtbegin.o crtend.o crti.o crtn.o"
! tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
;;
changequote(,)dnl
! i[34567]86-*-rtemscoff*)
changequote([,])dnl
cpu_type=i386
tm_file=i386/rtems.h
***************
*** 2100,2112 ****
extra_headers=math-68881.h
float_format=m68k
;;
! m68k-*-rtems*)
tmake_file="m68k/t-m68kbare t-rtems"
tm_file=m68k/rtems.h
extra_headers=math-68881.h
float_format=m68k
;;
-
m88k-dg-dgux*)
case $machine in
m88k-dg-dguxbcs*)
--- 2101,2118 ----
extra_headers=math-68881.h
float_format=m68k
;;
! m68k-*-rtemself*)
! tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff"
! tm_file=m68k/rtemself.h
! extra_headers=math-68881.h
! float_format=m68k
! ;;
! m68k-*-rtemscoff*|m68k-*-rtems*)
tmake_file="m68k/t-m68kbare t-rtems"
tm_file=m68k/rtems.h
extra_headers=math-68881.h
float_format=m68k
;;
m88k-dg-dgux*)
case $machine in
m88k-dg-dguxbcs*)
***************
*** 2631,2637 ****
;;
mips64orion-*-rtems*)
tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
! tmake_file="mips/t-ecoff t-rtems"
;;
mipstx39el-*-elf*)
tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
--- 2637,2644 ----
;;
mips64orion-*-rtems*)
tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
! tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
! tmake_file="mips/t-elf t-rtems"
;;
mipstx39el-*-elf*)
tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
***************
*** 3076,3082 ****
tmake_file=sparc/t-sunos41
xmake_file=x-lynx
;;
! sparc-*-rtems*)
tmake_file="sparc/t-sparcbare t-rtems"
tm_file=sparc/rtems.h
;;
--- 3083,3096 ----
tmake_file=sparc/t-sunos41
xmake_file=x-lynx
;;
! sparc-*-rtems*|sparc-*-rtemself*)
! tm_file="sparc/rtemself.h"
! tmake_file="sparc/t-elf t-rtems"
! extra_parts="crti.o crtn.o crtbegin.o crtend.o"
! #float_format=i128
! float_format=i64
! ;;
! sparc-*-rtemsaout*)
tmake_file="sparc/t-sparcbare t-rtems"
tm_file=sparc/rtems.h
;;
diff -N -P -r -c /usr1/rtems/work/original/gcc-2.95/gcc/t-elf gcc-2.95/gcc/t-elf
*** /usr1/rtems/work/original/gcc-2.95/gcc/t-elf Wed Dec 31 18:00:00 1969
--- gcc-2.95/gcc/t-elf Mon Aug 2 12:22:37 1999
***************
*** 0 ****
--- 1,96 ----
+ CONFIG2_H = $(srcdir)/config/mips/ecoff.h
+
+ # We have a premade insn-attrtab.c to save the hour it takes to run genattrtab.
+ # PREMADE_ATTRTAB = $(srcdir)/config/mips/mips-at.c
+ # PREMADE_ATTRTAB_MD = $(srcdir)/config/mips/mips-at.md
+
+ # Suppress building libgcc1.a, since the MIPS compiler port is complete
+ # and does not need anything from libgcc1.a.
+ LIBGCC1 =
+
+ EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
+ # Don't let CTOR_LIST end up in sdata section.
+ CRTSTUFF_T_CFLAGS = -G 0
+
+ # When building a cross compiler, put the mips16 support functions in
+ # libgcc1.a.
+ CROSS_LIBGCC1 = libgcc1-asm.a
+ LIB1ASMSRC = mips/mips16.S
+ LIB1ASMFUNCS = _m16addsf3 _m16subsf3 _m16mulsf3 _m16divsf3 \
+ _m16eqsf2 _m16nesf2 _m16gtsf2 _m16gesf2 _m16lesf2 _m16ltsf2 \
+ _m16fltsisf _m16fixsfsi \
+ _m16adddf3 _m16subdf3 _m16muldf3 _m16divdf3 \
+ _m16extsfdf2 _m16trdfsf2 \
+ _m16eqdf2 _m16nedf2 _m16gtdf2 _m16gedf2 _m16ledf2 _m16ltdf2 \
+ _m16fltsidf _m16fixdfsi \
+ _m16retsf _m16retdf \
+ _m16stub1 _m16stub2 _m16stub5 _m16stub6 _m16stub9 _m16stub10 \
+ _m16stubsf0 _m16stubsf1 _m16stubsf2 _m16stubsf5 _m16stubsf6 \
+ _m16stubsf9 _m16stubsf10 \
+ _m16stubdf0 _m16stubdf1 _m16stubdf2 _m16stubdf5 _m16stubdf6 \
+ _m16stubdf9 _m16stubdf10
+
+ # We must build libgcc2.a with -G 0, in case the user wants to link
+ # without the $gp register.
+ TARGET_LIBGCC2_CFLAGS = -G 0
+
+ # fp-bit and dp-bit are really part of libgcc1, but this will cause
+ # them to be built correctly, so... [taken from t-sparclite]
+ LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
+
+ dp-bit.c: $(srcdir)/config/fp-bit.c
+ echo '#ifdef __MIPSEL__' > dp-bit.c
+ echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
+ echo '#endif' >> dp-bit.c
+ echo '#define US_SOFTWARE_GOFAST' >> dp-bit.c
+ cat $(srcdir)/config/fp-bit.c >> dp-bit.c
+
+ fp-bit.c: $(srcdir)/config/fp-bit.c
+ echo '#define FLOAT' > fp-bit.c
+ echo '#ifdef __MIPSEL__' >> fp-bit.c
+ echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
+ echo '#endif' >> fp-bit.c
+ echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c
+ cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+
+ # Build the libraries for both hard and soft floating point
+
+ MULTILIB_OPTIONS = msoft-float/msingle-float EL/EB mips1/mips3
+ MULTILIB_DIRNAMES = soft-float single el eb mips1 mips3
+ MULTILIB_MATCHES = msingle-float=m4650
+
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
+
+ # Add additional dependencies to recompile selected modules whenever the
+ # tm.h file changes. The files compiled are:
+ #
+ # gcc.c (*_SPEC changes)
+ # toplev.c (new switches + assembly output changes)
+ # sdbout.c (debug format changes)
+ # dbxout.c (debug format changes)
+ # dwarfout.c (debug format changes)
+ # final.c (assembly output changes)
+ # varasm.c (assembly output changes)
+ # cse.c (cost functions)
+ # insn-output.c (possible ifdef changes in tm.h)
+ # regclass.c (fixed/call used register changes)
+ # cccp.c (new preprocessor macros, -v version #)
+ # explow.c (GO_IF_LEGITIMATE_ADDRESS)
+ # recog.c (GO_IF_LEGITIMATE_ADDRESS)
+ # reload.c (GO_IF_LEGITIMATE_ADDRESS)
+
+ gcc.o: $(CONFIG2_H)
+ toplev.o: $(CONFIG2_H)
+ sdbout.o: $(CONFIG2_H)
+ dbxout.o: $(CONFIG2_H)
+ dwarfout.o: $(CONFIG2_H)
+ final.o: $(CONFIG2_H)
+ varasm.o: $(CONFIG2_H)
+ cse.o: $(CONFIG2_H)
+ insn-output.o: $(CONFIG2_H)
+ regclass.o: $(CONFIG2_H)
+ cccp.o: $(CONFIG2_H)
+ explow.o: $(CONFIG2_H)
+ recog.o: $(CONFIG2_H)
+ reload.o: $(CONFIG2_H)