View | Details | Raw Unified | Return to bug 228502
Collapse All | Expand All

(-)trunk/mono/mono/mini/ChangeLog (+4 lines)
Lines 1-4 Link Here
1
1
2
Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
3
4
	* mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
5
2
Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6
Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3
7
4
	* mini.c: handle also floating point values in initialize_array.
8
	* mini.c: handle also floating point values in initialize_array.
(-)trunk/mono/mono/mini/mini-ppc.c (-8 / +22 lines)
Lines 1948-1957 Link Here
1948
		return;
1948
		return;
1949
	}
1949
	}
1950
1950
1951
	if (prim == 15 || ins == 0x4e800021) {
1951
	if (prim == 15 || ins == 0x4e800021 || ins == 0x4e800020 || ins == 0x4e800420) {
1952
		guint32 *seq;
1952
		guint32 *seq;
1953
		/* the trampoline code will try to patch the blrl */
1953
		/* the trampoline code will try to patch the blrl, blr, bcctr */
1954
		if (ins == 0x4e800021) {
1954
		if (ins == 0x4e800021 || ins == 0x4e800020 || ins == 0x4e800420) {
1955
			code -= 12;
1955
			code -= 12;
1956
		}
1956
		}
1957
		/* this is the lis/ori/mtlr/blrl sequence */
1957
		/* this is the lis/ori/mtlr/blrl sequence */
Lines 1959-1965 Link Here
1959
		g_assert ((seq [0] >> 26) == 15);
1959
		g_assert ((seq [0] >> 26) == 15);
1960
		g_assert ((seq [1] >> 26) == 24);
1960
		g_assert ((seq [1] >> 26) == 24);
1961
		g_assert ((seq [2] >> 26) == 31);
1961
		g_assert ((seq [2] >> 26) == 31);
1962
		g_assert (seq [3] == 0x4e800021);
1962
		g_assert (seq [3] == 0x4e800021 || seq [3] == 0x4e800020 || seq [3] == 0x4e800420);
1963
		/* FIXME: make this thread safe */
1963
		/* FIXME: make this thread safe */
1964
		ppc_lis (code, ppc_r0, (guint32)(target) >> 16);
1964
		ppc_lis (code, ppc_r0, (guint32)(target) >> 16);
1965
		ppc_ori (code, ppc_r0, ppc_r0, (guint32)(target) & 0xffff);
1965
		ppc_ori (code, ppc_r0, ppc_r0, (guint32)(target) & 0xffff);
Lines 3336-3342 Link Here
3336
	if (method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED) {
3336
	if (method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED) {
3337
		ppc_load (code, ppc_r3, cfg->domain);
3337
		ppc_load (code, ppc_r3, cfg->domain);
3338
		mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_INTERNAL_METHOD, (gpointer)"mono_jit_thread_attach");
3338
		mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_INTERNAL_METHOD, (gpointer)"mono_jit_thread_attach");
3339
		ppc_bl (code, 0);
3339
		if (FORCE_INDIR_CALL || cfg->method->dynamic) {
3340
			ppc_lis (code, ppc_r0, 0);
3341
			ppc_ori (code, ppc_r0, ppc_r0, 0);
3342
			ppc_mtlr (code, ppc_r0);
3343
			ppc_blrl (code);
3344
		} else {
3345
			ppc_bl (code, 0);
3346
		}
3340
	}
3347
	}
3341
3348
3342
	if (method->save_lmf) {
3349
	if (method->save_lmf) {
Lines 3536-3542 Link Here
3536
		if (patch_info->type == MONO_PATCH_INFO_EXC) {
3543
		if (patch_info->type == MONO_PATCH_INFO_EXC) {
3537
			i = exception_id_by_name (patch_info->data.target);
3544
			i = exception_id_by_name (patch_info->data.target);
3538
			if (!exc_throw_found [i]) {
3545
			if (!exc_throw_found [i]) {
3539
				max_epilog_size += 12;
3546
				max_epilog_size += 24;
3540
				exc_throw_found [i] = TRUE;
3547
				exc_throw_found [i] = TRUE;
3541
			}
3548
			}
3542
		} else if (patch_info->type == MONO_PATCH_INFO_BB_OVF)
3549
		} else if (patch_info->type == MONO_PATCH_INFO_BB_OVF)
Lines 3545-3551 Link Here
3545
			MonoOvfJump *ovfj = patch_info->data.target;
3552
			MonoOvfJump *ovfj = patch_info->data.target;
3546
			i = exception_id_by_name (ovfj->data.exception);
3553
			i = exception_id_by_name (ovfj->data.exception);
3547
			if (!exc_throw_found [i]) {
3554
			if (!exc_throw_found [i]) {
3548
				max_epilog_size += 12;
3555
				max_epilog_size += 24;
3549
				exc_throw_found [i] = TRUE;
3556
				exc_throw_found [i] = TRUE;
3550
			}
3557
			}
3551
			max_epilog_size += 8;
3558
			max_epilog_size += 8;
Lines 3614-3620 Link Here
3614
			patch_info->type = MONO_PATCH_INFO_INTERNAL_METHOD;
3621
			patch_info->type = MONO_PATCH_INFO_INTERNAL_METHOD;
3615
			patch_info->data.name = "mono_arch_throw_exception_by_name";
3622
			patch_info->data.name = "mono_arch_throw_exception_by_name";
3616
			patch_info->ip.i = code - cfg->native_code;
3623
			patch_info->ip.i = code - cfg->native_code;
3617
			ppc_b (code, 0);
3624
			if (FORCE_INDIR_CALL || cfg->method->dynamic) {
3625
				ppc_lis (code, ppc_r0, 0);
3626
				ppc_ori (code, ppc_r0, ppc_r0, 0);
3627
				ppc_mtctr (code, ppc_r0);
3628
				ppc_bcctr (code, PPC_BR_ALWAYS, 0);
3629
			} else {
3630
				ppc_b (code, 0);
3631
			}
3618
			break;
3632
			break;
3619
		}
3633
		}
3620
		default:
3634
		default:

Return to bug 228502