• grischka's avatar
    bcheck cleanup · 56db092a
    grischka 创作于
    - revert Makefiles to state before last bcheck additions
      Instead, just load bcheck.o explicitly if that is
      what is wanted.
    
    - move tcc_add_bcheck() to the <target>-link.c files and
      remove revently added arguments.  This function is to
      support tccelf.c with linking, not for tccgen.c to
      support compilation.
    
    - remove -ba option:  It said:
      "-ba  Enable better address checking with bounds checker"
      Okay, if it is better then to have it is not an option.
    
    - remove va_copy. It is C99 and we try to stay C89 in tinycc
      when possible.  For example, MS compilers do not have va_copy.
    
    - win64: revert any 'fixes' to alloca
      It was correct as it was before, except for bound_checking
      where it was not implemented.  This should now work too.
    
    - remove parasitic filename:linenum features
      Such feature is already present with rt_printline in
      tccrun.c.  If it doesn't work it can be fixed.
    
    - revert changes to gen_bounded_ptr_add()
      gen_bounded_ptr_add() was working as it should before
      (mostly).  For the sake of simplicity I switched it to
      CDECL.  Anyway, FASTCALL means SLOWCALL with tinycc.
    
    In exchange you get one addition which is required for
    bounds_cnecking function arguments.  The important thing
    is to check them *BEFORE* they are loaded into registers.
    New function gbound_args() does that.
    
    In any case, code instrumentation with the bounds-check
    functions as such now seems to work flawlessly again,
    which means when they are inserted as NOPs, any code that
    tcc can compile, seems to behave just the same as without
    them.
    
    What these functions then do when fully enabled, is a
    differnt story.  I did not touch this.
    56db092a