lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lightning] Let's shift again


From: Mike Spivey
Subject: Re: [Lightning] Let's shift again
Date: Sat, 21 Feb 2009 12:27:16 +0000
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Alas, that patch doesn't work either in cases such as lshr_i R0 R1 R0.  I think
I've fixed the problem, and have written more test cases, but I'll ponder it 
for a
while before posting more code.

-- Mike

Mike Spivey wrote:
> Dear Paolo and all,
> 
> I'm sorry to say it, but the shift instructions still aren't working on i386. 
>  In
> particular, "lshr_i V0 R1 V2" results in a message saying that the 
> instruction is
> unimplemented, but in fact "lshr_i R1 V1 V2" gives the wrong answers. (The 
> problem
> arises because i386 insists on having the *third* operand in ECX aka R1, so 
> some
> moves must be inserted if any other register is used.)
> 
> I've attached a test case that can be compiled with -DUNFIXED or -DFIX1 or 
> -DFIX2.
>  With FIX1, the instruction "lshr_i V0 R1 V2" works correctly, and "lshr_i R1 
> V1
> V2" is unimplemented.  The fix is a simple matter of nesting calls to jit_op_ 
> and
> jit_replace in the opposite order with a couple of adjustments.
> 
> A better fix is provided with FIX2, because there R1 can be used as any of the
> registers, but of course with varying penalties in pushes and pops and moves.
> 
> Best wishes,
> 
> -- Mike
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Lightning mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lightning




reply via email to

[Prev in Thread] Current Thread [Next in Thread]