aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2017-11-17 15:53:51 +0000
committerTamar Christina <tnfchris@gcc.gnu.org>2017-11-17 15:53:51 +0000
commitec132ef20c94c5bc72cdf27138cdff2e0c96800e (patch)
tree66a6b83e440593a102ad9a175aebacd673e801b5 /gcc/doc
parent6e72eb34e279a97e997b59494f8d47170efb03be (diff)
downloadgcc-ec132ef20c94c5bc72cdf27138cdff2e0c96800e.zip
gcc-ec132ef20c94c5bc72cdf27138cdff2e0c96800e.tar.gz
gcc-ec132ef20c94c5bc72cdf27138cdff2e0c96800e.tar.bz2
re PR target/82641 (Unable to enable crc32 for a certain function with target attribute on ARM (aarch32))
2017-11-17 Tamar Christina <tamar.christina@arm.com> PR target/82641 * config/arm/arm.c (arm_valid_target_attribute_rec): Parse "arch=" and "+<ext>". (arm_valid_target_attribute_tree): Re-init global options. (arm_option_override): Make non-static. (arm_options_perform_arch_sanity_checks): Make errors fatal. * gcc/config/arm/arm-c.c (__ARM_FEATURE_CMSE): Support undef. (__ARM_FEATURE_CRC32): Support undef. * config/arm/arm_acle.h (__ARM_FEATURE_CRC32): Replace with pragma. * doc/extend.texi (ARM Function Attributes): Add pragma and target. gcc/testsuite/ 2017-11-17 Tamar Christina <tamar.christina@arm.com> PR target/82641 * gcc.target/arm/pragma_arch_attribute.c: New. From-SVN: r254878
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/extend.texi34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 711264c..50bda91 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -3858,6 +3858,40 @@ Specifies the fpu for which to tune the performance of this function.
The behavior and permissible arguments are the same as for the @option{-mfpu=}
command-line option.
+@item arch=
+@cindex @code{arch=} function attribute, ARM
+Specifies the architecture version and architectural extensions to use
+for this function. The behavior and permissible arguments are the same as
+for the @option{-march=} command-line option.
+
+The above target attributes can be specified as follows:
+
+@smallexample
+__attribute__((target("arch=armv8-a+crc")))
+int
+f (int a)
+@{
+ return a + 5;
+@}
+@end smallexample
+
+Additionally, the architectural extension string may be specified on its
+own. This can be used to turn on and off particular architectural extensions
+without having to specify a particular architecture version or core. Example:
+
+@smallexample
+__attribute__((target("+crc+nocrypto")))
+int
+foo (int a)
+@{
+ return a + 5;
+@}
+@end smallexample
+
+In this example @code{target("+crc+nocrypto")} enables the @code{crc}
+extension and disables the @code{crypto} extension for the function @code{foo}
+without modifying an existing @option{-march=} or @option{-mcpu} option.
+
@end table
@end table