diff options
author | Jani Monoses <jani@ubuntu.com> | 2012-02-21 01:15:02 +0200 |
---|---|---|
committer | Jani Monoses <jani@ubuntu.com> | 2012-02-21 01:15:02 +0200 |
commit | e13dc26e394ede799a60691638971cf1d9689f74 (patch) | |
tree | 21a4db8dd15c24e28f1cec9b536524c7cc7a4240 /bridges | |
parent | 1248e2af6a70c44651b74d2950aeabb64c1c70e7 (diff) |
ARM bridge: fixes for passing double arguments on the stack
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx | 6 | ||||
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx index 07bdea17c2e4..9750b6acca0b 100644 --- a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx @@ -70,6 +70,7 @@ namespace char * pCppStack = pTopStack; #ifdef __ARM_PCS_VFP + int dc = 0; char * pFloatArgs = (char *)(pCppStack - 64); #endif // return @@ -152,6 +153,11 @@ namespace if ((pFloatArgs - pTopStack) % 8) pFloatArgs+=sizeof(float); //align to 8 pCppArgs[nPos] = pUnoArgs[nPos] = pFloatArgs; pFloatArgs += sizeof(double); + if (++dc == arm::MAX_FPR_REGS) { + if (pCppStack - pTopStack < 16) + pCppStack = pTopStack + 16; + pFloatArgs = pCppStack; + } } else #endif pCppArgs[nPos] = pUnoArgs[nPos] = pCppStack; diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx index 8e69ebeef351..98b29bac0efb 100644 --- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx @@ -362,7 +362,8 @@ void callVirtualMethod( { \ ++pDS; \ } \ - *pDS++ = *reinterpret_cast<double *>( pSV );\ + *(double *)pDS = *reinterpret_cast<double *>( pSV );\ + pDS += 2;\ } #else #define INSERT_FLOAT( pSV, nr, pFPR, pDS ) \ |