[PATCH 2/2] x86: improve FPU support

2009-07-03 Thread Arthur Huillet
- fix moving floats between GPR and XMM registers - implemented FSUB FMUL and FDIV, cannot be fully tested yet - implemented FCMPL - missing : FNEG, FREM, and more importantly functions returning float are not doing it properly yet. Signed-off-by: Arthur Huillet --- arch/x86/emit-code.c

Re: [PATCH] vm: allocate enough memory for inherited fields, amendment #2

2009-07-03 Thread Pekka Enberg
On Thu, 2009-07-02 at 21:43 +0200, Vegard Nossum wrote: > Allocate just the right amount of memory that we need for this class's > static fields, including fields inherited from the superclass. > > Signed-off-by: Vegard Nossum Applied, thanks! --

Re: [PATCH] x86: fix FMUL FDIV FCMPL, implement FNEG, enable FloatArithmeticTest

2009-07-03 Thread Pekka Enberg
Applied, thanks! -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH 1/2] x86: fix cvtsi2ss and cvtss2si code emission

2009-07-03 Thread Pekka Enberg
On Fri, 2009-07-03 at 02:05 +0200, Arthur Huillet wrote: > source and destination registers were swapped > > Signed-off-by: Arthur Huillet Applied, thanks! -- ___ Jatovm-deve

[PATCH] x86: float remainder is FREM in the HIR

2009-07-03 Thread Arthur Huillet
Not implemented for now because the emulation function returns float, and we cannot talk to functions returning floats that respect the ABI for now. Signed-off-by: Arthur Huillet --- include/jit/expression.h |1 + jit/arithmetic-bc.c |2 +- jit/tree-printer

[PATCH] regression: add integer<->float conversion tests

2009-07-03 Thread Arthur Huillet
Disabled until conversion is implemented. Signed-off-by: Arthur Huillet --- regression/jvm/FloatArithmeticTest.java | 18 +- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/regression/jvm/FloatArithmeticTest.java b/regression/jvm/FloatArithmeticTest.java index

Re: [PATCH] x86: float remainder is FREM in the HIR

2009-07-03 Thread Pekka Enberg
both patches applied -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

[PATCH] x86: implement f2i and i2f

2009-07-03 Thread Arthur Huillet
This is done by extending the HIR with two new EXPR_CONVERSION : EXPR_CONVERSION_{TO,FROM}_FLOAT. Signed-off-by: Arthur Huillet --- arch/x86/insn-selector_32.brg | 38 ++ include/jit/expression.h|4 +++ jit/expression.c

Re: [PATCH] vm: part 1 of itables (interface method tables)

2009-07-03 Thread Pekka Enberg
On Thu, 2009-07-02 at 21:43 +0200, Vegard Nossum wrote: > This patch adds: > > 1. A space in the class struct where we can store the itable > 2. Collecting the interface methods implemented by the class and its > superclasses > 3. Tracing (debug output) of the collected itable > > Signed-o

Re: [PATCH] vm: part 1 of itables (interface method tables)

2009-07-03 Thread Vegard Nossum
2009/7/3 Pekka Enberg : > On Thu, 2009-07-02 at 21:43 +0200, Vegard Nossum wrote: >> This patch adds: >> >>  1. A space in the class struct where we can store the itable >>  2. Collecting the interface methods implemented by the class and its >>     superclasses >>  3. Tracing (debug output) of the

Re: [PATCH] x86: implement OP_FREM

2009-07-03 Thread Pekka Enberg
applied -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

[PATCH] x86: implement OP_FREM

2009-07-03 Thread Arthur Huillet
This calls the C function fmodf() as the VM Spec suggests. Signed-off-by: Arthur Huillet --- arch/x86/insn-selector_32.brg | 21 + regression/jvm/FloatArithmeticTest.java |9 +++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/arch/x86/in

Re: [PATCH] x86: floating point returning is now ABI conformant

2009-07-03 Thread Pekka Enberg
applied -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

[PATCH] x86: factorize code for INVOKEVIRTUAL and FINVOKEVIRTUAL

2009-07-03 Thread Arthur Huillet
Signed-off-by: Arthur Huillet --- arch/x86/insn-selector_32.brg | 108 +++-- 1 files changed, 40 insertions(+), 68 deletions(-) diff --git a/arch/x86/insn-selector_32.brg b/arch/x86/insn-selector_32.brg index 0e8e84f..35d9ecb 100644 --- a/arch/x86/insn-select

[PATCH] x86: factorize code for INVOKE and FINVOKE

2009-07-03 Thread Arthur Huillet
Signed-off-by: Arthur Huillet --- arch/x86/insn-selector_32.brg | 125 - 1 files changed, 48 insertions(+), 77 deletions(-) diff --git a/arch/x86/insn-selector_32.brg b/arch/x86/insn-selector_32.brg index 35d9ecb..857f2a9 100644 --- a/arch/x86/insn-select

