Switch AARCH32/AARCH64 to __aarch64__
NOTE: AARCH32/AARCH64 macros are now deprecated in favor of __aarch64__.
All common C compilers pre-define the same macros to signal which
architecture the code is being compiled for: __arm__ for AArch32 (or
earlier versions) and __aarch64__ for AArch64. There's no need for TF-A
to define its own custom macros for this. In order to unify code with
the export headers (which use __aarch64__ to avoid another dependency),
let's deprecate the AARCH32 and AARCH64 macros and switch the code base
over to the pre-defined standard macro. (Since it is somewhat
unintuitive that __arm__ only means AArch32, let's standardize on only
using __aarch64__.)
NOTE: This change is based on below TFA commit
https://github.com/ARM-software/arm-trusted-firmware/commit/402b3cf8766fe2cb4ae462f7ee7761d08a1ba56c
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com>
Change-Id: If2c3dbaeb01d4a9d8cfd95d906e5eaf4ae94417f
diff --git a/tftf/tests/extensions/mte/test_mte.c b/tftf/tests/extensions/mte/test_mte.c
index 13da667..7dbb9ef 100644
--- a/tftf/tests/extensions/mte/test_mte.c
+++ b/tftf/tests/extensions/mte/test_mte.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -12,7 +12,7 @@
test_result_t test_mte_instructions(void)
{
SKIP_TEST_IF_AARCH32();
-#ifdef AARCH64
+#ifdef __aarch64__
SKIP_TEST_IF_MTE_SUPPORT_LESS_THAN(MTE_IMPLEMENTED_EL0);
/* irg */
@@ -24,13 +24,13 @@
__asm__ volatile (".inst 0xD1800129");
return TEST_RESULT_SUCCESS;
-#endif /* AARCH64 */
+#endif /* __aarch64__ */
}
test_result_t test_mte_leakage(void)
{
SKIP_TEST_IF_AARCH32();
-#ifdef AARCH64
+#ifdef __aarch64__
smc_args tsp_svc_params;
int gcr_el1;
@@ -53,5 +53,5 @@
}
return TEST_RESULT_SUCCESS;
-#endif /* AARCH64 */
+#endif /* __aarch64__ */
}