강의

멘토링

커뮤니티

Inflearn Community Q&A

grapesgun0624's profile image
grapesgun0624

asked

Structure and Principles of Arm Architecture for System Software Development - Part 1, Taught by the Author (2024 Version)

5.4.3 Practice: Changing from Abort Mode (Data Abort) to Supervisor Mode (TRACE32)

MOVS 명령어 질문

Written on

·

303

0

안녕하세요. "MOVS PC, LR" 명령어 수행시에 무조건 SVC모드로만 전환되는 것인지 아니면 다른 모드로도 전환될수 있는 것인지 궁금합니다.

 

임베디드arm-architecturemicroprocessorscortex-a

Answer 2

0

grapesgun0624님의 프로필 이미지
grapesgun0624
Questioner

답변 감사합니다.

0

austinkim님의 프로필 이미지
austinkim
Instructor

네, Supervisor(SVC) 모드 이외에 다른 동작 모드로 스위칭할 수 있습니다.

동작 모드를 바꾸는 동작은 다음과 같은데요;

 

1. SPSR_<mode> 레지스터의 M[4:0] 비트에 변경하려는 동작 모드의 비트값을 저장

2. LR(R14) 레지스터에 동작 모드가 변경되면서 분기할 주소를 업데이트

3. 'SUBS PC, LR, #4' 혹은 'MOVS PC, LR' 명령어를 실행

 

SPSR_<mode> 레지스터의 M[4:0] 비트에 변경하려는 동작 모드의 비트값을 저정하면 됩니다.

혹시 추가로 다른 궁금한 점이 있으면 질문 남겨주세요.

 

감사합니다.

grapesgun0624's profile image
grapesgun0624

asked

Ask a question