diff --git a/src/system/kernel/arch/x86/arch_x86.S b/src/system/kernel/arch/x86/arch_x86.S index af5688f0bf..695631f970 100644 --- a/src/system/kernel/arch/x86/arch_x86.S +++ b/src/system/kernel/arch/x86/arch_x86.S @@ -222,10 +222,15 @@ FUNCTION(arch_debug_save_registers): popl %eax movl %eax, 36(%esi) - movl %cs, 40(%esi) - movl %ss, 44(%esi) - movl %ds, 48(%esi) - movl %es, 52(%esi) + xor %eax, %eax + movw %cs, %ax + movl %eax, 40(%esi) + movw %ss, %ax + movl %eax, 44(%esi) + movw %ds, %ax + movl %eax, 48(%esi) + movw %es, %ax + movl %eax, 52(%esi) popl %eax popl %esi