1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 08:06:17 +04:00

Revert "Fix trapframe."

This reverts commit 297c9d453d.
This commit is contained in:
Harry Chen 2019-05-13 23:53:47 +08:00
parent 297c9d453d
commit 6a83de7846

View File

@ -32,12 +32,6 @@ trap_from_kernel:
* k1 = old stack pointer
* sp = kernel stack */
#ifdef board_thinpad
#define TRAPFRAME_SIZE 304
#else
#define TRAPFRAME_SIZE 176
#endif
# align stack pointer
andi k0, sp, 0xf
beqz k0, sp_aligned
@ -45,12 +39,18 @@ trap_from_kernel:
la k0, 0xfffffff0
and k0, sp, k0
sw sp, -TRAPFRAME_SIZE(k0)
sw sp, -176(k0)
move sp, k0
sp_aligned:
# allocate 38 / 70 words for trapframe + 6 extra words
#ifdef board_thinpad
#define TRAPFRAME_SIZE 304
#else
#define TRAPFRAME_SIZE 176
#endif
addiu sp, sp, -TRAPFRAME_SIZE
# save general registers