Kaydet (Commit) c01e0242 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Drop unnecessary nFPR parameter

same as 8a85f9f2 for gcc_linux_x86-64 (see there
for a more detailed commit message)

Change-Id: Ic2765c21834aabf8f7690c0bdab4d6efe6d34585
üst 6daac9ad
...@@ -48,20 +48,14 @@ ...@@ -48,20 +48,14 @@
void CPPU_CURRENT_NAMESPACE::callVirtualMethod( void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
void * pThis, sal_uInt32 nVtableIndex, void * pRegisterReturn, void * pThis, sal_uInt32 nVtableIndex, void * pRegisterReturn,
typelib_TypeDescriptionReference * pReturnTypeRef, bool bSimpleReturn, typelib_TypeDescriptionReference * pReturnTypeRef, bool bSimpleReturn,
sal_uInt64 *pStack, sal_uInt32 nStack, sal_uInt64 *pGPR, double * pFPR, sal_uInt64 *pStack, sal_uInt32 nStack, sal_uInt64 *pGPR, double * pFPR)
sal_uInt32 nFPR)
{ {
// Should not happen, but...
if ( nFPR > x86_64::MAX_SSE_REGS )
nFPR = x86_64::MAX_SSE_REGS;
// Work around -fsanitize=address "inline assembly requires more registers // Work around -fsanitize=address "inline assembly requires more registers
// than available" error: // than available" error:
struct Data { struct Data {
sal_uInt64 pMethod; sal_uInt64 pMethod;
sal_uInt64 * pGPR; sal_uInt64 * pGPR;
double * pFPR; double * pFPR;
sal_uInt64 nFPR;
// Return values: // Return values:
sal_uInt64 rax; sal_uInt64 rax;
sal_uInt64 rdx; sal_uInt64 rdx;
...@@ -70,7 +64,6 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod( ...@@ -70,7 +64,6 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
} data; } data;
data.pGPR = pGPR; data.pGPR = pGPR;
data.pFPR = pFPR; data.pFPR = pFPR;
data.nFPR = nFPR;
// Get pointer to method // Get pointer to method
sal_uInt64 pMethod = *static_cast<sal_uInt64 *>(pThis); sal_uInt64 pMethod = *static_cast<sal_uInt64 *>(pThis);
...@@ -112,14 +105,13 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod( ...@@ -112,14 +105,13 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
// Perform the call // Perform the call
"movq 0%0, %%r11\n\t" "movq 0%0, %%r11\n\t"
"movq 24%0, %%rax\n\t"
"call *%%r11\n\t" "call *%%r11\n\t"
// Fill the return values // Fill the return values
"movq %%rax, 32%0\n\t" "movq %%rax, 24%0\n\t"
"movq %%rdx, 40%0\n\t" "movq %%rdx, 32%0\n\t"
"movsd %%xmm0, 48%0\n\t" "movsd %%xmm0, 40%0\n\t"
"movsd %%xmm1, 56%0\n\t" "movsd %%xmm1, 48%0\n\t"
:: "o" (data) :: "o" (data)
: "rax", "rdi", "rsi", "rdx", "rcx", "r8", "r9", "r10", "r11", : "rax", "rdi", "rsi", "rdx", "rcx", "r8", "r9", "r10", "r11",
"xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7",
......
...@@ -31,8 +31,7 @@ namespace CPPU_CURRENT_NAMESPACE { ...@@ -31,8 +31,7 @@ namespace CPPU_CURRENT_NAMESPACE {
void callVirtualMethod( void callVirtualMethod(
void * pThis, sal_uInt32 nVtableIndex, void * pRegisterReturn, void * pThis, sal_uInt32 nVtableIndex, void * pRegisterReturn,
typelib_TypeDescriptionReference * pReturnTypeRef, bool bSimpleReturn, typelib_TypeDescriptionReference * pReturnTypeRef, bool bSimpleReturn,
sal_uInt64 *pStack, sal_uInt32 nStack, sal_uInt64 *pGPR, double * pFPR, sal_uInt64 *pStack, sal_uInt32 nStack, sal_uInt64 *pGPR, double * pFPR);
sal_uInt32 nFPR);
} }
......
...@@ -242,8 +242,7 @@ static void cpp_call( ...@@ -242,8 +242,7 @@ static void cpp_call(
pAdjustedThisPtr, aVtableSlot.index, pAdjustedThisPtr, aVtableSlot.index,
pCppReturn, pReturnTypeRef, bSimpleReturn, pCppReturn, pReturnTypeRef, bSimpleReturn,
pStackStart, ( pStack - pStackStart ), pStackStart, ( pStack - pStackStart ),
pGPR, pGPR, pFPR );
pFPR, nFPR );
} catch (const Exception &) { } catch (const Exception &) {
throw; throw;
} catch (const std::exception & e) { } catch (const std::exception & e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment