Browse Source

At the end of initialize setjmp block add a label that is moved along with

the block code and use it as the jump target.
cache-refactoring
Aleksey Demakov 19 years ago
parent
commit
8a8482e496
  1. 7
      ChangeLog
  2. 9
      jit/jit-insn.c

7
ChangeLog

@ -1,3 +1,10 @@
2006-05-28 Klaus Treichel <ktreichel@web.de>
* jit/jit-insn.c: Add a code_label in initialize_setjmp_block just
before the end_label that is moved with the block to the start of
the function as jump target to the code. Otherwise other blocks
moved to the start after this block will never be executed.
2006-05-27 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (free_value, save_value): the value that has

9
jit/jit-insn.c

@ -7000,6 +7000,7 @@ static int initialize_setjmp_block(jit_function_t func)
#if !defined(JIT_BACKEND_INTERP)
jit_label_t start_label = jit_label_undefined;
jit_label_t end_label = jit_label_undefined;
jit_label_t code_label = jit_label_undefined;
jit_label_t rethrow_label = jit_label_undefined;
jit_type_t type;
jit_value_t args[2];
@ -7105,7 +7106,7 @@ static int initialize_setjmp_block(jit_function_t func)
#endif /* !HAVE_SIGSETJMP */
/* Branch to the end of the init code if "setjmp" returned zero */
if(!jit_insn_branch_if_not(func, value, &end_label))
if(!jit_insn_branch_if_not(func, value, &code_label))
{
return 0;
}
@ -7176,6 +7177,12 @@ static int initialize_setjmp_block(jit_function_t func)
JIT_CALL_NOTHROW | JIT_CALL_NORETURN);
jit_type_free(type);
/* Insert the target to jump to the normal code. */
if(!jit_insn_label(func, &code_label))
{
return 0;
}
/* Force the start of a new block to mark the end of the init code */
if(!jit_insn_label(func, &end_label))
{

Loading…
Cancel
Save