Source: libgc
Tags: upstream patch
User: helm...@debian.org
Usertags: rebootstrap

Please support the tilegx architecture in libgc. Mallanox published
their work[1] on tilegx and include a patch bundle[2] affecting multiple
source packages including libgc. I am attaching their gc.fixup which
still applies to libgc today. That makes libgc build, but it still lacks
symbols for tilegx. Fortunately, the symbols are exactly the same as on
arm64, so the following command can be used to update symbols:

    sed -i -e '/^ /s/=\(!\?\)arm64 /&\1tilegx /' debian/libgc1c2.symbols

Please apply the attached patch and update the symbols. Maybe Chris
Metcalf (included in X-Debbugs-Cc) can help upstream it.

Helmut

[1] http://www.mellanox.com/repository/solutions/tile-scm/source.html
[2] http://www.mellanox.com/repository/solutions/tile-scm/tilera.tar.xz
--- /home/packages/gcc-4.4.7-3-java/boehm-gc/include/private/gcconfig.h 
2010-06-11 05:07:17.000000000 -0400
+++ ./include/private/gcconfig.h        2011-10-07 14:02:01.956362000 -0400
@@ -460,6 +460,15 @@
 #     define  mach_type_known
 #    endif 
 # endif
+# if defined(__tile__) && defined(LINUX)
+#  ifdef __tilegx__
+#    define TILEGX
+#  else
+#    define TILEPRO
+#  endif
+#  define mach_type_known
+# endif
+
 
 /* Feel free to add more clauses here */
 
@@ -515,6 +524,8 @@
                    /*                  that's called an RS6000.        */
                    /*             CRIS       ==> Axis Etrax            */
                    /*             M32R       ==> Renesas M32R          */
+                   /*             TILEPRO    ==> Tilera TILEPro        */
+                   /*             TILEGX     ==> Tilera TILE-Gx        */
 
 
 /*
@@ -2086,6 +2097,45 @@
 #   endif
 # endif
 
+# ifdef TILEPRO
+#  define MACH_TYPE "TILEPro"
+#  define ALIGNMENT 4
+#  define ALIGN_DOUBLE
+#  define PREFETCH(x) __insn_prefetch(x)
+#  include <arch/chip.h>
+#  define CACHE_LINE_SIZE CHIP_L2_LINE_SIZE()
+#  define USE_GENERIC_PUSH_REGS
+#  ifdef LINUX
+#   define OS_TYPE "LINUX"
+    extern int __data_start[];
+#   define DATASTART (ptr_t)(__data_start)
+#   define LINUX_STACKBOTTOM
+#   define DYNAMIC_LOADING
+#  endif
+# endif
+
+# ifdef TILEGX
+#  define CPP_WORDSZ (__SIZEOF_POINTER__ * 8)
+#  define MACH_TYPE "TILE-Gx"
+#  define ALIGNMENT __SIZEOF_POINTER__
+#  if CPP_WORDSZ < 64
+#   define ALIGN_DOUBLE /* Guarantee 64-bit alignment for allocations. */
+    /* Take advantage of 64-bit stores. */
+#   define CLEAR_DOUBLE(x) ((*(long long *)(x)) = 0)
+#  endif
+#  define PREFETCH(x) __insn_prefetch_l1(x)
+#  include <arch/chip.h>
+#  define CACHE_LINE_SIZE CHIP_L2_LINE_SIZE()
+#  define USE_GENERIC_PUSH_REGS
+#  ifdef LINUX
+#   define OS_TYPE "LINUX"
+    extern int __data_start[];
+#   define DATASTART (ptr_t)(__data_start)
+#   define LINUX_STACKBOTTOM
+#   define DYNAMIC_LOADING
+#  endif
+# endif
+
 #if defined(LINUX) && defined(USE_MMAP)
     /* The kernel may do a somewhat better job merging mappings etc.   */
     /* with anonymous mappings.                                                
*/

Reply via email to