Kaydet (Commit) e13dc26e authored tarafından Jani Monoses's avatar Jani Monoses

ARM bridge: fixes for passing double arguments on the stack

üst 1248e2af
...@@ -70,6 +70,7 @@ namespace ...@@ -70,6 +70,7 @@ namespace
char * pCppStack = pTopStack; char * pCppStack = pTopStack;
#ifdef __ARM_PCS_VFP #ifdef __ARM_PCS_VFP
int dc = 0;
char * pFloatArgs = (char *)(pCppStack - 64); char * pFloatArgs = (char *)(pCppStack - 64);
#endif #endif
// return // return
...@@ -152,6 +153,11 @@ namespace ...@@ -152,6 +153,11 @@ namespace
if ((pFloatArgs - pTopStack) % 8) pFloatArgs+=sizeof(float); //align to 8 if ((pFloatArgs - pTopStack) % 8) pFloatArgs+=sizeof(float); //align to 8
pCppArgs[nPos] = pUnoArgs[nPos] = pFloatArgs; pCppArgs[nPos] = pUnoArgs[nPos] = pFloatArgs;
pFloatArgs += sizeof(double); pFloatArgs += sizeof(double);
if (++dc == arm::MAX_FPR_REGS) {
if (pCppStack - pTopStack < 16)
pCppStack = pTopStack + 16;
pFloatArgs = pCppStack;
}
} else } else
#endif #endif
pCppArgs[nPos] = pUnoArgs[nPos] = pCppStack; pCppArgs[nPos] = pUnoArgs[nPos] = pCppStack;
......
...@@ -362,7 +362,8 @@ void callVirtualMethod( ...@@ -362,7 +362,8 @@ void callVirtualMethod(
{ \ { \
++pDS; \ ++pDS; \
} \ } \
*pDS++ = *reinterpret_cast<double *>( pSV );\ *(double *)pDS = *reinterpret_cast<double *>( pSV );\
pDS += 2;\
} }
#else #else
#define INSERT_FLOAT( pSV, nr, pFPR, pDS ) \ #define INSERT_FLOAT( pSV, nr, pFPR, pDS ) \
......
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