[Mono-devel-list] [PATCH] Opcode decomposition
Paolo Molaro
lupus at ximian.com
Mon Apr 5 14:24:30 EDT 2004
On 04/01/04 Ben Maurer wrote:
> Index: mini.c
> ===================================================================
> RCS file: /cvs/public/mono/mono/mini/mini.c,v
> retrieving revision 1.210
> diff -u -r1.210 mini.c
> --- mini.c 31 Mar 2004 20:45:53 -0000 1.210
> +++ mini.c 1 Apr 2004 21:29:19 -0000
> @@ -618,6 +618,27 @@
> (dest)->inst_right = (el2); \
> } while (0)
>
> +#define NEW_LOAD_MEMBASE(cfg,dest,source,offset,op) do { \
> + MonoInst* load_source; \
> + if (offset != 0) { \
> + MonoInst* offset_inst; \
> + NEW_ICONST (cfg, offset_inst, offset); \
> + MONO_INST_NEW (cfg, load_source, CEE_ADD); \
> + load_source->cil_code = source->cil_code; \
> + load_source->inst_left = source; \
> + load_source->inst_right = offset_inst; \
> + load_source->type = STACK_MP; \
STACK_MP is not always correct when you use the macro in this way.
In the new jit we try to maintain the info on managed/unmanaged
pointers, at least until burg is involved or going to a precise GC will
be even more difficult than it already is.
> @@ -6337,10 +6358,12 @@
> static MonoJitICallInfo *newarr_specific_info = NULL;
> MonoJitICallInfo *info;
> int i;
> + MonoCompile *cfg = data;
Put back this out of the fast path.
> +
> +decompose_again:
No gotos, please. It's also better to avoid creating a new MonoInst if
it's not needed (it saves also the memcpy you introduce with *tree =
*newinst).
lupus
--
-----------------------------------------------------------------
lupus at debian.org debian/rules
lupus at ximian.com Monkeys do it better
More information about the Mono-devel-list
mailing list