forked from pool/mono-core
Accepting request 348353 from home:michel_mno:branches:Mono:Factory
- retrieve from upstream all ppc patches not yet in 4.2.1 tarball ppc_instruction_length_of_atomic_add_i4_is_28.patch fix_atomic_add_i4_support_for_32bit_ppc.patch basic_changes_powerpc_be.patch (already done yesterday) ppc_add_monocontext_and_async_callback.patch fix_passing_struct_parms_per_elf_abiv2.patch update_elf_abiv2_testcases.patch partial_sharing_false_4_powerpc.patch fix_exception_when_reading_from_timezone_file.patch OBS-URL: https://build.opensuse.org/request/show/348353 OBS-URL: https://build.opensuse.org/package/show/Mono:Factory/mono-core?expand=0&rev=162
This commit is contained in:
parent
e29a5fe5a1
commit
a22a803e72
59
fix_atomic_add_i4_support_for_32bit_ppc.patch
Normal file
59
fix_atomic_add_i4_support_for_32bit_ppc.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From 8f379f0c8f98493180b508b9e68b9aa76c0c5bdf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= <alexrp@xamarin.com>
|
||||
Date: Mon, 3 Aug 2015 17:32:31 +0200
|
||||
Subject: [PATCH] [ppc] Fix atomic_add_i4 support for 32-bit PPC.
|
||||
|
||||
|
||||
---
|
||||
mono/mini/mini-ppc.c | 31 ++++++++++++++++---------------
|
||||
1 file changed, 16 insertions(+), 15 deletions(-)
|
||||
|
||||
Index: mono-4.2.1/mono/mini/mini-ppc.c
|
||||
===================================================================
|
||||
--- mono-4.2.1.orig/mono/mini/mini-ppc.c
|
||||
+++ mono-4.2.1/mono/mini/mini-ppc.c
|
||||
@@ -4417,6 +4417,22 @@ mono_arch_output_basic_block (MonoCompil
|
||||
else
|
||||
ppc_mr (code, ins->dreg, ins->sreg1);
|
||||
break;
|
||||
+#else
|
||||
+ case OP_ICONV_TO_R4:
|
||||
+ case OP_ICONV_TO_R8: {
|
||||
+ if (cpu_hw_caps & PPC_ISA_64) {
|
||||
+ ppc_srawi(code, ppc_r0, ins->sreg1, 31);
|
||||
+ ppc_stw (code, ppc_r0, -8, ppc_r1);
|
||||
+ ppc_stw (code, ins->sreg1, -4, ppc_r1);
|
||||
+ ppc_lfd (code, ins->dreg, -8, ppc_r1);
|
||||
+ ppc_fcfid (code, ins->dreg, ins->dreg);
|
||||
+ if (ins->opcode == OP_ICONV_TO_R4)
|
||||
+ ppc_frsp (code, ins->dreg, ins->dreg);
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
case OP_ATOMIC_ADD_I4:
|
||||
CASE_PPC64 (OP_ATOMIC_ADD_I8) {
|
||||
int location = ins->inst_basereg;
|
||||
@@ -4450,21 +4466,6 @@ mono_arch_output_basic_block (MonoCompil
|
||||
ppc_mr (code, ins->dreg, ppc_r0);
|
||||
break;
|
||||
}
|
||||
-#else
|
||||
- case OP_ICONV_TO_R4:
|
||||
- case OP_ICONV_TO_R8: {
|
||||
- if (cpu_hw_caps & PPC_ISA_64) {
|
||||
- ppc_srawi(code, ppc_r0, ins->sreg1, 31);
|
||||
- ppc_stw (code, ppc_r0, -8, ppc_r1);
|
||||
- ppc_stw (code, ins->sreg1, -4, ppc_r1);
|
||||
- ppc_lfd (code, ins->dreg, -8, ppc_r1);
|
||||
- ppc_fcfid (code, ins->dreg, ins->dreg);
|
||||
- if (ins->opcode == OP_ICONV_TO_R4)
|
||||
- ppc_frsp (code, ins->dreg, ins->dreg);
|
||||
- }
|
||||
- break;
|
||||
- }
|
||||
-#endif
|
||||
case OP_ATOMIC_CAS_I4:
|
||||
CASE_PPC64 (OP_ATOMIC_CAS_I8) {
|
||||
int location = ins->sreg1;
|
24
fix_exception_when_reading_from_timezone_file.patch
Normal file
24
fix_exception_when_reading_from_timezone_file.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From 45c3685e3b360ecc8c5a78ee10c298d6b584a302 Mon Sep 17 00:00:00 2001
|
||||
From: Bill Seurer <seurer@linux.vnet.ibm.com>
|
||||
Date: Thu, 10 Sep 2015 13:34:27 -0500
|
||||
Subject: [PATCH] [ppc] Fix exception when reading from timezone file. See
|
||||
https://bugzilla.xamarin.com/show_bug.cgi?id=30360
|
||||
|
||||
|
||||
---
|
||||
mcs/class/corlib/System/TimeZoneInfo.cs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: mono-4.2.1/mcs/class/corlib/System/TimeZoneInfo.cs
|
||||
===================================================================
|
||||
--- mono-4.2.1.orig/mcs/class/corlib/System/TimeZoneInfo.cs
|
||||
+++ mono-4.2.1/mcs/class/corlib/System/TimeZoneInfo.cs
|
||||
@@ -1175,7 +1175,7 @@ namespace System
|
||||
return (((i >> 24) & 0xff)
|
||||
| ((i >> 8) & 0xff00)
|
||||
| ((i << 8) & 0xff0000)
|
||||
- | ((i << 24)));
|
||||
+ | (((i & 0xff) << 24)));
|
||||
}
|
||||
|
||||
static int ReadBigEndianInt32 (byte [] buffer, int start)
|
3352
fix_passing_struct_parms_per_elf_abiv2.patch
Normal file
3352
fix_passing_struct_parms_per_elf_abiv2.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 11 08:32:06 UTC 2015 - normand@linux.vnet.ibm.com
|
||||
|
||||
- retrieve from upstream all ppc patches not yet in 4.2.1 tarball
|
||||
ppc_instruction_length_of_atomic_add_i4_is_28.patch
|
||||
fix_atomic_add_i4_support_for_32bit_ppc.patch
|
||||
basic_changes_powerpc_be.patch (already done yesterday)
|
||||
ppc_add_monocontext_and_async_callback.patch
|
||||
fix_passing_struct_parms_per_elf_abiv2.patch
|
||||
update_elf_abiv2_testcases.patch
|
||||
partial_sharing_false_4_powerpc.patch
|
||||
fix_exception_when_reading_from_timezone_file.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 10 15:08:07 UTC 2015 - normand@linux.vnet.ibm.com
|
||||
|
||||
|
@ -39,7 +39,17 @@ Patch2: authors.patch
|
||||
# PATCH-FIX-OPENSUSE fix insecure use of strncat at process.c:383 to fix build process
|
||||
Patch3: strncat-process-c.patch
|
||||
Patch4: mono-un-revoke-fix-in-BNC-144655.patch
|
||||
Patch5: basic_changes_powerpc_be.patch
|
||||
##################
|
||||
## set of ppc patches from git upstream not yet in tarball 4.2.1
|
||||
Patch5: ppc_instruction_length_of_atomic_add_i4_is_28.patch
|
||||
Patch6: fix_atomic_add_i4_support_for_32bit_ppc.patch
|
||||
Patch7: basic_changes_powerpc_be.patch
|
||||
Patch8: ppc_add_monocontext_and_async_callback.patch
|
||||
Patch9: fix_passing_struct_parms_per_elf_abiv2.patch
|
||||
Patch10: update_elf_abiv2_testcases.patch
|
||||
Patch11: partial_sharing_false_4_powerpc.patch
|
||||
Patch12: fix_exception_when_reading_from_timezone_file.patch
|
||||
##################
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: bison
|
||||
@ -117,6 +127,13 @@ technologies that have been submitted to the ECMA for standardization.
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
|
||||
%build
|
||||
NOCONFIGURE="yes" ./autogen.sh
|
||||
|
24
partial_sharing_false_4_powerpc.patch
Normal file
24
partial_sharing_false_4_powerpc.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From 35b511524a4d15b75cfbba982d82b7abef3a29dc Mon Sep 17 00:00:00 2001
|
||||
From: Bill Seurer <seurer@linux.vnet.ibm.com>
|
||||
Date: Tue, 8 Dec 2015 12:52:01 -0600
|
||||
Subject: [PATCH] [ppc] Temporary fix for power to get builds working.
|
||||
|
||||
|
||||
---
|
||||
mono/mini/mini-ppc.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
Index: mono-4.2.1/mono/mini/mini-ppc.c
|
||||
===================================================================
|
||||
--- mono-4.2.1.orig/mono/mini/mini-ppc.c
|
||||
+++ mono-4.2.1/mono/mini/mini-ppc.c
|
||||
@@ -627,6 +627,9 @@ mono_arch_init (void)
|
||||
mono_mprotect (bp_trigger_page, mono_pagesize (), 0);
|
||||
|
||||
mono_aot_register_jit_icall ("mono_ppc_throw_exception", mono_ppc_throw_exception);
|
||||
+
|
||||
+ // FIXME: Fix partial sharing for power and remove this
|
||||
+ mono_set_partial_sharing_supported (FALSE);
|
||||
}
|
||||
|
||||
/*
|
168
ppc_add_monocontext_and_async_callback.patch
Normal file
168
ppc_add_monocontext_and_async_callback.patch
Normal file
@ -0,0 +1,168 @@
|
||||
From f05362d9a16317c65cf46506b7557dfb0176a678 Mon Sep 17 00:00:00 2001
|
||||
From: Bill Seurer <seurer@linux.vnet.ibm.com>
|
||||
Date: Mon, 24 Aug 2015 17:10:36 -0500
|
||||
Subject: [PATCH] [ppc] Add MonoContext and asynch callback support
|
||||
|
||||
|
||||
---
|
||||
mono/mini/exceptions-ppc.c | 13 ++++++
|
||||
mono/mini/mini-ppc.h | 11 ++++-
|
||||
mono/utils/mono-context.h | 95 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 117 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: mono-4.2.1/mono/mini/exceptions-ppc.c
|
||||
===================================================================
|
||||
--- mono-4.2.1.orig/mono/mini/exceptions-ppc.c
|
||||
+++ mono-4.2.1/mono/mini/exceptions-ppc.c
|
||||
@@ -783,3 +783,16 @@ mono_arch_handle_exception (void *ctx, g
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
+
|
||||
+
|
||||
+// FIX ME: This is not complete
|
||||
+void
|
||||
+mono_arch_setup_async_callback (MonoContext *ctx, void (*async_cb)(void *fun), gpointer user_data)
|
||||
+{
|
||||
+ uintptr_t sp = (uintptr_t) MONO_CONTEXT_GET_SP(ctx);
|
||||
+ sp -= PPC_MINIMAL_STACK_SIZE;
|
||||
+ *(unsigned long *)sp = MONO_CONTEXT_GET_SP(ctx);
|
||||
+ MONO_CONTEXT_SET_BP(ctx, sp);
|
||||
+ MONO_CONTEXT_SET_IP(ctx, (unsigned long) async_cb);
|
||||
+}
|
||||
+
|
||||
Index: mono-4.2.1/mono/mini/mini-ppc.h
|
||||
===================================================================
|
||||
--- mono-4.2.1.orig/mono/mini/mini-ppc.h
|
||||
+++ mono-4.2.1/mono/mini/mini-ppc.h
|
||||
@@ -139,8 +139,15 @@ typedef struct MonoCompileArch {
|
||||
/* Linux */
|
||||
#ifdef __mono_ppc64__
|
||||
#define PPC_RET_ADDR_OFFSET 16
|
||||
-#define PPC_STACK_PARAM_OFFSET 48
|
||||
-#define PPC_MINIMAL_STACK_SIZE 48
|
||||
+ // Power LE abvi2
|
||||
+ #if (_CALL_ELF == 2)
|
||||
+ #define PPC_STACK_PARAM_OFFSET 32
|
||||
+ #define PPC_MINIMAL_STACK_SIZE 32
|
||||
+ #else
|
||||
+ #define PPC_STACK_PARAM_OFFSET 48
|
||||
+ #define PPC_MINIMAL_STACK_SIZE 48
|
||||
+ #endif
|
||||
+#define MONO_ARCH_HAVE_SETUP_ASYNC_CALLBACK 1
|
||||
#define PPC_MINIMAL_PARAM_AREA_SIZE 64
|
||||
#define PPC_LAST_FPARG_REG ppc_f13
|
||||
#define PPC_PASS_STRUCTS_BY_VALUE 1
|
||||
Index: mono-4.2.1/mono/utils/mono-context.h
|
||||
===================================================================
|
||||
--- mono-4.2.1.orig/mono/utils/mono-context.h
|
||||
+++ mono-4.2.1/mono/utils/mono-context.h
|
||||
@@ -359,6 +359,100 @@ typedef struct {
|
||||
* We might also want to add an additional field to propagate
|
||||
* the original context from the signal handler.
|
||||
*/
|
||||
+#ifdef __mono_ppc64__
|
||||
+
|
||||
+typedef struct {
|
||||
+ gulong sc_ir; // pc
|
||||
+ gulong sc_sp; // r1
|
||||
+ mgreg_t regs [32];
|
||||
+ double fregs [32];
|
||||
+} MonoContext;
|
||||
+
|
||||
+/* we have the stack pointer, not the base pointer in sigcontext */
|
||||
+#define MONO_CONTEXT_SET_IP(ctx,ip) do { (ctx)->sc_ir = (gulong)ip; } while (0);
|
||||
+#define MONO_CONTEXT_SET_BP(ctx,bp) do { (ctx)->sc_sp = (gulong)bp; } while (0);
|
||||
+#define MONO_CONTEXT_SET_SP(ctx,sp) do { (ctx)->sc_sp = (gulong)sp; } while (0);
|
||||
+
|
||||
+#define MONO_CONTEXT_GET_IP(ctx) ((gpointer)((ctx)->sc_ir))
|
||||
+#define MONO_CONTEXT_GET_BP(ctx) ((gpointer)((ctx)->regs [ppc_r31-13]))
|
||||
+#define MONO_CONTEXT_GET_SP(ctx) ((gpointer)((ctx)->sc_sp))
|
||||
+
|
||||
+#define MONO_CONTEXT_GET_CURRENT(ctx) \
|
||||
+ __asm__ __volatile__( \
|
||||
+ "std 0, 0(%0)\n" \
|
||||
+ "std 1, 8(%0)\n" \
|
||||
+ "std 0, 8*0+16(%0)\n" \
|
||||
+ "std 1, 8*1+16(%0)\n" \
|
||||
+ "std 2, 8*2+16(%0)\n" \
|
||||
+ "std 3, 8*3+16(%0)\n" \
|
||||
+ "std 4, 8*4+16(%0)\n" \
|
||||
+ "std 5, 8*5+16(%0)\n" \
|
||||
+ "std 6, 8*6+16(%0)\n" \
|
||||
+ "std 7, 8*7+16(%0)\n" \
|
||||
+ "std 8, 8*8+16(%0)\n" \
|
||||
+ "std 9, 8*9+16(%0)\n" \
|
||||
+ "std 10, 8*10+16(%0)\n" \
|
||||
+ "std 11, 8*11+16(%0)\n" \
|
||||
+ "std 12, 8*12+16(%0)\n" \
|
||||
+ "std 13, 8*13+16(%0)\n" \
|
||||
+ "std 14, 8*14+16(%0)\n" \
|
||||
+ "std 15, 8*15+16(%0)\n" \
|
||||
+ "std 16, 8*16+16(%0)\n" \
|
||||
+ "std 17, 8*17+16(%0)\n" \
|
||||
+ "std 18, 8*18+16(%0)\n" \
|
||||
+ "std 19, 8*19+16(%0)\n" \
|
||||
+ "std 20, 8*20+16(%0)\n" \
|
||||
+ "std 21, 8*21+16(%0)\n" \
|
||||
+ "std 22, 8*22+16(%0)\n" \
|
||||
+ "std 23, 8*23+16(%0)\n" \
|
||||
+ "std 24, 8*24+16(%0)\n" \
|
||||
+ "std 25, 8*25+16(%0)\n" \
|
||||
+ "std 26, 8*26+16(%0)\n" \
|
||||
+ "std 27, 8*27+16(%0)\n" \
|
||||
+ "std 28, 8*28+16(%0)\n" \
|
||||
+ "std 29, 8*29+16(%0)\n" \
|
||||
+ "std 30, 8*30+16(%0)\n" \
|
||||
+ "std 31, 8*31+16(%0)\n" \
|
||||
+ "stfd 0, 8*0+8*32+16(%0)\n" \
|
||||
+ "stfd 1, 8*1+8*32+16(%0)\n" \
|
||||
+ "stfd 2, 8*2+8*32+16(%0)\n" \
|
||||
+ "stfd 3, 8*3+8*32+16(%0)\n" \
|
||||
+ "stfd 4, 8*4+8*32+16(%0)\n" \
|
||||
+ "stfd 5, 8*5+8*32+16(%0)\n" \
|
||||
+ "stfd 6, 8*6+8*32+16(%0)\n" \
|
||||
+ "stfd 7, 8*7+8*32+16(%0)\n" \
|
||||
+ "stfd 8, 8*8+8*32+16(%0)\n" \
|
||||
+ "stfd 9, 8*9+8*32+16(%0)\n" \
|
||||
+ "stfd 10, 8*10+8*32+16(%0)\n" \
|
||||
+ "stfd 11, 8*11+8*32+16(%0)\n" \
|
||||
+ "stfd 12, 8*12+8*32+16(%0)\n" \
|
||||
+ "stfd 13, 8*13+8*32+16(%0)\n" \
|
||||
+ "stfd 14, 8*14+8*32+16(%0)\n" \
|
||||
+ "stfd 15, 8*15+8*32+16(%0)\n" \
|
||||
+ "stfd 16, 8*16+8*32+16(%0)\n" \
|
||||
+ "stfd 17, 8*17+8*32+16(%0)\n" \
|
||||
+ "stfd 18, 8*18+8*32+16(%0)\n" \
|
||||
+ "stfd 19, 8*19+8*32+16(%0)\n" \
|
||||
+ "stfd 20, 8*20+8*32+16(%0)\n" \
|
||||
+ "stfd 21, 8*21+8*32+16(%0)\n" \
|
||||
+ "stfd 22, 8*22+8*32+16(%0)\n" \
|
||||
+ "stfd 23, 8*23+8*32+16(%0)\n" \
|
||||
+ "stfd 24, 8*24+8*32+16(%0)\n" \
|
||||
+ "stfd 25, 8*25+8*32+16(%0)\n" \
|
||||
+ "stfd 26, 8*26+8*32+16(%0)\n" \
|
||||
+ "stfd 27, 8*27+8*32+16(%0)\n" \
|
||||
+ "stfd 28, 8*28+8*32+16(%0)\n" \
|
||||
+ "stfd 29, 8*29+8*32+16(%0)\n" \
|
||||
+ "stfd 30, 8*30+8*32+16(%0)\n" \
|
||||
+ "stfd 31, 8*31+8*32+16(%0)\n" \
|
||||
+ : : "r" (&(ctx)) \
|
||||
+ : "memory" \
|
||||
+ )
|
||||
+
|
||||
+#define MONO_ARCH_HAS_MONO_CONTEXT 1
|
||||
+
|
||||
+#else
|
||||
+
|
||||
typedef struct {
|
||||
gulong sc_ir; // pc
|
||||
gulong sc_sp; // r1
|
||||
@@ -375,6 +469,7 @@ typedef struct {
|
||||
#define MONO_CONTEXT_GET_IP(ctx) ((gpointer)((ctx)->sc_ir))
|
||||
#define MONO_CONTEXT_GET_BP(ctx) ((gpointer)((ctx)->regs [ppc_r31-13]))
|
||||
#define MONO_CONTEXT_GET_SP(ctx) ((gpointer)((ctx)->sc_sp))
|
||||
+#endif
|
||||
|
||||
#elif defined(__sparc__) || defined(sparc) /* defined(__mono_ppc__) */
|
||||
|
21
ppc_instruction_length_of_atomic_add_i4_is_28.patch
Normal file
21
ppc_instruction_length_of_atomic_add_i4_is_28.patch
Normal file
@ -0,0 +1,21 @@
|
||||
From f967c79926900343f399c75624deedaba460e544 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= <alexrp@xamarin.com>
|
||||
Date: Mon, 3 Aug 2015 17:32:07 +0200
|
||||
Subject: [PATCH] [ppc] Instruction length of atomic_add_i4 is 28.
|
||||
|
||||
|
||||
---
|
||||
mono/mini/cpu-ppc.md | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: mono-4.2.1/mono/mini/cpu-ppc.md
|
||||
===================================================================
|
||||
--- mono-4.2.1.orig/mono/mini/cpu-ppc.md
|
||||
+++ mono-4.2.1/mono/mini/cpu-ppc.md
|
||||
@@ -314,5 +314,5 @@ vcall2_membase: src1:b len:16 clob:c
|
||||
|
||||
jump_table: dest:i len:8
|
||||
|
||||
-atomic_add_i4: src1:b src2:i dest:i len:20
|
||||
+atomic_add_i4: src1:b src2:i dest:i len:28
|
||||
atomic_cas_i4: src1:b src2:i src3:i dest:i len:38
|
4409
update_elf_abiv2_testcases.patch
Normal file
4409
update_elf_abiv2_testcases.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user