From 372c86ac62fabe319f05622e20f0a78713e43203 Mon Sep 17 00:00:00 2001 From: Philipp Kupferschmied Date: Fri, 16 Jan 2009 18:26:00 +0100 Subject: [PATCH] BUGFIX: clobber memory in do_ipc to prevent gcc4.3 from setting MRs _after_ performing the IPC. (thx to R. Neider for his help) --- kernel/src/glue/v4-x86/x32/tcb.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/kernel/src/glue/v4-x86/x32/tcb.h b/kernel/src/glue/v4-x86/x32/tcb.h index b42d9bcd..0bdd932d 100644 --- a/kernel/src/glue/v4-x86/x32/tcb.h +++ b/kernel/src/glue/v4-x86/x32/tcb.h @@ -301,21 +301,23 @@ INLINE msg_tag_t tcb_t::do_ipc(threadid_t to_tid, threadid_t from_tid, timeout_t { msg_tag_t tag; word_t mr1, mr2, dummy; - asm("pushl %%ebp \n" + asm volatile + ("pushl %%ebp \n" "pushl %%ecx \n" "call sys_ipc \n" "addl $4, %%esp \n" "movl %%ebp, %%ecx \n" "popl %%ebp \n" : "=S"(tag.raw), - "=b"(mr1), - "=c"(mr2), - "=a"(dummy), - "=d"(dummy) + "=b"(mr1), + "=c"(mr2), + "=a"(dummy), + "=d"(dummy) : "a"(to_tid.get_raw()), "d"(from_tid.get_raw()), "c"(timeout.raw) - : "edi"); + : "edi", + "memory"); set_mr(1, mr1); set_mr(2, mr2); return tag;