18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef __ASM_ARM_INSN_H
38c2ecf20Sopenharmony_ci#define __ASM_ARM_INSN_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_cistatic inline unsigned long
68c2ecf20Sopenharmony_ciarm_gen_nop(void)
78c2ecf20Sopenharmony_ci{
88c2ecf20Sopenharmony_ci#ifdef CONFIG_THUMB2_KERNEL
98c2ecf20Sopenharmony_ci	return 0xf3af8000; /* nop.w */
108c2ecf20Sopenharmony_ci#else
118c2ecf20Sopenharmony_ci	return 0xe1a00000; /* mov r0, r0 */
128c2ecf20Sopenharmony_ci#endif
138c2ecf20Sopenharmony_ci}
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciunsigned long
168c2ecf20Sopenharmony_ci__arm_gen_branch(unsigned long pc, unsigned long addr, bool link, bool warn);
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_cistatic inline unsigned long
198c2ecf20Sopenharmony_ciarm_gen_branch(unsigned long pc, unsigned long addr)
208c2ecf20Sopenharmony_ci{
218c2ecf20Sopenharmony_ci	return __arm_gen_branch(pc, addr, false, true);
228c2ecf20Sopenharmony_ci}
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_cistatic inline unsigned long
258c2ecf20Sopenharmony_ciarm_gen_branch_link(unsigned long pc, unsigned long addr, bool warn)
268c2ecf20Sopenharmony_ci{
278c2ecf20Sopenharmony_ci	return __arm_gen_branch(pc, addr, true, warn);
288c2ecf20Sopenharmony_ci}
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci#endif
31