[PATCH] x86: floating point returning is now ABI conformant

2009-07-03 Thread Arthur Huillet
We use the top of the x87 stack as is specified by the i386 SystemV ABI. Signed-off-by: Arthur Huillet --- arch/x86/emit-code.c| 12 +++ arch/x86/include/arch/instruction.h |3 + arch/x86/insn-selector_32.brg | 126 ++- arch/x86/instru

[PATCH] Makefile: remove .class files from runtime/ on 'make clean'

2009-07-03 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index dd2febe..73df9b4 100644 --- a/Makefile +++ b/Makefile @@ -271,6 +271,7 @@ clean: $(Q) - rm -f $(REGRESSION_TEST_SUITE_CLASSES) $(Q) - rm -f

Re: [PATCH] x86: factorize code for INVOKEVIRTUAL and FINVOKEVIRTUAL

2009-07-03 Thread Pekka Enberg
applied -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH] Makefile: remove .class files from runtime/ on 'make clean'

2009-07-03 Thread Pekka Enberg
applied -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH] x86: factorize code for INVOKE and FINVOKE

2009-07-03 Thread Pekka Enberg
applied -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

[PATCH 1/2] x86 implement INT -> CHAR conversion

2009-07-03 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- arch/x86/emit-code.c| 12 ++-- arch/x86/include/arch/instruction.h |3 ++- arch/x86/insn-selector_32.brg |6 +- arch/x86/lir-printer.c | 12 ++-- arch/x86/use-def.c |3 ++- 5 f

[PATCH 2/2] vm: set java.io.tmpdir property to /tmp

2009-07-03 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- vm/jato.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index 739093f..5652d50 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -78,6 +78,10 @@ static void __vm_native native_vmsystemproperties_preinit(struct vm_objec

Re: [PATCH 2/2] vm: set java.io.tmpdir property to /tmp

2009-07-03 Thread Vegard Nossum
2009/7/3 Tomek Grabiec : > > Signed-off-by: Tomek Grabiec > --- >  vm/jato.c |    4 >  1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/vm/jato.c b/vm/jato.c > index 739093f..5652d50 100644 > --- a/vm/jato.c > +++ b/vm/jato.c > @@ -78,6 +78,10 @@ static void __vm_native > na

[PATCH 3/6] vm: move preloading code to vm/preload.c

2009-07-03 Thread Tomek Grabiec
Rename include/vm/java_lang.h to include/vm/preload.h Signed-off-by: Tomek Grabiec --- Makefile |3 +- include/vm/java_lang.h | 30 include/vm/preload.h | 32 jit/emulate.c|1 + jit/trace-jit.c |2 +- jit/trampoline.c

[PATCH 1/6] test: fix 'make test' breakage

2009-07-03 Thread Tomek Grabiec
Introduced by commit "x86 implement INT -> CHAR conversion" Signed-off-by: Tomek Grabiec --- test/arch-x86/emit-code-test_32.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/arch-x86/emit-code-test_32.c b/test/arch-x86/emit-code-test_32.c index f024f62..64ea6

[PATCH 4/6] vm: fix warnings in jit/trace-jit.c

2009-07-03 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- jit/trace-jit.c |2 ++ test/jit/trace-stub.c |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/jit/trace-jit.c b/jit/trace-jit.c index bfcce4e..87176b6 100644 --- a/jit/trace-jit.c +++ b/jit/trace-jit.c @@ -26,6 +26,8 @@ #includ

[PATCH 2/6] vm: convert vm/stack-trace.c to new JatoVM interface

2009-07-03 Thread Tomek Grabiec
Cleanup fallouts from JamVM and re-enable natives for VMThrowable.fillInStackTrace() and VMThrowable.getStackTrace(). Signed-off-by: Tomek Grabiec --- include/vm/java_lang.h |5 ++- include/vm/object.h | 12 + include/vm/stack-trace.h |5 +- vm/jato.c| 24 +

[PATCH 6/6] vm: handle exceptions in class initialization correctly

2009-07-03 Thread Tomek Grabiec
The procedure is described in JVM spec: http://java.sun.com/docs/books/jvms/second_edition/html/Concepts.doc.html#24237 Signed-off-by: Tomek Grabiec --- arch/x86/emit-code.c| 13 - include/jit/exception.h |3 +++ include/vm/class.h |1 + include/vm/preload.h|

[PATCH 5/6] vm: Use preloaded classes for creating exceptions in VM

2009-07-03 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- include/jit/exception.h |2 +- include/vm/object.h |4 +--- include/vm/preload.h| 11 +++ jit/emulate.c |4 ++-- jit/exception.c |4 ++-- jit/trampoline.c|2 +- test/vm/object-stub.c |2 +- vm/