提交 e1872bb1 创建 作者: rsc's avatar rsc

formatting, fix comment

上级 e0240674
.text .text
.globl trap .globl trap
.globl trapret1 .globl trapret1
.globl alltraps .globl alltraps
.set SEG_KDATA_SEL 0x10 # selector for SEG_KDATA
# vectors.S sends all traps here.
alltraps: alltraps:
/* vectors.S sends all traps here */ # Build trap frame.
pushl %ds # build pushl %ds
pushl %es # trap pushl %es
pushal # frame pushal
movl $16,%eax # SEG_KDATA << 3
movw %ax,%ds # kernel # Set up data segments.
movw %ax,%es # segments movl $SEG_KDATA_SEL, %eax
pushl %esp # pass pointer to this trapframe movw %ax,%ds
call trap # and call trap() movw %ax,%es
# Call trap(tf), where tf=%esp
pushl %esp
call trap
addl $4, %esp addl $4, %esp
# return falls through to trapret...
/* # Return falls through to trapret...
* a forked process RETs here
* expects ESP to point to a Trapframe
*/
.globl trapret .globl trapret
trapret: trapret:
popal popal
popl %es popl %es
popl %ds popl %ds
addl $0x8, %esp /* trapno and errcode */ addl $0x8, %esp # trapno and errcode
iret iret
# A forked process switches to user mode by calling
# forkret1(tf), where tf is the trap frame to use.
.globl forkret1 .globl forkret1
forkret1: forkret1:
movl 4(%esp), %esp movl 4(%esp), %esp
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论