зеркало из https://github.com/mozilla/gecko-dev.git
Bug 361470 Fix Solairs build after refactoring xptcall
r=benjamin moa=timeless
This commit is contained in:
Родитель
6bbecb89fb
Коммит
9cf63e0320
|
@ -1,71 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
/* Platform specific code to invoke XPCOM methods on native objects */
|
||||
.global XPTC_InvokeByIndex
|
||||
/*
|
||||
XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
|
||||
*/
|
||||
XPTC_InvokeByIndex:
|
||||
save %sp,-(64 + 16),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 16
|
||||
mov %i2,%o0 ! paramCount
|
||||
call invoke_count_words ! returns the required stack size in %o0
|
||||
mov %i3,%o1 ! params
|
||||
|
||||
sll %o0,2,%l0 ! number of bytes
|
||||
sub %sp,%l0,%sp ! create the additional stack space
|
||||
|
||||
mov %sp,%o0 ! pointer for copied args
|
||||
add %o0,72,%o0 ! step past the register window, the
|
||||
! struct result pointer and the 'this' slot
|
||||
mov %i2,%o1 ! paramCount
|
||||
call invoke_copy_to_stack
|
||||
mov %i3,%o2 ! params
|
||||
!
|
||||
! calculate the target address from the vtable
|
||||
!
|
||||
add %i1,1,%i1 ! vTable is zero-based, index is 1 based (?)
|
||||
ld [%i0],%l1 ! *that --> vTable
|
||||
sll %i1,3,%i1
|
||||
add %i1,%l1,%l1 ! vTable[index * 8], l1 now points to vTable entry
|
||||
lduh [%l1],%l0 ! this adjustor
|
||||
sll %l0,16,%l0 ! sign extend to 32 bits
|
||||
sra %l0,16,%l0
|
||||
add %l0,%i0,%i0 ! adjust this
|
||||
ld [%l1 + 4],%l0 ! target address
|
||||
|
||||
.L5: ld [%sp + 88],%o5
|
||||
.L4: ld [%sp + 84],%o4
|
||||
.L3: ld [%sp + 80],%o3
|
||||
.L2: ld [%sp + 76],%o2
|
||||
.L1: ld [%sp + 72],%o1
|
||||
.L0:
|
||||
jmpl %l0,%o7 ! call the routine
|
||||
! always have a 'this', from the incoming 'that'
|
||||
mov %i0,%o0
|
||||
|
||||
mov %o0,%i0 ! propagate return value
|
||||
ret
|
||||
restore
|
|
@ -21,13 +21,13 @@
|
|||
*/
|
||||
|
||||
/* Platform specific code to invoke XPCOM methods on native objects */
|
||||
.global XPTC_InvokeByIndex
|
||||
.global NS_InvokeByIndex
|
||||
/*
|
||||
XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
|
||||
*/
|
||||
XPTC_InvokeByIndex:
|
||||
NS_InvokeByIndex:
|
||||
save %sp,-(64 + 32),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 32
|
||||
mov %i2,%o0 ! paramCount
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
* Platform specific code to invoke XPCOM methods on native objects for
|
||||
* solaris/sparc with gcc 3 ABI.
|
||||
*/
|
||||
.global XPTC_InvokeByIndex
|
||||
.global NS_InvokeByIndex
|
||||
/*
|
||||
* XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
* PRUint32 paramCount, nsXPTCVariant* params);
|
||||
* NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
* PRUint32 paramCount, nsXPTCVariant* params);
|
||||
*/
|
||||
XPTC_InvokeByIndex:
|
||||
NS_InvokeByIndex:
|
||||
save %sp,-(64 + 32),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 32
|
||||
mov %i2,%o0 ! paramCount
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
|
||||
/* Platform specific code to invoke XPCOM methods on native objects */
|
||||
|
||||
.global XPTC_InvokeByIndex
|
||||
.type XPTC_InvokeByIndex, #function
|
||||
.global NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex, #function
|
||||
/*
|
||||
XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
|
||||
*/
|
||||
XPTC_InvokeByIndex:
|
||||
NS_InvokeByIndex:
|
||||
save %sp,-(64 + 32),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 32
|
||||
sll %i2,3,%l0 ! assume the worst case
|
||||
|
@ -69,4 +69,4 @@ XPTC_InvokeByIndex:
|
|||
ret
|
||||
restore
|
||||
|
||||
.size XPTC_InvokeByIndex, .-XPTC_InvokeByIndex
|
||||
.size NS_InvokeByIndex, .-NS_InvokeByIndex
|
||||
|
|
|
@ -32,15 +32,15 @@
|
|||
The SCD is available from http://www.sparc.com/.
|
||||
*/
|
||||
|
||||
.global XPTC_InvokeByIndex
|
||||
.type XPTC_InvokeByIndex, #function
|
||||
.global NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex, #function
|
||||
|
||||
/*
|
||||
XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
|
||||
*/
|
||||
XPTC_InvokeByIndex:
|
||||
NS_InvokeByIndex:
|
||||
save %sp,-(128 + 64),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 64
|
||||
sll %i2,4,%l0 ! assume the worst case
|
||||
|
@ -100,4 +100,4 @@ XPTC_InvokeByIndex:
|
|||
ret
|
||||
restore
|
||||
|
||||
.size XPTC_InvokeByIndex, .-XPTC_InvokeByIndex
|
||||
.size NS_InvokeByIndex, .-NS_InvokeByIndex
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.globl XPTC_InvokeByIndex
|
||||
.type XPTC_InvokeByIndex, @function
|
||||
XPTC_InvokeByIndex:
|
||||
.globl NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex, @function
|
||||
NS_InvokeByIndex:
|
||||
push %ebp
|
||||
movl %esp,%ebp
|
||||
push %ebx
|
||||
|
@ -51,5 +51,5 @@ XPTC_InvokeByIndex:
|
|||
movl %ebp,%esp
|
||||
pop %ebp
|
||||
ret
|
||||
.size XPTC_InvokeByIndex, . - XPTC_InvokeByIndex
|
||||
.size NS_InvokeByIndex, . - NS_InvokeByIndex
|
||||
|
||||
|
|
|
@ -106,9 +106,9 @@ invoke_copy_to_stack(PRUint32 paramCount, nsXPTCVariant* s, PRUint32* d)
|
|||
}
|
||||
|
||||
#if !defined(__SUNPRO_CC) /* Sun Workshop Compiler. */
|
||||
XPTC_PUBLIC_API(nsresult)
|
||||
XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params)
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params)
|
||||
{
|
||||
#ifdef __GNUC__ /* Gnu compiler. */
|
||||
PRUint32 result;
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
/* Implement shared vtbl methods. */
|
||||
|
||||
#include "xptcprivate.h"
|
||||
#include "xptiprivate.h"
|
||||
|
||||
#if defined(sparc) || defined(__sparc__)
|
||||
|
||||
|
@ -55,7 +56,6 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args)
|
|||
|
||||
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
|
||||
nsXPTCMiniVariant* dispatchParams = NULL;
|
||||
nsIInterfaceInfo* iface_info = NULL;
|
||||
const nsXPTMethodInfo* info;
|
||||
PRUint8 paramCount;
|
||||
PRUint8 i;
|
||||
|
@ -63,10 +63,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args)
|
|||
|
||||
NS_ASSERTION(self,"no self");
|
||||
|
||||
self->GetInterfaceInfo(&iface_info);
|
||||
NS_ASSERTION(iface_info,"no interface info");
|
||||
|
||||
iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
|
||||
self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
|
||||
NS_ASSERTION(info,"no interface info");
|
||||
|
||||
paramCount = info->GetParamCount();
|
||||
|
@ -115,9 +112,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args)
|
|||
}
|
||||
}
|
||||
|
||||
result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
|
||||
|
||||
NS_RELEASE(iface_info);
|
||||
result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams);
|
||||
|
||||
if(dispatchParams != paramBuffer)
|
||||
delete [] dispatchParams;
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
/* Implement shared vtbl methods. */
|
||||
|
||||
#include "xptcprivate.h"
|
||||
#include "xptiprivate.h"
|
||||
|
||||
#if defined(sparc) || defined(__sparc__)
|
||||
|
||||
|
@ -59,10 +60,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args)
|
|||
|
||||
NS_ASSERTION(self,"no self");
|
||||
|
||||
self->GetInterfaceInfo(&iface_info);
|
||||
NS_ASSERTION(iface_info,"no interface info");
|
||||
|
||||
iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
|
||||
self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
|
||||
NS_ASSERTION(info,"no interface info");
|
||||
|
||||
paramCount = info->GetParamCount();
|
||||
|
@ -108,9 +106,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args)
|
|||
}
|
||||
}
|
||||
|
||||
result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
|
||||
|
||||
NS_RELEASE(iface_info);
|
||||
result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams);
|
||||
|
||||
if(dispatchParams != paramBuffer)
|
||||
delete [] dispatchParams;
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
/* Implement shared vtbl methods. */
|
||||
|
||||
#include "xptcprivate.h"
|
||||
#include "xptiprivate.h"
|
||||
#include "xptc_platforms_unixish_x86.h"
|
||||
|
||||
#if !defined(__SUNPRO_CC) /* Sun Workshop Compiler. */
|
||||
|
@ -51,7 +52,6 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
|
|||
|
||||
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
|
||||
nsXPTCMiniVariant* dispatchParams = NULL;
|
||||
nsIInterfaceInfo* iface_info = NULL;
|
||||
const nsXPTMethodInfo* info;
|
||||
PRUint8 paramCount;
|
||||
PRUint8 i;
|
||||
|
@ -59,10 +59,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
|
|||
|
||||
NS_ASSERTION(self,"no self");
|
||||
|
||||
self->GetInterfaceInfo(&iface_info);
|
||||
NS_ASSERTION(iface_info,"no interface info");
|
||||
|
||||
iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
|
||||
self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
|
||||
NS_ASSERTION(info,"no interface info");
|
||||
|
||||
paramCount = info->GetParamCount();
|
||||
|
|
Загрузка…
Ссылка в новой задаче