[PATCH 5/5] jit: add support for register constraints

2009-08-08 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- arch/mmix/include/arch/registers.h |9 + arch/x86/include/arch/registers_32.h |4 ++- arch/x86/registers_32.c | 58 - jit/linear-scan.c| 14 +--- 4 files changed, 55 insertions(

[PATCH 4/5] jit: fix off-by-one in register allocator

2009-08-08 Thread Vegard Nossum
From: Arthur Huillet Signed-off-by: Vegard Nossum --- jit/linear-scan.c |2 +- test/jit/linear-scan-test.c |9 +++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/jit/linear-scan.c b/jit/linear-scan.c index d2a3c92..f038ba3 100644 --- a/jit/linear-scan.c +

[PATCH 3/5] x86: define emitter for MOVSX_16_MEMBASE_REG

2009-08-08 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- arch/x86/emit-code.c| 15 +++ arch/x86/include/arch/instruction.h |1 + arch/x86/use-def.c |1 + 3 files changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c inde

[PATCH 2/5] x86: define emitter for MOVSX_8_MEMBASE_REG

2009-08-08 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- arch/x86/emit-code.c| 15 +++ arch/x86/include/arch/instruction.h |1 + arch/x86/use-def.c |1 + 3 files changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c inde

[PATCH 1/5] vm: introduce vm_type_size()

2009-08-08 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- include/vm/types.h |1 + vm/types.c | 19 +++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/include/vm/types.h b/include/vm/types.h index dc944d9..9b5c2f6 100644 --- a/include/vm/types.h +++ b/include/vm/types.h @@ -

[PATCH 2/2] vm: fix off-by-one bug in utf8_to_char_array()

2009-08-08 Thread Tomek Grabiec
This caused incorrect loading of utf8 strings with character codes >= 0x80. Signed-off-by: Tomek Grabiec --- regression/jvm/StringTest.java |5 + vm/utf8.c | 10 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/regression/jvm/StringTest.ja

[PATCH 1/2] vm: print resolved method signature in bytecode disassembly

2009-08-08 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- include/vm/bytecodes.h |4 +++- jit/trace-jit.c|3 ++- vm/bytecodes.c | 28 +++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/include/vm/bytecodes.h b/include/vm/bytecodes.h index 26da079..836c1

Re: [PATCH] vm: fix utf8_to_char_array()

2009-08-08 Thread Vegard Nossum
2009/8/8 Tomek Grabiec : > This caused that for characters with codes > 0x80 we > skipped one byte. > > Signed-off-by: Tomek Grabiec I don't like this patch. We already have all our error checking in utf8_char_count() and utf8_to_char_array() assumes this. We shouldn't have error checks in utf8_

[PATCH] vm: fix utf8_to_char_array()

2009-08-08 Thread Tomek Grabiec
This caused that for characters with codes > 0x80 we skipped one byte. Signed-off-by: Tomek Grabiec --- vm/utf8.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/vm/utf8.c b/vm/utf8.c index c9caf88..85355e3 100644 --- a/vm/utf8.c +++ b/vm/utf8.c @@ -2,6 +2,7 @@ #i

Re: [PATCH 2/2] jit: introduce per-edge data flow resolution blocks

2009-08-08 Thread Arthur Huillet
Hi, On Sat, 8 Aug 2009 12:43:50 +0200 Tomek Grabiec wrote: > When resolving data flow we can not emit reload instructions at the > end of a basic block. That's because the register we are reloading to > might be allocated to another interval at the end of this > block. Especially, it can be use

[PATCH] vm: fix itable sorting

2009-08-08 Thread Vegard Nossum
Reported-and-analyzed-by: Tomek Grabiec Signed-off-by: Vegard Nossum --- vm/itable.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/itable.c b/vm/itable.c index 77409c0..955aa66 100644 --- a/vm/itable.c +++ b/vm/itable.c @@ -135,8 +135,8 @@ itable_resolver_stub_er

[PATCH] vm: add missing enter_vm_from_jni()

2009-08-08 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- vm/jni-interface.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/vm/jni-interface.c b/vm/jni-interface.c index 4dfecb1..5aeed36 100644 --- a/vm/jni-interface.c +++ b/vm/jni-interface.c @@ -559,6 +559,8 @@ vm_jni_get_byte_array

[PATCH] vm: fix array_set_field_double()

2009-08-08 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- include/vm/object.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/vm/object.h b/include/vm/object.h index 3b5a707..899e741 100644 --- a/include/vm/object.h +++ b/include/vm/object.h @@ -181,9 +181,9 @@ array_get_field_float(s

[PATCH 2/2] jit: introduce per-edge data flow resolution blocks

2009-08-08 Thread Tomek Grabiec
When resolving data flow we can not emit reload instructions at the end of a basic block. That's because the register we are reloading to might be allocated to another interval at the end of this block. Especially, it can be used in a branch instruction that ends this basic block (see tableswitch).

[PATCH 1/2] vm: implement VMClass.getComponentType()

2009-08-08 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec --- vm/jato.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index 49749d2..34f453a 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -535,6 +535,22 @@ static jint native_vmclass_getmodifiers(struct vm_object

[PATCH 1/2] vm: clean up field initialization a little bit

2009-08-08 Thread Vegard Nossum
Makes the code easier to read. Signed-off-by: Vegard Nossum --- vm/class.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/vm/class.c b/vm/class.c index 91f4ca0..8cb6ebb 100644 --- a/vm/class.c +++ b/vm/class.c @@ -266,6 +266,7 @@ int vm_class_link(struct vm_cl

[PATCH 2/2] vm: group class/instance fields by type

2009-08-08 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- include/vm/field.h |4 +- vm/class.c | 135 +-- vm/field.c | 11 + 3 files changed, 112 insertions(+), 38 deletions(-) diff --git a/include/vm/field.h b/include/vm/field.h index 4a5a557..2