1*38fd1498Szrj /* Compilation switch flag definitions for GCC. 2*38fd1498Szrj Copyright (C) 1987-2018 Free Software Foundation, Inc. 3*38fd1498Szrj 4*38fd1498Szrj This file is part of GCC. 5*38fd1498Szrj 6*38fd1498Szrj GCC is free software; you can redistribute it and/or modify it under 7*38fd1498Szrj the terms of the GNU General Public License as published by the Free 8*38fd1498Szrj Software Foundation; either version 3, or (at your option) any later 9*38fd1498Szrj version. 10*38fd1498Szrj 11*38fd1498Szrj GCC is distributed in the hope that it will be useful, but WITHOUT ANY 12*38fd1498Szrj WARRANTY; without even the implied warranty of MERCHANTABILITY or 13*38fd1498Szrj FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14*38fd1498Szrj for more details. 15*38fd1498Szrj 16*38fd1498Szrj You should have received a copy of the GNU General Public License 17*38fd1498Szrj along with GCC; see the file COPYING3. If not see 18*38fd1498Szrj <http://www.gnu.org/licenses/>. */ 19*38fd1498Szrj 20*38fd1498Szrj #ifndef GCC_FLAGS_H 21*38fd1498Szrj #define GCC_FLAGS_H 22*38fd1498Szrj 23*38fd1498Szrj #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS) 24*38fd1498Szrj 25*38fd1498Szrj /* Names of debug_info_type, for error messages. */ 26*38fd1498Szrj extern const char *const debug_type_names[]; 27*38fd1498Szrj 28*38fd1498Szrj extern void strip_off_ending (char *, int); 29*38fd1498Szrj extern int base_of_path (const char *path, const char **base_out); 30*38fd1498Szrj 31*38fd1498Szrj /* Return true iff flags are set as if -ffast-math. */ 32*38fd1498Szrj extern bool fast_math_flags_set_p (const struct gcc_options *); 33*38fd1498Szrj extern bool fast_math_flags_struct_set_p (struct cl_optimization *); 34*38fd1498Szrj 35*38fd1498Szrj 36*38fd1498Szrj /* Now the symbols that are set with `-f' switches. */ 37*38fd1498Szrj 38*38fd1498Szrj /* True if printing into -fdump-final-insns= dump. */ 39*38fd1498Szrj 40*38fd1498Szrj extern bool final_insns_dump_p; 41*38fd1498Szrj 42*38fd1498Szrj 43*38fd1498Szrj /* Other basic status info about current function. */ 44*38fd1498Szrj 45*38fd1498Szrj /* Target-dependent global state. */ 46*38fd1498Szrj struct target_flag_state { 47*38fd1498Szrj /* Values of the -falign-* flags: how much to align labels in code. 48*38fd1498Szrj 0 means `use default', 1 means `don't align'. 49*38fd1498Szrj For each variable, there is an _log variant which is the power 50*38fd1498Szrj of two not less than the variable, for .align output. */ 51*38fd1498Szrj int x_align_loops_log; 52*38fd1498Szrj int x_align_loops_max_skip; 53*38fd1498Szrj int x_align_jumps_log; 54*38fd1498Szrj int x_align_jumps_max_skip; 55*38fd1498Szrj int x_align_labels_log; 56*38fd1498Szrj int x_align_labels_max_skip; 57*38fd1498Szrj int x_align_functions_log; 58*38fd1498Szrj 59*38fd1498Szrj /* The excess precision currently in effect. */ 60*38fd1498Szrj enum excess_precision x_flag_excess_precision; 61*38fd1498Szrj }; 62*38fd1498Szrj 63*38fd1498Szrj extern struct target_flag_state default_target_flag_state; 64*38fd1498Szrj #if SWITCHABLE_TARGET 65*38fd1498Szrj extern struct target_flag_state *this_target_flag_state; 66*38fd1498Szrj #else 67*38fd1498Szrj #define this_target_flag_state (&default_target_flag_state) 68*38fd1498Szrj #endif 69*38fd1498Szrj 70*38fd1498Szrj #define align_loops_log \ 71*38fd1498Szrj (this_target_flag_state->x_align_loops_log) 72*38fd1498Szrj #define align_loops_max_skip \ 73*38fd1498Szrj (this_target_flag_state->x_align_loops_max_skip) 74*38fd1498Szrj #define align_jumps_log \ 75*38fd1498Szrj (this_target_flag_state->x_align_jumps_log) 76*38fd1498Szrj #define align_jumps_max_skip \ 77*38fd1498Szrj (this_target_flag_state->x_align_jumps_max_skip) 78*38fd1498Szrj #define align_labels_log \ 79*38fd1498Szrj (this_target_flag_state->x_align_labels_log) 80*38fd1498Szrj #define align_labels_max_skip \ 81*38fd1498Szrj (this_target_flag_state->x_align_labels_max_skip) 82*38fd1498Szrj #define align_functions_log \ 83*38fd1498Szrj (this_target_flag_state->x_align_functions_log) 84*38fd1498Szrj #define flag_excess_precision \ 85*38fd1498Szrj (this_target_flag_state->x_flag_excess_precision) 86*38fd1498Szrj 87*38fd1498Szrj /* Returns TRUE if generated code should match ABI version N or 88*38fd1498Szrj greater is in use. */ 89*38fd1498Szrj 90*38fd1498Szrj #define abi_version_at_least(N) \ 91*38fd1498Szrj (flag_abi_version == 0 || flag_abi_version >= (N)) 92*38fd1498Szrj 93*38fd1498Szrj /* Whether to emit an overflow warning whose code is C. */ 94*38fd1498Szrj #define issue_strict_overflow_warning(c) (warn_strict_overflow >= (int) (c)) 95*38fd1498Szrj 96*38fd1498Szrj #endif 97*38fd1498Szrj 98*38fd1498Szrj #endif /* ! GCC_FLAGS_H */ 99