From a07acab41bd40e917f4159299015b24bb5eceef1 Mon Sep 17 00:00:00 2001 From: Marcus Overhagen Date: Sat, 16 Sep 2006 20:40:19 +0000 Subject: [PATCH] fixed assembly code to compile with gcc 4.0.3. the original code was invalid, as there is no mov instruction to move a 16 bit segment register into 32 bit memory location, and movzx (called movzwl within gcc) doesn't work with segement registers. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18864 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/arch_x86.S | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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