linux-2.6.33/store_user_sp_lr()(arm)
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#j3e2442e]
#backlinks
*説明 [#lffb05d7]
-パス: [[linux-2.6.33/arch/arm/kernel/entry-header.S]]
-FIXME: これは何?
--説明
**引数 [#s97547f8]
-rd
--
-rtemp
--
-offset
--
**返り値 [#xac0c9cf]
-なし
**参考 [#c47ea38f]
*実装 [#o10b0258]
@
@ Store/load the USER SP and LR registers by switching ...
@ mode. Useful in Thumb-2 mode where "stm/ldm rd, {sp, ...
@ available. Should only be called from SVC mode
@
.macro store_user_sp_lr, rd, rtemp, offset = 0
mrs \rtemp, cpsr
eor \rtemp, \rtemp, #(SVC_MODE ^ SYSTEM_MODE)
msr cpsr_c, \rtemp @ switch to the SYS mode
-
--[[linux-2.6.33/SVC_MODE]]
-
--[[linux-2.6.33/SYSTEM_MODE]]
str sp, [\rd, #\offset] @ save sp_usr
str lr, [\rd, #\offset + 4] @ save lr_usr
eor \rtemp, \rtemp, #(SVC_MODE ^ SYSTEM_MODE)
msr cpsr_c, \rtemp @ switch back to the SVC mode
.endm
*コメント [#h72f89ac]
終了行:
*参照元 [#j3e2442e]
#backlinks
*説明 [#lffb05d7]
-パス: [[linux-2.6.33/arch/arm/kernel/entry-header.S]]
-FIXME: これは何?
--説明
**引数 [#s97547f8]
-rd
--
-rtemp
--
-offset
--
**返り値 [#xac0c9cf]
-なし
**参考 [#c47ea38f]
*実装 [#o10b0258]
@
@ Store/load the USER SP and LR registers by switching ...
@ mode. Useful in Thumb-2 mode where "stm/ldm rd, {sp, ...
@ available. Should only be called from SVC mode
@
.macro store_user_sp_lr, rd, rtemp, offset = 0
mrs \rtemp, cpsr
eor \rtemp, \rtemp, #(SVC_MODE ^ SYSTEM_MODE)
msr cpsr_c, \rtemp @ switch to the SYS mode
-
--[[linux-2.6.33/SVC_MODE]]
-
--[[linux-2.6.33/SYSTEM_MODE]]
str sp, [\rd, #\offset] @ save sp_usr
str lr, [\rd, #\offset + 4] @ save lr_usr
eor \rtemp, \rtemp, #(SVC_MODE ^ SYSTEM_MODE)
msr cpsr_c, \rtemp @ switch back to the SVC mode
.endm
*コメント [#h72f89ac]
ページ名: