Hi all, This patch implements target attribute support via the TARGET_OPTION_VALID_ATTRIBUTE_P hook. The aarch64_handle_option function in common/config/aarch64/aarch64-common.c is exported to the backend and beefed up a bit. The target attributes supported by this patch reflect the command-line options that we specified as Save earlier in the series. Explicitly, the target attributes supported are: - "general-regs-only" - "fix-cortex-a53-835769" and "no-fix-cortex-a53-835769" - "cmodel=" - "strict-align" - "omit-leaf-frame-pointer" and "no-omit-leaf-frame-pointer" - "tls-dialect" - "arch=" - "cpu=" - "tune=" These correspond to equivalent command-line options when prefixed with a '-m'. Additionally, this patch supports specifying architectural features, as in the -march and -mcpu options by themselves. So, for example we can write: __attribute__((target("+simd+crypto"))) to enable 'simd' and 'crypto' on a per-function basis. The documentation and tests for this come as a separate patch later after the target pragma support and the inlining rules are implemented. Bootstrapped and tested on aarch64. Ok for trunk? Thanks, Kyrill 2015-07-16 Kyrylo Tkachov * 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.