Avoid corrupting eax during system call.

This commit is contained in:
Danila Fedorin 2019-04-23 16:14:21 -07:00
parent 6ab267bb9b
commit bbdb8bd811

View File

@ -81,14 +81,12 @@ TRAPHANDLER(t_default, T_DEFAULT);
.globl _alltraps
_alltraps:
sub $0x2, %esp
mov %ds, %eax
push %ax
pushw %ds
sub $0x2, %esp
mov %es, %eax
push %ax
pushw %es
pushal
mov $(GD_KD), %eax
movl %eax, %ds
movl %eax, %es
movw %ax, %ds
movw %ax, %es
pushl %esp
call trap