summaryrefslogtreecommitdiff
path: root/gcc/config/arm/arm.c
diff options
context:
space:
mode:
authorMatthew Gretton-Dann <matthew.gretton-dann@arm.com>2012-10-18 10:49:23 +0000
committerRamana Radhakrishnan <ramana@gcc.gnu.org>2012-10-18 10:49:23 +0000
commit595fefee5d18e9a08f2e7b1be156be4ace719a6f (patch)
treefc46d395d86fd64a67f721fb90ce21b242b75e21 /gcc/config/arm/arm.c
parenta9ba8ba56c16e80fd9134822bdfe34f565f4ccf4 (diff)
downloadgcc-595fefee5d18e9a08f2e7b1be156be4ace719a6f.tar.gz
Add basic armv8-a support
2012-10-17 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> * config/arm/lib1funcs.S (__ARM_ARCH__): Define for ARMv8-A. 2012-10-17 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> * gcc.target/arm/ftest-armv8a-arm.c: New testcase. * gcc.target/arm/ftest-armv8a-thumb.c: Likewise. * gcc.target/arm/ftest-support-arm.h (feature_matrix): Add ARMv8-A row. * gcc.target/arm/ftest-support-thumb.h (feature_matrix): Likewise. * gcc.target/arm/ftest-support.h (architecture): Add ARMv8-A. * lib/target-supports.exp: Add ARMv8-A architecture expectation. 2012-10-17 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> * config.gcc: Add support for ARMv8 for arm*-*-* targets. * config/arm/arm-arches.def: Add armv8-a * config/arm/arm-fpus.def: Add fp-armv8, neon-fp-armv8, crypto-neon-fp-armv8. Add crypto field. * config/arm/arm-tables.opt: Regenerate. * config/arm/arm.c (FL_FOR_ARCH8A): Likewise. (arm_arch8): New global variable. (ARM_FPU): Add crypto parameter. (arm_option_override): Set arm_arch8, update comments. * config/arm/arm.h (TARGET_CRYPTO): New macro. (arm_fpu_desc): Add crypto field. (base_architecture): Add ARMv8 entry. (arm_arch8): New variable declaration. * config/arm/bpabi.h: ARMv8 supports BE8. * doc/invoke.texi: Document ARMv8 options. Co-Authored-By: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> From-SVN: r192558
Diffstat (limited to 'gcc/config/arm/arm.c')
-rw-r--r--gcc/config/arm/arm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index fc3a5080987..165dfe20450 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -686,6 +686,7 @@ static int thumb_call_reg_needed;
architecture. */
#define FL_ARCH7 (1 << 22) /* Architecture 7. */
#define FL_ARM_DIV (1 << 23) /* Hardware divide (ARM mode). */
+#define FL_ARCH8 (1 << 24) /* Architecture 8. */
#define FL_IWMMXT (1 << 29) /* XScale v2 or "Intel Wireless MMX technology". */
#define FL_IWMMXT2 (1 << 30) /* "Intel Wireless MMX2 technology". */
@@ -716,6 +717,8 @@ static int thumb_call_reg_needed;
#define FL_FOR_ARCH7R (FL_FOR_ARCH7A | FL_THUMB_DIV)
#define FL_FOR_ARCH7M (FL_FOR_ARCH7 | FL_THUMB_DIV)
#define FL_FOR_ARCH7EM (FL_FOR_ARCH7M | FL_ARCH7EM)
+#define FL_FOR_ARCH8A (FL_FOR_ARCH7 | FL_ARCH6K | FL_ARCH8 | FL_THUMB_DIV \
+ | FL_ARM_DIV | FL_NOTM)
/* The bits in this mask specify which
instructions we are allowed to generate. */
@@ -765,6 +768,9 @@ int arm_arch_notm = 0;
/* Nonzero if instructions present in ARMv7E-M can be used. */
int arm_arch7em = 0;
+/* Nonzero if instructions present in ARMv8 can be used. */
+int arm_arch8 = 0;
+
/* Nonzero if this chip can benefit from load scheduling. */
int arm_ld_sched = 0;
@@ -1059,8 +1065,8 @@ char arm_arch_name[] = "__ARM_ARCH_0UNK__";
static const struct arm_fpu_desc all_fpus[] =
{
-#define ARM_FPU(NAME, MODEL, REV, VFP_REGS, NEON, FP16) \
- { NAME, MODEL, REV, VFP_REGS, NEON, FP16 },
+#define ARM_FPU(NAME, MODEL, REV, VFP_REGS, NEON, FP16, CRYPTO) \
+ { NAME, MODEL, REV, VFP_REGS, NEON, FP16, CRYPTO },
#include "arm-fpus.def"
#undef ARM_FPU
};
@@ -1743,6 +1749,7 @@ arm_option_override (void)
arm_arch6m = arm_arch6 && !arm_arch_notm;
arm_arch7 = (insn_flags & FL_ARCH7) != 0;
arm_arch7em = (insn_flags & FL_ARCH7EM) != 0;
+ arm_arch8 = (insn_flags & FL_ARCH8) != 0;
arm_arch_thumb2 = (insn_flags & FL_THUMB2) != 0;
arm_arch_xscale = (insn_flags & FL_XSCALE) != 0;
@@ -1959,6 +1966,7 @@ arm_option_override (void)
/* Enable -munaligned-access by default for
- all ARMv6 architecture-based processors
- ARMv7-A, ARMv7-R, and ARMv7-M architecture-based processors.
+ - ARMv8 architecture-base processors.
Disable -munaligned-access by default for
- all pre-ARMv6 architecture-based processors