[kaffe] arm/linux jit3 status report

Kiyo Inaba inaba at src.ricoh.co.jp
Tue Jul 31 19:42:32 PDT 2007


Still it does not work, but I finally found where the bug is...

According to the assembler listing of the method 'loadClass' (which
is attached at the very end of this mail), the argument one (which is
passed by register r1) is once stored in register r6, and has a copy
in [r11, #-72]. But at adress 0x68d910, the saved area are contaminated
by register r7, rather than r6. It is also true for the 'hidden'
argument ('this' variable) passed by register r0, and stored in r5.

Maybe some register spill portions should have bug, and I need extra
time to fix it. The register allocation algorithm in kaffe is tough
to debug ;-<

Kiyo
---------------------------------------------------------------------
<JIT: java/lang/ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; time 4ms (3697ms) @ 0x68d830 (0x1be04c)>
0x68d830:       mov     r12, sp
0x68d834:       stmdb   sp!, {r4, r5, r6, r7, r8, r9, r10, r11, r12, lr, pc}
0x68d838:       subs    r9, pc, #16     ; 0x10
0x68d83c:       sub     r11, r12, #4    ; 0x4
0x68d840:       subs    sp, sp, #48     ; 0x30
0x68d844:       mov     r5, r0
0x68d848:       mov     r6, r1          ; == 'HelloWorldApp'
0x68d84c:       mov     r7, r2
0x68d850:       cmp     sp, r3
0x68d854:       bhi     0x68d864
0x68d858:       ldr     r3, [r9, #-56]
0x68d85c:       mov     lr, pc
0x68d860:       mov     pc, r3
0x68d864:       str     r3, [r11, #-56]
0x68d868:       mov     r0, r5
0x68d86c:       ldr     r1, [r9, #-48]
0x68d870:       mov     lr, pc
0x68d874:       mov     pc, r1 ; lockObject
0x68d878:       str     r5, [r11, #-76]
0x68d87c:       str     r6, [r11, #-72]
0x68d880:       cmp     r5, #0  ; 0x0
0x68d884:       bne     0x68d894
0x68d888:       ldr     r1, [r9, #-40]
0x68d88c:       mov     lr, pc
0x68d890:       mov     pc, r1
0x68d894:       ldr     r1, [r11, #-76]
0x68d898:       cmp     r1, #0  ; 0x0
0x68d89c:       bne     0x68d8ac
0x68d8a0:       ldr     r2, [r9, #-40]
0x68d8a4:       mov     lr, pc
0x68d8a8:       mov     pc, r2
0x68d8ac:       ldr     r2, [r11, #-56]
0x68d8b0:       ldr     r1, [r11, #-72]
0x68d8b4:       ldr     r0, [r11, #-76]
0x68d8b8:       ldr     r3, [r9, #-32]
0x68d8bc:       ldr     r3, [r3]
0x68d8c0:       mov     lr, pc
0x68d8c4:       mov     pc, r3
0x68d8c8:       mov     r4, r0
0x68d8cc:       cmp     r4, #0  ; 0x0
0x68d8d0:       bne     0x68da70
0x68d8d4:       str     r5, [r11, #-76]
0x68d8d8:       cmp     r5, #0  ; 0x0
0x68d8dc:       bne     0x68d8fc
0x68d8e0:       str     r4, [r11, #-60]
0x68d8e4:       str     r7, [r11, #-52]
0x68d8e8:       str     r6, [r11, #-48]
0x68d8ec:       str     r5, [r11, #-44]
0x68d8f0:       ldr     r0, [r9, #-40]
0x68d8f4:       mov     lr, pc
0x68d8f8:       mov     pc, r0
0x68d8fc:       ldr     r0, [r11, #-76]
0x68d900:       ldr     r0, [r0, #16]
0x68d904:       cmp     r0, #0  ; 0x0
0x68d908:       bne     0x68d960
0x68d90c:       ldr     r2, [r11, #-56]
0x68d910:       str     r7, [r11, #-72]
0x68d914:       ldr     r1, [r11, #-72] ; <<<=== BAD VALUE
0x68d918:       str     r6, [r11, #-76]
0x68d91c:       ldr     r0, [r11, #-76]
0x68d920:       str     r4, [r11, #-60]
0x68d924:       ldr     r3, [r9, #-24]
0x68d928:       ldr     r3, [r3]
0x68d92c:       mov     lr, pc
0x68d930:       mov     pc, r3
0x68d934:       mov     r4, r0
0x68d938:       cmp     r4, #0  ; 0x0
0x68d93c:       beq     0x68d95c
0x68d940:       mov     r0, r5
0x68d944:       ldr     r1, [r9, #-16]
0x68d948:       mov     lr, pc
0x68d94c:       mov     pc, r1
0x68d950:       mov     r0, r4
0x68d954:       b       0x68dae0
0x68d958:       str     r4, [r11, #-76]
0x68d95c:       b       0x68d9f8
0x68d960:       str     r5, [r11, #-76]
0x68d964:       cmp     r5, #0  ; 0x0
0x68d968:       bne     0x68d97c
0x68d96c:       str     r4, [r11, #-60]
0x68d970:       ldr     r1, [r9, #-40]
0x68d974:       mov     lr, pc
0x68d978:       mov     pc, r1
0x68d97c:       ldr     r1, [r11, #-76]
0x68d980:       ldr     r1, [r1, #16]
0x68d984:       str     r1, [r11, #-76]
0x68d988:       str     r6, [r11, #-72]
0x68d98c:       str     r7, [r11, #-68]
0x68d990:       cmp     r1, #0  ; 0x0
0x68d994:       bne     0x68d9a8
0x68d998:       str     r4, [r11, #-60]
0x68d99c:       ldr     r1, [r9, #-40]
0x68d9a0:       mov     lr, pc
0x68d9a4:       mov     pc, r1
0x68d9a8:       ldr     r1, [r11, #-76]
0x68d9ac:       ldr     r2, [r1]
0x68d9b0:       ldr     r2, [r2, #32]
0x68d9b4:       ldr     r3, [r11, #-56]
0x68d9b8:       str     r2, [r11, #-80]
0x68d9bc:       ldr     r2, [r11, #-68]
0x68d9c0:       ldr     r1, [r11, #-72]
0x68d9c4:       ldr     r0, [r11, #-76]
0x68d9c8:       str     r4, [r11, #-60]
0x68d9cc:       ldr     r10, [r11, #-80]
0x68d9d0:       mov     lr, pc
0x68d9d4:       mov     pc, r10
0x68d9d8:       str     r0, [r11, #-76]
0x68d9dc:       mov     r0, r5
0x68d9e0:       ldr     r1, [r9, #-16]
0x68d9e4:       mov     lr, pc
0x68d9e8:       mov     pc, r1
0x68d9ec:       ldr     r1, [r11, #-76]
0x68d9f0:       mov     r0, r1
0x68d9f4:       b       0x68dae0
0x68d9f8:       b       0x68da28
0x68d9fc:       mov     r12, r11
0x68da00:       sub     r12, r12, #44   ; 0x2c
0x68da04:       subs    sp, r12, #48    ; 0x30
0x68da08:       mov     r9, #48 ; 0x30
0x68da0c:       add     r9, r9, #55296  ; 0xd800
0x68da10:       add     r9, r9, #6815744        ; 0x680000
0x68da14:       add     r9, r9, #0      ; 0x0
0x68da18:       ldr     r4, [r11, #-60]
0x68da1c:       ldr     r7, [r11, #-52]
0x68da20:       ldr     r6, [r11, #-48]
0x68da24:       ldr     r5, [r11, #-44]
0x68da28:       str     r5, [r11, #-76]
0x68da2c:       str     r6, [r11, #-72]
0x68da30:       cmp     r5, #0  ; 0x0
0x68da34:       bne     0x68da44
0x68da38:       ldr     r1, [r9, #-40]
0x68da3c:       mov     lr, pc
0x68da40:       mov     pc, r1
0x68da44:       ldr     r1, [r11, #-76]
0x68da48:       ldr     r2, [r1]
0x68da4c:       ldr     r2, [r2, #36]
0x68da50:       str     r2, [r11, #-80]
0x68da54:       ldr     r2, [r11, #-56]
0x68da58:       ldr     r1, [r11, #-72]
0x68da5c:       ldr     r0, [r11, #-76]
0x68da60:       ldr     r3, [r11, #-80]
0x68da64:       mov     lr, pc
0x68da68:       mov     pc, r3
0x68da6c:       mov     r4, r0
0x68da70:       cmp     r7, #0  ; 0x0
0x68da74:       beq     0x68dac8
0x68da78:       str     r5, [r11, #-76]
0x68da7c:       str     r4, [r11, #-72]
0x68da80:       cmp     r5, #0  ; 0x0
0x68da84:       bne     0x68da94
0x68da88:       ldr     r0, [r9, #-40]
0x68da8c:       mov     lr, pc
0x68da90:       mov     pc, r0
0x68da94:       ldr     r0, [r11, #-76]
0x68da98:       cmp     r0, #0  ; 0x0
0x68da9c:       bne     0x68daac
0x68daa0:       ldr     r1, [r9, #-40]
0x68daa4:       mov     lr, pc
0x68daa8:       mov     pc, r1
0x68daac:       ldr     r2, [r11, #-56]
0x68dab0:       ldr     r1, [r11, #-72]
0x68dab4:       ldr     r0, [r11, #-76]
0x68dab8:       ldr     r3, [r9, #-8]
0x68dabc:       ldr     r3, [r3]
0x68dac0:       mov     lr, pc
0x68dac4:       mov     pc, r3
0x68dac8:       mov     r0, r5
0x68dacc:       ldr     r1, [r9, #-16]
0x68dad0:       mov     lr, pc
0x68dad4:       mov     pc, r1
0x68dad8:       mov     r0, r4
0x68dadc:       b       0x68dae0
0x68dae0:       ldmdb   r11, {r4, r5, r6, r7, r8, r9, r10, r11, sp, pc}




More information about the kaffe mailing list