summaryrefslogtreecommitdiffstats
path: root/arch/arm/lib32/semihosting-trap.S
blob: f7960d7cea96de0a0273c5bb3858969fba57529c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* SPDX-License-Identifier: GPL-2.0-only */
/* SPDX-FileCopyrightText: 2015 Zodiac Inflight Innovations */

/*
 * semihosting-trap.S -- Assembly code needed to make a semihosting call
 *
 * Author: Andrey Smirnov <andrew.smirnov@gmail.com>
 */

#include <linux/linkage.h>
#include <asm/unified.h>

.section .text.semihosting_trap
ENTRY(semihosting_trap)
	@ In supervisor mode SVC would clobber LR
	push	{lr}
	ARM(	svc	#0x123456	)
	THUMB(	svc	#0xAB		)
	pop	{pc}
ENDPROC(semihosting_trap)