BUGFIX: clobber memory in do_ipc to prevent

gcc4.3 from setting MRs _after_ performing
        the IPC.
        (thx to R. Neider for his help)
This commit is contained in:
Philipp Kupferschmied 2009-01-16 18:26:00 +01:00
parent 74dd311bb3
commit 372c86ac62
1 changed files with 8 additions and 6 deletions

View File

@ -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;