1/* 2 * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6#ifndef ASSERT_MACROS_S 7#define ASSERT_MACROS_S 8 9 /* 10 * Assembler macro to enable asm_assert. We assume that the stack is 11 * initialized prior to invoking this macro. 12 */ 13#define ASM_ASSERT(_cc) \ 14.ifndef .L_assert_filename ;\ 15 .pushsection .rodata.str1.1, "aS" ;\ 16 .L_assert_filename: ;\ 17 .string __FILE__ ;\ 18 .popsection ;\ 19.endif ;\ 20 b##_cc 300f ;\ 21 ldr r0, =.L_assert_filename ;\ 22 ldr r1, =__LINE__ ;\ 23 b asm_assert;\ 24300: 25 26#endif /* ASSERT_MACROS_S */ 27