1 /* Types shared between arm and aarch64.
3 Copyright (C) 2009-2021 Free Software Foundation, Inc.
4 Contributed by Arm Ltd.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published
10 by the Free Software Foundation; either version 3, or (at your
11 option) any later version.
13 GCC is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
22 #ifndef GCC_AARCH_COMMON_H
23 #define GCC_AARCH_COMMON_H
25 /* Enum describing the various ways that the
26 aarch*_parse_{arch,tune,cpu,extension} functions can fail.
27 This way their callers can choose what kind of error to give. */
29 enum aarch_parse_opt_result
31 AARCH_PARSE_OK
, /* Parsing was successful. */
32 AARCH_PARSE_MISSING_ARG
, /* Missing argument. */
33 AARCH_PARSE_INVALID_FEATURE
, /* Invalid feature modifier. */
34 AARCH_PARSE_INVALID_ARG
/* Invalid arch, tune, cpu arg. */
37 /* Function types -msign-return-address should sign. */
38 enum aarch_function_type
{
39 /* Don't sign any function. */
41 /* Non-leaf functions. */
42 AARCH_FUNCTION_NON_LEAF
,
47 /* The key type that -msign-return-address should use. */
53 struct aarch_branch_protect_type
55 /* The type's name that the user passes to the branch-protection option
58 /* Function to handle the protection type and set global variables.
59 First argument is the string token corresponding with this type and the
60 second argument is the next token in the option string.
62 * AARCH_PARSE_OK: Handling was sucessful.
63 * AARCH_INVALID_ARG: The type is invalid in this context and the caller
64 should print an error.
65 * AARCH_INVALID_FEATURE: The type is invalid and the handler prints its
67 enum aarch_parse_opt_result (*handler
)(char*, char*);
68 /* A list of types that can follow this type in the option string. */
69 const struct aarch_branch_protect_type
* subtypes
;
70 unsigned int num_subtypes
;
73 #endif /* GCC_AARCH_COMMON_H */