diff options
author | Soby Mathew <soby.mathew@arm.com> | 2014-08-19 11:26:00 +0100 |
---|---|---|
committer | Soby Mathew <soby.mathew@arm.com> | 2014-08-19 14:42:35 +0100 |
commit | aecc0840805672279e4165f4d368a59b5c20771e (patch) | |
tree | 658c6ed36c041cfd9d2f367b6dae55d4069ac40b /include | |
parent | a4a8eaeb36f7a023b057f49e0f43f1d0134fd7f0 (diff) |
Rework use of labels in assembly macros.
This patch provides a workaround for the ASM_ASSERT label issue
and also reworks the use of labels in assembly macros.
If the caller of the ASM_ASSERT macro happened to use the
label '1' to jump past the ASM_ASSERT macro, it would not have
worked since the ASM_ASSERT macro internally used the same label.
Hence, as a workaround, this patch makes the label a high
number in the expectation that the caller will never use it.
Also updated the other assembly macros using numerical labels to
named lables.
Change-Id: Iec892359db84f2391ad2a83a92141c4d7049776a
Diffstat (limited to 'include')
-rw-r--r-- | include/common/assert_macros.S | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/common/assert_macros.S b/include/common/assert_macros.S index 45d699bd..807972f3 100644 --- a/include/common/assert_macros.S +++ b/include/common/assert_macros.S @@ -30,7 +30,10 @@ /* * Assembler macro to enable asm_assert. Use this macro wherever - * assert is required in assembly. + * assert is required in assembly. Please note that the macro makes + * use of label '300' to provide the logic and the caller + * should make sure that this label is not used to branch prior + * to calling this macro. */ #define ASM_ASSERT(_cc) \ .ifndef .L_assert_filename ;\ @@ -39,8 +42,8 @@ .string __FILE__ ;\ .popsection ;\ .endif ;\ - b._cc 1f ;\ + b._cc 300f ;\ adr x0, .L_assert_filename ;\ mov x1, __LINE__ ;\ b asm_assert ;\ -1: +300: |