Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
883dfa48
Kaydet (Commit)
883dfa48
authored
Eyl 30, 2013
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't use tabs here either
Change-Id: I633d73ac04ad97bb71e62a93e7d804cd253b2a31
üst
dbd0fa72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
29 deletions
+33
-29
generate-snippets.pl
bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl
+18
-18
helper.s
bridges/source/cpp_uno/gcc3_ios_arm/helper.s
+15
-11
No files found.
bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl
Dosyayı görüntüle @
883dfa48
...
@@ -14,19 +14,19 @@ sub gen_arm ($$)
...
@@ -14,19 +14,19 @@ sub gen_arm ($$)
{
{
my
(
$funIndex
,
$vtableOffset
)
=
@_
;
my
(
$funIndex
,
$vtableOffset
)
=
@_
;
printf
(
"codeSnippet_%08x_%d:\n"
,
$funIndex
,
$vtableOffset
);
printf
(
"codeSnippet_%08x_%d:\n"
,
$funIndex
,
$vtableOffset
);
printf
(
"
\t
mov ip, pc\n"
);
printf
(
"
mov ip, pc\n"
);
printf
(
"
\t
b _privateSnippetExecutor\n"
);
printf
(
"
b _privateSnippetExecutor\n"
);
printf
(
"
\t
.long %#08x\n"
,
$funIndex
);
printf
(
"
.long %#08x\n"
,
$funIndex
);
printf
(
"
\t
.long %d\n"
,
$vtableOffset
);
printf
(
"
.long %d\n"
,
$vtableOffset
);
}
}
sub
gen_x86
($$$)
sub
gen_x86
($$$)
{
{
my
(
$funIndex
,
$vtableOffset
,
$executor
)
=
@_
;
my
(
$funIndex
,
$vtableOffset
,
$executor
)
=
@_
;
printf
(
"codeSnippet_%08x_%d_%s:\n"
,
$funIndex
,
$vtableOffset
,
$executor
);
printf
(
"codeSnippet_%08x_%d_%s:\n"
,
$funIndex
,
$vtableOffset
,
$executor
);
printf
(
"
\t
movl \$%#08x, %%eax\n"
,
$funIndex
);
printf
(
"
movl \$%#08x, %%eax\n"
,
$funIndex
);
printf
(
"
\t
movl \$%d, %%edx\n"
,
$vtableOffset
);
printf
(
"
movl \$%d, %%edx\n"
,
$vtableOffset
);
printf
(
"
\t
jmp _privateSnippetExecutor%s\n"
,
$executor
);
printf
(
"
jmp _privateSnippetExecutor%s\n"
,
$executor
);
}
}
printf
(
".text\n"
);
printf
(
".text\n"
);
...
@@ -41,7 +41,7 @@ printf ("// (to indicate a hidden parameter for returning large values)\n");
...
@@ -41,7 +41,7 @@ printf ("// (to indicate a hidden parameter for returning large values)\n");
printf
(
"// - the vtable offset\n"
);
printf
(
"// - the vtable offset\n"
);
printf
(
"\n"
);
printf
(
"\n"
);
printf
(
"
\t
.align 4\n"
);
printf
(
"
.align 4\n"
);
printf
(
"\n"
);
printf
(
"\n"
);
foreach
my
$funIndex
(
0
..
$nFunIndexes
-
1
)
foreach
my
$funIndex
(
0
..
$nFunIndexes
-
1
)
...
@@ -54,7 +54,7 @@ foreach my $funIndex (0 .. $nFunIndexes-1)
...
@@ -54,7 +54,7 @@ foreach my $funIndex (0 .. $nFunIndexes-1)
}
}
printf
(
"#else\n"
);
printf
(
"#else\n"
);
printf
(
"
\t
.align 1, 0x90\n"
);
printf
(
"
.align 1, 0x90\n"
);
foreach
my
$funIndex
(
0
..
$nFunIndexes
-
1
)
foreach
my
$funIndex
(
0
..
$nFunIndexes
-
1
)
{
{
...
@@ -70,15 +70,15 @@ foreach my $funIndex (0 .. $nFunIndexes-1)
...
@@ -70,15 +70,15 @@ foreach my $funIndex (0 .. $nFunIndexes-1)
printf
(
"#endif\n"
);
printf
(
"#endif\n"
);
printf
(
"
\t
.globl _nFunIndexes\n"
);
printf
(
"
.globl _nFunIndexes\n"
);
printf
(
"_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
(
"_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"
);
printf
(
"_codeSnippets:\n"
);
foreach
my
$funIndex
(
0
..
$nFunIndexes
-
1
)
foreach
my
$funIndex
(
0
..
$nFunIndexes
-
1
)
...
@@ -86,13 +86,13 @@ foreach my $funIndex (0 .. $nFunIndexes-1)
...
@@ -86,13 +86,13 @@ foreach my $funIndex (0 .. $nFunIndexes-1)
foreach
my
$vtableOffset
(
0
..
$nVtableOffsets
-
1
)
foreach
my
$vtableOffset
(
0
..
$nVtableOffsets
-
1
)
{
{
printf
(
"#ifdef __arm\n"
);
printf
(
"#ifdef __arm\n"
);
printf
(
"
\t
.long codeSnippet_%08x_%d - _codeSnippets\n"
,
$funIndex
,
$vtableOffset
);
printf
(
"
.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
|
0x80000000
,
$vtableOffset
);
printf
(
"#else\n"
);
printf
(
"#else\n"
);
foreach
my
$executor
(
'General'
,
'Void'
,
'Hyper'
,
'Float'
,
'Double'
,
'Class'
)
foreach
my
$executor
(
'General'
,
'Void'
,
'Hyper'
,
'Float'
,
'Double'
,
'Class'
)
{
{
printf
(
"
\t
.long codeSnippet_%08x_%d_%s - _codeSnippets\n"
,
$funIndex
,
$vtableOffset
,
$executor
);
printf
(
"
.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
|
0x80000000
,
$vtableOffset
,
$executor
);
}
}
printf
(
"#endif\n"
);
printf
(
"#endif\n"
);
}
}
...
...
bridges/source/cpp_uno/gcc3_ios_arm/helper.s
Dosyayı görüntüle @
883dfa48
// -*- 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 file is part of the LibreOffice project.
//
//
// This Source Code Form is subject to the terms of the Mozilla Public
// This Source Code Form is subject to the terms of the Mozilla Public
...
@@ -25,20 +27,20 @@
...
@@ -25,20 +27,20 @@
// Fixed by Michael Casadevall <mcasadevall@kubuntu.org>
// Fixed by Michael Casadevall <mcasadevall@kubuntu.org>
// Modified for iOS by Tor Lillqvist <tml@iki.fi>
// Modified for iOS by Tor Lillqvist <tml@iki.fi>
.text
.text
.align
4
.align
4
_privateSnippetExecutor:
_privateSnippetExecutor:
stmfd
sp!, {r0-r3} // follow other parameters on stack
stmfd
sp!, {r0-r3} // follow other parameters on stack
mov
r0, ip // r0 points to functionoffset/vtable
mov
r0, ip // r0 points to functionoffset/vtable
mov
r1, sp // r1 points to this and params
mov
r1, sp // r1 points to this and params
// (see cpp2uno.cxx:codeSnippet())
// (see cpp2uno.cxx:codeSnippet())
stmfd
sp!, {r4,lr} // save return address
stmfd
sp!, {r4,lr} // save return address
// (r4 pushed to preserve stack alignment)
// (r4 pushed to preserve stack alignment)
bl
_cpp_vtable_call
bl
_cpp_vtable_call
add
sp, sp, #4 // no need to restore r4 (we didn't touch it)
add
sp, sp, #4 // no need to restore r4 (we didn't touch it)
ldr
pc, [sp], #20 // return, discarding function arguments
ldr
pc, [sp], #20 // return, discarding function arguments
#else
#else
.text
.text
...
@@ -330,3 +332,5 @@ L___gxx_personality_v0$non_lazy_ptr:
...
@@ -330,3 +332,5 @@ L___gxx_personality_v0$non_lazy_ptr:
.destructor
.destructor
.align 1
.align 1
#endif
#endif
// vim:set shiftwidth=4 softtabstop=4 expandtab:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment