# Patch created by krokas
# Date: Tue Oct 31 00:38:31 MSK 2006
# Repository: libjit
# Comments:
# 
#### End of Preamble ####

#### Patch data follows ####
Index: jit/jit-rules-x86.c
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/jit/jit-rules-x86.c,v
retrieving revision 1.40
diff -c -r1.40 jit-rules-x86.c
*** jit/jit-rules-x86.c	14 Sep 2006 06:27:08 -0000	1.40
--- jit/jit-rules-x86.c	30 Oct 2006 21:38:11 -0000
***************
*** 1296,1305 ****
  	if(func->builder->setjmp_value != 0)
  	{
  		_jit_gen_fix_value(func->builder->setjmp_value);
! 		x86_call_imm(inst, 0);
! 		x86_pop_membase(inst, X86_EBP,
! 						func->builder->setjmp_value->frame_offset +
! 						jit_jmp_catch_pc_offset);
  	}
  
  	/* Push the exception type onto the stack */
--- 1296,1303 ----
  	if(func->builder->setjmp_value != 0)
  	{
  		_jit_gen_fix_value(func->builder->setjmp_value);
! 		x86_mov_membase_imm(inst, X86_EBP, (unsigned int)(func->builder->setjmp_value->frame_offset +
! 						    jit_jmp_catch_pc_offset), (unsigned int)inst, 4);
  	}
  
  	/* Push the exception type onto the stack */
Index: jit/jit-rules-x86.ins
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/jit/jit-rules-x86.ins,v
retrieving revision 1.17
diff -c -r1.17 jit-rules-x86.ins
*** jit/jit-rules-x86.ins	22 Oct 2006 23:51:41 -0000	1.17
--- jit/jit-rules-x86.ins	30 Oct 2006 21:38:12 -0000
***************
*** 1551,1560 ****
  			/* We have a "setjmp" block in the current function,
  			   so we must record the location of the throw first */
  			_jit_gen_fix_value(func->builder->setjmp_value);
! 			x86_call_imm(inst, 0);
! 			x86_pop_membase(inst, X86_EBP,
! 							func->builder->setjmp_value->frame_offset +
! 							jit_jmp_catch_pc_offset);
  		}
  		x86_call_code(inst, (void *)jit_exception_throw);
  	}
--- 1551,1558 ----
  			/* We have a "setjmp" block in the current function,
  			   so we must record the location of the throw first */
  			_jit_gen_fix_value(func->builder->setjmp_value);
! 			x86_mov_membase_imm(inst, X86_EBP, (unsigned int)(func->builder->setjmp_value->frame_offset
! 							    + jit_jmp_catch_pc_offset), (unsigned int)inst, 4);
  		}
  		x86_call_code(inst, (void *)jit_exception_throw);
  	}
***************
*** 1564,1571 ****
  
  JIT_OP_LOAD_PC:
  	[=reg] -> {
! 		x86_call_imm(inst, 0);
! 		x86_pop_reg(inst, $1);
  	}
  
  JIT_OP_LOAD_EXCEPTION_PC: manual
--- 1562,1568 ----
  
  JIT_OP_LOAD_PC:
  	[=reg] -> {
! 		x86_mov_reg_imm(inst, $1, (unsigned int)inst);
  	}
  
  JIT_OP_LOAD_EXCEPTION_PC: manual
#### End of Patch data ####
