[llvm-commits] [llvm-gcc-4.2] r53147 - in /llvm-gcc-4.2/trunk: config.sub gcc/Makefile.in gcc/config.gcc gcc/config/mips/mips.c gcc/config/mips/mips.h gcc/config/mips/psp.h gcc/config/mips/t-allegrex
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Sat Jul 5 12:08:31 PDT 2008
Author: bruno
Date: Sat Jul 5 14:08:31 2008
New Revision: 53147
URL: http://llvm.org/viewvc/llvm-project?rev=53147&view=rev
Log:
Mips allegrex core support.
Added:
llvm-gcc-4.2/trunk/gcc/config/mips/psp.h
llvm-gcc-4.2/trunk/gcc/config/mips/t-allegrex
Modified:
llvm-gcc-4.2/trunk/config.sub
llvm-gcc-4.2/trunk/gcc/Makefile.in
llvm-gcc-4.2/trunk/gcc/config.gcc
llvm-gcc-4.2/trunk/gcc/config/mips/mips.c
llvm-gcc-4.2/trunk/gcc/config/mips/mips.h
Modified: llvm-gcc-4.2/trunk/config.sub
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/config.sub?rev=53147&r1=53146&r2=53147&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/config.sub (original)
+++ llvm-gcc-4.2/trunk/config.sub Sat Jul 5 14:08:31 2008
@@ -267,6 +267,7 @@
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
+ | mipsallegrex | mipsallegrexel \
| mn10200 | mn10300 \
| mt \
| msp430 \
@@ -348,6 +349,7 @@
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
+ | mipsallegrex-* | mipsallegrexel-* \
| mmix-* \
| mt-* \
| msp430-* \
@@ -690,6 +692,10 @@
basic_machine=m68k-atari
os=-mint
;;
+ psp)
+ basic_machine=mipsallegrexel-psp
+ os=-elf
+ ;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
Modified: llvm-gcc-4.2/trunk/gcc/Makefile.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/Makefile.in?rev=53147&r1=53146&r2=53147&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/Makefile.in (original)
+++ llvm-gcc-4.2/trunk/gcc/Makefile.in Sat Jul 5 14:08:31 2008
@@ -1140,8 +1140,7 @@
ia64-*-*) echo ia64;; \
i[34567]86-*-*) echo x86;; \
x86_64-*-*) echo x86;; \
- mips-*-*) echo mips;; \
- mipsel-*-*) echo mipsel;; \
+ mips*-*-*) echo mips;; \
powerpc*-*-*) echo powerpc;; \
sparc-*-*) echo sparc;; \
sparcv9-*-*) echo sparc;; \
Modified: llvm-gcc-4.2/trunk/gcc/config.gcc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config.gcc?rev=53147&r1=53146&r2=53147&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config.gcc (original)
+++ llvm-gcc-4.2/trunk/gcc/config.gcc Sat Jul 5 14:08:31 2008
@@ -1700,6 +1700,18 @@
tmake_file=mips/t-r3900
use_fixproto=yes
;;
+mipsallegrex*)
+ tm_file="elfos.h ${tm_file} mips/elf.h"
+ tmake_file=mips/t-allegrex
+ target_cpu_default="MASK_SINGLE_FLOAT|MASK_DIVIDE_BREAKS"
+ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=2 MIPS_CPU_STRING_DEFAULT=\\\"allegrex\\\" MIPS_ABI_DEFAULT=ABI_EABI"
+ case ${target} in
+ mipsallegrex*-psp-elf*)
+ tm_file="${tm_file} mips/psp.h"
+ ;;
+ esac
+ use_fixproto=yes
+ ;;
mmix-knuth-mmixware)
need_64bit_hwint=yes
;;
Modified: llvm-gcc-4.2/trunk/gcc/config/mips/mips.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/mips/mips.c?rev=53147&r1=53146&r2=53147&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/mips/mips.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/mips/mips.c Sat Jul 5 14:08:31 2008
@@ -721,6 +721,7 @@
/* MIPS II */
{ "r6000", PROCESSOR_R6000, 2 },
+ { "allegrex", PROCESSOR_ALLEGREX, 2 },
/* MIPS III */
{ "r4000", PROCESSOR_R4000, 3 },
Modified: llvm-gcc-4.2/trunk/gcc/config/mips/mips.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/mips/mips.h?rev=53147&r1=53146&r2=53147&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/mips/mips.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/mips/mips.h Sat Jul 5 14:08:31 2008
@@ -60,6 +60,7 @@
PROCESSOR_SB1,
PROCESSOR_SB1A,
PROCESSOR_SR71000,
+ PROCESSOR_ALLEGREX,
PROCESSOR_MAX
};
@@ -212,6 +213,7 @@
#define TARGET_SB1 (mips_arch == PROCESSOR_SB1 \
|| mips_arch == PROCESSOR_SB1A)
#define TARGET_SR71K (mips_arch == PROCESSOR_SR71000)
+#define TARGET_ALLEGREX (mips_arch == PROCESSOR_ALLEGREX)
/* Scheduling target defines. */
#define TUNE_MIPS3000 (mips_tune == PROCESSOR_R3000)
@@ -227,6 +229,7 @@
#define TUNE_MIPS9000 (mips_tune == PROCESSOR_R9000)
#define TUNE_SB1 (mips_tune == PROCESSOR_SB1 \
|| mips_tune == PROCESSOR_SB1A)
+#define TUNE_ALLEGREX (mips_tune == PROCESSOR_ALLEGREX)
/* True if the pre-reload scheduler should try to create chains of
multiply-add or multiply-subtract instructions. For example,
@@ -270,6 +273,9 @@
#define TARGET_IRIX 0
#define TARGET_IRIX6 0
+/* PSP */
+#define TARGET_PSP 0
+
/* Define preprocessor macros for the -march and -mtune options.
PREFIX is either _MIPS_ARCH or _MIPS_TUNE, INFO is the selected
processor. If INFO's canonical name is "foo", define PREFIX to
@@ -339,6 +345,13 @@
if (TARGET_DSP) \
builtin_define ("__mips_dsp"); \
\
+ if (TARGET_PSP) \
+ { \
+ builtin_define ("PSP=1"); \
+ builtin_define ("__psp__=1"); \
+ builtin_define ("_PSP=1"); \
+ } \
+ \
MIPS_CPP_SET_PROCESSOR ("_MIPS_ARCH", mips_arch_info); \
MIPS_CPP_SET_PROCESSOR ("_MIPS_TUNE", mips_tune_info); \
\
Added: llvm-gcc-4.2/trunk/gcc/config/mips/psp.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/mips/psp.h?rev=53147&view=auto
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/mips/psp.h (added)
+++ llvm-gcc-4.2/trunk/gcc/config/mips/psp.h Sat Jul 5 14:08:31 2008
@@ -0,0 +1,31 @@
+/* Support for Sony's Playstation Portable (PSP).
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ Contributed by Marcus R. Brown <mrbrown at ocgnet.org>
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#undef TARGET_PSP
+#define TARGET_PSP 1
+
+/* Override the startfile spec to include crt0.o. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "crt0%O%s crti%O%s crtbegin%O%s"
+
+/* Get rid of the .pdr section. */
+#undef SUBTARGET_ASM_SPEC
+#define SUBTARGET_ASM_SPEC "-mno-pdr"
Added: llvm-gcc-4.2/trunk/gcc/config/mips/t-allegrex
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/mips/t-allegrex?rev=53147&view=auto
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/mips/t-allegrex (added)
+++ llvm-gcc-4.2/trunk/gcc/config/mips/t-allegrex Sat Jul 5 14:08:31 2008
@@ -0,0 +1,29 @@
+# Suppress building libgcc1.a, since the MIPS compiler port is complete
+# and does not need anything from libgcc1.a.
+LIBGCC1 =
+CROSS_LIBGCC1 =
+
+EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o
+# Don't let CTOR_LIST end up in sdata section.
+CRTSTUFF_T_CFLAGS = -G 0
+
+# Assemble startup files.
+$(T)crti.o: $(srcdir)/config/mips/crti.asm $(GCC_PASSES)
+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
+ -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mips/crti.asm
+
+$(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES)
+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
+ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm
+
+# We must build libgcc2.a with -G 0, in case the user wants to link
+# without the $gp register.
+TARGET_LIBGCC2_CFLAGS = -G 0
+
+# Build the libraries for both hard and soft floating point
+
+MULTILIB_OPTIONS =
+MULTILIB_DIRNAMES =
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
More information about the llvm-commits
mailing list