head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.10 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.8 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.6 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.4 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.3.0.2 pkgsrc-2009Q4-base:1.3 pkgsrc-2009Q2:1.2.0.2 pkgsrc-2009Q2-base:1.2 pkgsrc-2009Q1:1.1.1.1.0.12 pkgsrc-2009Q1-base:1.1.1.1 pkgsrc-2008Q4:1.1.1.1.0.10 pkgsrc-2008Q4-base:1.1.1.1 pkgsrc-2008Q3:1.1.1.1.0.8 pkgsrc-2008Q3-base:1.1.1.1 cube-native-xorg:1.1.1.1.0.6 cube-native-xorg-base:1.1.1.1 pkgsrc-2008Q2:1.1.1.1.0.4 pkgsrc-2008Q2-base:1.1.1.1 cwrapper:1.1.1.1.0.2 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.3 date 2009.09.22.13.17.29; author tnn; state dead; branches; next 1.2; 1.2 date 2009.04.21.12.58.22; author tnn; state Exp; branches; next 1.1; 1.1 date 2008.06.28.10.01.07; author tnn; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.06.28.10.01.07; author tnn; state Exp; branches; next ; desc @@ 1.3 log @Send firefox3 on it's way to the happy hunting ground. @ text @$NetBSD: patch-bx,v 1.2 2009/04/21 12:58:22 tnn Exp $ --- xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp.orig 2004-04-18 16:18:18.000000000 +0200 +++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp @@@@ -41,6 +41,7 @@@@ // Implement shared vtbl methods. #include "xptcprivate.h" +#include "xptiprivate.h" // The Linux/PPC ABI (aka PPC/SYSV ABI) passes the first 8 integral // parameters and the first 8 floating point parameters in registers @@@@ -71,7 +72,6 @@@@ PrepareAndDispatch(nsXPTCStubBase* self, { nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; nsXPTCMiniVariant* dispatchParams = NULL; - nsIInterfaceInfo* iface_info = NULL; const nsXPTMethodInfo* info; PRUint32 paramCount; PRUint32 i; @@@@ -79,12 +79,7 @@@@ PrepareAndDispatch(nsXPTCStubBase* self, NS_ASSERTION(self,"no self"); - self->GetInterfaceInfo(&iface_info); - NS_ASSERTION(iface_info,"no interface info"); - if (! iface_info) - return NS_ERROR_UNEXPECTED; - - iface_info->GetMethodInfo(PRUint16(methodIndex), &info); + self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info); NS_ASSERTION(info,"no method info"); if (! info) return NS_ERROR_UNEXPECTED; @@@@ -119,8 +114,10 @@@@ PrepareAndDispatch(nsXPTCStubBase* self, if ((PRUint32) ap & 4) ap++; // doubles are 8-byte aligned on stack dp->val.d = *(double*) ap; ap += 2; +#if __GXX_ABI_VERSION < 100 if (gpr < GPR_COUNT) gpr += 2; +#endif } continue; } @@@@ -130,8 +127,10 @@@@ PrepareAndDispatch(nsXPTCStubBase* self, else { dp->val.f = *(float*) ap; ap += 1; +#if __GXX_ABI_VERSION < 100 if (gpr < GPR_COUNT) gpr += 1; +#endif } continue; } @@@@ -179,9 +178,9 @@@@ PrepareAndDispatch(nsXPTCStubBase* self, } } - result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams); - - NS_RELEASE(iface_info); + result = self->mOuter->CallMethod((PRUint16) methodIndex, + info, + dispatchParams); if (dispatchParams != paramBuffer) delete [] dispatchParams; @@@@ -195,7 +194,9 @@@@ PrepareAndDispatch(nsXPTCStubBase* self, // however, it's quick, dirty, and'll break when the ABI changes on // us, which is what we want ;-). -#define STUB_ENTRY(n) \ +#if __GXX_ABI_VERSION < 100 +// gcc-2 version +# define STUB_ENTRY(n) \ __asm__ ( \ ".section \".text\" \n\t" \ ".align 2 \n\t" \ @@@@ -206,6 +207,46 @@@@ __asm__ ( "li 11,"#n" \n\t" \ "b SharedStub@@local \n" \ ); +#else +// gcc-3 version +// +// As G++3 ABI contains the length of the functionname in the mangled +// name, it is difficult to get a generic assembler mechanism like +// in the G++ 2.95 case. +// Create names would be like: +// _ZN14nsXPTCStubBase5Stub1Ev +// _ZN14nsXPTCStubBase6Stub12Ev +// _ZN14nsXPTCStubBase7Stub123Ev +// _ZN14nsXPTCStubBase8Stub1234Ev +// etc. +// Use assembler directives to get the names right... + +# define STUB_ENTRY(n) \ +__asm__ ( \ + ".align 2 \n\t" \ + ".if "#n" < 10 \n\t" \ + ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ + ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@@function \n\n" \ +"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \ + \ + ".elseif "#n" < 100 \n\t" \ + ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ + ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@@function \n\n" \ +"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \ + \ + ".elseif "#n" < 1000 \n\t" \ + ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ + ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@@function \n\n" \ +"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \ + \ + ".else \n\t" \ + ".err \"stub number "#n" >= 1000 not yet supported\"\n" \ + ".endif \n\t" \ + \ + "li 11,"#n" \n\t" \ + "b SharedStub@@local \n" \ +); +#endif #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ @ 1.2 log @Add and update patches to enable building on NetBSD/*ppc. Most of this work was done by "Kernigh" in PR pkg/39358. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD: patch-bx,v 1.5 2007/05/12 13:53:09 ghen Exp $ d3 33 a35 4 diff -ruN ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp --- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp 2004-04-18 23:18:18.000000000 +0900 +++ ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp 2005-12-04 19:34:41.000000000 +0900 @@@@ -119,8 +119,10 @@@@ d46 1 a46 1 @@@@ -130,8 +132,10 @@@@ d57 14 a70 1 @@@@ -195,7 +199,9 @@@@ d81 1 a81 1 @@@@ -206,6 +212,46 @@@@ @ 1.1.1.1 log @Import firefox3-3.0 as www/firefox3. This is a new major release of the popular Firefox browser from Mozilla. Based on Gecko 1.9, it brings improvements in the areas of performance, stability, rendering correctness, security, usability and more. Release notes: http://www.mozilla.com/en-US/firefox/3.0/releasenotes/ @ text @@