Kaydet (Commit) 95eeed58 authored tarafından Herbert Dürr's avatar Herbert Dürr

#i124086# preserve 16byte stack alignment in gcc3-solaris-intel's uno2cpp bridge

Patch-by: 's avatarApostolos Syropoulos <asyropoulos123@hotmail.com>
Review-by: 's avatarHerbert Dürr <hdu@apache.org>
üst 24db7825
...@@ -45,7 +45,15 @@ namespace ...@@ -45,7 +45,15 @@ namespace
{ {
//================================================================================================== //==================================================================================================
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, void * pAdjustedThisPtr,
sal_Int32 nVtableIndex, sal_Int32 nVtableIndex,
void * pRegisterReturn, void * pRegisterReturn,
...@@ -67,6 +75,13 @@ static void callVirtualMethod( ...@@ -67,6 +75,13 @@ static void callVirtualMethod(
void * stackptr; void * stackptr;
asm volatile ( asm volatile (
"mov %%esp, %6\n\t" "mov %%esp, %6\n\t"
// preserve potential 128bit stack alignment
"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 // copy values
"mov %0, %%eax\n\t" "mov %0, %%eax\n\t"
"mov %%eax, %%edx\n\t" "mov %%eax, %%edx\n\t"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment