Commit 5a2c8331 by Kyrylo Tkachov Committed by Kyrylo Tkachov

[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.

From-SVN: r226560
parent d78006d9
2015-08-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* 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.
2015-08-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.h (SWITCHABLE_TARGET): Define.
* config/aarch64/aarch64.c: Include target-globals.h
(aarch64_previous_fndecl): New variable.
......
......@@ -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;
}
......
......@@ -22,6 +22,8 @@
#ifndef GCC_AARCH64_PROTOS_H
#define GCC_AARCH64_PROTOS_H
#include "input.h"
/*
SYMBOL_CONTEXT_ADR
The symbol is used in a load-address operation.
......@@ -252,6 +254,8 @@ bool aarch64_float_const_zero_rtx_p (rtx);
bool aarch64_function_arg_regno_p (unsigned);
bool aarch64_gen_movmemqi (rtx *);
bool aarch64_gimple_fold_builtin (gimple_stmt_iterator *);
bool aarch64_handle_option (struct gcc_options *, struct gcc_options *,
const struct cl_decoded_option *, location_t);
bool aarch64_is_extend_from_extract (machine_mode, rtx, rtx);
bool aarch64_is_long_call_p (rtx);
bool aarch64_label_mentioned_p (rtx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment