diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-10-01 00:44:02 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-10-01 01:03:29 +0300 |
commit | 6a3493adb70c53a345456e220213dc645a05a155 (patch) | |
tree | b2dd3f273a33b16ce24186f7185fb83bde697369 /bridges | |
parent | 883dfa4827ad29dfdc363189ac7052dbb1b866dd (diff) |
Add dummy code for the ARM64 case
Change-Id: I88a871374ecc8d9d59f9b33b5198c0e6c9a2458d
Diffstat (limited to 'bridges')
-rwxr-xr-x | bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl | 13 | ||||
-rw-r--r-- | bridges/source/cpp_uno/gcc3_ios_arm/helper.s | 13 |
2 files changed, 21 insertions, 5 deletions
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl b/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl index 822afffacf5f..43dd6fc7a640 100755 --- a/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl +++ b/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl @@ -14,7 +14,12 @@ sub gen_arm ($$) { my ($funIndex, $vtableOffset) = @_; printf ("codeSnippet_%08x_%d:\n", $funIndex, $vtableOffset); + printf ("#ifdef __arm\n"); + # Note: pc is the address of instruction being executed plus 8 printf (" mov ip, pc\n"); + printf ("#else\n"); + printf (" adr x15, .+8\n"); + printf ("#endif\n"); printf (" b _privateSnippetExecutor\n"); printf (" .long %#08x\n", $funIndex); printf (" .long %d\n", $vtableOffset); @@ -31,11 +36,11 @@ sub gen_x86 ($$$) printf (".text\n"); -printf ("#ifdef __arm\n"); +printf ("#if defined(__arm) || defined(__arm64)\n"); printf ("\n"); -printf ("// Each codeSnippetX function stores pc into ip and branches to _privateSnippetExecutor\n"); -printf ("// The branch instruction is followed by two longs (that ip thus points to):\n"); +printf ("// Each codeSnippetX function stores into ip/x15 an address and branches to _privateSnippetExecutor\n"); +printf ("// The branch instruction is followed by two longs that ip/x15 points to:\n"); printf ("// - the function index, as such and with the 0x80000000 bit set\n"); printf ("// (to indicate a hidden parameter for returning large values)\n"); printf ("// - the vtable offset\n"); @@ -85,7 +90,7 @@ foreach my $funIndex (0 .. $nFunIndexes-1) { foreach my $vtableOffset (0 .. $nVtableOffsets-1) { - printf ("#ifdef __arm\n"); + printf ("#if defined(__arm) || defined(__arm64)\n"); printf (" .long codeSnippet_%08x_%d - _codeSnippets\n", $funIndex, $vtableOffset); printf (" .long codeSnippet_%08x_%d - _codeSnippets\n", $funIndex|0x80000000, $vtableOffset); printf ("#else\n"); diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/helper.s b/bridges/source/cpp_uno/gcc3_ios_arm/helper.s index 2f94734d8cdb..27c7c04ed1fc 100644 --- a/bridges/source/cpp_uno/gcc3_ios_arm/helper.s +++ b/bridges/source/cpp_uno/gcc3_ios_arm/helper.s @@ -19,7 +19,7 @@ #include "codesnippets.S" -#ifdef __arm +#if defined(__arm) // ARM support code for LibreOffice C++/UNO bridging // // Written by Peter Naulls <peter@chocky.org> @@ -42,6 +42,17 @@ _privateSnippetExecutor: add sp, sp, #4 // no need to restore r4 (we didn't touch it) ldr pc, [sp], #20 // return, discarding function arguments +#elif defined(__arm64) + + .text + .align 4 + +_privateSnippetExecutor: + + // Not done yet, intentionally crash for now... + mov x15, #0 + ldr x15, [x15] + #else .text |