diff options
author | ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-08-04 10:14:00 +0000 |
---|---|---|
committer | ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-08-04 10:14:00 +0000 |
commit | aadb8e17e51f18b69c5e1d1549befb1d2b808aba (patch) | |
tree | 9ed1e08b16d7aa19d73e52f157563335247fac4e /gcc/common | |
parent | f59387ab406ff385c0cb7b3dba819b28140865cc (diff) | |
download | gcc-aadb8e17e51f18b69c5e1d1549befb1d2b808aba.tar.gz |
[AArch64][8/14] Implement TARGET_OPTION_VALID_ATTRIBUTE_P
* common/config/aarch64/aarch64-common.c (aarch64_handle_option):
Remove static. Handle OPT_mgeneral_regs_only,
OPT_mfix_cortex_a53_835769, OPT_mstrict_align,
OPT_momit_leaf_frame_pointer.
* config/aarch64/aarch64.c: Include opts.h and diagnostic.h
(aarch64_attr_opt_type): New enum.
(aarch64_attribute_info): New struct.
(aarch64_handle_attr_arch): New function.
(aarch64_handle_attr_cpu): Likewise.
(aarch64_handle_attr_tune): Likewise.
(aarch64_handle_attr_isa_flags): Likewise.
(aarch64_attributes): New table.
(aarch64_process_one_target_attr): New function.
(num_occurences_in_str): Likewise.
(aarch64_process_target_attr): Likewise.
(aarch64_option_valid_attribute_p): Likewise.
(TARGET_OPTION_VALID_ATTRIBUTE_P): Define.
* config/aarch64/aarch64-protos.h: Include input.h
(aarch64_handle_option): Declare prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226560 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/common')
-rw-r--r-- | gcc/common/config/aarch64/aarch64-common.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/common/config/aarch64/aarch64-common.c b/gcc/common/config/aarch64/aarch64-common.c index b3fd9dc5460..726c62531d9 100644 --- a/gcc/common/config/aarch64/aarch64-common.c +++ b/gcc/common/config/aarch64/aarch64-common.c @@ -60,7 +60,7 @@ static const struct default_options aarch_option_optimization_table[] = respective component of -mcpu. This logic is implemented in config/aarch64/aarch64.c:aarch64_override_options. */ -static bool +bool aarch64_handle_option (struct gcc_options *opts, struct gcc_options *opts_set ATTRIBUTE_UNUSED, const struct cl_decoded_option *decoded, @@ -68,6 +68,7 @@ aarch64_handle_option (struct gcc_options *opts, { size_t code = decoded->opt_index; const char *arg = decoded->arg; + int val = decoded->value; switch (code) { @@ -83,6 +84,22 @@ aarch64_handle_option (struct gcc_options *opts, opts->x_aarch64_tune_string = arg; return true; + case OPT_mgeneral_regs_only: + opts->x_target_flags |= MASK_GENERAL_REGS_ONLY; + return true; + + case OPT_mfix_cortex_a53_835769: + opts->x_aarch64_fix_a53_err835769 = val; + return true; + + case OPT_mstrict_align: + opts->x_target_flags |= MASK_STRICT_ALIGN; + return true; + + case OPT_momit_leaf_frame_pointer: + opts->x_flag_omit_frame_pointer = val; + return true; + default: return true; } |