forked from pool/mono-core
Accepting request 225505 from Mono:Factory
- rediff and reactivate ppc.patch - port forward ppc64le fixes from matz: - Add support for ppc64le, fix build warnings, the blocksize changes in mono-core-ppc64le.diff should also help ppc64 proper. Added patches: * mono-core-parallel-build.diff * mono-core-ppc64le-callreg.diff * mono-core-ppc64le-swr11r12.diff * mono-core-ppc64le.diff - no valgrind on aarch64 and s390 (but on s390x) (forwarded request 225490 from oertel) OBS-URL: https://build.opensuse.org/request/show/225505 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mono-core?expand=0&rev=77
This commit is contained in:
commit
62ab75ec11
11
mono-core-parallel-build.diff
Normal file
11
mono-core-parallel-build.diff
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/mcs/Makefile
|
||||
+++ b/mcs/Makefile
|
||||
@@ -82,7 +82,7 @@
|
||||
@:
|
||||
|
||||
dir-check:
|
||||
- @if [ "$(NO_DIR_CHECK)" = "" -a "$(PROFILE)" != "basic" ]; then make -C ../runtime; fi
|
||||
+ @if [ "$(NO_DIR_CHECK)" = "" -a "$(PROFILE)" != "basic" ]; then $(MAKE) -C ../runtime; fi
|
||||
|
||||
# fun specialty targets
|
||||
|
194
mono-core-ppc64le-callreg.diff
Normal file
194
mono-core-ppc64le-callreg.diff
Normal file
@ -0,0 +1,194 @@
|
||||
Use ppc_r12 for some global call sequences
|
||||
|
||||
After the mechanical exchange of ppc_r11 and ppc_r12 we now can use
|
||||
ppc_r12 for global calls to hold the callees address without clobbering
|
||||
r11 (which potentially contains IMT_REG, VTABLE_REG and RGCTX_REG).
|
||||
We don't need to change all indirect calls, only those potentially reaching
|
||||
functions containing a TOC setup based on r12 (in particular functions
|
||||
in shared libs). As the instruction sequence patcher can only deal
|
||||
with one destination register we also need to make some additional
|
||||
calls use r12. We probably should convert all calls that currently
|
||||
use r0 to use r12 if no other conflicts arise but this is enough to build.
|
||||
|
||||
diff -u mono-3.2.3/mono/mini/exceptions-ppc.c mono-3.2.3/mono/mini/exceptions-ppc.c
|
||||
--- mono-3.2.3/mono/mini/exceptions-ppc.c 2014-01-04 19:04:35.000000000 +0000
|
||||
+++ mono-3.2.3/mono/mini/exceptions-ppc.c 2014-01-04 19:32:51.000000000 +0000
|
||||
@@ -395,8 +395,8 @@
|
||||
ppc_bcctrl (code, PPC_BR_ALWAYS, 0);
|
||||
} else {
|
||||
ppc_load (code, ppc_r3, (gulong)mono_defaults.corlib);
|
||||
- ppc_load_func (code, ppc_r0, mono_exception_from_token);
|
||||
- ppc_mtctr (code, ppc_r0);
|
||||
+ ppc_load_func (code, PPC_CALL_REG, mono_exception_from_token);
|
||||
+ ppc_mtctr (code, PPC_CALL_REG);
|
||||
ppc_bcctrl (code, PPC_BR_ALWAYS, 0);
|
||||
}
|
||||
}
|
||||
@@ -430,8 +430,8 @@
|
||||
ppc_mtctr (code, ppc_r12);
|
||||
ppc_bcctrl (code, PPC_BR_ALWAYS, 0);
|
||||
} else {
|
||||
- ppc_load_func (code, ppc_r0, mono_ppc_throw_exception);
|
||||
- ppc_mtctr (code, ppc_r0);
|
||||
+ ppc_load_func (code, PPC_CALL_REG, mono_ppc_throw_exception);
|
||||
+ ppc_mtctr (code, PPC_CALL_REG);
|
||||
ppc_bcctrl (code, PPC_BR_ALWAYS, 0);
|
||||
}
|
||||
/* we should never reach this breakpoint */
|
||||
diff -u mono-3.2.3/mono/mini/mini-ppc.c mono-3.2.3/mono/mini/mini-ppc.c
|
||||
--- mono-3.2.3/mono/mini/mini-ppc.c 2014-01-04 19:16:23.000000000 +0000
|
||||
+++ mono-3.2.3/mono/mini/mini-ppc.c 2014-01-04 19:58:06.000000000 +0000
|
||||
@@ -1783,8 +1783,8 @@
|
||||
|
||||
ppc_load_ptr (code, ppc_r3, cfg->method);
|
||||
ppc_li (code, ppc_r4, 0); /* NULL ebp for now */
|
||||
- ppc_load_func (code, ppc_r0, func);
|
||||
- ppc_mtlr (code, ppc_r0);
|
||||
+ ppc_load_func (code, PPC_CALL_REG, func);
|
||||
+ ppc_mtlr (code, PPC_CALL_REG);
|
||||
ppc_blrl (code);
|
||||
return code;
|
||||
}
|
||||
@@ -1881,8 +1881,8 @@
|
||||
}
|
||||
|
||||
ppc_load_ptr (code, ppc_r3, cfg->method);
|
||||
- ppc_load_func (code, ppc_r0, func);
|
||||
- ppc_mtlr (code, ppc_r0);
|
||||
+ ppc_load_func (code, PPC_CALL_REG, func);
|
||||
+ ppc_mtlr (code, PPC_CALL_REG);
|
||||
ppc_blrl (code);
|
||||
|
||||
switch (save_mode) {
|
||||
@@ -2923,7 +2923,7 @@
|
||||
|
||||
if (!is_fd) {
|
||||
guint8 *buf = (guint8*)&seq [5];
|
||||
- ppc_mr (buf, ppc_r0, ppc_r12);
|
||||
+ ppc_mr (buf, PPC_CALL_REG, ppc_r12);
|
||||
ppc_nop (buf);
|
||||
}
|
||||
} else {
|
||||
@@ -2936,7 +2936,7 @@
|
||||
/* FIXME: we're assuming we're using r12 here */
|
||||
ppc_load_ptr_sequence (code, ppc_r12, target);
|
||||
#else
|
||||
- ppc_load_ptr_sequence (code, ppc_r0, target);
|
||||
+ ppc_load_ptr_sequence (code, PPC_CALL_REG, target);
|
||||
#endif
|
||||
mono_arch_flush_icache ((guint8*)seq, 28);
|
||||
#else
|
||||
@@ -2952,8 +2952,8 @@
|
||||
g_assert ((seq [2] >> 26) == 31);
|
||||
g_assert (seq [3] == 0x4e800021 || seq [3] == 0x4e800020 || seq [3] == 0x4e800420);
|
||||
/* FIXME: make this thread safe */
|
||||
- ppc_lis (code, ppc_r0, (guint32)(target) >> 16);
|
||||
- ppc_ori (code, ppc_r0, ppc_r0, (guint32)(target) & 0xffff);
|
||||
+ ppc_lis (code, PPC_CALL_REG, (guint32)(target) >> 16);
|
||||
+ ppc_ori (code, PPC_CALL_REG, PPC_CALL_REG, (guint32)(target) & 0xffff);
|
||||
mono_arch_flush_icache (code - 8, 8);
|
||||
#endif
|
||||
} else {
|
||||
@@ -3371,8 +3371,8 @@
|
||||
mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_INTERNAL_METHOD,
|
||||
(gpointer)"mono_break");
|
||||
if ((FORCE_INDIR_CALL || cfg->method->dynamic) && !cfg->compile_aot) {
|
||||
- ppc_load_func (code, ppc_r0, 0);
|
||||
- ppc_mtlr (code, ppc_r0);
|
||||
+ ppc_load_func (code, PPC_CALL_REG, 0);
|
||||
+ ppc_mtlr (code, PPC_CALL_REG);
|
||||
ppc_blrl (code);
|
||||
} else {
|
||||
ppc_bl (code, 0);
|
||||
@@ -3819,8 +3819,8 @@
|
||||
else
|
||||
mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_ABS, call->fptr);
|
||||
if ((FORCE_INDIR_CALL || cfg->method->dynamic) && !cfg->compile_aot) {
|
||||
- ppc_load_func (code, ppc_r0, 0);
|
||||
- ppc_mtlr (code, ppc_r0);
|
||||
+ ppc_load_func (code, PPC_CALL_REG, 0);
|
||||
+ ppc_mtlr (code, PPC_CALL_REG);
|
||||
ppc_blrl (code);
|
||||
} else {
|
||||
ppc_bl (code, 0);
|
||||
@@ -3913,8 +3913,8 @@
|
||||
mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_INTERNAL_METHOD,
|
||||
(gpointer)"mono_arch_throw_exception");
|
||||
if ((FORCE_INDIR_CALL || cfg->method->dynamic) && !cfg->compile_aot) {
|
||||
- ppc_load_func (code, ppc_r0, 0);
|
||||
- ppc_mtlr (code, ppc_r0);
|
||||
+ ppc_load_func (code, PPC_CALL_REG, 0);
|
||||
+ ppc_mtlr (code, PPC_CALL_REG);
|
||||
ppc_blrl (code);
|
||||
} else {
|
||||
ppc_bl (code, 0);
|
||||
@@ -3927,8 +3927,8 @@
|
||||
mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_INTERNAL_METHOD,
|
||||
(gpointer)"mono_arch_rethrow_exception");
|
||||
if ((FORCE_INDIR_CALL || cfg->method->dynamic) && !cfg->compile_aot) {
|
||||
- ppc_load_func (code, ppc_r0, 0);
|
||||
- ppc_mtlr (code, ppc_r0);
|
||||
+ ppc_load_func (code, PPC_CALL_REG, 0);
|
||||
+ ppc_mtlr (code, PPC_CALL_REG);
|
||||
ppc_blrl (code);
|
||||
} else {
|
||||
ppc_bl (code, 0);
|
||||
@@ -5070,8 +5070,8 @@
|
||||
mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_INTERNAL_METHOD,
|
||||
(gpointer)"mono_get_lmf_addr");
|
||||
if ((FORCE_INDIR_CALL || cfg->method->dynamic) && !cfg->compile_aot) {
|
||||
- ppc_load_func (code, ppc_r0, 0);
|
||||
- ppc_mtlr (code, ppc_r0);
|
||||
+ ppc_load_func (code, PPC_CALL_REG, 0);
|
||||
+ ppc_mtlr (code, PPC_CALL_REG);
|
||||
ppc_blrl (code);
|
||||
} else {
|
||||
ppc_bl (code, 0);
|
||||
@@ -5380,8 +5380,8 @@
|
||||
patch_info->data.name = "mono_arch_throw_corlib_exception";
|
||||
patch_info->ip.i = code - cfg->native_code;
|
||||
if (FORCE_INDIR_CALL || cfg->method->dynamic) {
|
||||
- ppc_load_func (code, ppc_r0, 0);
|
||||
- ppc_mtctr (code, ppc_r0);
|
||||
+ ppc_load_func (code, PPC_CALL_REG, 0);
|
||||
+ ppc_mtctr (code, PPC_CALL_REG);
|
||||
ppc_bcctr (code, PPC_BR_ALWAYS, 0);
|
||||
} else {
|
||||
ppc_bl (code, 0);
|
||||
diff -u mono-3.2.3/mono/mini/mini-ppc.h mono-3.2.3/mono/mini/mini-ppc.h
|
||||
--- mono-3.2.3/mono/mini/mini-ppc.h 2014-01-04 19:04:36.000000000 +0000
|
||||
+++ mono-3.2.3/mono/mini/mini-ppc.h 2014-01-04 19:27:07.000000000 +0000
|
||||
@@ -172,6 +172,8 @@
|
||||
#define PPC_FIRST_FPARG_REG ppc_f1
|
||||
#endif
|
||||
|
||||
+#define PPC_CALL_REG ppc_r12
|
||||
+
|
||||
#if defined(HAVE_WORKING_SIGALTSTACK) && !defined(__APPLE__)
|
||||
#define MONO_ARCH_SIGSEGV_ON_ALTSTACK 1
|
||||
#define MONO_ARCH_SIGNAL_STACK_SIZE (12 * 1024)
|
||||
diff -u mono-3.2.3/mono/mini/tramp-ppc.c mono-3.2.3/mono/mini/tramp-ppc.c
|
||||
--- mono-3.2.3/mono/mini/tramp-ppc.c 2014-01-04 19:16:53.000000000 +0000
|
||||
+++ mono-3.2.3/mono/mini/tramp-ppc.c 2014-01-04 19:35:16.000000000 +0000
|
||||
@@ -309,8 +309,8 @@
|
||||
ppc_mtlr (code, ppc_r12);
|
||||
ppc_blrl (code);
|
||||
} else {
|
||||
- ppc_load_func (code, ppc_r0, mono_get_lmf_addr);
|
||||
- ppc_mtlr (code, ppc_r0);
|
||||
+ ppc_load_func (code, PPC_CALL_REG, mono_get_lmf_addr);
|
||||
+ ppc_mtlr (code, PPC_CALL_REG);
|
||||
ppc_blrl (code);
|
||||
}
|
||||
/* we build the MonoLMF structure on the stack - see mini-ppc.h
|
||||
@@ -371,8 +371,8 @@
|
||||
ppc_blrl (code);
|
||||
} else {
|
||||
tramp_handler = mono_get_trampoline_func (tramp_type);
|
||||
- ppc_load_func (code, ppc_r0, tramp_handler);
|
||||
- ppc_mtlr (code, ppc_r0);
|
||||
+ ppc_load_func (code, PPC_CALL_REG, tramp_handler);
|
||||
+ ppc_mtlr (code, PPC_CALL_REG);
|
||||
ppc_blrl (code);
|
||||
}
|
||||
|
1161
mono-core-ppc64le-swr11r12.diff
Normal file
1161
mono-core-ppc64le-swr11r12.diff
Normal file
File diff suppressed because it is too large
Load Diff
247
mono-core-ppc64le.diff
Normal file
247
mono-core-ppc64le.diff
Normal file
@ -0,0 +1,247 @@
|
||||
Basic ppc64le support
|
||||
|
||||
This adds initial support for ppc64le to the ppc64 port. That is:
|
||||
* little endian aware (also in strtod),
|
||||
* and ELFv2 aware (not using function descriptors)
|
||||
* adjust various block sizes to be multiple of 64k, the default
|
||||
pagesize on ppc64le. The sources should have used the system function
|
||||
to ensure alignment on pagesize, so this is just a stop-gap
|
||||
|
||||
It also corrects the list of registers for the precise GC, but that isn't
|
||||
used in mini at all on any architecture currently.
|
||||
|
||||
diff -x 'Makefile*' -x 'config*' -x '*.m4' -urp mono-3.2.3.orig/mono/arch/ppc/ppc-codegen.h mono-3.2.3/mono/arch/ppc/ppc-codegen.h
|
||||
--- mono-3.2.3.orig/mono/arch/ppc/ppc-codegen.h 2013-09-13 22:21:32.000000000 +0000
|
||||
+++ mono-3.2.3/mono/arch/ppc/ppc-codegen.h 2014-01-03 18:39:09.000000000 +0000
|
||||
@@ -123,7 +123,7 @@ enum {
|
||||
PPC_TRAP_GE_UN = 16 + PPC_TRAP_EQ
|
||||
};
|
||||
|
||||
-#define ppc_emit32(c,x) do { *((guint32 *) (c)) = GUINT32_TO_BE (x); (c) = (gpointer)((guint8 *)(c) + sizeof (guint32));} while (0)
|
||||
+#define ppc_emit32(c,x) do { *((guint32 *) (c)) = (guint32) (x); (c) = (gpointer)((guint8 *)(c) + sizeof (guint32));} while (0)
|
||||
|
||||
#define ppc_is_imm16(val) ((((val)>> 15) == 0) || (((val)>> 15) == -1))
|
||||
#define ppc_is_uimm16(val) ((glong)(val) >= 0L && (glong)(val) <= 65535L)
|
||||
@@ -806,11 +806,15 @@ my and Ximian's copyright to this code.
|
||||
} \
|
||||
} G_STMT_END
|
||||
|
||||
+#if _CALL_ELF == 2
|
||||
+#define ppc_load_func(c,D,V) ppc_load_sequence ((c), (D), (V))
|
||||
+#else
|
||||
#define ppc_load_func(c,D,v) G_STMT_START { \
|
||||
ppc_load_sequence ((c), ppc_r11, (guint64)(gsize)(v)); \
|
||||
ppc_ldptr ((c), ppc_r2, sizeof (gpointer), ppc_r11); \
|
||||
ppc_ldptr ((c), (D), 0, ppc_r11); \
|
||||
} G_STMT_END
|
||||
+#endif
|
||||
|
||||
#define ppc_load_multiple_regs(c,D,d,A) G_STMT_START { \
|
||||
int __i, __o = (d); \
|
||||
diff -x 'Makefile*' -x 'config*' -x '*.m4' -urp mono-3.2.3.orig/mono/metadata/sgen-marksweep.c mono-3.2.3/mono/metadata/sgen-marksweep.c
|
||||
--- mono-3.2.3.orig/mono/metadata/sgen-marksweep.c 2013-09-13 22:21:52.000000000 +0000
|
||||
+++ mono-3.2.3/mono/metadata/sgen-marksweep.c 2014-01-03 19:13:37.000000000 +0000
|
||||
@@ -45,8 +45,10 @@
|
||||
#define SGEN_HAVE_CONCURRENT_MARK
|
||||
#endif
|
||||
|
||||
-#define MS_BLOCK_SIZE (16*1024)
|
||||
-#define MS_BLOCK_SIZE_SHIFT 14
|
||||
+/* MS_BLOCK_SIZE must be a multiple of the system pagesize, which for some
|
||||
+ archs is 64k. */
|
||||
+#define MS_BLOCK_SIZE (64*1024)
|
||||
+#define MS_BLOCK_SIZE_SHIFT 16
|
||||
#define MAJOR_SECTION_SIZE MS_BLOCK_SIZE
|
||||
#define CARDS_PER_BLOCK (MS_BLOCK_SIZE / CARD_SIZE_IN_BYTES)
|
||||
|
||||
diff -x 'Makefile*' -x 'config*' -x '*.m4' -urp mono-3.2.3.orig/mono/mini/mini-gc.c mono-3.2.3/mono/mini/mini-gc.c
|
||||
--- mono-3.2.3.orig/mono/mini/mini-gc.c 2013-12-22 03:29:45.000000000 +0000
|
||||
+++ mono-3.2.3/mono/mini/mini-gc.c 2014-01-03 18:44:54.000000000 +0000
|
||||
@@ -439,7 +439,12 @@ static int callee_saved_regs [] = { ARMR
|
||||
#elif defined(TARGET_S390X)
|
||||
static int callee_saved_regs [] = { s390_r6, s390_r7, s390_r8, s390_r9, s390_r10, s390_r11, s390_r12, s390_r13, s390_r14 };
|
||||
#elif defined(TARGET_POWERPC)
|
||||
-static int callee_saved_regs [] = { ppc_r6, ppc_r7, ppc_r8, ppc_r9, ppc_r10, ppc_r11, ppc_r12, ppc_r13, ppc_r14 };
|
||||
+static int callee_saved_regs [] = {
|
||||
+ ppc_r13, ppc_r14, ppc_r15, ppc_r16,
|
||||
+ ppc_r17, ppc_r18, ppc_r19, ppc_r20,
|
||||
+ ppc_r21, ppc_r22, ppc_r23, ppc_r24,
|
||||
+ ppc_r25, ppc_r26, ppc_r27, ppc_r28,
|
||||
+ ppc_r29, ppc_r30, ppc_r31 };
|
||||
#endif
|
||||
|
||||
static guint32
|
||||
diff -x 'Makefile*' -x 'config*' -x '*.m4' -urp mono-3.2.3.orig/mono/mini/mini-ppc.c mono-3.2.3/mono/mini/mini-ppc.c
|
||||
--- mono-3.2.3.orig/mono/mini/mini-ppc.c 2013-09-13 22:22:23.000000000 +0000
|
||||
+++ mono-3.2.3/mono/mini/mini-ppc.c 2014-01-03 18:54:20.000000000 +0000
|
||||
@@ -2812,14 +2812,14 @@ handle_thunk (int absolute, guchar *code
|
||||
static void
|
||||
patch_ins (guint8 *code, guint32 ins)
|
||||
{
|
||||
- *(guint32*)code = GUINT32_TO_BE (ins);
|
||||
+ *(guint32*)code = ins;
|
||||
mono_arch_flush_icache (code, 4);
|
||||
}
|
||||
|
||||
void
|
||||
ppc_patch_full (guchar *code, const guchar *target, gboolean is_fd)
|
||||
{
|
||||
- guint32 ins = GUINT32_FROM_BE (*(guint32*)code);
|
||||
+ guint32 ins = *(guint32*)code;
|
||||
guint32 prim = ins >> 26;
|
||||
guint32 ovf;
|
||||
|
||||
@@ -2902,7 +2902,13 @@ ppc_patch_full (guchar *code, const guch
|
||||
else
|
||||
code -= 24;
|
||||
} else {
|
||||
- if (ppc_is_load_op (seq [5]) || ppc_opcode (seq [5]) == 31) /* ld || lwz || mr */
|
||||
+ if (ppc_is_load_op (seq [5])
|
||||
+#ifdef PPC_USES_FUNCTION_DESCRIPTOR
|
||||
+ /* With function descs we need to do more careful
|
||||
+ matches. */
|
||||
+ || ppc_opcode (seq [5]) == 31 /* ld || lwz || mr */
|
||||
+#endif
|
||||
+ )
|
||||
branch_ins = seq + 8;
|
||||
else
|
||||
branch_ins = seq + 6;
|
||||
@@ -2926,8 +2932,12 @@ ppc_patch_full (guchar *code, const guch
|
||||
}
|
||||
|
||||
/* FIXME: make this thread safe */
|
||||
+#ifdef PPC_USES_FUNCTION_DESCRIPTOR
|
||||
/* FIXME: we're assuming we're using r11 here */
|
||||
ppc_load_ptr_sequence (code, ppc_r11, target);
|
||||
+#else
|
||||
+ ppc_load_ptr_sequence (code, ppc_r0, target);
|
||||
+#endif
|
||||
mono_arch_flush_icache ((guint8*)seq, 28);
|
||||
#else
|
||||
guint32 *seq;
|
||||
@@ -4482,6 +4492,16 @@ mono_arch_register_lowlevel_calls (void)
|
||||
}
|
||||
|
||||
#ifdef __mono_ppc64__
|
||||
+#ifdef _LITTLE_ENDIAN
|
||||
+#define patch_load_sequence(ip,val) do {\
|
||||
+ guint16 *__load = (guint16*)(ip); \
|
||||
+ g_assert (sizeof (val) == sizeof (gsize)); \
|
||||
+ __load [0] = (((guint64)(gsize)(val)) >> 48) & 0xffff; \
|
||||
+ __load [2] = (((guint64)(gsize)(val)) >> 32) & 0xffff; \
|
||||
+ __load [6] = (((guint64)(gsize)(val)) >> 16) & 0xffff; \
|
||||
+ __load [8] = ((guint64)(gsize)(val)) & 0xffff; \
|
||||
+ } while (0)
|
||||
+#elif defined _BIG_ENDIAN
|
||||
#define patch_load_sequence(ip,val) do {\
|
||||
guint16 *__load = (guint16*)(ip); \
|
||||
g_assert (sizeof (val) == sizeof (gsize)); \
|
||||
@@ -4491,6 +4511,9 @@ mono_arch_register_lowlevel_calls (void)
|
||||
__load [9] = ((guint64)(gsize)(val)) & 0xffff; \
|
||||
} while (0)
|
||||
#else
|
||||
+#error huh? No endianess defined by compiler
|
||||
+#endif
|
||||
+#else
|
||||
#define patch_load_sequence(ip,val) do {\
|
||||
guint16 *__lis_ori = (guint16*)(ip); \
|
||||
__lis_ori [1] = (((gulong)(val)) >> 16) & 0xffff; \
|
||||
diff -x 'Makefile*' -x 'config*' -x '*.m4' -urp mono-3.2.3.orig/mono/mini/mini-ppc.h mono-3.2.3/mono/mini/mini-ppc.h
|
||||
--- mono-3.2.3.orig/mono/mini/mini-ppc.h 2013-12-22 03:29:45.000000000 +0000
|
||||
+++ mono-3.2.3/mono/mini/mini-ppc.h 2014-01-03 18:17:41.000000000 +0000
|
||||
@@ -69,7 +69,13 @@ typedef struct MonoCompileArch {
|
||||
#define MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS
|
||||
#define MONO_ARCH_NO_EMULATE_LONG_MUL_OPTS
|
||||
#define MONO_ARCH_HAVE_ATOMIC_ADD 1
|
||||
+
|
||||
+/* ELFv2 ABI doesn't use function descriptors. */
|
||||
+#if _CALL_ELF == 2
|
||||
+#undef PPC_USES_FUNCTION_DESCRIPTOR
|
||||
+#else
|
||||
#define PPC_USES_FUNCTION_DESCRIPTOR
|
||||
+#endif
|
||||
|
||||
#ifndef __mono_ilp32__
|
||||
#define MONO_ARCH_HAVE_TLS_GET 1
|
||||
diff -x 'Makefile*' -x 'config*' -x '*.m4' -urp mono-3.2.3.orig/mono/mini/mini.c mono-3.2.3/mono/mini/mini.c
|
||||
--- mono-3.2.3.orig/mono/mini/mini.c 2013-12-22 03:29:45.000000000 +0000
|
||||
+++ mono-3.2.3/mono/mini/mini.c 2014-01-03 19:06:17.000000000 +0000
|
||||
@@ -6752,10 +6752,9 @@ mini_get_debug_options (void)
|
||||
static gpointer
|
||||
mini_create_ftnptr (MonoDomain *domain, gpointer addr)
|
||||
{
|
||||
-#if !defined(__ia64__) && !defined(__ppc64__) && !defined(__powerpc64__)
|
||||
+#if !defined(__ia64__) && (!defined(__ppc64__) && !defined(__powerpc64__) || _CALL_ELF == 2)
|
||||
return addr;
|
||||
#else
|
||||
-
|
||||
gpointer* desc = NULL;
|
||||
|
||||
if ((desc = g_hash_table_lookup (domain->ftnptrs_hash, addr)))
|
||||
@@ -6782,7 +6781,7 @@ mini_create_ftnptr (MonoDomain *domain,
|
||||
static gpointer
|
||||
mini_get_addr_from_ftnptr (gpointer descr)
|
||||
{
|
||||
-#if defined(__ia64__) || defined(__ppc64__) || defined(__powerpc64__)
|
||||
+#if defined(__ia64__) || ((defined(__ppc64__) || defined(__powerpc64__)) && _CALL_ELF != 2)
|
||||
return *(gpointer*)descr;
|
||||
#else
|
||||
return descr;
|
||||
diff -x 'Makefile*' -x 'config*' -x '*.m4' -urp mono-3.2.3.orig/mono/utils/lock-free-alloc.c mono-3.2.3/mono/utils/lock-free-alloc.c
|
||||
--- mono-3.2.3.orig/mono/utils/lock-free-alloc.c 2013-09-13 22:21:38.000000000 +0000
|
||||
+++ mono-3.2.3/mono/utils/lock-free-alloc.c 2014-01-03 19:11:56.000000000 +0000
|
||||
@@ -123,7 +123,9 @@ struct _MonoLockFreeAllocDescriptor {
|
||||
|
||||
#define NUM_DESC_BATCH 64
|
||||
|
||||
-#define SB_SIZE 16384
|
||||
+/* SB_SIZE must be a multiple of the system pagesize, which for some
|
||||
+ archs is 64k. */
|
||||
+#define SB_SIZE 65536
|
||||
#define SB_HEADER_SIZE 16
|
||||
#define SB_USABLE_SIZE (SB_SIZE - SB_HEADER_SIZE)
|
||||
|
||||
diff -x 'Makefile*' -x 'config*' -x '*.m4' -urp mono-3.2.3.orig/mono/utils/mono-mmap.c mono-3.2.3/mono/utils/mono-mmap.c
|
||||
--- mono-3.2.3.orig/mono/utils/mono-mmap.c 2013-09-13 22:21:38.000000000 +0000
|
||||
+++ mono-3.2.3/mono/utils/mono-mmap.c 2014-01-03 17:57:28.000000000 +0000
|
||||
@@ -332,6 +332,11 @@ mono_valloc (void *addr, size_t length,
|
||||
int
|
||||
mono_vfree (void *addr, size_t length)
|
||||
{
|
||||
+/*if ( (length & (mono_pagesize () - 1)) != 0)
|
||||
+ printf ("XXXX vfree: length not multiple of pagesize\n");
|
||||
+if ( aligned_address (addr, length, mono_pagesize()) != addr)
|
||||
+ printf ("XXXX vfree: addr not aligned to pagesize\n");*/
|
||||
+
|
||||
return munmap (addr, length);
|
||||
}
|
||||
|
||||
diff -x 'Makefile*' -x 'config*' -x '*.m4' -urp mono-3.2.3.orig/mono/utils/strtod.c mono-3.2.3/mono/utils/strtod.c
|
||||
--- mono-3.2.3.orig/mono/utils/strtod.c 2013-09-13 22:21:37.000000000 +0000
|
||||
+++ mono-3.2.3/mono/utils/strtod.c 2014-01-03 18:26:43.000000000 +0000
|
||||
@@ -173,6 +173,12 @@
|
||||
* #define NO_ERRNO if strtod should not assign errno = ERANGE when
|
||||
* the result overflows to +-Infinity or underflows to 0.
|
||||
*/
|
||||
+#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
|
||||
+# define IEEE_MC68k
|
||||
+#elif defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
|
||||
+# define IEEE_8087
|
||||
+#else
|
||||
+
|
||||
#if defined(TARGET_X86) || defined(mips) && defined(MIPSEL) || defined (__arm__)
|
||||
|
||||
# define IEEE_8087
|
||||
@@ -194,9 +200,12 @@
|
||||
# define IEEE_MC68k
|
||||
|
||||
#else
|
||||
+#warning byte order unknown, assuming big endian
|
||||
#define IEEE_MC68k
|
||||
#endif
|
||||
|
||||
+#endif
|
||||
+
|
||||
#define Long gint32
|
||||
#define ULong guint32
|
||||
|
@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 10 17:20:57 CET 2014 - ro@suse.de
|
||||
|
||||
- rediff and reactivate ppc.patch
|
||||
- port forward ppc64le fixes from matz:
|
||||
- Add support for ppc64le, fix build warnings, the blocksize
|
||||
changes in mono-core-ppc64le.diff should also help ppc64 proper.
|
||||
Added patches:
|
||||
* mono-core-parallel-build.diff
|
||||
* mono-core-ppc64le-callreg.diff
|
||||
* mono-core-ppc64le-swr11r12.diff
|
||||
* mono-core-ppc64le.diff
|
||||
- no valgrind on aarch64 and s390 (but on s390x)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 22 08:51:00 UTC 2014 - mailaender@opensuse.org
|
||||
|
||||
|
@ -32,9 +32,13 @@ Patch1: mono-arm-cpuinfo-v5.patch
|
||||
Patch2: mono-arm-cpuinfo-v7.patch
|
||||
Patch3: mono-arm-vfp.patch
|
||||
# PATCH-FIX-OPENSUSE ppc.patch dvaleev@suse.com -- fix ppc build failures
|
||||
#Patch4: ppc.patch
|
||||
Patch4: ppc.patch
|
||||
# PATCH-FIX-UPSTREAM mono-core-target-4.0.patch dimstar@opensuse.org -- Use runtime 4.0 as default for cairo and nunit
|
||||
Patch5: mono-core-target-4.0.patch
|
||||
Patch6: mono-core-parallel-build.diff
|
||||
Patch7: mono-core-ppc64le.diff
|
||||
Patch8: mono-core-ppc64le-swr11r12.diff
|
||||
Patch9: mono-core-ppc64le-callreg.diff
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: bison
|
||||
@ -45,7 +49,7 @@ BuildRequires: libtool
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: xorg-x11-libX11-devel
|
||||
BuildRequires: zlib-devel
|
||||
%ifnarch ia64 %arm
|
||||
%ifnarch ia64 %arm aarch64 s390
|
||||
BuildRequires: valgrind-devel
|
||||
%endif
|
||||
%if %llvm == yes
|
||||
@ -99,8 +103,12 @@ technologies that have been submitted to the ECMA for standardization.
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%endif
|
||||
#%patch4 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
|
45
ppc.patch
45
ppc.patch
@ -1,38 +1,23 @@
|
||||
Index: mono-3.0.2/mono/mini/mini.c
|
||||
===================================================================
|
||||
--- mono-3.0.2.orig/mono/mini/mini.c
|
||||
+++ mono-3.0.2/mono/mini/mini.c
|
||||
@@ -6240,7 +6240,7 @@ mini_create_ftnptr (MonoDomain *domain,
|
||||
desc [0] = addr;
|
||||
desc [1] = NULL;
|
||||
# elif defined(__ppc64__) || defined(__powerpc64__)
|
||||
- gpointer *desc;
|
||||
+ //gpointer *desc;
|
||||
|
||||
desc = mono_domain_alloc0 (domain, 3 * sizeof (gpointer));
|
||||
|
||||
Index: mono-3.0.2/mono/mini/mini-ppc.h
|
||||
===================================================================
|
||||
--- mono-3.0.2.orig/mono/mini/mini-ppc.h
|
||||
+++ mono-3.0.2/mono/mini/mini-ppc.h
|
||||
@@ -96,6 +96,7 @@ typedef struct MonoCompileArch {
|
||||
#define MONO_ARCH_EMULATE_FREM 1
|
||||
#define MONO_ARCH_BIGMUL_INTRINS 1
|
||||
#define MONO_ARCH_HAVE_ATOMIC_CAS 1
|
||||
+#define MONO_ARCH_GC_MAPS_SUPPORTED 1
|
||||
|
||||
/* Parameters used by the register allocator */
|
||||
#define MONO_ARCH_CALLEE_REGS ((0xff << ppc_r3) | (1 << ppc_r11) | (1 << ppc_r12))
|
||||
Index: mono-3.0.2/mono/mini/mini-gc.c
|
||||
===================================================================
|
||||
--- mono-3.0.2.orig/mono/mini/mini-gc.c
|
||||
+++ mono-3.0.2/mono/mini/mini-gc.c
|
||||
@@ -438,6 +438,8 @@ static int callee_saved_regs [] = { X86_
|
||||
================================================================================
|
||||
--- mono-3.2.8/mono/mini/mini-gc.c
|
||||
+++ mono-3.2.8/mono/mini/mini-gc.c
|
||||
@@ -438,6 +438,8 @@
|
||||
static int callee_saved_regs [] = { ARMREG_V1, ARMREG_V2, ARMREG_V3, ARMREG_V4, ARMREG_V5, ARMREG_V7, ARMREG_FP };
|
||||
#elif defined(TARGET_S390X)
|
||||
static int callee_saved_regs [] = { s390_r6, s390_r7, s390_r8, s390_r9, s390_r10, s390_r11, s390_r12, s390_r13, s390_r14 };
|
||||
+#elif defined(TARGET_POWERPC)
|
||||
+static int callee_saved_regs [] = { ppc_r6, ppc_r7, ppc_r8, ppc_r9, ppc_r10, ppc_r11, ppc_r12, ppc_r13, ppc_r14 };
|
||||
#endif
|
||||
|
||||
|
||||
static guint32
|
||||
--- mono-3.2.8/mono/mini/mini-ppc.h
|
||||
+++ mono-3.2.8/mono/mini/mini-ppc.h
|
||||
@@ -96,6 +96,7 @@
|
||||
#define MONO_ARCH_EMULATE_FREM 1
|
||||
#define MONO_ARCH_BIGMUL_INTRINS 1
|
||||
#define MONO_ARCH_HAVE_ATOMIC_CAS 1
|
||||
+#define MONO_ARCH_GC_MAPS_SUPPORTED 1
|
||||
|
||||
/* Parameters used by the register allocator */
|
||||
#define MONO_ARCH_CALLEE_REGS ((0xff << ppc_r3) | (1 << ppc_r11) | (1 << ppc_r12))
|
||||
|
Loading…
Reference in New Issue
Block a user