summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-10-01 00:35:45 +0300
committerTor Lillqvist <tml@collabora.com>2013-10-01 00:53:27 +0300
commit883dfa4827ad29dfdc363189ac7052dbb1b866dd (patch)
tree365f0a8e7f45bc6b7ff824e268ed6e5b819cb21a /bridges
parentdbd0fa72168ad9957466e447975a6ee7a63c434e (diff)
Don't use tabs here either
Change-Id: I633d73ac04ad97bb71e62a93e7d804cd253b2a31
Diffstat (limited to 'bridges')
-rwxr-xr-xbridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl36
-rw-r--r--bridges/source/cpp_uno/gcc3_ios_arm/helper.s26
2 files changed, 33 insertions, 29 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 67701cbfe7e8..822afffacf5f 100755
--- a/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl
@@ -14,19 +14,19 @@ sub gen_arm ($$)
{
my ($funIndex, $vtableOffset) = @_;
printf ("codeSnippet_%08x_%d:\n", $funIndex, $vtableOffset);
- printf ("\tmov ip, pc\n");
- printf ("\tb _privateSnippetExecutor\n");
- printf ("\t.long %#08x\n", $funIndex);
- printf ("\t.long %d\n", $vtableOffset);
+ printf (" mov ip, pc\n");
+ printf (" b _privateSnippetExecutor\n");
+ printf (" .long %#08x\n", $funIndex);
+ printf (" .long %d\n", $vtableOffset);
}
sub gen_x86 ($$$)
{
my ($funIndex, $vtableOffset, $executor) = @_;
printf ("codeSnippet_%08x_%d_%s:\n", $funIndex, $vtableOffset, $executor);
- printf ("\tmovl \$%#08x, %%eax\n", $funIndex);
- printf ("\tmovl \$%d, %%edx\n", $vtableOffset);
- printf ("\tjmp _privateSnippetExecutor%s\n", $executor);
+ printf (" movl \$%#08x, %%eax\n", $funIndex);
+ printf (" movl \$%d, %%edx\n", $vtableOffset);
+ printf (" jmp _privateSnippetExecutor%s\n", $executor);
}
printf (".text\n");
@@ -41,7 +41,7 @@ printf ("// (to indicate a hidden parameter for returning large values)\n");
printf ("// - the vtable offset\n");
printf ("\n");
-printf ("\t.align 4\n");
+printf (" .align 4\n");
printf ("\n");
foreach my $funIndex (0 .. $nFunIndexes-1)
@@ -54,7 +54,7 @@ foreach my $funIndex (0 .. $nFunIndexes-1)
}
printf ("#else\n");
-printf ("\t.align 1, 0x90\n");
+printf (" .align 1, 0x90\n");
foreach my $funIndex (0 .. $nFunIndexes-1)
{
@@ -70,15 +70,15 @@ foreach my $funIndex (0 .. $nFunIndexes-1)
printf ("#endif\n");
-printf ("\t.globl _nFunIndexes\n");
+printf (" .globl _nFunIndexes\n");
printf ("_nFunIndexes:\n");
-printf ("\t.long %d\n", $nFunIndexes);
+printf (" .long %d\n", $nFunIndexes);
-printf ("\t.globl _nVtableOffsets\n");
+printf (" .globl _nVtableOffsets\n");
printf ("_nVtableOffsets:\n");
-printf ("\t.long %d\n", $nVtableOffsets);
+printf (" .long %d\n", $nVtableOffsets);
-printf ("\t.globl _codeSnippets\n");
+printf (" .globl _codeSnippets\n");
printf ("_codeSnippets:\n");
foreach my $funIndex (0 .. $nFunIndexes-1)
@@ -86,13 +86,13 @@ foreach my $funIndex (0 .. $nFunIndexes-1)
foreach my $vtableOffset (0 .. $nVtableOffsets-1)
{
printf ("#ifdef __arm\n");
- printf ("\t.long codeSnippet_%08x_%d - _codeSnippets\n", $funIndex, $vtableOffset);
- printf ("\t.long codeSnippet_%08x_%d - _codeSnippets\n", $funIndex|0x80000000, $vtableOffset);
+ printf (" .long codeSnippet_%08x_%d - _codeSnippets\n", $funIndex, $vtableOffset);
+ printf (" .long codeSnippet_%08x_%d - _codeSnippets\n", $funIndex|0x80000000, $vtableOffset);
printf ("#else\n");
foreach my $executor ('General', 'Void', 'Hyper', 'Float', 'Double', 'Class')
{
- printf ("\t.long codeSnippet_%08x_%d_%s - _codeSnippets\n", $funIndex, $vtableOffset, $executor);
- printf ("\t.long codeSnippet_%08x_%d_%s - _codeSnippets\n", $funIndex|0x80000000, $vtableOffset, $executor);
+ printf (" .long codeSnippet_%08x_%d_%s - _codeSnippets\n", $funIndex, $vtableOffset, $executor);
+ printf (" .long codeSnippet_%08x_%d_%s - _codeSnippets\n", $funIndex|0x80000000, $vtableOffset, $executor);
}
printf ("#endif\n");
}
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/helper.s b/bridges/source/cpp_uno/gcc3_ios_arm/helper.s
index 914d4b7299c0..2f94734d8cdb 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/helper.s
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/helper.s
@@ -1,3 +1,5 @@
+// -*- Mode: Asm; tab-width: 4; tab-stop-list: (4 12 32); comment-column: 30; comment-start: "// "; indent-tabs-mode: nil -*-
+//
// This file is part of the LibreOffice project.
//
// This Source Code Form is subject to the terms of the Mozilla Public
@@ -25,20 +27,20 @@
// Fixed by Michael Casadevall <mcasadevall@kubuntu.org>
// Modified for iOS by Tor Lillqvist <tml@iki.fi>
- .text
- .align 4
+ .text
+ .align 4
_privateSnippetExecutor:
- stmfd sp!, {r0-r3} // follow other parameters on stack
- mov r0, ip // r0 points to functionoffset/vtable
- mov r1, sp // r1 points to this and params
- // (see cpp2uno.cxx:codeSnippet())
- stmfd sp!, {r4,lr} // save return address
- // (r4 pushed to preserve stack alignment)
- bl _cpp_vtable_call
+ stmfd sp!, {r0-r3} // follow other parameters on stack
+ mov r0, ip // r0 points to functionoffset/vtable
+ mov r1, sp // r1 points to this and params
+ // (see cpp2uno.cxx:codeSnippet())
+ stmfd sp!, {r4,lr} // save return address
+ // (r4 pushed to preserve stack alignment)
+ bl _cpp_vtable_call
- add sp, sp, #4 // no need to restore r4 (we didn't touch it)
- ldr pc, [sp], #20 // return, discarding function arguments
+ add sp, sp, #4 // no need to restore r4 (we didn't touch it)
+ ldr pc, [sp], #20 // return, discarding function arguments
#else
.text
@@ -330,3 +332,5 @@ L___gxx_personality_v0$non_lazy_ptr:
.destructor
.align 1
#endif
+
+// vim:set shiftwidth=4 softtabstop=4 expandtab: