Patchwork [AArch64,1/6] Implement support for Crypto -- Define TARGET_CRYPTO.

login
register
mail settings
Submitter Tejas Belagod
Date Dec. 6, 2013, 5:35 p.m.
Message ID <52A20AF1.8060301@arm.com>
Download mbox | patch
Permalink /patch/298136/
State New
Headers show

Comments

Tejas Belagod - Dec. 6, 2013, 5:35 p.m.
Hi,

The attached patch defines TARGET_CRYPTO macro and defines builtin preprocessor 
macro __ARM_FEATURE_CRYPTO.

Tested on aarch64-none-elf. OK for trunk?

Thanks,
Tejas.

Changelog

2013-12-06  Tejas Belagod  <tejas.belagod@arm.com>

	* config/aarch64/aarch64.h (TARGET_CRYPTO): New.
	(__ARM_FEATURE_CRYPTO): Define if TARGET_CRYPTO is true.
Marcus Shawcroft - Dec. 10, 2013, 10 a.m.
On 6 December 2013 17:35, Tejas Belagod <tbelagod@arm.com> wrote:

> 2013-12-06  Tejas Belagod  <tejas.belagod@arm.com>
>
>         * config/aarch64/aarch64.h (TARGET_CRYPTO): New.
>         (__ARM_FEATURE_CRYPTO): Define if TARGET_CRYPTO is true.

OK, but don;t apply until the rest of this patch series is approved.
/Marcus

Patch

diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index cead022..59f15cb 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -54,6 +54,8 @@ 
 	  cpp_define (parse_in, "_ILP32");		\
 	  cpp_define (parse_in, "__ILP32__");		\
 	}						\
+      if (TARGET_CRYPTO)				\
+	builtin_define ("__ARM_FEATURE_CRYPTO");	\
     } while (0)
 
 
@@ -180,6 +182,8 @@  extern unsigned long aarch64_isa_flags;
 extern unsigned long aarch64_tune_flags;
 #define AARCH64_TUNE_SLOWMUL       (aarch64_tune_flags & AARCH64_FL_SLOWMUL)
 
+/* Crypto is an optional feature.  */
+#define TARGET_CRYPTO AARCH64_ISA_CRYPTO
 
 /* Standard register usage.  */