Core: Add volatile to inline assembly blocks
This patch introduces the consistent usage of the keyword
volatile to mark inline assembly blocks in order to avoid
potential issues with aggressive optimisation modes that
could remove them.
Change-Id: I304286658b87ec41e738760479ef067895a63464
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
diff --git a/interface/src/tfm_nspm_api.c b/interface/src/tfm_nspm_api.c
index a835f2d..a540e8c 100644
--- a/interface/src/tfm_nspm_api.c
+++ b/interface/src/tfm_nspm_api.c
@@ -64,7 +64,7 @@
static uint32_t tfm_nspm_svc_register_client(uint32_t client_id)
{
SVC(SVC_TFM_NSPM_REGISTER_CLIENT_ID);
- __ASM("BX LR");
+ __ASM volatile("BX LR");
}
uint32_t tfm_nspm_register_client_id(void)