summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-03-01 14:43:46 +0100
committersb <sb@openoffice.org>2010-03-01 14:43:46 +0100
commit80b39c82606e372f298cdf3c715277b14d3014bd (patch)
tree2a6a64e63b972ee40de289be419373ed24a91e23 /bridges
parentd2a42ecf88e1485003dce580929d20e2799cc6ee (diff)
parente3e1a6da8047cb36de9a8faf592a69c9a482a5d9 (diff)
merged in CWS sb119
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/call.s16
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx7
2 files changed, 18 insertions, 5 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/call.s b/bridges/source/cpp_uno/gcc3_linux_intel/call.s
index f345e3a764ac..45d7c5308d30 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/call.s
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/call.s
@@ -9,7 +9,8 @@ privateSnippetExecutorGeneral:
.LCFIg0:
movl %esp,%ebp
.LCFIg1:
- subl $0x4,%esp # 32bit returnValue
+ subl $0x8,%esp # 32bit returnValue, and preserve potential 128bit
+ # stack alignment
pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
@@ -30,6 +31,7 @@ privateSnippetExecutorVoid:
.LCFIv0:
movl %esp,%ebp
.LCFIv1:
+ andl $0xFFFFFFF0,%esp # preserve potential 128bit stack alignment
pushl $0 # 32bit null pointer (returnValue not used)
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
@@ -49,7 +51,8 @@ privateSnippetExecutorHyper:
.LCFIh0:
movl %esp,%ebp
.LCFIh1:
- subl $0x8,%esp # 64bit returnValue
+ subl $0x8,%esp # 64bit returnValue (preserves potential 128bit
+ # stack alignment)
pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
@@ -71,7 +74,8 @@ privateSnippetExecutorFloat:
.LCFIf0:
movl %esp,%ebp
.LCFIf1:
- subl $0x4,%esp # 32bit returnValue
+ subl $0x8,%esp # 32bit returnValue, and preserve potential 128bit
+ # stack alignment
pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
@@ -92,7 +96,8 @@ privateSnippetExecutorDouble:
.LCFId0:
movl %esp,%ebp
.LCFId1:
- subl $0x8,%esp # 64bit returnValue
+ subl $0x8,%esp # 64bit returnValue (preserves potential 128bit
+ # stack alignment)
pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
@@ -113,7 +118,8 @@ privateSnippetExecutorClass:
.LCFIc0:
movl %esp,%ebp
.LCFIc1:
- subl $0x4,%esp # 32bit returnValue
+ subl $0x8,%esp # 32bit returnValue, and preserve potential 128bit
+ # stack alignment
pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
index afd202f683cf..4d1d3f2f8ca4 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
@@ -84,6 +84,13 @@ void callVirtualMethod(
void * stackptr;
asm volatile (
"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
"mov %0, %%eax\n\t"
"mov %%eax, %%edx\n\t"