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
72927f81
Kaydet (Commit)
72927f81
authored
Mar 30, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Turn macros into functions
Change-Id: I390fc815c32fa0eeeabf4d80a17bc4deedad2d2c
üst
be8395d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
31 deletions
+45
-31
uno2cpp.cxx
bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+45
-31
No files found.
bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
Dosyayı görüntüle @
72927f81
...
...
@@ -40,7 +40,9 @@
using
namespace
::
com
::
sun
::
star
::
uno
;
// Macros for easier insertion of values to registers or stack
namespace
{
// Functions for easier insertion of values to registers or stack
// pSV - pointer to the source
// nr - order of the value [will be increased if stored to register]
// pFPR, pGPR - pointer to the registers
...
...
@@ -48,38 +50,50 @@ using namespace ::com::sun::star::uno;
// The value in %xmm register is already prepared to be retrieved as a float,
// thus we treat float and double the same
#define INSERT_FLOAT_DOUBLE( pSV, nr, pFPR, pDS ) \
if ( nr < x86_64::MAX_SSE_REGS ) \
pFPR[nr++] = *reinterpret_cast<double *>( pSV ); \
else \
*pDS++ = *reinterpret_cast<sal_uInt64 *>( pSV ); // verbatim!
#define INSERT_INT64( pSV, nr, pGPR, pDS ) \
if ( nr < x86_64::MAX_GPR_REGS ) \
pGPR[nr++] = *reinterpret_cast<sal_uInt64 *>( pSV ); \
else \
*pDS++ = *reinterpret_cast<sal_uInt64 *>( pSV );
#define INSERT_INT32( pSV, nr, pGPR, pDS ) \
if ( nr < x86_64::MAX_GPR_REGS ) \
pGPR[nr++] = *reinterpret_cast<sal_uInt32 *>( pSV ); \
else \
*pDS++ = *reinterpret_cast<sal_uInt32 *>( pSV );
#define INSERT_INT16( pSV, nr, pGPR, pDS ) \
if ( nr < x86_64::MAX_GPR_REGS ) \
pGPR[nr++] = *reinterpret_cast<sal_uInt16 *>( pSV ); \
else \
*pDS++ = *reinterpret_cast<sal_uInt16 *>( pSV );
#define INSERT_INT8( pSV, nr, pGPR, pDS ) \
if ( nr < x86_64::MAX_GPR_REGS ) \
pGPR[nr++] = *reinterpret_cast<sal_uInt8 *>( pSV ); \
else \
*pDS++ = *reinterpret_cast<sal_uInt8 *>( pSV );
void
INSERT_FLOAT_DOUBLE
(
void
const
*
pSV
,
sal_uInt32
&
nr
,
double
*
pFPR
,
sal_uInt64
*&
pDS
)
{
if
(
nr
<
x86_64
::
MAX_SSE_REGS
)
pFPR
[
nr
++
]
=
*
static_cast
<
double
const
*>
(
pSV
);
else
*
pDS
++
=
*
static_cast
<
sal_uInt64
const
*>
(
pSV
);
// verbatim!
}
void
INSERT_INT64
(
void
const
*
pSV
,
sal_uInt32
&
nr
,
sal_uInt64
*
pGPR
,
sal_uInt64
*&
pDS
)
{
if
(
nr
<
x86_64
::
MAX_GPR_REGS
)
pGPR
[
nr
++
]
=
*
static_cast
<
sal_uInt64
const
*>
(
pSV
);
else
*
pDS
++
=
*
static_cast
<
sal_uInt64
const
*>
(
pSV
);
}
namespace
{
void
INSERT_INT32
(
void
const
*
pSV
,
sal_uInt32
&
nr
,
sal_uInt64
*
pGPR
,
sal_uInt64
*&
pDS
)
{
if
(
nr
<
x86_64
::
MAX_GPR_REGS
)
pGPR
[
nr
++
]
=
*
static_cast
<
sal_uInt32
const
*>
(
pSV
);
else
*
pDS
++
=
*
static_cast
<
sal_uInt32
const
*>
(
pSV
);
}
void
INSERT_INT16
(
void
const
*
pSV
,
sal_uInt32
&
nr
,
sal_uInt64
*
pGPR
,
sal_uInt64
*&
pDS
)
{
if
(
nr
<
x86_64
::
MAX_GPR_REGS
)
pGPR
[
nr
++
]
=
*
static_cast
<
sal_uInt16
const
*>
(
pSV
);
else
*
pDS
++
=
*
static_cast
<
sal_uInt16
const
*>
(
pSV
);
}
void
INSERT_INT8
(
void
const
*
pSV
,
sal_uInt32
&
nr
,
sal_uInt64
*
pGPR
,
sal_uInt64
*&
pDS
)
{
if
(
nr
<
x86_64
::
MAX_GPR_REGS
)
pGPR
[
nr
++
]
=
*
static_cast
<
sal_uInt8
const
*>
(
pSV
);
else
*
pDS
++
=
*
static_cast
<
sal_uInt8
const
*>
(
pSV
);
}
void
appendCString
(
OUStringBuffer
&
buffer
,
char
const
*
text
)
{
if
(
text
!=
0
)
{
...
...
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