1/* 2 * Arm SCP/MCP Software 3 * Copyright (c) 2014-2021, Arm Limited and Contributors. All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7#ifndef ASSERT_MACROS_S 8#define ASSERT_MACROS_S 9 10 /* 11 * Assembler macro to enable asm_assert. Use this macro wherever 12 * assert is required in assembly. Please note that the macro makes 13 * use of label '300' to provide the logic and the caller 14 * should make sure that this label is not used to branch prior 15 * to calling this macro. 16 */ 17#define ASM_ASSERT(_cc) \ 18.ifndef .L_assert_filename ;\ 19 .pushsection .rodata.str1.1, "aS" ;\ 20 .L_assert_filename: ;\ 21 .string __FILE__ ;\ 22 .popsection ;\ 23.endif ;\ 24 b._cc 300f ;\ 25 adr x0, .L_assert_filename ;\ 26 mov x1, __LINE__ ;\ 27 b asm_assert ;\ 28300: 29 30#endif /* ASSERT_MACROS_S */ 31