sed -e 's/,.*$//'`
fi
+ # Disallow extensions in --with-tune=cortex-a53+crc.
+ if [ $which = tune ] && [ x"$ext_val" != x ]; then
+ echo "Architecture extensions not supported in --with-$which=$val" 1>&2
+ exit 1
+ fi
+
# Use the pre-processor to strip flatten the options.
# This makes the format less rigid than if we use
# grep and sed directly here.
fi
true
else
- echo "Unknown $which used in --with-$which=$val" 1>&2
- exit 1
+ # Allow --with-$which=native.
+ if [ "$val" = native ]; then
+ true
+ else
+ echo "Unknown $which used in --with-$which=$val" 1>&2
+ exit 1
+ fi
fi
done
;;
#define ENDIAN_LANE_N(NUNITS, N) \
(BYTES_BIG_ENDIAN ? NUNITS - 1 - N : N)
-/* Support for a configure-time default CPU, etc. We currently support
- --with-arch and --with-cpu. Both are ignored if either is specified
- explicitly on the command line at run time. */
+/* Support for configure-time --with-arch, --with-cpu and --with-tune.
+ --with-arch and --with-cpu are ignored if either -mcpu or -march is used.
+ --with-tune is ignored if either -mtune or -mcpu is used (but is not
+ affected by -march). */
#define OPTION_DEFAULT_SPECS \
{"arch", "%{!march=*:%{!mcpu=*:-march=%(VALUE)}}" }, \
- {"cpu", "%{!march=*:%{!mcpu=*:-mcpu=%(VALUE)}}" },
+ {"cpu", "%{!march=*:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \
+ {"tune", "%{!mcpu=*:%{!mtune=*:-mtune=%(VALUE)}}"},
#define MCPU_TO_MARCH_SPEC \
" %{mcpu=*:-march=%:rewrite_mcpu(%{mcpu=*:%*})}"
--- /dev/null
+/* { dg-do compile { target { tune_cortex_a76 } } } */
+/* { dg-additional-options " -dA " } */
+
+void foo ()
+{}
+
+/* { dg-final { scan-assembler "//.tune cortex-a76" } } */
--- /dev/null
+/* { dg-do compile { target { tune_cortex_a76 } } } */
+/* { dg-additional-options " -dA -march=armv8.6-a " } */
+
+void foo ()
+{}
+
+/* { dg-final { scan-assembler "//.tune cortex-a76" } } */
+/* { dg-final { scan-assembler ".arch armv8.6-a" } } */
--- /dev/null
+/* { dg-do compile { target { tune_cortex_a76 } } } */
+/* { dg-additional-options " -dA -mcpu=cortex-a73" } */
+
+void foo ()
+{}
+
+/* { dg-final { scan-assembler "//.tune cortex-a73" } } */
+/* { dg-final { scan-assembler ".arch armv8-a" } } */
--- /dev/null
+/* { dg-do compile { target { tune_cortex_a76 } } } */
+/* { dg-additional-options " -dA -mtune=cortex-a73" } */
+
+void foo ()
+{}
+
+/* { dg-final { scan-assembler "//.tune cortex-a73" } } */
} ""]
}
+# Return 1 if GCC was configured with --with-tune=cortex-a76
+proc check_effective_target_tune_cortex_a76 { } {
+ return [check_configured_with "with-tune=cortex-a76"]
+}
+
# Return 1 if the target has an efficient means to encode large initializers
# in the assembly.