On Tue, 2009-01-13 at 17:18 +0200, Pekka Enberg wrote:
> There's also some "interesting" things going on in the generated
> assembly:
>
> TRACE: jamvm/ObjectStackTest.assertIsGreaterThanOne(I)V
> Length: 14
> Code: 1a 04 a4 00 07 04 a7 00 04 03 b8 00 0d b1
>
> Disassembler Listing:
>
> 0x09339000: 57 push %edi
> 0x09339001: 56 push %esi
> 0x09339002: 53 push %ebx
> 0x09339003: 55 push %ebp
> 0x09339004: 89 e5 mov %esp,%ebp
> 0x09339006: 8b 45 14 mov 0x14(%ebp),%eax
> 0x09339009: 83 f8 01 cmp $0x1,%eax
> 0x0933900c: 0f 8e 0c 00 00 00 jle 0x000000000933901e
> ---
> 0x09339012: e9 0e 00 00 00 jmp 0x0000000009339025 # (1)
> 0x09339017: b8 01 00 00 00 mov $0x1,%eax
> 0x0933901c: 89 c3 mov %eax,%ebx
> ---
> 0x0933901e: b8 00 00 00 00 mov $0x0,%eax
> 0x09339023: 89 c1 mov %eax,%ecx # (2)
> ----
> 0x09339025: 53 push %ebx
> 0x09339026: e8 d5 bf fe ff call 0x0000000009325000
> 0x0933902b: 83 c4 04 add $0x4,%esp
> 0x0933902e: e9 00 00 00 00 jmp 0x0000000009339033
>
> 0x09339033: 5d pop %ebp
> 0x09339034: 5b pop %ebx
> 0x09339035: 5e pop %esi
> 0x09339036: 5f pop %edi
> 0x09339037: c3 ret
>
> So in (1), we're adding the store instructions *after* the jmp from the
> basic block and in (2) we should be using "ebx" just like in the other
> predecessor of the basic block.
I fixed up (1) with commit 65b9b3f571b6a67479c2a79a01e3166d070cb335
("jit: spill mimic stack before branching"). Need to think about (2) a
bit more before fixing it up.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Jatovm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jatovm-devel