On Mon, 2009-07-06 at 13:27 +0200, Tomek Grabiec wrote:
> When branch target points to the same basic block that contains that
> branch then branch insn will be added to the backpatch list because
> target_bb->is_emitted field is false yet. The backpatch list for basic block
> is browsed before its instructions are emitted. Therefore the branch
> whose target points to the containing basic block will never be
> patched.
> 
> Solution to this problem is to set ->is_emitted to true as soon
> as ->mach_offset is set (before basic block's instructions are emitted).
> This will cause that branches pointing to the containing basic block
> will be resolved immediately.
> 
> Affected code:
> 
> public class Test2 {
>     static public void c() {
>     }
> 
>     public static void main(String[] args) {
> 
>         while (true) c();
>     }
> }
> 
> Acked-by: Arthur HUILLET <[email protected]>
> Signed-off-by: Tomek Grabiec <[email protected]>

Applied, thanks!


------------------------------------------------------------------------------
_______________________________________________
Jatovm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Reply via email to