From 5b57f45b124536e65986e53f1f177361d1d17661 Mon Sep 17 00:00:00 2001 From: Paolo Molaro Date: Wed, 24 Jan 2007 13:54:49 +0000 Subject: Wed Jan 24 14:54:40 CET 2007 Paolo Molaro * mini.c: fix some more soft-float issues. svn path=/trunk/mono/; revision=71591 --- mono/mini/ChangeLog | 5 +++++ mono/mini/mini.c | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index 8ca7d1a1ada..f7719d551d0 100644 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -1,3 +1,8 @@ + +Wed Jan 24 14:54:40 CET 2007 Paolo Molaro + + * mini.c: fix some more soft-float issues. + 2007-01-24 Zoltan Varga * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build. diff --git a/mono/mini/mini.c b/mono/mini/mini.c index f12fb207c3c..d808eb13bd2 100644 --- a/mono/mini/mini.c +++ b/mono/mini/mini.c @@ -2710,10 +2710,19 @@ handle_load_float (MonoCompile *cfg, MonoBasicBlock *bblock, MonoInst *ptr, cons NEW_TEMPLOAD (cfg, (ins), temp); \ } \ } while (0) +#define STARG_SOFT_FLOAT(cfg,ins,idx,ip) do {\ + if (param_types [(idx)]->type == MONO_TYPE_R4 && !param_types [(idx)]->byref) { \ + int temp; \ + NEW_ARGLOADA (cfg, (ins), (idx)); \ + handle_store_float (cfg, bblock, (ins), *sp, (ip)); \ + MONO_INST_NEW (cfg, (ins), CEE_NOP); \ + } \ + } while (0) #else #define LDLOC_SOFT_FLOAT(cfg,ins,idx,ip) #define STLOC_SOFT_FLOAT(cfg,ins,idx,ip) #define LDARG_SOFT_FLOAT(cfg,ins,idx,ip) +#define STARG_SOFT_FLOAT(cfg,ins,idx,ip) #endif static MonoMethod* @@ -3029,6 +3038,11 @@ mono_method_check_inlining (MonoCompile *cfg, MonoMethod *method) MONO_TYPE_ISSTRUCT (signature->ret)) return FALSE; +#ifdef MONO_ARCH_SOFT_FLOAT + /* this complicates things, fix later */ + if (signature->ret->type == MONO_TYPE_R4) + return FALSE; +#endif /* its not worth to inline methods with valuetype arguments?? */ for (i = 0; i < signature->param_count; i++) { if (MONO_TYPE_ISSTRUCT (signature->params [i])) { @@ -4318,6 +4332,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b ins->cil_code = ip; if (!dont_verify_stloc && target_type_is_incompatible (cfg, param_types [ip [1]], *sp)) UNVERIFIED; + STARG_SOFT_FLOAT (cfg, ins, ip [1], ip); if (ins->opcode == CEE_STOBJ) { NEW_ARGLOADA (cfg, ins, ip [1]); handle_stobj (cfg, bblock, ins, *sp, ip, ins->klass, FALSE, FALSE, FALSE); @@ -7296,6 +7311,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b ins->cil_code = ip; if (!dont_verify_stloc && target_type_is_incompatible (cfg, param_types [n], *sp)) UNVERIFIED; + STARG_SOFT_FLOAT (cfg, ins, n, ip); if (ins->opcode == CEE_STOBJ) { NEW_ARGLOADA (cfg, ins, n); handle_stobj (cfg, bblock, ins, *sp, ip, ins->klass, FALSE, FALSE, FALSE); -- cgit v1.2.3