RE: Compilinng the gcc_solaris_intel bridge
Hello Herbert, [...] + // preserve potential 128bit stack alignment I'm not sure whether the SPARCv9 ABI spec is relevant for your build environment, but it mentions this 16byte stack alignment in [1] as something new. Maybe the other changes may be relevant too to solve the bridge problems. Well, as I said my patch is based on the code found in the corresponding gcc3-linux-intel file. Obviously, this has nothing to do with SPARC machines, but then again it might be some kind of leftover. In particular I'd also suggest to mark the ecx register as clobbered like we do in [2] by changing the line: : eax, edx to : eax, edx, ecx I have changed this and it still compiles the testtools. A.S. -- Apostols Syropoulos Xanthi, Greece
Compilinng the gcc_solaris_intel bridge
Hello, After a number of efforts I have finally managed to find the proper patch for file bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx and so to build a functional bridge for Solaris. Previously, I could not build the testtools module but now they compile just fine. Here is the patch: --- bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx.oldΔευ Ιαν 27 17:38:53 2014 +++ bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxxΔευ Ιαν 27 17:34:30 2014 @@ -45,12 +45,20 @@ { //== -static void callVirtualMethod( +void callVirtualMethod( void * pAdjustedThisPtr, sal_Int32 nVtableIndex, void * pRegisterReturn, typelib_TypeClass eReturnType, sal_Int32 * pStackLongs, +sal_Int32 nStackLongs ) __attribute__((noinline)); + +void callVirtualMethod( +void * pAdjustedThisPtr, +sal_Int32 nVtableIndex, +void * pRegisterReturn, +typelib_TypeClass eReturnType, +sal_Int32 * pStackLongs, sal_Int32 nStackLongs ) { // parameter list is mixed list of * and values @@ -67,6 +75,13 @@ void * stackptr; asm volatile ( mov %%esp, %6\n\t + // preserve potential 128bit stack alignment +and $0xfff0, %%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 Of course the patch is just a copy of the corresponding Linux patch, but I was not sure whether it work! A.S. -- Apostols Syropoulos Xanthi, Greece
Re: Compilinng the gcc_solaris_intel bridge
Hi Apostolos, On 27.01.2014 17:04, Απόστολος Συρόπουλος wrote: After a number of efforts I have finally managed to find the proper patch for file bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx and so to build a functional bridge for Solaris. Previously, I could not build the testtools module but now they compile just fine. Congratulations on solving this last critical step! Here is the patch: [...] --- bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx.oldΔευ Ιαν 27 17:38:53 2014 +++ bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxxΔευ Ιαν 27 17:34:30 2014 [...] + // preserve potential 128bit stack alignment +and $0xfff0, %%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 This looks very much like the change for issue 108371, which means that the patch is licensed properly for our project. Of course the patch is just a copy of the corresponding Linux patch, but I was not sure whether it work! I'm glad you tried it out! Herbert - To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org