diff options
| author | grischka <grischka> | 2009-12-19 22:22:43 +0100 |
|---|---|---|
| committer | grischka <grischka> | 2009-12-19 22:22:43 +0100 |
| commit | 7fa712e00c5221d9373e8f8fa073e9e6fa064da1 (patch) | |
| tree | 21c5acbfcb4ddaa6d61d30fe79cfaece3ff7b5d9 /i386-gen.c | |
| parent | 8bbde91f62291cb0383c2406ae6123be903c944b (diff) | |
| download | tinycc-7fa712e00c5221d9373e8f8fa073e9e6fa064da1.tar.gz tinycc-7fa712e00c5221d9373e8f8fa073e9e6fa064da1.tar.bz2 | |
win32: enable bounds checker & exception handler
exception handler borrowed from k1w1. Thanks.
Diffstat (limited to 'i386-gen.c')
| -rw-r--r-- | i386-gen.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -87,8 +87,10 @@ const int reg_classes[NB_REGS] = { /******************************************************/ static unsigned long func_sub_sp_offset; -static unsigned long func_bound_offset; static int func_ret_sub; +#ifdef CONFIG_TCC_BCHECK +static unsigned long func_bound_offset; +#endif /* XXX: make it faster ? */ void g(int c) @@ -511,12 +513,14 @@ void gfunc_prolog(CType *func_type) func_ret_sub = 4; #endif +#ifdef CONFIG_TCC_BCHECK /* leave some room for bound checking code */ if (tcc_state->do_bounds_check) { oad(0xb8, 0); /* lbound section pointer */ oad(0xb8, 0); /* call to function */ func_bound_offset = lbounds_section->data_offset; } +#endif } /* generate function epilog */ |
