From e1bd1891df9888250844d829bd039b673efd60f2 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Fri, 21 May 2004 22:51:42 +0000 Subject: [PATCH] _jit_block_peephole_branch: don't allow conditional branches to cross an exception context boundary, because doing so will violate "finally" semantics. --- ChangeLog | 6 ++++++ jit/jit-block.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 197a5ee..5434c10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ +2004-05-22 Rhys Weatherley + + * jit/jit-block.c (_jit_block_peephole_branch): don't allow + conditional branches to cross an exception context boundary, + because doing so will violate "finally" semantics. + 2004-05-21 Rhys Weatherley * jit/jit-gen-arm.c, jit/jit-gen-arm.h: modify the ARM codegen diff --git a/jit/jit-block.c b/jit/jit-block.c index abc5b13..9517e0e 100644 --- a/jit/jit-block.c +++ b/jit/jit-block.c @@ -481,6 +481,11 @@ void _jit_block_peephole_branch(jit_block_t block) { break; } + if(new_block->block_eh != block->block_eh && insn->opcode != JIT_OP_BR) + { + /* Conditional branches must never cross an exception context */ + break; + } if(new_block->first_insn < new_block->last_insn) { /* There is more than one instruction in this block, -- 2.47.3