[Mono-devel-list] Patch for CONV_I/U handling in mini.c
Zoltan Varga
vargaz at gmail.com
Tue Aug 10 13:18:28 EDT 2004
Hi,
I fail to see why this is neccesary. CONV_I and friends are already
transformed
to OP_LCONV_I in type_from_op () if the top of the stack is an int64.
OP_LCONV_I is then handled by the rules in inssel-long<32>.brg, so the
backend will never see it. If the top of the stack is an int32, then CONV_I is
passed to the rules in inssel.brg, which either emit a move on 32 bit machines,
or pass it to the backend on 64 bit machines. So the backend should allways
emit a widening op. It might be more meaningful to transform CONV_I into
OP_ICONV_I in the burg rules, to signify that it is a 32 bit op.
Zoltan
On Fri, 30 Jul 2004 11:10:01 -0700, Bernie Solomon
<bernard at ugsolutions.com> wrote:
>
> I attach a patch to mini.h/c to improve handling of cast to native int for
> 64 bit machines.
> This affects CONV_I and similar opcodes.
>
> If the type is already the same size as a ptr no instruction is generated so
> that
> for a 64bit machine if a CEE_CONV_I gets through to the code generation
> stage (as it does for sparc V9) it must be a 4 to 8 byte widening operation.
>
> I added the STACK_I macro to make this easier to code.
>
> OK to commit?
>
> Bernie Solomon
>
>
>
More information about the Mono-devel-list
mailing list