Skip to content

Commit

Permalink
2008-09-06 Zoltan Varga <vargaz@gmail.com>
Browse files Browse the repository at this point in the history
	* mini.c (mono_spill_call): Handle pinvoke+soft float on arm.

svn path=/branches/mono-2-0/mono/; revision=112422
  • Loading branch information
vargaz committed Sep 6, 2008
1 parent 8125642 commit 742bd55
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
2 changes: 2 additions & 0 deletions mono/mini/ChangeLog
@@ -1,5 +1,7 @@
2008-09-06 Zoltan Varga <vargaz@gmail.com>

* mini.c (mono_spill_call): Handle pinvoke+soft float on arm.

* aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
methods to their code to avoid computing the full name of wrappers and
doing a lookup in a string hash table.
Expand Down
30 changes: 27 additions & 3 deletions mono/mini/mini.c
Expand Up @@ -2631,8 +2631,27 @@ mono_spill_call (MonoCompile *cfg, MonoBasicBlock *bblock, MonoCallInst *call, M
if (store->opcode == CEE_STIND_R4) {
/*FIXME implement proper support for to_end*/
g_assert (!to_end);
NEW_TEMPLOADA (cfg, store, temp->inst_c0);
handle_store_float (cfg, bblock, store, ins, ip);
if (sig->pinvoke) {
/* The called function really returns a float in an int reg */
switch (ins->opcode) {
case OP_FCALL:
ins->opcode = OP_CALL;
break;
case OP_FCALL_REG:
ins->opcode = OP_CALL_REG;
break;
case OP_FCALL_MEMBASE:
ins->opcode = OP_CALL_MEMBASE;
break;
default:
g_assert_not_reached ();
}
store->opcode = CEE_STIND_I4;
MONO_ADD_INS (bblock, store);
} else {
NEW_TEMPLOADA (cfg, store, temp->inst_c0);
handle_store_float (cfg, bblock, store, ins, ip);
}
} else
#endif
if (to_end)
Expand Down Expand Up @@ -6144,6 +6163,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
else
no_spill = FALSE;

#ifdef MONO_ARCH_SOFT_FLOAT
if (fsig->pinvoke && fsig->ret->type == MONO_TYPE_R4)
/* The code to handle this is in spill_call () */
no_spill = FALSE;
#endif

/* FIXME: only do this for generic methods if
they are not shared! */
if (context_used &&
Expand Down Expand Up @@ -14076,7 +14101,6 @@ mini_init (const char *filename, const char *runtime_version)
mono_add_internal_call ("Mono.Runtime::mono_runtime_install_handlers",
mono_runtime_install_handlers);


create_helper_signature ();

#define JIT_CALLS_WORK
Expand Down

0 comments on commit 742bd55

Please sign in to comment.