From 2a4b67f90b486e4b617cc382559e427953a91f98 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 12 Mar 2015 16:49:06 +0100 Subject: [PATCH] nova: fix syscall bindings for 32bit The bindings for 32bit did not consider that in the syscall_3 function edx changes due to the assembly instructions and that in the syscall_4 function edx and ecx change. So, the compiler wrongly assumed that the content of these registers stayed unchanged. Fixes #1447 --- repos/base-nova/include/32bit/nova/syscalls.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/repos/base-nova/include/32bit/nova/syscalls.h b/repos/base-nova/include/32bit/nova/syscalls.h index b80d4fea1..c568bf6ed 100644 --- a/repos/base-nova/include/32bit/nova/syscalls.h +++ b/repos/base-nova/include/32bit/nova/syscalls.h @@ -120,8 +120,8 @@ namespace Nova { " sysenter;" "1:" " pop %%ebx;" - : "+a" (status) - : "D" (p1), "S" (p2), "d" (p3) + : "+a" (status), "+d" (p3) + : "D" (p1), "S" (p2) : "ecx"); return status; } @@ -149,8 +149,8 @@ namespace Nova { " pop %%ebx;" " pop %%ebp;" - : "+a" (status) - : "D" (p1), "S" (p2), "c" (p3), "d" (p4) + : "+a" (status), "+c" (p3), "+d" (p4) + : "D" (p1), "S" (p2) : "memory"); return status; }