Re: Crash in fix_invoke function

2009-04-16 Thread Tomek Grabiec
2009/4/15 Arthur Huillet : > I managed to trigger a segfault in fix_invoke when running the following > program : > http://rafb.net/p/fT6n2f27.html >  (duplicated below) > > > > +       public static int getone() { > +               return 1; > +       } > + > +       public static void testInteger

Broken while loops: BC2IR bug(s)

2009-04-16 Thread Arthur Huillet
Hi, The following java code : public static void aaa() { int i = 0; while (i < 5) { i = i+1; } assertEquals(5, i); } is compiled into the following bytecode : public static void aaa(); Code: 0: iconst_0 1: istore_0 2: goto

Re: [PATCH] jit: HIR now separates 32bit and 64bit shifts

2009-04-16 Thread Pekka Enberg
On Thu, 2009-04-16 at 11:40 +0200, Arthur HUILLET wrote: > OP_{SHR, USHR, SHL} now denotes 32bit operations, > OP_{SHR, USHR, SHL}_64 represent 64bit operations. > > This is necessary because we cannot provide "optimised" reg, EXPR_LOCAL > rules for 64bit shifts easily on x86. > > Signed-off-by:

[PATCH] jit: HIR now separates 32bit and 64bit shifts

2009-04-16 Thread Arthur HUILLET
OP_{SHR, USHR, SHL} now denotes 32bit operations, OP_{SHR, USHR, SHL}_64 represent 64bit operations. This is necessary because we cannot provide "optimised" reg, EXPR_LOCAL rules for 64bit shifts easily on x86. Signed-off-by: Arthur HUILLET --- arch/x86/insn-selector_32.brg | 15 +

Re: [PATCH] Added support for LIR tracing. Implemented for x86.

2009-04-16 Thread Pekka Enberg
On Thu, 2009-04-16 at 00:57 +0200, Arthur HUILLET wrote: > this patch adds a LIR tracer. It has only been implemented for x86 so > I assume you will have to tweak it a bit before merging it upstream. > It seems to work fine here, so please apply. Nope, i386 is the only supported architecture for n

Re: [PATCH] jit: fix bug in register allocator when splitting intervals

2009-04-16 Thread Pekka Enberg
On Wed, 2009-04-15 at 18:45 +0200, Arthur HUILLET wrote: > The unhandled intervals list was browsed with list_for_each_safe, which > does not work if the immediate successor is modified. This happens when > splitting intervals and inserting the split child into the list - the > bug was that the chi

Re: [PATCH] x86: Add fixed registers to use-def for instructions with implicit operands

2009-04-16 Thread Pekka Enberg
On Wed, 2009-04-15 at 18:42 +0200, Arthur HUILLET wrote: > Also removed DEF_CALLER_SAVED_REGISTERS in favor of a binary OR of the > said fixed registers. > This exposes a bug in the register allocator with long multiplication, > which is why it is disabled by this patch. > > Signed-off-by: Arthur

Re: [PATCH] jit: fix regalloc tracing so interval splitting is readable

2009-04-16 Thread Pekka Enberg
On Wed, 2009-04-15 at 17:09 +0200, Arthur HUILLET wrote: > Intervals are now displayed with their start and end positions, and the > assigned register is selected correctly. > > Signed-off-by: Arthur HUILLET Applied, thanks! -