Patch for apps/bench/pingpong
"Mai, Haohui" <[email protected]> Mon, 21 Dec 2009 16:58:58 -0600
| Newsgroups | gmane.comp.micro-kernel.l4.l4ka.general |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I'm playing around with L4ka on a 64-bit machine. It seems that the code is a little bit out of date, so I make a small fix so that it works correctly under gcc 4.4. :-) Any comments are appreciated. Thanks. Cheers, Haohui
l4ka-apps-bench-64bit.patch
(text/x-patch, 1 KB)
Index: pingpong-amd64-32.cc
===================================================================
--- pingpong-amd64-32.cc (revision 1118)
+++ pingpong-amd64-32.cc (working copy)
@@ -44,14 +44,14 @@
L4_Word_t dummy;
__asm__ __volatile__ (
"/* pingpong_arch_ipc() */\n"
- "pushl %%ebp \n"
+ "pushq %%rbp \n"
"xorl %%ecx, %%ecx \n"
"movl %%esi, (%%edi) \n"
"call *ipc_32 \n" /* jump via KIP */
- "popl %%ebp \n"
+ "popq %%rbp \n"
: "=d" (dummy), "=S"(untyped)
: "a" (dest), "d" (dest), "S"(untyped), "D"(__L4_X86_Utcb())
- : "ebx", "ecx" );
+ : "ebx", "ecx" );
return untyped;
}
Index: Makefile.in
===================================================================
--- Makefile.in (revision 1118)
+++ Makefile.in (working copy)
@@ -49,7 +49,7 @@
CFLAGS_powerpc+= -fno-builtin
CXXFLAGS_powerpc+= -fno-rtti
-CCFLAGS_pingpong-amd64-32 = $(subst -m64,-m32,$(CCFLAGS)) -m32
+CCFLAGS_pingpong-amd64-32 = -fPIC -fno-exceptions
pingpong-amd64-32.o: pingpong-amd64-32.cc
$(CC) $(CPPFLAGS) $(CCFLAGS_$*) -x c++ -c $< -o $(notdir $@)