Re: [PATCH] vm: Use calloc() to allocate class methods

2009-09-05 Thread Pekka Enberg
Vegard Nossum wrote: > 2009/9/5 Pekka Enberg : >> Good point. I wonder why we have methods without code attribute in >> classfiles. >> > > Native and abstract methods don't have code. It's all here: > > http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#1546 > > I think I

Re: [PATCH] vm: Use calloc() to allocate class methods

2009-09-05 Thread Vegard Nossum
2009/9/5 Pekka Enberg : > Good point. I wonder why we have methods without code attribute in > classfiles. > Native and abstract methods don't have code. It's all here: http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#1546 I think I tried once to skip the prepare-for-ji

Re: [PATCH] vm: Use calloc() to allocate class methods

2009-09-05 Thread Pekka Enberg
Vegard Nossum wrote: > 2009/9/5 Pekka Enberg : >> On Sat, 2009-09-05 at 16:06 +0200, Vegard Nossum wrote: >>> Um, wait, what's the actual dereference that causes the valgrind >>> warning? Because as it stands, it looks like you're fixing just the >>> symptom and not the real error. We have method i

[penberg/jato] fdabb3: x86-64: pass arguments correctly in STMT_ATHROW

2009-09-05 Thread noreply
Branch: refs/heads/master Home: http://github.com/penberg/jato Commit: fdabb34075d775fd7394598edaa7d95dedfb76aa http://github.com/penberg/jato/commit/fdabb34075d775fd7394598edaa7d95dedfb76aa Author: Eduard - Gabriel Munteanu Date: 2009-09-05 (Sat, 05 Sep 2009) Changed paths: M arch/x8

Re: [PATCH] vm: Use calloc() to allocate class methods

2009-09-05 Thread Vegard Nossum
2009/9/5 Pekka Enberg : > On Sat, 2009-09-05 at 16:06 +0200, Vegard Nossum wrote: >> Um, wait, what's the actual dereference that causes the valgrind >> warning? Because as it stands, it looks like you're fixing just the >> symptom and not the real error. We have method initializers that >> should

Re: [PATCH] vm: Use calloc() to allocate class methods

2009-09-05 Thread Pekka Enberg
On Sat, 2009-09-05 at 16:06 +0200, Vegard Nossum wrote: > 2009/9/5 Pekka Enberg : > > This fixes the following uninitialized memory access reported by valgrind: > > > > ==24231== Warning: set address range perms: large range 268435456 (defined) > > ==24231== Conditional jump or move depends on un

Re: [PATCH] vm: Use calloc() to allocate class methods

2009-09-05 Thread Vegard Nossum
2009/9/5 Pekka Enberg : > This fixes the following uninitialized memory access reported by valgrind: > >  ==24231== Warning: set address range perms: large range 268435456 (defined) >  ==24231== Conditional jump or move depends on uninitialised value(s) >  ==24231==    at 0x8069173: alloc_stack_fra

[PATCH] vm: Use calloc() to allocate class methods

2009-09-05 Thread Pekka Enberg
This fixes the following uninitialized memory access reported by valgrind: ==24231== Warning: set address range perms: large range 268435456 (defined) ==24231== Conditional jump or move depends on uninitialised value(s) ==24231==at 0x8069173: alloc_stack_frame (stack-slot.c:45) ==24231

Re: [PATCH 13/19] x86-64: add XMM registers

2009-09-05 Thread Pekka Enberg
Hi Eduard, Eduard - Gabriel Munteanu wrote: > This adds definitions for XMM regs on x86-64. > > Signed-off-by: Eduard - Gabriel Munteanu > --- > arch/x86/include/arch/registers_64.h |9 + > arch/x86/registers_64.c |9 + > 2 files changed, 18 insertions(+), 0

[PATCH 19/19] x86-64: provide definition for itable_resolver_stub_error()

2009-09-05 Thread Eduard - Gabriel Munteanu
This defines itable_resolver_stub_error() on x86-64 just like it is defined on x86-32, except for the regparm attribute (since x86-64 already uses registers for passing arguments). Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/emit-code.c | 13 + 1 files changed, 13 inserti

[PATCH 16/19] x86-64: ifdef EXPR_FVALUE and OP_DNEG

2009-09-05 Thread Eduard - Gabriel Munteanu
We ifdef these until they are implemented properly on x86-64. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/insn-selector.brg |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/x86/insn-selector.brg b/arch/x86/insn-selector.brg index 17b68a1..6b57153 100644

[PATCH 18/19] x86-64: remove is_caller_saved_reg()

2009-09-05 Thread Eduard - Gabriel Munteanu
is_caller_saved_reg() is no longer used since caller_save_regs has been introduced, so we remove it. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/include/arch/registers_64.h | 18 -- 1 files changed, 0 insertions(+), 18 deletions(-) diff --git a/arch/x86/include/arch/

[PATCH 17/19] x86-64: define caller_save_regs

2009-09-05 Thread Eduard - Gabriel Munteanu
Recent changes have introduced caller_save_regs, which must be defined on x86-64 as well. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/include/arch/registers_64.h |3 +++ arch/x86/registers_64.c | 21 + 2 files changed, 24 insertions(+), 0 deletion

[PATCH 13/19] x86-64: add XMM registers

2009-09-05 Thread Eduard - Gabriel Munteanu
This adds definitions for XMM regs on x86-64. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/include/arch/registers_64.h |9 + arch/x86/registers_64.c |9 + 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/arch/registers

