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
77f1f220
Kaydet (Commit)
77f1f220
authored
Ara 22, 2013
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
iOS arm64 C++/UNO bridge WIP
Change-Id: I786cc64fc814c755ba215898026365af26b56205
üst
836abd39
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
4 deletions
+26
-4
cpp2uno-arm64.cxx
bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
+0
-0
generate-snippets.pl
bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl
+10
-2
helper.s
bridges/source/cpp_uno/gcc3_ios_arm/helper.s
+15
-1
uno2cpp-arm64.cxx
bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
+1
-1
No files found.
bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
Dosyayı görüntüle @
77f1f220
This diff is collapsed.
Click to expand it.
bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl
Dosyayı görüntüle @
77f1f220
...
...
@@ -13,6 +13,9 @@ my $nVtableOffsets = 4;
sub
gen_arm
($$)
{
my
(
$funIndex
,
$vtableOffset
)
=
@_
;
if
(
$funIndex
&
0x80000000
)
{
printf
(
"#ifndef __arm64\n"
);
}
printf
(
"codeSnippet_%08x_%d:\n"
,
$funIndex
,
$vtableOffset
);
printf
(
"#ifdef __arm\n"
);
# Note: pc is the address of instruction being executed plus 8
...
...
@@ -23,6 +26,9 @@ sub gen_arm ($$)
printf
(
" b _privateSnippetExecutor\n"
);
printf
(
" .long %#08x\n"
,
$funIndex
);
printf
(
" .long %d\n"
,
$vtableOffset
);
if
(
$funIndex
&
0x80000000
)
{
printf
(
"#endif\n"
);
}
}
sub
gen_x86
($$$)
...
...
@@ -41,8 +47,8 @@ printf ("#if defined(__arm) || defined(__arm64)\n");
printf
(
"\n"
);
printf
(
"// Each codeSnippetX function stores into ip (arm64: x15) an address and branches to _privateSnippetExecutor\n"
);
printf
(
"// The address is that following the branch instruction, containing two 32-bit ints:\n"
);
printf
(
"// - the function index
, as such or with
the 0x80000000 bit set\n"
);
printf
(
"//
(to indicate that a hidden parameter (arm64: x8)
is used for returning large values)\n"
);
printf
(
"// - the function index
(for 32-bit can have
the 0x80000000 bit set\n"
);
printf
(
"//
to indicate that a hidden parameter
is used for returning large values)\n"
);
printf
(
"// - the vtable offset\n"
);
printf
(
"\n"
);
...
...
@@ -92,7 +98,9 @@ foreach my $funIndex (0 .. $nFunIndexes-1)
{
printf
(
"#if defined(__arm) || defined(__arm64)\n"
);
printf
(
" .long codeSnippet_%08x_%d - _codeSnippets\n"
,
$funIndex
,
$vtableOffset
);
printf
(
"#ifndef __arm64\n"
);
printf
(
" .long codeSnippet_%08x_%d - _codeSnippets\n"
,
$funIndex
|
0x80000000
,
$vtableOffset
);
printf
(
"#endif\n"
);
printf
(
"#else\n"
);
foreach
my
$executor
(
'General'
,
'Void'
,
'Hyper'
,
'Float'
,
'Double'
,
'Class'
)
{
...
...
bridges/source/cpp_uno/gcc3_ios_arm/helper.s
Dosyayı görüntüle @
77f1f220
...
...
@@ -49,22 +49,36 @@ _privateSnippetExecutor:
_privateSnippetExecutor:
// _privateSnippetExecutor is jumped to from each of the
// codeSnippet_* generated by generate-snippets.pl
// Store potential args in general purpose registers
stp x6, x7, [sp, #-16]!
stp x4, x5, [sp, #-16]!
stp x2, x3, [sp, #-16]!
stp x0, x1, [sp, #-16]!
// Store potential args in floating point/SIMD registers
stp d6, d7, [sp, #-16]!
stp d4, d5, [sp, #-16]!
stp d2, d3, [sp, #-16]!
stp d0, d1, [sp, #-16]!
// First argument to cpp_vtable_call: The x15 set up in the codeSnippet instance
mov x0, x15
// Store x8 (potential pointer to return value storage) and lr
stp x8, lr, [sp, #-16]!
// Second argument: The pointer to all the above
mov x1, sp
bl _cpp_vtable_call
ldp x8, lr, [sp, #0]
add sp, sp, #
80
add sp, sp, #
144
ret lr
#else
// i386 code, for the simulator
.text
.align 1, 0x90
...
...
bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
Dosyayı görüntüle @
77f1f220
...
...
@@ -152,7 +152,7 @@ void callVirtualMethod(
sal_uInt64
x0
;
sal_uInt64
x1
;
__asm__
__volatile__
__asm__
__volatile__
(
" ldp x0, x1, %[pgpr_0]
\n
"
" ldp x2, x3, %[pgpr_2]
\n
"
...
...
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