From 04cb3d1fd50c564a9ef0319fca1786fc6f6cb0a1 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Wed, 15 May 2019 22:42:23 +0800 Subject: [PATCH] Fix ucore x86_64 esp->rsp --- ucore/src/arch/x86_64/initcode.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ucore/src/arch/x86_64/initcode.S b/ucore/src/arch/x86_64/initcode.S index 40e6ff4..f7d7ddf 100644 --- a/ucore/src/arch/x86_64/initcode.S +++ b/ucore/src/arch/x86_64/initcode.S @@ -2,11 +2,11 @@ .globl _start _start: # set ebp for backtrace - movl $0x0, %ebp + movq $0x0, %rbp # move down the esp register # since it may cause page fault in backtrace - subl $0x20, %esp + subq $0x20, %rsp # call user-program function # according to fastcall ABI, the first 6 parameters are in registes