http://bugs.gentoo.org/show_bug.cgi?id=292519 Obviously, this is illegal on modern x86 ABIs; stack frames must be kept 128- bit aligned. --- build/ooo310-m19/bridges/source/cpp_uno/gcc3_linux_intel/call.s 2010/01/10 17:07:06 1.1 +++ build/ooo310-m19/bridges/source/cpp_uno/gcc3_linux_intel/call.s 2010/01/10 17:15:57 @@ -10,6 +10,7 @@ privateSnippetExecutorGeneral: movl %esp,%ebp .LCFIg1: subl $0x4,%esp # 32bit returnValue + andl $0xfffffff0,%esp # 128-bit alignment pushl %esp # 32bit &returnValue pushl %ecx # 32bit pCallStack pushl %edx # 32bit nVtableOffset @@ -50,6 +51,7 @@ privateSnippetExecutorHyper: movl %esp,%ebp .LCFIh1: subl $0x8,%esp # 64bit returnValue + andl $0xfffffff0,%esp # 128-bit alignment pushl %esp # 32bit &returnValue pushl %ecx # 32bit pCallStack pushl %edx # 32bit nVtableOffset @@ -72,6 +74,7 @@ privateSnippetExecutorFloat: movl %esp,%ebp .LCFIf1: subl $0x4,%esp # 32bit returnValue + andl $0xfffffff0,%esp # 128-bit alignment pushl %esp # 32bit &returnValue pushl %ecx # 32bit pCallStack pushl %edx # 32bit nVtableOffset @@ -93,6 +96,7 @@ privateSnippetExecutorDouble: movl %esp,%ebp .LCFId1: subl $0x8,%esp # 64bit returnValue + andl $0xfffffff0,%esp # 128-bit alignment pushl %esp # 32bit &returnValue pushl %ecx # 32bit pCallStack pushl %edx # 32bit nVtableOffset @@ -114,6 +118,7 @@ privateSnippetExecutorClass: movl %esp,%ebp .LCFIc1: subl $0x4,%esp # 32bit returnValue + andl $0xfffffff0,%esp # 128-bit alignment pushl %esp # 32bit &returnValue pushl %ecx # 32bit pCallStack pushl %edx # 32bit nVtableOffset --- build/ooo310-m19/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx 2010/01/10 17:17:11 1.1 +++ build/ooo310-m19/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx 2010/01/10 17:54:25 @@ -87,6 +87,13 @@ void callVirtualMethod( void * stackptr; asm volatile ( "mov %%esp, %6\n\t" + // align stack to 128 bits + "and $0xfffffff0, %%esp\n\t" + "mov %0, %%eax\n\t" + "lea -4(,%%eax,4), %%eax\n\t" + "and $0xf, %%eax\n\t" + "sub $0xc, %%eax\n\t" + "add %%eax, %%esp\n\t" // copy values "mov %0, %%eax\n\t" "mov %%eax, %%edx\n\t"