Drop s390x patches (already in this release)
Former-commit-id: 8f21e3a3b527fc3ccc051f85eab32e4b3d163e11
This commit is contained in:
parent
2c32e9f24d
commit
f4487850ea
@ -1,172 +0,0 @@
|
|||||||
From 872e97cb30cc9e9f827d6540ca327ee8869dda33 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Neale Ferguson <neale@sinenomine.net>
|
|
||||||
Date: Tue, 28 Oct 2014 14:48:45 -0400
|
|
||||||
Subject: [PATCH] Add OP_LREM_IMM support;Add implementation of
|
|
||||||
mono_arch_get_delegate_virtual_invoke_impl
|
|
||||||
|
|
||||||
---
|
|
||||||
mono/mini/cpu-s390x.md | 1 +
|
|
||||||
mono/mini/decompose.c | 4 ++++
|
|
||||||
mono/mini/mini-s390x.c | 50 +++++++++++++++++++++++++++++++++++++++++------
|
|
||||||
mono/mini/support-s390x.h | 6 +++++-
|
|
||||||
4 files changed, 54 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/mono/mini/cpu-s390x.md b/mono/mini/cpu-s390x.md
|
|
||||||
index b3dce35..2eee2e4 100644
|
|
||||||
--- a/mono/mini/cpu-s390x.md
|
|
||||||
+++ b/mono/mini/cpu-s390x.md
|
|
||||||
@@ -283,6 +283,7 @@ long_xor: dest:i src1:i src2:i len:8
|
|
||||||
long_neg: dest:i src1:i len:6
|
|
||||||
long_not: dest:i src1:i len:12
|
|
||||||
long_rem: dest:i src1:i src2:i len:12
|
|
||||||
+long_rem_imm: dest:i src1:i src2:i len:12
|
|
||||||
long_rem_un: dest:i src1:i src2:i len:16
|
|
||||||
long_shl: dest:i src1:i src2:i len:14
|
|
||||||
long_shl_imm: dest:i src1:i len:14
|
|
||||||
diff --git a/mono/mini/decompose.c b/mono/mini/decompose.c
|
|
||||||
index 6e9d4aa..f29e913 100644
|
|
||||||
--- a/mono/mini/decompose.c
|
|
||||||
+++ b/mono/mini/decompose.c
|
|
||||||
@@ -486,6 +486,9 @@ mono_decompose_opcode (MonoCompile *cfg, MonoInst *ins)
|
|
||||||
ins->opcode = OP_ICONST;
|
|
||||||
MONO_INST_NULLIFY_SREGS (ins);
|
|
||||||
ins->inst_c0 = 0;
|
|
||||||
+#if __s390__
|
|
||||||
+ }
|
|
||||||
+#else
|
|
||||||
} else if ((ins->inst_imm > 0) && (ins->inst_imm < (1LL << 32)) && (power != -1)) {
|
|
||||||
gboolean is_long = ins->opcode == OP_LREM_IMM;
|
|
||||||
int compensator_reg = alloc_ireg (cfg);
|
|
||||||
@@ -511,6 +514,7 @@ mono_decompose_opcode (MonoCompile *cfg, MonoInst *ins)
|
|
||||||
|
|
||||||
NULLIFY_INS (ins);
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/mono/mini/mini-s390x.c b/mono/mini/mini-s390x.c
|
|
||||||
index 435ef29..d84c878 100644
|
|
||||||
--- a/mono/mini/mini-s390x.c
|
|
||||||
+++ b/mono/mini/mini-s390x.c
|
|
||||||
@@ -624,7 +624,7 @@ indent (int diff) {
|
|
||||||
if (diff < 0)
|
|
||||||
indent_level += diff;
|
|
||||||
v = indent_level;
|
|
||||||
- printf("%p [%3d] ",pthread_self(),v);
|
|
||||||
+ printf("%p [%3d] ",(void *)pthread_self(),v);
|
|
||||||
while (v-- > 0) {
|
|
||||||
printf (". ");
|
|
||||||
}
|
|
||||||
@@ -2798,6 +2798,7 @@ mono_arch_lowering_pass (MonoCompile *cfg, MonoBasicBlock *bb)
|
|
||||||
case OP_IREM_UN_IMM:
|
|
||||||
case OP_LAND_IMM:
|
|
||||||
case OP_LOR_IMM:
|
|
||||||
+ case OP_LREM_IMM:
|
|
||||||
case OP_LXOR_IMM:
|
|
||||||
case OP_LOCALLOC_IMM:
|
|
||||||
mono_decompose_op_imm (cfg, bb, ins);
|
|
||||||
@@ -3312,6 +3313,17 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
|
|
||||||
s390_lgr (code, ins->dreg, s390_r0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
+ case OP_LREM_IMM: {
|
|
||||||
+ if (s390_is_imm16 (ins->inst_imm)) {
|
|
||||||
+ s390_lghi (code, s390_r13, ins->inst_imm);
|
|
||||||
+ } else {
|
|
||||||
+ s390_lgfi (code, s390_r13, ins->inst_imm);
|
|
||||||
+ }
|
|
||||||
+ s390_lgr (code, s390_r0, ins->sreg1);
|
|
||||||
+ s390_dsgr (code, s390_r0, s390_r13);
|
|
||||||
+ s390_lgfr (code, ins->dreg, s390_r0);
|
|
||||||
+ }
|
|
||||||
+ break;
|
|
||||||
case OP_LREM_UN: {
|
|
||||||
s390_lgr (code, s390_r1, ins->sreg1);
|
|
||||||
s390_lghi (code, s390_r0, 0);
|
|
||||||
@@ -5735,9 +5747,35 @@ mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_targe
|
|
||||||
/*------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
gpointer
|
|
||||||
-mono_arch_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method, int offset, gboolean load_imt_reg)
|
|
||||||
+mono_arch_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method,
|
|
||||||
+ int offset, gboolean load_imt_reg)
|
|
||||||
{
|
|
||||||
- return NULL;
|
|
||||||
+ guint8 *code, *start;
|
|
||||||
+ int size = 20;
|
|
||||||
+
|
|
||||||
+ start = code = mono_global_codeman_reserve (size);
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * Replace the "this" argument with the target
|
|
||||||
+ */
|
|
||||||
+ s390_lgr (code, s390_r1, s390_r2);
|
|
||||||
+ s390_lg (code, s390_r2, s390_r1, 0, MONO_STRUCT_OFFSET(MonoDelegate, target));
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * Load the IMT register, if needed
|
|
||||||
+ */
|
|
||||||
+ if (load_imt_reg) {
|
|
||||||
+ s390_lg (code, MONO_ARCH_IMT_REG, s390_r2, 0, MONO_STRUCT_OFFSET(MonoDelegate, method));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * Load the vTable
|
|
||||||
+ */
|
|
||||||
+ s390_lg (code, s390_r1, s390_r2, 0, MONO_STRUCT_OFFSET(MonoObject, vtable));
|
|
||||||
+ s390_agfi(code, s390_r1, offset);
|
|
||||||
+ s390_br (code, s390_r1);
|
|
||||||
+
|
|
||||||
+ return(start);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*========================= End of Function ========================*/
|
|
||||||
@@ -5833,7 +5871,7 @@ mono_arch_build_imt_thunk (MonoVTable *vtable, MonoDomain *domain,
|
|
||||||
s390_lg (code, s390_r1, 0, s390_r1, 0);
|
|
||||||
}
|
|
||||||
s390_br (code, s390_r1);
|
|
||||||
- target = S390_RELATIVE(code, item->jmp_code);
|
|
||||||
+ target = (gint64) S390_RELATIVE(code, item->jmp_code);
|
|
||||||
s390_patch_rel(item->jmp_code+2, target);
|
|
||||||
S390_SET (code, s390_r1, fail_tramp);
|
|
||||||
s390_br (code, s390_r1);
|
|
||||||
@@ -5863,7 +5901,7 @@ mono_arch_build_imt_thunk (MonoVTable *vtable, MonoDomain *domain,
|
|
||||||
if (item->jmp_code) {
|
|
||||||
if (item->check_target_idx) {
|
|
||||||
gint64 offset;
|
|
||||||
- offset = S390_RELATIVE(imt_entries [item->check_target_idx]->code_target,
|
|
||||||
+ offset = (gint64) S390_RELATIVE(imt_entries [item->check_target_idx]->code_target,
|
|
||||||
item->jmp_code);
|
|
||||||
s390_patch_rel ((guchar *) item->jmp_code + 2, (guint64) offset);
|
|
||||||
}
|
|
||||||
@@ -5932,7 +5970,7 @@ mono_arch_get_cie_program (void)
|
|
||||||
{
|
|
||||||
GSList *l = NULL;
|
|
||||||
|
|
||||||
- mono_add_unwind_op_def_cfa (l, NULL, NULL, STK_BASE, 0);
|
|
||||||
+ mono_add_unwind_op_def_cfa (l, 0, 0, STK_BASE, 0);
|
|
||||||
|
|
||||||
return(l);
|
|
||||||
}
|
|
||||||
diff --git a/mono/mini/support-s390x.h b/mono/mini/support-s390x.h
|
|
||||||
index 62edcc4..f93dc88 100644
|
|
||||||
--- a/mono/mini/support-s390x.h
|
|
||||||
+++ b/mono/mini/support-s390x.h
|
|
||||||
@@ -4,8 +4,12 @@
|
|
||||||
#define S390_SET(loc, dr, v) \
|
|
||||||
do { \
|
|
||||||
guint64 val = (guint64) v; \
|
|
||||||
- if (s390_is_uimm16(val)) { \
|
|
||||||
+ if (s390_is_imm16(val)) { \
|
|
||||||
+ s390_lghi(loc, dr, val); \
|
|
||||||
+ } else if (s390_is_uimm16(val)) { \
|
|
||||||
s390_llill(loc, dr, val); \
|
|
||||||
+ } else if (s390_is_imm32(val)) { \
|
|
||||||
+ s390_lgfi(loc, dr, val); \
|
|
||||||
} else if (s390_is_uimm32(val)) { \
|
|
||||||
s390_llilf(loc, dr, val); \
|
|
||||||
} else { \
|
|
||||||
--
|
|
||||||
1.9.1
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
|||||||
Index: xamarin-pkg-mono/mono/mini/support-s390x.h
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ xamarin-pkg-mono/mono/mini/support-s390x.h 2014-10-27 22:55:28.660079050 +0000
|
|
||||||
@@ -0,0 +1,93 @@
|
|
||||||
+#ifndef __MONO_SUPPORT_S390X_H__
|
|
||||||
+#define __MONO_SUPPORT_S390X_H__
|
|
||||||
+
|
|
||||||
+#define S390_SET(loc, dr, v) \
|
|
||||||
+ do { \
|
|
||||||
+ guint64 val = (guint64) v; \
|
|
||||||
+ if (s390_is_uimm16(val)) { \
|
|
||||||
+ s390_llill(loc, dr, val); \
|
|
||||||
+ } else if (s390_is_uimm32(val)) { \
|
|
||||||
+ s390_llilf(loc, dr, val); \
|
|
||||||
+ } else { \
|
|
||||||
+ guint32 hi = (val) >> 32; \
|
|
||||||
+ guint32 lo = (val) & 0xffffffff; \
|
|
||||||
+ s390_iihf(loc, dr, hi); \
|
|
||||||
+ s390_iilf(loc, dr, lo); \
|
|
||||||
+ } \
|
|
||||||
+ } while (0)
|
|
||||||
+
|
|
||||||
+#define S390_LONG(loc, opy, op, r, ix, br, off) \
|
|
||||||
+ if (s390_is_imm20(off)) { \
|
|
||||||
+ s390_##opy (loc, r, ix, br, off); \
|
|
||||||
+ } else { \
|
|
||||||
+ if (ix == 0) { \
|
|
||||||
+ S390_SET(loc, s390_r13, off); \
|
|
||||||
+ s390_la (loc, s390_r13, s390_r13, br, 0); \
|
|
||||||
+ } else { \
|
|
||||||
+ s390_la (loc, s390_r13, ix, br, 0); \
|
|
||||||
+ S390_SET (loc, s390_r0, off); \
|
|
||||||
+ s390_agr (loc, s390_r13, s390_r0); \
|
|
||||||
+ } \
|
|
||||||
+ s390_##op (loc, r, 0, s390_r13, 0); \
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+#define S390_SET_MASK(loc, dr, v) \
|
|
||||||
+ do { \
|
|
||||||
+ if (s390_is_imm16 (v)) { \
|
|
||||||
+ s390_lghi (loc, dr, v); \
|
|
||||||
+ } else if (s390_is_imm32 (v)) { \
|
|
||||||
+ s390_lgfi (loc, dr, v); \
|
|
||||||
+ } else { \
|
|
||||||
+ gint64 val = (gint64) v; \
|
|
||||||
+ guint32 hi = (val) >> 32; \
|
|
||||||
+ guint32 lo = (val) & 0xffffffff; \
|
|
||||||
+ s390_iilf(loc, dr, lo); \
|
|
||||||
+ s390_iihf(loc, dr, hi); \
|
|
||||||
+ } \
|
|
||||||
+ } while (0)
|
|
||||||
+
|
|
||||||
+#define S390_CALL_TEMPLATE(loc, r) \
|
|
||||||
+ do { \
|
|
||||||
+ s390_iihf (loc, r, 0); \
|
|
||||||
+ s390_iilf (loc, r, 0); \
|
|
||||||
+ s390_basr (loc, s390_r14, r); \
|
|
||||||
+ } while (0)
|
|
||||||
+
|
|
||||||
+#define S390_BR_TEMPLATE(loc, r) \
|
|
||||||
+ do { \
|
|
||||||
+ s390_iihf (loc, r, 0); \
|
|
||||||
+ s390_iilf (loc, r, 0); \
|
|
||||||
+ s390_br (loc, r); \
|
|
||||||
+ } while (0)
|
|
||||||
+
|
|
||||||
+#define S390_LOAD_TEMPLATE(loc, r) \
|
|
||||||
+ do { \
|
|
||||||
+ s390_iihf (loc, r, 0); \
|
|
||||||
+ s390_iilf (loc, r, 0); \
|
|
||||||
+ } while (0)
|
|
||||||
+
|
|
||||||
+#define S390_EMIT_CALL(loc, t) \
|
|
||||||
+ do { \
|
|
||||||
+ gint64 val = (gint64) t; \
|
|
||||||
+ guint32 hi = (val) >> 32; \
|
|
||||||
+ guint32 lo = (val) & 0xffffffff; \
|
|
||||||
+ uintptr_t p = (uintptr_t) loc; \
|
|
||||||
+ p += 2; \
|
|
||||||
+ *(guint32 *) p = hi; \
|
|
||||||
+ p += 6; \
|
|
||||||
+ *(guint32 *) p = lo; \
|
|
||||||
+ } while (0)
|
|
||||||
+
|
|
||||||
+#define S390_EMIT_LOAD(loc, v) \
|
|
||||||
+ do { \
|
|
||||||
+ gint64 val = (gint64) v; \
|
|
||||||
+ guint32 hi = (val) >> 32; \
|
|
||||||
+ guint32 lo = (val) & 0xffffffff; \
|
|
||||||
+ uintptr_t p = (uintptr_t) loc; \
|
|
||||||
+ p += 2; \
|
|
||||||
+ *(guint32 *) p = hi; \
|
|
||||||
+ p += 6; \
|
|
||||||
+ *(guint32 *) p = lo; \
|
|
||||||
+ } while (0)
|
|
||||||
+
|
|
||||||
+#endif /* __MONO_SUPPORT_S390X_H__ */
|
|
2
debian/patches/series
vendored
2
debian/patches/series
vendored
@ -1,2 +0,0 @@
|
|||||||
include_missing_s390x_header.patch
|
|
||||||
0001-Add-OP_LREM_IMM-support-Add-implementation-of-mono_a.patch
|
|
Loading…
x
Reference in New Issue
Block a user