提交 f90b85bc 创建 作者: Silas Boyd-Wickizer's avatar Silas Boyd-Wickizer

Rejigger trapframe slightly.

上级 013a2bac
......@@ -24,60 +24,60 @@ sysentry:
jmp sysentry
trapcommon:
pushq %rdi
pushq %rsi
pushq %rdx
pushq %rcx
pushq %rax
pushq %r8
pushq %r9
pushq %r10
pushq %r11
pushq %rbx
pushq %rbp
pushq %r12
pushq %r13
pushq %r14
pushq %r15
movw %ds, %ax
pushw %ax
subq $0xe, %rsp
pushq %rdi
pushq %rsi
pushq %rdx
pushq %rcx
pushq %rax
pushq %r8
pushq %r9
pushq %r10
pushq %r11
pushq %rbx
pushq %rbp
pushq %r12
pushq %r13
pushq %r14
pushq %r15
movw %ds, %ax
pushw %ax
subq $0xe, %rsp
# Set up data and per-cpu segments.
movw $KDSEG, %ax
movw %ax, %ds
movw %ax, %es
movw $KDSEG, %ax
movw %ax, %ds
movw %ax, %es
// XXX(sbw) we should do something with fs, gs, gs.base
movq %rsp, %rdi // first argument to trap
call trap
movq %rsp, %rdi // first argument to trap
call trap
// Fall through to trapret
.globl trapret
.align 8
trapret:
addq $0xe, %rsp // padding
popw %ax
movw %ax, %ds
movw %ax, %es
// XXX(sbw) we should do something with fs, gs, gs.base
addq $0xe, %rsp // padding
popq %r15
popq %r14
popq %r13
popq %r12
popq %rbp
popq %rbx
popq %r11
popq %r10
popq %r9
popq %r8
popq %rax
popq %rcx
popq %rdx
popq %rsi
popq %rdi
addq $0x10, %rsp // trapno, err
popq %r15
popq %r14
popq %r13
popq %r12
popq %rbp
popq %rbx
popq %r11
popq %r10
popq %r9
popq %r8
popq %rax
popq %rcx
popq %rdx
popq %rsi
popq %rdi
addq $0x10, %rsp // trapno, err
iretq
.data
......
......@@ -149,8 +149,8 @@ rcr2(void)
// Layout of the trap frame built on the stack by the
// hardware and by trapasm.S, and passed to trap().
struct trapframe {
u16 ds;
u16 padding3[7];
u16 ds;
// amd64 ABI callee saved registers
u64 r15;
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论