[PATCH] vm: fix check_class() and check_class_object() macros

2009-07-07 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/jni-interface.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/jni-interface.c b/vm/jni-interface.c index c5aa38c..c955dfb 100644 --- a/vm/jni-interface.c +++ b/vm/jni-interface.c @@ -41,14 +41,14 @@ #include

[RFC PATCH 02/13] x86: better common code register aliases

2009-07-07 Thread Eduard - Gabriel Munteanu
This replaces various aliases (and leftovers) with better ones. For example, we can now refer to REG_ESP or REG_RSP in common code with REG_xSP. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- arch/x86/emit-code.c | 46 +-

[RFC PATCH 09/13] x86-64: fix __emit64_push_imm()

2009-07-07 Thread Eduard - Gabriel Munteanu
We can't push a 64-bit immediate value on the stack on x86-64. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- arch/x86/emit-code.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c index

[RFC PATCH 06/13] x86: fix emitters depending on pointer size

2009-07-07 Thread Eduard - Gabriel Munteanu
We now use PTR_SIZE, so common code is independent of long size. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- arch/x86/emit-code.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c index

[RFC PATCH 04/13] x86-64: provide reg_type()

2009-07-07 Thread Eduard - Gabriel Munteanu
This provides reg_type() on x86-64, as required by other code. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- arch/x86/registers_64.c | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/arch/x86/registers_64.c

[RFC PATCH 07/13] x86-64: implement emit_trampoline and related emitters

2009-07-07 Thread Eduard - Gabriel Munteanu
This implements emit_trampoline() and related emitters and fixes code that it depends on. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- arch/x86/Makefile_64|1 + arch/x86/emit-code.c| 205 +--

[RFC PATCH 12/13] Remove -Werror on non-i386 builds

2009-07-07 Thread Eduard - Gabriel Munteanu
x86-64 isn't complete yet and there are a few warnings that will be eventually solved. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- Makefile |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index b1b20ea..08cebfe 100644

[RFC PATCH 01/13] x86-64: don't use REG_Exx outside common code

2009-07-07 Thread Eduard - Gabriel Munteanu
This fixes an inconsistency where we use REG_ESP instead of REG_RSP. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- arch/x86/emit-code.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c index

[RFC PATCH 08/13] x86-64: fix typo in REX prefix

2009-07-07 Thread Eduard - Gabriel Munteanu
REX prefixes have a base value of 0x40 (i.e. hex), not 40 (i.e. decimal). Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- arch/x86/emit-code.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c index

[RFC PATCH 13/13] x86-64: stub for emit_itable_resolver_stub()

2009-07-07 Thread Eduard - Gabriel Munteanu
This creates a stub for emit_itable_resolver_stub() that simply returns NULL. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- arch/x86/emit-code.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c

[PATCH] Fix use-after-free in fixup_static_at()

2009-07-07 Thread Vegard Nossum
Ensuring that the class is initialized may cause fixup to be called again, and when we return to the first fixup call, the fixup list will be invalid. The solution is to not access the list anymore after we've ensured that the class has been initialized. This was introduced in: Author: Vegard

[PATCH 1/4] vm: don't build itables for abstract classes

2009-07-07 Thread Vegard Nossum
Reported-by: Arthur HUILLET arthur.huil...@free.fr Signed-off-by: Vegard Nossum vegard.nos...@gmail.com --- include/vm/class.h |5 + vm/class.c |4 +++- vm/itable.c|5 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/vm/class.h

[PATCH 4/4] vm: implement getStaticMethodId JNI call

2009-07-07 Thread Vegard Nossum
Signed-off-by: Vegard Nossum vegard.nos...@gmail.com --- vm/jni-interface.c | 29 - 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/vm/jni-interface.c b/vm/jni-interface.c index c955dfb..2b6dc28 100644 --- a/vm/jni-interface.c +++ b/vm/jni-interface.c

[GIT PULL] misc. updates

2009-07-07 Thread Vegard Nossum
Hi, The following changes since commit 4cfb501928aac056574a758bc98bb0897d3b9a01: Eduard - Gabriel Munteanu (1): x86-64: stub for emit_itable_resolver_stub() are available in the git repository at: git://github.com/vegard/jato.git master Vegard Vegard Nossum (5):

[PATCH 2/4] vm: fix deadlock (error in invokestatic handling)

2009-07-07 Thread Vegard Nossum
We shouldn't try to initialize classes with the compilation_unit mutex held. The right fix here is to split initialization from fix-up, and do the initialization before we even try to compile the method. Reported-by: Tomek Grabiec tgrab...@gmail.com Signed-off-by: Vegard Nossum

[PATCH] vm: Add new classpath autodiscovery path

2009-07-07 Thread Tomek Grabiec
On gentoo gnu-classpath-97.2 is installed in /usr/local/classpath/ Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/jato.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index 4eb5dbc..ec7a388 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -474,6

[PATCH 1/2] vm: set 'path.separator' to ':'

2009-07-07 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/jato.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index 4eb5dbc..a9eb0a7 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -106,7 +106,7 @@ static void __vm_native

[PATCH 2/2] vm: set 'java.library.path' property to LD_LIBRARY_PATH

2009-07-07 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/jato.c | 31 ++- vm/jni.c | 16 +--- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index a9eb0a7..c6dfd4d 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -93,6