xref: /openbsd/gnu/usr.bin/gcc/gcc/protector.h (revision 949214e7)
15982dd4aSetoh /* RTL buffer overflow protection function for GNU C compiler
25982dd4aSetoh    Copyright (C) 1987, 88, 89, 92-7, 1998 Free Software Foundation, Inc.
35982dd4aSetoh 
45982dd4aSetoh This file is part of GCC.
55982dd4aSetoh 
65982dd4aSetoh GCC is free software; you can redistribute it and/or modify it under
75982dd4aSetoh the terms of the GNU General Public License as published by the Free
85982dd4aSetoh Software Foundation; either version 2, or (at your option) any later
95982dd4aSetoh version.
105982dd4aSetoh 
115982dd4aSetoh GCC is distributed in the hope that it will be useful, but WITHOUT ANY
125982dd4aSetoh WARRANTY; without even the implied warranty of MERCHANTABILITY or
135982dd4aSetoh FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
145982dd4aSetoh for more details.
155982dd4aSetoh 
165982dd4aSetoh You should have received a copy of the GNU General Public License
175982dd4aSetoh along with GCC; see the file COPYING.  If not, write to the Free
185982dd4aSetoh Software Foundation, 59 Temple Place - Suite 330, Boston, MA
195982dd4aSetoh 02111-1307, USA.  */
205982dd4aSetoh 
215982dd4aSetoh 
225982dd4aSetoh /* declaration of GUARD variable */
235982dd4aSetoh #define GUARD_m		Pmode
245982dd4aSetoh #define UNITS_PER_GUARD MAX(BIGGEST_ALIGNMENT / BITS_PER_UNIT, GET_MODE_SIZE (GUARD_m))
255982dd4aSetoh 
265982dd4aSetoh #ifndef L_stack_smash_handler
275982dd4aSetoh 
285982dd4aSetoh /* insert a guard variable before a character buffer and change the order
295982dd4aSetoh  of pointer variables, character buffers and pointer arguments */
305982dd4aSetoh 
315982dd4aSetoh extern void prepare_stack_protection  PARAMS ((int inlinable));
325982dd4aSetoh 
335982dd4aSetoh #ifdef TREE_CODE
345982dd4aSetoh /* search a character array from the specified type tree */
355982dd4aSetoh 
36*949214e7Smiod extern int search_string_def PARAMS ((tree names));
375982dd4aSetoh #endif
385982dd4aSetoh 
395982dd4aSetoh /* examine whether the input contains frame pointer addressing */
405982dd4aSetoh 
415982dd4aSetoh extern int contains_fp PARAMS ((rtx op));
425982dd4aSetoh 
435982dd4aSetoh /* Return size that is not allocated for stack frame. It will be allocated
445982dd4aSetoh    to modify the home of pseudo registers called from global_alloc.  */
455982dd4aSetoh 
465982dd4aSetoh extern HOST_WIDE_INT get_frame_free_size PARAMS ((void));
475982dd4aSetoh 
485982dd4aSetoh /* allocate a local variable in the stack area before character buffers
495982dd4aSetoh    to avoid the corruption of it */
505982dd4aSetoh 
515982dd4aSetoh extern rtx assign_stack_local_for_pseudo_reg PARAMS ((enum machine_mode, HOST_WIDE_INT, int));
525982dd4aSetoh 
535982dd4aSetoh #endif
54