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

Rejigger trapframe slightly.

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