[llvm-commits] [llvm-gcc] [PATCH] psp allegrex support

Eric Christopher echristo at apple.com
Fri Jun 27 15:05:51 PDT 2008


On Jun 27, 2008, at 12:06 PM, Bruno Cardoso Lopes wrote:

> <allegrex.patch>

+mipsallegrex-*-elf* | mipsallegrexel-*-elf*)

Why not just mipsallegrex*?

+	tm_defines="MIPS_ISA_DEFAULT=2 MIPS_CPU_STRING_DEFAULT=\\\"allegrex\\ 
\" MIPS_ABI_DEFAULT=ABI_EABI"

you want:

tm_defines="${tm_defines} ...."

-    mips-*-*) echo mips;; \
-    mipsel-*-*) echo mipsel;; \
+    mips*el-*-*) echo mipsel;; \
+    mips*-*-*) echo mips;; \

If this change is needed then something is wrong.

+++ gcc/config/mips/t-allegrex	(revision 0)

You could just require --disable-multilibs and use t-elf, but that's  
not a big deal.

+#undef SUBTARGET_CPP_SPEC
+#define SUBTARGET_CPP_SPEC "-DPSP=1 -D__psp__=1 -D_PSP=1"

This needs to go into TARGET_CPU_CPP_BUILTINS().

You also need to define a PROCESSOR_TYPE and mask for the processor.  
That will make any other defines you need in the backend much easier  
to deal with (and enable you to do the above bits).

-eric



More information about the llvm-commits mailing list