[Mono-list] JIT patch for stabs debugging

Dietmar Maurer dietmar@ximian.com
11 Mar 2002 09:27:02 +0100


On Sun, 2002-03-10 at 13:45, Martin Baulig wrote:

> 
> > > --- x86.brg	2002/03/08 06:08:46	1.92
> > > +++ x86.brg	2002/03/09 21:48:16
> > > @@ -816,7 +816,7 @@
> > >  	if (tree->left->reg1 != X86_EAX)
> > >  		x86_mov_reg_reg (s->code, X86_EAX, tree->left->reg1, 4);
> > >  
> > > -	x86_cdq (s->code);
> > > +	x86_mov_reg_imm (s->code, X86_EDX, 0);
> > >  	x86_div_reg (s->code, tree->right->reg1, FALSE);
> > >  
> > >  	mono_assert (tree->reg1 == X86_EAX &&
> > 
> > Use xor %edx, %edx, there.
> 
> There is no x86_xor(), but x86_mov_reg_imm() already emits a XOR if the argument is zero.
> 
> Btw., this shouldn't be in the diff, it's another patch which Dietmar already approved.

Hi Paolo,

I think we should have something like x86_clear_reg (code, X86_XXX). The
XOR hack is obvious for any assembler freak, but confusing for other
people.

for example:

#define x86_clear_reg(code,reg) x86_alu_reg_reg(code, X86_XOR, reg, reg)

- Dietmar