[Libreoffice-commits] core.git: bridges/source

jan Iversen jani at libreoffice.org
Thu Mar 15 18:41:51 UTC 2018


 bridges/source/cpp_uno/gcc3_ios/cpp2uno.cxx    |    4 
 bridges/source/cpp_uno/gcc3_ios/ios64_helper.s |  290 +++++++++++--------------
 2 files changed, 134 insertions(+), 160 deletions(-)

New commits:
commit d47749c76949515992b4144e59d7c51f7e976dda
Author: jan Iversen <jani at libreoffice.org>
Date:   Thu Mar 15 19:39:44 2018 +0100

    iOS, simplified bridge assembler code.
    
    Use x14 and x15 as function and offset instead of
    having x15 as a pointer to 2 words.
    
    Change-Id: I1cb3af4e86e3abe1b56fba2509eda31af0435885

diff --git a/bridges/source/cpp_uno/gcc3_ios/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_ios/cpp2uno.cxx
index 1e2e94d090b2..7a927f6bc58c 100644
--- a/bridges/source/cpp_uno/gcc3_ios/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios/cpp2uno.cxx
@@ -420,11 +420,11 @@ namespace
  * (called by asm snippets)
  */
 
-extern "C" sal_Int64 cpp_vtable_call( sal_Int32 *pFunctionAndOffset,
+extern "C" sal_Int64 cpp_vtable_call( sal_Int32 func, sal_Int32 offset,
                                       void **pCallStack )
 {
     sal_Int64 nRegReturn;
-    typelib_TypeClass aType = cpp_mediate( pFunctionAndOffset[0], pFunctionAndOffset[1], pCallStack, &nRegReturn );
+    typelib_TypeClass aType = cpp_mediate( func, offset, pCallStack, &nRegReturn );
 
     switch( aType )
     {
diff --git a/bridges/source/cpp_uno/gcc3_ios/ios64_helper.s b/bridges/source/cpp_uno/gcc3_ios/ios64_helper.s
index 6737f73dde6f..c5c02ea8149b 100644
--- a/bridges/source/cpp_uno/gcc3_ios/ios64_helper.s
+++ b/bridges/source/cpp_uno/gcc3_ios/ios64_helper.s
@@ -19,166 +19,139 @@
     .section        __TEXT,__text,regular,pure_instructions
 
     .p2align        2
-codeSnippet_00000000_0:
-    adr x15, .+8
+codeSnippet_0_0:
+    mov x14, 0
+    mov x15, 0
     b _privateSnippetExecutor
-    .long 00000000
-    .long 0
-codeSnippet_00000000_1:
-    adr x15, .+8
+codeSnippet_0_1:
+    mov x14, 0
+    mov x15, 1
     b _privateSnippetExecutor
-    .long 00000000
-    .long 1
-codeSnippet_00000000_2:
-    adr x15, .+8
+codeSnippet_0_2:
+    mov x14, 0
+    mov x15, 2
     b _privateSnippetExecutor
-    .long 00000000
-    .long 2
-codeSnippet_00000000_3:
-    adr x15, .+8
+codeSnippet_0_3:
+    mov x14, 0
+    mov x15, 3
     b _privateSnippetExecutor
-    .long 00000000
-    .long 3
-codeSnippet_00000001_0:
-    adr x15, .+8
+codeSnippet_1_0:
+    mov x14, 1
+    mov x15, 0
     b _privateSnippetExecutor
     .long 0x000001
     .long 0
-codeSnippet_00000001_1:
-    adr x15, .+8
+codeSnippet_1_1:
+    mov x14, 1
+    mov x15, 1
     b _privateSnippetExecutor
-    .long 0x000001
-    .long 1
-codeSnippet_00000001_2:
-    adr x15, .+8
+codeSnippet_1_2:
+    mov x14, 1
+    mov x15, 2
     b _privateSnippetExecutor
-    .long 0x000001
-    .long 2
-codeSnippet_00000001_3:
-    adr x15, .+8
+codeSnippet_1_3:
+    mov x14, 1
+    mov x15, 3
     b _privateSnippetExecutor
-    .long 0x000001
-    .long 3
-codeSnippet_00000002_0:
-    adr x15, .+8
+codeSnippet_2_0:
+    mov x14, 2
+    mov x15, 0
     b _privateSnippetExecutor
-    .long 0x000002
-    .long 0
-codeSnippet_00000002_1:
-    adr x15, .+8
+codeSnippet_2_1:
+    mov x14, 2
+    mov x15, 1
     b _privateSnippetExecutor
-    .long 0x000002
-    .long 1
-codeSnippet_00000002_2:
-    adr x15, .+8
+codeSnippet_2_2:
+    mov x14, 2
+    mov x15, 2
     b _privateSnippetExecutor
-    .long 0x000002
-    .long 2
-codeSnippet_00000002_3:
-    adr x15, .+8
+codeSnippet_2_3:
+    mov x14, 2
+    mov x15, 3
     b _privateSnippetExecutor
     .long 0x000002
     .long 3
-codeSnippet_00000003_0:
-    adr x15, .+8
+codeSnippet_3_0:
+    mov x14, 3
+    mov x15, 0
     b _privateSnippetExecutor
-    .long 0x000003
-    .long 0
-codeSnippet_00000003_1:
-    adr x15, .+8
+codeSnippet_3_1:
+    mov x14, 3
+    mov x15, 1
     b _privateSnippetExecutor
-    .long 0x000003
-    .long 1
-codeSnippet_00000003_2:
-    adr x15, .+8
+codeSnippet_3_2:
+    mov x14, 3
+    mov x15, 2
     b _privateSnippetExecutor
-    .long 0x000003
-    .long 2
-codeSnippet_00000003_3:
-    adr x15, .+8
+codeSnippet_3_3:
+    mov x14, 3
+    mov x15, 3
     b _privateSnippetExecutor
-    .long 0x000003
-    .long 3
-codeSnippet_00000004_0:
-    adr x15, .+8
+codeSnippet_4_0:
+    mov x14, 4
+    mov x15, 0
     b _privateSnippetExecutor
-    .long 0x000004
-    .long 0
-codeSnippet_00000004_1:
-    adr x15, .+8
+codeSnippet_4_1:
+    mov x14, 4
+    mov x15, 1
     b _privateSnippetExecutor
-    .long 0x000004
-    .long 1
-codeSnippet_00000004_2:
-    adr x15, .+8
+codeSnippet_4_2:
+    mov x14, 4
+    mov x15, 2
     b _privateSnippetExecutor
-    .long 0x000004
-    .long 2
-codeSnippet_00000004_3:
-    adr x15, .+8
+codeSnippet_4_3:
+    mov x14, 4
+    mov x15, 3
     b _privateSnippetExecutor
-    .long 0x000004
-    .long 3
-codeSnippet_00000005_0:
-    adr x15, .+8
+codeSnippet_5_0:
+    mov x14, 5
+    mov x15, 0
     b _privateSnippetExecutor
-    .long 0x000005
-    .long 0
-codeSnippet_00000005_1:
-    adr x15, .+8
+codeSnippet_5_1:
+    mov x14, 5
+    mov x15, 1
     b _privateSnippetExecutor
-    .long 0x000005
-    .long 1
-codeSnippet_00000005_2:
-    adr x15, .+8
+codeSnippet_5_2:
+    mov x14, 5
+    mov x15, 2
     b _privateSnippetExecutor
-    .long 0x000005
-    .long 2
-codeSnippet_00000005_3:
-    adr x15, .+8
+codeSnippet_5_3:
+    mov x14, 5
+    mov x15, 3
     b _privateSnippetExecutor
-    .long 0x000005
-    .long 3
-codeSnippet_00000006_0:
-    adr x15, .+8
+codeSnippet_6_0:
+    mov x14, 6
+    mov x15, 0
     b _privateSnippetExecutor
-    .long 0x000006
-    .long 0
-codeSnippet_00000006_1:
-    adr x15, .+8
+codeSnippet_6_1:
+    mov x14, 6
+    mov x15, 1
     b _privateSnippetExecutor
-    .long 0x000006
-    .long 1
-codeSnippet_00000006_2:
-    adr x15, .+8
+codeSnippet_6_2:
+    mov x14, 6
+    mov x15, 2
     b _privateSnippetExecutor
-    .long 0x000006
-    .long 2
-codeSnippet_00000006_3:
-    adr x15, .+8
+codeSnippet_6_3:
+    mov x14, 6
+    mov x15, 3
     b _privateSnippetExecutor
-    .long 0x000006
-    .long 3
-codeSnippet_00000007_0:
-    adr x15, .+8
+codeSnippet_7_0:
+    mov x14, 7
+    mov x15, 0
     b _privateSnippetExecutor
-    .long 0x000007
-    .long 0
-codeSnippet_00000007_1:
-    adr x15, .+8
+codeSnippet_7_1:
+    mov x14, 7
+    mov x15, 1
     b _privateSnippetExecutor
-    .long 0x000007
-    .long 1
-codeSnippet_00000007_2:
-    adr x15, .+8
+codeSnippet_7_2:
+    mov x14, 7
+    mov x15, 2
     b _privateSnippetExecutor
-    .long 0x000007
-    .long 2
-codeSnippet_00000007_3:
-    adr x15, .+8
+codeSnippet_7_3:
+    mov x14, 7
+    mov x15, 3
     b _privateSnippetExecutor
-    .long 0x000007
-    .long 3
+
     .globl _nFunIndexes
 _nFunIndexes:
     .long 8
@@ -187,38 +160,38 @@ _nVtableOffsets:
     .long 4
     .globl _codeSnippets
 _codeSnippets:
-    .long codeSnippet_00000000_0 - _codeSnippets
-    .long codeSnippet_00000000_1 - _codeSnippets
-    .long codeSnippet_00000000_2 - _codeSnippets
-    .long codeSnippet_00000000_3 - _codeSnippets
-    .long codeSnippet_00000001_0 - _codeSnippets
-    .long codeSnippet_00000001_1 - _codeSnippets
-    .long codeSnippet_00000001_2 - _codeSnippets
-    .long codeSnippet_00000001_3 - _codeSnippets
-    .long codeSnippet_00000002_0 - _codeSnippets
-    .long codeSnippet_00000002_1 - _codeSnippets
-    .long codeSnippet_00000002_2 - _codeSnippets
-    .long codeSnippet_00000002_3 - _codeSnippets
-    .long codeSnippet_00000003_0 - _codeSnippets
-    .long codeSnippet_00000003_1 - _codeSnippets
-    .long codeSnippet_00000003_2 - _codeSnippets
-    .long codeSnippet_00000003_3 - _codeSnippets
-    .long codeSnippet_00000004_0 - _codeSnippets
-    .long codeSnippet_00000004_1 - _codeSnippets
-    .long codeSnippet_00000004_2 - _codeSnippets
-    .long codeSnippet_00000004_3 - _codeSnippets
-    .long codeSnippet_00000005_0 - _codeSnippets
-    .long codeSnippet_00000005_1 - _codeSnippets
-    .long codeSnippet_00000005_2 - _codeSnippets
-    .long codeSnippet_00000005_3 - _codeSnippets
-    .long codeSnippet_00000006_0 - _codeSnippets
-    .long codeSnippet_00000006_1 - _codeSnippets
-    .long codeSnippet_00000006_2 - _codeSnippets
-    .long codeSnippet_00000006_3 - _codeSnippets
-    .long codeSnippet_00000007_0 - _codeSnippets
-    .long codeSnippet_00000007_1 - _codeSnippets
-    .long codeSnippet_00000007_2 - _codeSnippets
-    .long codeSnippet_00000007_3 - _codeSnippets
+    .long codeSnippet_0_0 - _codeSnippets
+    .long codeSnippet_0_1 - _codeSnippets
+    .long codeSnippet_0_2 - _codeSnippets
+    .long codeSnippet_0_3 - _codeSnippets
+    .long codeSnippet_1_0 - _codeSnippets
+    .long codeSnippet_1_1 - _codeSnippets
+    .long codeSnippet_1_2 - _codeSnippets
+    .long codeSnippet_1_3 - _codeSnippets
+    .long codeSnippet_2_0 - _codeSnippets
+    .long codeSnippet_2_1 - _codeSnippets
+    .long codeSnippet_2_2 - _codeSnippets
+    .long codeSnippet_2_3 - _codeSnippets
+    .long codeSnippet_3_0 - _codeSnippets
+    .long codeSnippet_3_1 - _codeSnippets
+    .long codeSnippet_3_2 - _codeSnippets
+    .long codeSnippet_3_3 - _codeSnippets
+    .long codeSnippet_4_0 - _codeSnippets
+    .long codeSnippet_4_1 - _codeSnippets
+    .long codeSnippet_4_2 - _codeSnippets
+    .long codeSnippet_4_3 - _codeSnippets
+    .long codeSnippet_5_0 - _codeSnippets
+    .long codeSnippet_5_1 - _codeSnippets
+    .long codeSnippet_5_2 - _codeSnippets
+    .long codeSnippet_5_3 - _codeSnippets
+    .long codeSnippet_6_0 - _codeSnippets
+    .long codeSnippet_6_1 - _codeSnippets
+    .long codeSnippet_6_2 - _codeSnippets
+    .long codeSnippet_6_3 - _codeSnippets
+    .long codeSnippet_7_0 - _codeSnippets
+    .long codeSnippet_7_1 - _codeSnippets
+    .long codeSnippet_7_2 - _codeSnippets
+    .long codeSnippet_7_3 - _codeSnippets
 
 
 
@@ -248,8 +221,9 @@ _privateSnippetExecutor:
 
     // First argument (x15 set up in the codeSnippet instance)
     // Second argument: The pointer to all the above
-    mov     x0, x15
-    mov     x1, sp
+    mov     x0, x14
+    mov     x1, x15
+    mov     x2, sp
 
     bl      _cpp_vtable_call
     ldp     x8, lr, [sp, #0]


More information about the Libreoffice-commits mailing list