Files
plant_car/arch/armv7-r/iar/arm_fullcontextrestore.S
2025-11-08 13:26:19 +08:00

44 lines
1.0 KiB
ArmAsm

/*
* arm_fullcontextrestore.S
*
* Copyright (c) 2022 Semidrive Semiconductor.
* All rights reserved.
*
* Description: ARM full context restore.
*
* Revision History:
* -----------------
*/
INCLUDE config.h
INCLUDE compiler.h
INCLUDE armv7-r/svcall.h
/****************************************************************************
* Public Functions
****************************************************************************/
PUBLIC arm_fullcontextrestore
SECTION .text:CODE(2)
/****************************************************************************
* Name: arm_fullcontextrestore
****************************************************************************/
arm_fullcontextrestore:
cps #0x1F /* Enter sys mode */
/* Perform the System call with R0=1 and R1=regs */
mov r1, r0 /* R1: regs */
mov r0, #SYS_restore_context /* R0: restore context */
svc 0 /* Force synchronous SVCall (or Hard Fault) */
/* This call should not return */
bx lr /* Unnecessary ... will not return */
END