[Mono-devel-list] [PATCH] Updated patch for long reg allocation

Paolo Molaro lupus at ximian.com
Wed May 5 12:02:22 EDT 2004


On 05/05/04 Torstensson, Patrik wrote:
> This update just changes back the behavior of md 'l' to the old behavior
> (forcing result into eax:edx)

> Index: mini-x86.c
> ===================================================================
> RCS file: /cvs/public/mono/mono/mini/mini-x86.c,v
> retrieving revision 1.88
> diff -u -r1.88 mini-x86.c
> --- mini-x86.c	28 Apr 2004 12:49:44 -0000	1.88
> +++ mini-x86.c	5 May 2004 11:30:03 -0000
> @@ -1747,6 +1835,56 @@
>  					insert_before_ins (load, tmp, store);
>  			}
>  		} 
> +		else if (spec [MONO_INST_SRC2] == 'L') {
> +			/* FIXME: This functionality havn't been fully tested */

Please drop this chunk from the commit until we actually use this code
and test it.

> @@ -2205,6 +2343,105 @@
>  		case OP_SHL_IMM:
>  			x86_shift_reg_imm (code, X86_SHL, ins->dreg, ins->inst_imm);
>  			break;
> +		case OP_LSHL: {
> +			guint8 *br[2];
> +
> +			/* handle shifts bellow 32 bits */
> +			x86_alu_reg_imm (code, X86_CMP, X86_ECX, 32);
> +			br[0] = code; x86_branch8 (code, X86_CC_GE, 0, TRUE);
> +
> +			x86_shld_reg (code, ins->unused, ins->sreg1);
> +			x86_shift_reg (code, X86_SHL, ins->sreg1);
> +
> +			br[1] = code; x86_jump8 (code, 0);

Please use meaningful names for the branch sites: this one, for example
could be called jump_to_end, etc.
After the changes feel free to commit and get people to test.
Thanks.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list