OSDN Git Service

* config/spu/t-spu-elf (LIB2_SIDITI_CONV_FUNC): Define.
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Dec 2010 18:12:23 +0000 (18:12 +0000)
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Dec 2010 18:12:23 +0000 (18:12 +0000)
* config/spu/spu.h (MIN_UNITS_PER_WORD): Do not define.
(LIBGCC2_UNITS_PER_WORD): Define if not already defined.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167950 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/spu/spu.h
gcc/config/spu/t-spu-elf

index 7a64192..18eaa23 100644 (file)
@@ -1,3 +1,9 @@
+2010-12-16  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
+
+       * config/spu/t-spu-elf (LIB2_SIDITI_CONV_FUNC): Define.
+       * config/spu/spu.h (MIN_UNITS_PER_WORD): Do not define.
+       (LIBGCC2_UNITS_PER_WORD): Define if not already defined.
+
 2010-12-16  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/46893
index 234ff49..d56a52b 100644 (file)
@@ -65,9 +65,16 @@ extern GTY(()) int spu_tune;
 
 #define UNITS_PER_WORD (BITS_PER_WORD/BITS_PER_UNIT)
 
-/* We never actually change UNITS_PER_WORD, but defining this causes
-   libgcc to use some different sizes of types when compiling. */
-#define MIN_UNITS_PER_WORD 4
+/* When building libgcc, we need to assume 4 words per units even
+   though UNITS_PER_WORD is 16, because the SPU has basically a 32-bit
+   instruction set although register size is 128 bits.  In particular,
+   this causes libgcc to contain __divdi3 instead of __divti3 etc.
+   However, we allow this default to be re-defined on the command
+   line, so that we can use the LIB2_SIDITI_CONV_FUNCS mechanism
+   to get (in addition) TImode versions of some routines.  */
+#ifndef LIBGCC2_UNITS_PER_WORD
+#define LIBGCC2_UNITS_PER_WORD 4
+#endif
 
 #define POINTER_SIZE 32
 
index 3bb54e4..341a5aa 100644 (file)
@@ -61,6 +61,10 @@ fp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/spu/t-spu-elf
        echo '#define FLOAT' > fp-bit.c
        cat $(srcdir)/config/fp-bit.c >> fp-bit.c
 
+# Build TImode conversion routines to support Fortran 128-bit
+# integer data types.
+LIB2_SIDITI_CONV_FUNCS=yes
+
 # Don't let CTOR_LIST end up in sdata section.
 CRTSTUFF_T_CFLAGS =