Rearrange assembly helper macros

This patch moves assembler macros which are not architecture specific
to a new file `asm_macros_common.S` and moves the `el3_common_macros.S`
into `aarch64` specific folder.

Change-Id: I444a1ee3346597bf26a8b827480cd9640b38c826
diff --git a/include/common/aarch64/asm_macros.S b/include/common/aarch64/asm_macros.S
index e766989..cc8f424 100644
--- a/include/common/aarch64/asm_macros.S
+++ b/include/common/aarch64/asm_macros.S
@@ -31,6 +31,7 @@
 #define __ASM_MACROS_S__
 
 #include <arch.h>
+#include <asm_macros_common.S>
 
 
 	.macro	func_prologue
@@ -104,81 +105,6 @@
 	  .endif
 	.endm
 
-	/*
-	 * This macro is used to create a function label and place the
-	 * code into a separate text section based on the function name
-	 * to enable elimination of unused code during linking
-	 */
-	.macro func _name
-	.section .text.\_name, "ax"
-	.type \_name, %function
-	.func \_name
-	\_name:
-	.endm
-
-	/*
-	 * This macro is used to mark the end of a function.
-	 */
-	.macro endfunc _name
-	.endfunc
-	.size \_name, . - \_name
-	.endm
-
-	/*
-	 * Theses macros are used to create function labels for deprecated
-	 * APIs. If ERROR_DEPRECATED is non zero, the callers of these APIs
-	 * will fail to link and cause build failure.
-	 */
-#if ERROR_DEPRECATED
-	.macro func_deprecated _name
-	func deprecated\_name
-	.endm
-
-	.macro endfunc_deprecated _name
-	endfunc deprecated\_name
-	.endm
-#else
-	.macro func_deprecated _name
-	func \_name
-	.endm
-
-	.macro endfunc_deprecated _name
-	endfunc \_name
-	.endm
-#endif
-
-	/*
-	 * Helper assembler macro to count trailing zeros. The output is
-	 * populated in the `TZ_COUNT` symbol.
-	 */
-	.macro count_tz _value, _tz_count
-	.if \_value
-	  count_tz "(\_value >> 1)", "(\_tz_count + 1)"
-	.else
-	  .equ TZ_COUNT, (\_tz_count - 1)
-	.endif
-	.endm
-
-	/*
-	 * This macro declares an array of 1 or more stacks, properly
-	 * aligned and in the requested section
-	 */
-#define DEFAULT_STACK_ALIGN	(1 << 6)   /* In case the caller doesnt provide alignment */
-
-	.macro declare_stack _name, _section, _size, _count, _align=DEFAULT_STACK_ALIGN
-	count_tz \_align, 0
-	.if (\_align - (1 << TZ_COUNT))
-	  .error "Incorrect stack alignment specified (Must be a power of 2)."
-	.endif
-	.if ((\_size & ((1 << TZ_COUNT) - 1)) <> 0)
-	  .error "Stack size not correctly aligned"
-	.endif
-	.section    \_section, "aw", %nobits
-	.align TZ_COUNT
-	\_name:
-	.space ((\_count) * (\_size)), 0
-	.endm
-
 #if ENABLE_PLAT_COMPAT
 	/*
 	 * This macro calculates the base address of an MP stack using the