From 4226681d366b8bf44f9c2986e620ecd010923a82 Mon Sep 17 00:00:00 2001 From: bellard Date: Sun, 3 Mar 2002 22:45:55 +0000 Subject: added optionnal bound check compile - fixed error reporting --- i386-gen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'i386-gen.c') diff --git a/i386-gen.c b/i386-gen.c index 9aad2e1..43fb083 100644 --- a/i386-gen.c +++ b/i386-gen.c @@ -412,6 +412,7 @@ void gfunc_prolog(int t) /* generate function epilog */ void gfunc_epilog(void) { +#ifdef CONFIG_TCC_BCHECK if (do_bounds_check && func_bound_ptr != lbounds_section->data_ptr) { int saved_ind; int *bounds_ptr; @@ -431,6 +432,7 @@ void gfunc_epilog(void) oad(0xe8, (int)__bound_local_delete - ind - 5); o(0x585a); /* restore returned value, if any */ } +#endif o(0xc9); /* leave */ if (func_ret_sub == 0) { o(0xc3); /* ret */ @@ -818,7 +820,7 @@ void gen_cvt_ftof(int t) } /* bound check support functions */ - +#ifdef CONFIG_TCC_BCHECK /* generate first part of bounded pointer addition */ void gen_bounded_ptr_add1(void) { @@ -859,6 +861,7 @@ void gen_bounded_ptr_add2(int deref) /* return pointer is there */ vtop->r = REG_EAX; } +#endif /* end of X86 code generator */ /*************************************************************/ -- cgit v1.3.1