Kaydet (Commit) 5747ed05 authored tarafından jan Iversen's avatar jan Iversen

iOS, simplified assembler

RC of cpp_vtable_call is never used in the asm part, so remove it.

Change-Id: Iabda12541fbb574a21395a8430c52a3e9f892947
üst c0149b1c
......@@ -290,11 +290,13 @@ namespace
}
static typelib_TypeClass cpp_mediate( sal_Int32 nFunctionIndex,
sal_Int32 nVtableOffset,
void ** pCallStack,
sal_Int64 * pRegisterReturn )
static void cpp_mediate(sal_Int32 nFunctionIndex,
sal_Int32 nVtableOffset,
void ** pCallStack)
{
sal_Int64 nRegReturn;
sal_Int64 *pRegisterReturn = &nRegReturn;
// pCallStack: x8, lr, d0..d7, x0..x7, rest of params originally on stack
// _this_ ptr is patched cppu_XInterfaceProxy object
void *pThis = pCallStack[2 + 8];
......@@ -409,7 +411,8 @@ namespace
}
}
return eRet;
(void)eRet;
return;
}
}
......@@ -419,31 +422,9 @@ namespace
*/
extern "C" void cpp_vtable_call( sal_Int32 func, sal_Int32 offset,
void **pCallStack )
void **pStack )
{
sal_Int64 nRegReturn;
typelib_TypeClass aType = cpp_mediate( func, offset, pCallStack, &nRegReturn );
switch( aType )
{
case typelib_TypeClass_BOOLEAN:
case typelib_TypeClass_BYTE:
nRegReturn = (unsigned long)(*(unsigned char *)&nRegReturn);
break;
case typelib_TypeClass_CHAR:
case typelib_TypeClass_UNSIGNED_SHORT:
case typelib_TypeClass_SHORT:
nRegReturn = (unsigned long)(*(unsigned short *)&nRegReturn);
break;
case typelib_TypeClass_ENUM:
case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_LONG:
nRegReturn = (unsigned long)(*(unsigned int *)&nRegReturn);
break;
case typelib_TypeClass_VOID:
default:
break;
}
cpp_mediate(func, offset, pStack);
}
namespace
......
......@@ -199,8 +199,6 @@ _privateSnippetExecutor:
.cfi_offset w29, -16
// _privateSnippetExecutor is jumped to from codeSnippet_*
stp x29, x30, [sp, #-0x10]!
mov x29, sp
// push all GP, FP/SIMD registers to the stack
stp x6, x7, [sp, #-16]!
......@@ -221,10 +219,14 @@ _privateSnippetExecutor:
mov x1, x15
mov x2, sp
bl _cpp_vtable_call
.globl _jantest
ldp x8, lr, [sp, #0]
// restore x8 (RC pointer) and lr (skip RC from cpp_vtable_call)
ldp x8, lr, [sp, #0]
// restore stack
add sp, sp, #144
ldp x29, x30, [sp], #0x10
// continue with throw/catch
ret lr
.cfi_endproc
......
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