Commit 361fb3ee by Kyrylo Tkachov Committed by Kyrylo Tkachov

[AArch64][6/14] Implement TARGET_OPTION_SAVE/TARGET_OPTION_RESTORE

	* config/aarch64/aarch64.opt (explicit_tune_core): New TargetVariable.
	(explicit_arch): Likewise.
	(x_aarch64_isa_flags): Likewise.
	(mgeneral-regs-only): Mark as Save.
	(mfix-cortex-a53-835769): Likewise.
	(mcmodel=): Likewise.
	(mstrict-align): Likewise.
	(momit-leaf-frame-pointer): Likewise.
	(mtls-dialect): Likewise.
	(master=): Likewise.
	* config/aarch64/aarch64.h (ASM_DECLARE_FUNCTION_NAME): Define.
	(aarch64_isa_flags): Remove extern declaration.
	* config/aarch64/aarch64.c (aarch64_validate_mcpu): Return a bool
	to indicate success or failure.
	(aarch64_validate_march): Likewise.
	(aarch64_validate_mtune): Likewise.
	(aarch64_isa_flags): Delete.
	(aarch64_override_options_internal): Access opts->x_aarch64_isa_flags
	instead of aarch64_isa_flags.
	(aarch64_get_tune_cpu): New function.
	(aarch64_get_arch): Likewise.
	(aarch64_override_options): Use above and set up explicit_tune_core
	and explicit_arch.
	(aarch64_print_extension): Move earlier in file.  Add isa_flags
	argument and use that instead of the global aarch64_isa_flags.
	(aarch64_option_save): New function.
	(aarch64_option_restore): Likewise.
	(aarch64_option_print): Likewise.
	(aarch64_declare_function_name): Likewise.
	(aarch64_start_file): Delete.
	(TARGET_ASM_FILE_START): Do not define.
	(TARGET_OPTION_RESTORE, TARGET_OPTION_PRINT): Define.
	* config/aarch64/aarch64-protos.h (aarch64_declare_function_name):
	Declare prototype.

