Hi,

This patch adds a predefined macro __ARM_FEATURE_UNALIGNED
which is set when unaligned access is supported in hardware and
enabled by users.

Thanks,
James Greenhalgh

gcc/

2011-09-14  James Greenhalgh  <james.greenha...@arm.com>

        * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS):
        New builtin macro.
diff --git gcc/config/arm/arm.h gcc/config/arm/arm.h
index 208ee51..a76988e 100644
--- gcc/config/arm/arm.h
+++ gcc/config/arm/arm.h
@@ -47,6 +47,8 @@ extern char arm_arch_name[];
     {							\
 	if (TARGET_DSP_MULTIPLY)			\
 	   builtin_define ("__ARM_FEATURE_DSP");	\
+	if (unaligned_access)				\
+	  builtin_define ("__ARM_FEATURE_UNALIGNED");	\
 	/* Define __arm__ even when in thumb mode, for	\
 	   consistency with armcc.  */			\
 	builtin_define ("__arm__");			\

Reply via email to