summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-01-10 01:38:57 +0200
committerTor Lillqvist <tml@iki.fi>2013-01-19 23:58:41 +0200
commit0ff470cff6ecc436e723af6a60986c8eefaba7b7 (patch)
treedcd63e91517eb7ba5baf7e11eb6641f988ba3921 /bridges
parent806535be2bd4e562cd11fed412185dfb6ed1d719 (diff)
iOS C++/UNO bridge fixes
As the inline asm statement stores parameters into r0-r3 we need to include those registers in the clobber list. Clang happened to store pMethod in r2 as input to the asm snippet. iOS uses the basic calling convention, but __ARM_EABI__ is not defined so amend some ifdefs. Change-Id: If3d66c5f3baa4dfa13f82a2b5c2ef1ab559ce31b
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
index a52a80a6859f..3a20ed84fd91 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
@@ -115,7 +115,7 @@ void MapReturn(sal_uInt32 r0, sal_uInt32 r1, typelib_TypeDescriptionReference *
pRegisterReturn[0] = r0;
break;
case typelib_TypeClass_FLOAT:
-#if !defined(__ARM_PCS_VFP) && (defined(__ARM_EABI__) || defined(__SOFTFP__))
+#if !defined(__ARM_PCS_VFP) && (defined(__ARM_EABI__) || defined(__SOFTFP__) || defined(IOS))
pRegisterReturn[0] = r0;
#else
register float fret asm("s0");
@@ -126,7 +126,7 @@ void MapReturn(sal_uInt32 r0, sal_uInt32 r1, typelib_TypeDescriptionReference *
#endif
break;
case typelib_TypeClass_DOUBLE:
-#if !defined(__ARM_PCS_VFP) && (defined(__ARM_EABI__) || defined(__SOFTFP__))
+#if !defined(__ARM_PCS_VFP) && (defined(__ARM_EABI__) || defined(__SOFTFP__) || defined(IOS))
pRegisterReturn[1] = r1;
pRegisterReturn[0] = r0;
#else
@@ -222,7 +222,7 @@ void callVirtualMethod(
"mov %[r1], r1\n\t"
: [r0]"=r" (r0), [r1]"=r" (r1)
: [pmethod]"m" (pMethod), [pgpr]"m" (pGPR), [pfpr]"m" (pFPR)
- : "r4", "r5");
+ : "r0", "r1", "r2", "r3", "r4", "r5");
MapReturn(r0, r1, pReturnType, (sal_uInt32*)pRegisterReturn);
}