Validate and set default parameters for stack-clash.
authorTamar Christina <tamar.christina@arm.com>
Mon, 1 Oct 2018 13:09:29 +0000 (13:09 +0000)
committerTamar Christina <tnfchris@gcc.gnu.org>
Mon, 1 Oct 2018 13:09:29 +0000 (13:09 +0000)
commit329130cc40cc7b061690a2e8b416f1798e2fd36a
treed7e35df912e55508ca456977cde1cc98f3b73d18
parentf622a56bcb4049083fcbb63bb27eca9230c89456
Validate and set default parameters for stack-clash.

This patch defines the default parameters and validation for the aarch64
stack clash probing interval and guard sizes.  It cleans up the previous
implementation and insures that at no point the invalidate arguments are
present in the pipeline for AArch64.  Currently they are only corrected once
cc1 initalizes the back-end.

The default for AArch64 is 64 KB for both of these and we only support 4 KB and 64 KB
probes.  We also enforce that any value you set here for the parameters must be
in sync.

If an invalid value is specified an error will be generated and compilation aborted.

gcc/

* common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
aarch64_option_default_param): New.
(params.h): Include.
(TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
* config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
stack-clash protection validation code.

From-SVN: r264757
gcc/ChangeLog
gcc/common/config/aarch64/aarch64-common.c
gcc/config/aarch64/aarch64.c