[PATCH 15/19] x86-64: move received parameters to non-fixed registers

2009-09-05 Thread Eduard - Gabriel Munteanu
We must not keep the parameters we received in fixed registers because they can be clobbered by other insn-selector rules that use them (e.g. method invocation). Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/insn-selector.brg | 38 +++--- include/jit

[PATCH 14/19] x86-64: handle class fields properly

2009-09-05 Thread Eduard - Gabriel Munteanu
This fixes class field handling on x86-64. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/insn-selector.brg | 85 1 files changed, 85 insertions(+), 0 deletions(-) diff --git a/arch/x86/insn-selector.brg b/arch/x86/insn-selector.brg index d1

[PATCH 11/19] x86-64: split and implement fixup_static()

2009-09-05 Thread Eduard - Gabriel Munteanu
The x86-64 variant of fixup_static() needs to cope with REX prefixes and RIP-relative addressing. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/emit-code.c | 91 ++--- 1 files changed, 63 insertions(+), 28 deletions(-) diff --git a/arch/x86/

[PATCH 10/19] x86-64: implement INSN_MOV_MEMINDEX_REG

2009-09-05 Thread Eduard - Gabriel Munteanu
This implements INSN_MOV_MEMINDEX_REG on x86-64. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/emit-code.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c index b363332..c2d625b 100644 --- a/arch/x86/emit-code

[PATCH 09/19] x86: use offsetof() instead of sizeof() when handling instance fields

2009-09-05 Thread Eduard - Gabriel Munteanu
Due to padding issues, sizeof() can provide incorrect offsets. Therefore, we replace sizeof() with offsetof(). Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/insn-selector.brg |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/insn-selector.brg b/arch/x

[PATCH 12/19] x86-64: zero unused parameter regs in native_call()

2009-09-05 Thread Eduard - Gabriel Munteanu
Generally, it is unneccessary to zero the unused parameter regs since we don't expect them to be read by the called function. However, Valgrind may complain about accessing uninitialized memory so it's preferable to zero them for now. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/call.c

[PATCH 08/19] x86: ifdef EXPR_CONVERSION_FROM_FLOAT

2009-09-05 Thread Eduard - Gabriel Munteanu
We ifdef EXPR_CONVERSION_FROM_FLOAT so the x86-64 port works until it is properly implemented. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/insn-selector.brg |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/insn-selector.brg b/arch/x86/insn-selector.brg

[PATCH 06/19] x86-64: implement signal bh

2009-09-05 Thread Eduard - Gabriel Munteanu
This implements functions related to signal bh on x86-64. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/signal-bh.S | 55 ++ 1 files changed, 55 insertions(+), 0 deletions(-) diff --git a/arch/x86/signal-bh.S b/arch/x86/signal-bh.S index

[PATCH 05/19] x86-64: fix emit_lock_this() and emit_unlock_this()

2009-09-05 Thread Eduard - Gabriel Munteanu
This fixes emit_lock_this() and emit_unlock_this() to use the saved *this pointer. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/emit-code.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c index ff22482..b363332 1006

[PATCH 07/19] x86-64: implement unwind()

2009-09-05 Thread Eduard - Gabriel Munteanu
This implements unwind() properly on x86-64. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/unwind_64.S | 24 +++- 1 files changed, 11 insertions(+), 13 deletions(-) diff --git a/arch/x86/unwind_64.S b/arch/x86/unwind_64.S index 0f120c6..b89ba0f 100644 --- a/arch/x8

[PATCH 04/19] x86-64: save *this pointer

2009-09-05 Thread Eduard - Gabriel Munteanu
Monitor emitters and locking code can't get *this otherwise because the corresponding instructions aren't insn-selected. Therefore we save *this in a known place on the stack. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/emit-code.c|6 ++ arch/x86/include/arch/st

[PATCH 03/19] x86: provide separate x86-32 signal bh definitions

2009-09-05 Thread Eduard - Gabriel Munteanu
The unified x86 and x86-64 signal bh definitions aren't suitable due to differences in argument passing. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/signal-bh.S | 42 +++--- 1 files changed, 15 insertions(+), 27 deletions(-) diff --git a/arch/x86/

[PATCH 01/19] x86-64: pass arguments correctly in STMT_ATHROW

2009-09-05 Thread Eduard - Gabriel Munteanu
This provides correct argument passing for x86-64 in STMT_ATHROW. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/insn-selector.brg | 25 - 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/arch/x86/insn-selector.brg b/arch/x86/insn-selector.brg inde

[PATCH 02/19] x86-64: implement STMT_MONITOR_*

2009-09-05 Thread Eduard - Gabriel Munteanu
This implements the STMT_MONITOR_* statements according to the x86-64 ABI. Signed-off-by: Eduard - Gabriel Munteanu --- arch/x86/insn-selector.brg | 30 ++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/arch/x86/insn-selector.brg b/arch/x86/insn-sel

[penberg/jato] 7f9b5f: jit: fix conversion of invoke* instructions

2009-09-05 Thread noreply
Branch: refs/heads/master Home: http://github.com/penberg/jato Commit: 7f9b5f817b69aae2622cdcf3604f23661a1b6550 http://github.com/penberg/jato/commit/7f9b5f817b69aae2622cdcf3604f23661a1b6550 Author: Tomek Grabiec Date: 2009-09-05 (Sat, 05 Sep 2009) Changed paths: M Makefile M arch/x