From-SVN: r226558
parent bca541c3
2015-08-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2015-08-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.opt (explicit_tune_core): New TargetVariable.
(explicit_arch): Likewise.
(x_aarch64_isa_flags): Likewise.
(mgeneral-regs-only): Mark as Save.
(mfix-cortex-a53-835769): Likewise.
(mcmodel=): Likewise.
(mstrict-align): Likewise.
(momit-leaf-frame-pointer): Likewise.
(mtls-dialect): Likewise.
(master=): Likewise.
* config/aarch64/aarch64.h (ASM_DECLARE_FUNCTION_NAME): Define.
(aarch64_isa_flags): Remove extern declaration.
* config/aarch64/aarch64.c (aarch64_validate_mcpu): Return a bool
to indicate success or failure.
(aarch64_validate_march): Likewise.
(aarch64_validate_mtune): Likewise.
(aarch64_isa_flags): Delete.
(aarch64_override_options_internal): Access opts->x_aarch64_isa_flags
instead of aarch64_isa_flags.
(aarch64_get_tune_cpu): New function.
(aarch64_get_arch): Likewise.
(aarch64_override_options): Use above and set up explicit_tune_core
and explicit_arch.
(aarch64_print_extension): Move earlier in file. Add isa_flags
argument and use that instead of the global aarch64_isa_flags.
(aarch64_option_save): New function.
(aarch64_option_restore): Likewise.
(aarch64_option_print): Likewise.
(aarch64_declare_function_name): Likewise.
(aarch64_start_file): Delete.
(TARGET_ASM_FILE_START): Do not define.
(TARGET_OPTION_RESTORE, TARGET_OPTION_PRINT): Define.
* config/aarch64/aarch64-protos.h (aarch64_declare_function_name):
Declare prototype.
2015-08-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.opt (momit-leaf-frame-pointer): Initialize * config/aarch64/aarch64.opt (momit-leaf-frame-pointer): Initialize
flag_omit_leaf_frame_pointer to 2. flag_omit_leaf_frame_pointer to 2.
......
...@@ -255,6 +255,7 @@ bool aarch64_gimple_fold_builtin (gimple_stmt_iterator *); ...@@ -255,6 +255,7 @@ bool aarch64_gimple_fold_builtin (gimple_stmt_iterator *);
bool aarch64_is_extend_from_extract (machine_mode, rtx, rtx); bool aarch64_is_extend_from_extract (machine_mode, rtx, rtx);
bool aarch64_is_long_call_p (rtx); bool aarch64_is_long_call_p (rtx);
bool aarch64_label_mentioned_p (rtx); bool aarch64_label_mentioned_p (rtx);
void aarch64_declare_function_name (FILE *, const char*, tree);
bool aarch64_legitimate_pic_operand_p (rtx); bool aarch64_legitimate_pic_operand_p (rtx);
bool aarch64_modes_tieable_p (machine_mode mode1, bool aarch64_modes_tieable_p (machine_mode mode1,
machine_mode mode2); machine_mode mode2);
......
...@@ -223,7 +223,7 @@ extern unsigned aarch64_architecture_version; ...@@ -223,7 +223,7 @@ extern unsigned aarch64_architecture_version;
| AARCH64_FL_LOR | AARCH64_FL_RDMA) | AARCH64_FL_LOR | AARCH64_FL_RDMA)
/* Macros to test ISA flags. */ /* Macros to test ISA flags. */
extern unsigned long aarch64_isa_flags;
#define AARCH64_ISA_CRC (aarch64_isa_flags & AARCH64_FL_CRC) #define AARCH64_ISA_CRC (aarch64_isa_flags & AARCH64_FL_CRC)
#define AARCH64_ISA_CRYPTO (aarch64_isa_flags & AARCH64_FL_CRYPTO) #define AARCH64_ISA_CRYPTO (aarch64_isa_flags & AARCH64_FL_CRYPTO)
#define AARCH64_ISA_FP (aarch64_isa_flags & AARCH64_FL_FP) #define AARCH64_ISA_FP (aarch64_isa_flags & AARCH64_FL_FP)
...@@ -438,6 +438,10 @@ extern unsigned long aarch64_isa_flags; ...@@ -438,6 +438,10 @@ extern unsigned long aarch64_isa_flags;
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
aarch64_asm_preferred_eh_data_format ((CODE), (GLOBAL)) aarch64_asm_preferred_eh_data_format ((CODE), (GLOBAL))
/* Output the assembly strings we want to add to a function definition. */
#define ASM_DECLARE_FUNCTION_NAME(STR, NAME, DECL) \
aarch64_declare_function_name (STR, NAME, DECL)
/* The register that holds the return address in exception handlers. */ /* The register that holds the return address in exception handlers. */
#define AARCH64_EH_STACKADJ_REGNUM (R0_REGNUM + 4) #define AARCH64_EH_STACKADJ_REGNUM (R0_REGNUM + 4)
#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, AARCH64_EH_STACKADJ_REGNUM) #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, AARCH64_EH_STACKADJ_REGNUM)
......
...@@ -21,6 +21,18 @@ ...@@ -21,6 +21,18 @@
HeaderInclude HeaderInclude
config/aarch64/aarch64-opts.h config/aarch64/aarch64-opts.h
TargetVariable
enum aarch64_processor explicit_tune_core = aarch64_none
TargetVariable
enum aarch64_arch explicit_arch = aarch64_no_arch
TargetSave
const char *x_aarch64_override_tune_string
TargetVariable
unsigned long aarch64_isa_flags = 0
; The TLS dialect names to use with -mtls-dialect. ; The TLS dialect names to use with -mtls-dialect.
Enum Enum
...@@ -53,11 +65,11 @@ Target Report RejectNegative Mask(BIG_END) ...@@ -53,11 +65,11 @@ Target Report RejectNegative Mask(BIG_END)
Assume target CPU is configured as big endian Assume target CPU is configured as big endian
mgeneral-regs-only mgeneral-regs-only
Target Report RejectNegative Mask(GENERAL_REGS_ONLY) Target Report RejectNegative Mask(GENERAL_REGS_ONLY) Save
Generate code which uses only the general registers Generate code which uses only the general registers
mfix-cortex-a53-835769 mfix-cortex-a53-835769
Target Report Var(aarch64_fix_a53_err835769) Init(2) Target Report Var(aarch64_fix_a53_err835769) Init(2) Save
Workaround for ARM Cortex-A53 Erratum number 835769 Workaround for ARM Cortex-A53 Erratum number 835769
mfix-cortex-a53-843419 mfix-cortex-a53-843419
...@@ -69,19 +81,19 @@ Target Report RejectNegative InverseMask(BIG_END) ...@@ -69,19 +81,19 @@ Target Report RejectNegative InverseMask(BIG_END)
Assume target CPU is configured as little endian Assume target CPU is configured as little endian
mcmodel= mcmodel=
Target RejectNegative Joined Enum(cmodel) Var(aarch64_cmodel_var) Init(AARCH64_CMODEL_SMALL) Target RejectNegative Joined Enum(cmodel) Var(aarch64_cmodel_var) Init(AARCH64_CMODEL_SMALL) Save
Specify the code model Specify the code model
mstrict-align mstrict-align
Target Report RejectNegative Mask(STRICT_ALIGN) Target Report RejectNegative Mask(STRICT_ALIGN) Save
Don't assume that unaligned accesses are handled by the system Don't assume that unaligned accesses are handled by the system
momit-leaf-frame-pointer momit-leaf-frame-pointer
Target Report Save Var(flag_omit_leaf_frame_pointer) Init(2) Target Report Var(flag_omit_leaf_frame_pointer) Init(2) Save
Omit the frame pointer in leaf functions Omit the frame pointer in leaf functions
mtls-dialect= mtls-dialect=
Target RejectNegative Joined Enum(tls_type) Var(aarch64_tls_dialect) Init(TLS_DESCRIPTORS) Target RejectNegative Joined Enum(tls_type) Var(aarch64_tls_dialect) Init(TLS_DESCRIPTORS) Save
Specify TLS dialect Specify TLS dialect
march= march=
......
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