rpms/xulrunner/devel xulrunner-path.patch, NONE, 1.1 xulrunner-version.patch, NONE, 1.1 .cvsignore, 1.5, 1.6 mozilla-firefox-head.ppc64.patch, 1.2, 1.3 mozilla-sqlite-build.patch, 1.1, 1.2 sources, 1.5, 1.6 xulrunner.spec, 1.32, 1.33
Martin Stransky (stransky)
fedora-extras-commits at redhat.com
Fri Dec 14 10:24:40 UTC 2007
Author: stransky
Update of /cvs/pkgs/rpms/xulrunner/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2929
Modified Files:
.cvsignore mozilla-firefox-head.ppc64.patch
mozilla-sqlite-build.patch sources xulrunner.spec
Added Files:
xulrunner-path.patch xulrunner-version.patch
Log Message:
* Wed Dec 12 2007 Martin Stransky <stransky at redhat.com> 1.9-0.beta2.1
- updated to Beta 2.
xulrunner-path.patch:
--- NEW FILE xulrunner-path.patch ---
--- mozilla/toolkit/xre/nsAppRunner.h.old 2007-09-25 18:01:56.000000000 +0200
+++ mozilla/toolkit/xre/nsAppRunner.h 2007-09-25 18:02:23.000000000 +0200
@@ -48,7 +48,8 @@
#elif defined(CCHMAXPATH)
#define MAXPATHLEN CCHMAXPATH
#else
-#define MAXPATHLEN 1024
+#include <limits.h>
+#define MAXPATHLEN PATH_MAX
#endif
#endif
diff -up mozilla/toolkit/mozapps/update/src/updater/updater.cpp.old mozilla/toolkit/mozapps/update/src/updater/updater.cpp
--- mozilla/toolkit/mozapps/update/src/updater/updater.cpp.old 2007-09-25 18:00:26.000000000 +0200
+++ mozilla/toolkit/mozapps/update/src/updater/updater.cpp 2007-09-25 18:00:53.000000000 +0200
@@ -107,7 +107,8 @@ void LaunchChild(int argc, char **argv);
# elif defined(CCHMAXPATH)
# define MAXPATHLEN CCHMAXPATH
# else
-# define MAXPATHLEN 1024
+# include <limits.h>
+# define MAXPATHLEN PATH_MAX
# endif
#endif
diff -up mozilla/xpcom/io/SpecialSystemDirectory.cpp.old mozilla/xpcom/io/SpecialSystemDirectory.cpp
--- mozilla/xpcom/io/SpecialSystemDirectory.cpp.old 2007-09-25 18:04:25.000000000 +0200
+++ mozilla/xpcom/io/SpecialSystemDirectory.cpp 2007-09-25 18:04:48.000000000 +0200
@@ -109,7 +109,8 @@
#elif defined(CCHMAXPATH)
#define MAXPATHLEN CCHMAXPATH
#else
-#define MAXPATHLEN 1024
+#include <limits.h>
+#define MAXPATHLEN PATH_MAX
#endif
#endif
diff -up mozilla/xpcom/obsolete/nsFileSpecUnix.cpp.old mozilla/xpcom/obsolete/nsFileSpecUnix.cpp
--- mozilla/xpcom/obsolete/nsFileSpecUnix.cpp.old 2006-11-28 01:18:37.000000000 +0100
+++ mozilla/xpcom/obsolete/nsFileSpecUnix.cpp 2007-09-25 18:05:49.000000000 +0200
@@ -79,7 +79,8 @@
#endif
#ifndef MAXPATHLEN
-#define MAXPATHLEN 1024 /* Guessing this is okay. Works for SCO. */
+#include <limits.h>
+#define MAXPATHLEN PATH_MAX /* Guessing this is okay. Works for SCO. */
#endif
#if defined(__QNX__)
diff -up mozilla/xpcom/build/nsXPCOMPrivate.h.old mozilla/xpcom/build/nsXPCOMPrivate.h
--- mozilla/xpcom/build/nsXPCOMPrivate.h.old 2007-09-25 18:02:58.000000000 +0200
+++ mozilla/xpcom/build/nsXPCOMPrivate.h 2007-09-25 18:03:15.000000000 +0200
@@ -252,7 +252,8 @@ NS_GetFrozenFunctions(XPCOMFunctions *en
#elif defined(CCHMAXPATH)
#define MAXPATHLEN CCHMAXPATH
#else
-#define MAXPATHLEN 1024
+#include <limits.h>
+#define MAXPATHLEN PATH_MAX
#endif
#endif
diff -up mozilla/dbm/include/mcom_db.h.old mozilla/dbm/include/mcom_db.h
--- mozilla/dbm/include/mcom_db.h.old 2007-09-25 17:57:09.000000000 +0200
+++ mozilla/dbm/include/mcom_db.h 2007-09-25 17:57:49.000000000 +0200
@@ -214,7 +214,8 @@
#endif /* __DBINTERFACE_PRIVATE */
#ifdef SCO
-#define MAXPATHLEN 1024
+#include <limits.h>
+#define MAXPATHLEN PATH_MAX
#endif
#include <fcntl.h>
diff -up mozilla/js/src/jsfile.c.old mozilla/js/src/jsfile.c
--- mozilla/js/src/jsfile.c.old 2006-07-26 20:55:08.000000000 +0200
+++ mozilla/js/src/jsfile.c 2007-09-25 18:22:52.000000000 +0200
@@ -105,7 +105,8 @@
#define utfstring "binary"
#define unicodestring "unicode"
-#define MAX_PATH_LENGTH 1024
+#include <limits.h>
+#define MAX_PATH_LENGTH PATH_MAX
#define MODE_SIZE 256
#define NUMBER_SIZE 32
#define MAX_LINE_LENGTH 256
diff -up mozilla/xpcom/typelib/xpidl/xpidl_java.c.old mozilla/xpcom/typelib/xpidl/xpidl_java.c
--- mozilla/xpcom/typelib/xpidl/xpidl_java.c.old 2007-09-25 18:38:52.000000000 +0200
+++ mozilla/xpcom/typelib/xpidl/xpidl_java.c 2007-09-25 18:39:17.000000000 +0200
@@ -44,6 +44,7 @@
#include "xpidl.h"
#include <ctype.h>
#include <glib.h>
+#include <limits.h>
#ifdef XP_WIN
#include <windef.h>
diff -up mozilla/widget/src/xremoteclient/XRemoteClient.cpp.old mozilla/widget/src/xremoteclient/XRemoteClient.cpp
--- mozilla/widget/src/xremoteclient/XRemoteClient.cpp.old 2007-09-25 18:14:08.000000000 +0200
+++ mozilla/widget/src/xremoteclient/XRemoteClient.cpp 2007-09-25 18:36:55.000000000 +0200
@@ -76,7 +76,8 @@
#endif
#ifndef MAX_PATH
-#define MAX_PATH 1024
+#include <limits.h>
+#define MAX_PATH PATH_MAX
#endif
#define ARRAY_LENGTH(array_) (sizeof(array_)/sizeof(array_[0]))
diff -up mozilla/modules/libreg/src/reg.c.old mozilla/modules/libreg/src/reg.c
--- mozilla/modules/libreg/src/reg.c.old 2007-09-25 18:25:02.000000000 +0200
+++ mozilla/modules/libreg/src/reg.c 2007-09-25 18:27:46.000000000 +0200
@@ -96,7 +96,8 @@
#define MAX_PATH PATH_MAX
#elif defined(XP_UNIX)
#ifndef MAX_PATH
-#define MAX_PATH 1024
+#include <limits.h>
+#define MAX_PATH PATH_MAX
#endif
#elif defined(XP_OS2)
#ifndef MAX_PATH
diff -up mozilla/config/pathsub.h.old mozilla/config/pathsub.h
--- mozilla/config/pathsub.h.old 2004-04-18 16:17:25.000000000 +0200
+++ mozilla/config/pathsub.h 2007-09-25 18:48:13.000000000 +0200
@@ -46,7 +46,7 @@
#include <sys/types.h>
#ifndef PATH_MAX
-#define PATH_MAX 1024
+#error "PATH_MAX is not defined!"
#endif
/*
diff -up mozilla/modules/libjar/nsZipArchive.cpp.old mozilla/modules/libjar/nsZipArchive.cpp
--- mozilla/modules/libjar/nsZipArchive.cpp.old 2006-09-13 20:32:37.000000000 +0200
+++ mozilla/modules/libjar/nsZipArchive.cpp 2007-09-25 18:51:00.000000000 +0200
@@ -121,7 +121,7 @@ char * strdup(const char *src)
# define S_IFLNK 0120000
# endif
# ifndef PATH_MAX
-# define PATH_MAX 1024
+# include <limits.h>
# endif
#endif /* XP_UNIX */
diff -up mozilla/nsprpub/config/pathsub.h.old mozilla/nsprpub/config/pathsub.h
--- mozilla/nsprpub/config/pathsub.h.old 2004-04-25 17:00:34.000000000 +0200
+++ mozilla/nsprpub/config/pathsub.h 2007-09-25 18:57:51.000000000 +0200
@@ -50,7 +50,7 @@
#endif
#ifndef PATH_MAX
-#define PATH_MAX 1024
+#error "PATH_MAX is not defined!"
#endif
/*
diff -up mozilla/security/coreconf/nsinstall/pathsub.h.old mozilla/security/coreconf/nsinstall/pathsub.h
--- mozilla/security/coreconf/nsinstall/pathsub.h.old 2004-04-25 17:02:18.000000000 +0200
+++ mozilla/security/coreconf/nsinstall/pathsub.h 2007-09-25 19:00:35.000000000 +0200
@@ -49,7 +49,7 @@
#endif
#ifndef PATH_MAX
-#define PATH_MAX 1024
+#error "PATH_MAX is not defined!"
#endif
/*
xulrunner-version.patch:
--- NEW FILE xulrunner-version.patch ---
diff -up mozilla/toolkit/mozapps/update/src/updater/module.ver mozilla/toolkit/mozapps/update/src/updater/module
diff -up mozilla/xulrunner/installer/Makefile.in.ver mozilla/xulrunner/installer/Makefile.in
--- mozilla/xulrunner/installer/Makefile.in.ver 2007-12-14 09:51:34.000000000 +0100
+++ mozilla/xulrunner/installer/Makefile.in 2007-12-14 09:52:03.000000000 +0100
@@ -44,6 +44,8 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
+MOZ_APP_VERSION="1.9pre"
+
NO_PKG_FILES = \
xulrunner-config \
regchrome* \
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/xulrunner/devel/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- .cvsignore 20 Nov 2007 11:59:13 -0000 1.5
+++ .cvsignore 14 Dec 2007 10:24:02 -0000 1.6
@@ -1,2 +1,3 @@
xulrunner-20071029.tar.bz2
xulrunner-20071120.tar.bz2
+xulrunner-20071212.tar.bz2
mozilla-firefox-head.ppc64.patch:
Index: mozilla-firefox-head.ppc64.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xulrunner/devel/mozilla-firefox-head.ppc64.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mozilla-firefox-head.ppc64.patch 20 Sep 2007 18:02:04 -0000 1.2
+++ mozilla-firefox-head.ppc64.patch 14 Dec 2007 10:24:02 -0000 1.3
@@ -1,47 +1,7 @@
-Index: xpcom/reflect/xptcall/src/md/unix/Makefile.in
-===================================================================
-RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v
-retrieving revision 1.92
-diff -u -B -u -p -r1.92 Makefile.in
---- xpcom/reflect/xptcall/src/md/unix/Makefile.in 14 Dec 2006 19:13:43 -0000 1.92
-+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 29 Jan 2007 17:49:54 -0000
-@@ -268,11 +268,16 @@ endif
- #
- # Linux/PPC
- #
--ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc)
-+ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc)
- CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
- ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
- AS := $(CC) -c -x assembler-with-cpp
- endif
-+ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
-+CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
-+ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
-+AS := $(CC) -c -x assembler-with-cpp
-+endif
-
- #
- # NetBSD/PPC
-Index: xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp,v
-retrieving revision 1.3
-diff -u -B -u -p -r1.3 xptcinvoke_ppc_netbsd.cpp
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp 18 Apr 2004 14:18:18 -0000 1.3
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp 29 Jan 2007 17:49:55 -0000
-@@ -44,7 +44,7 @@
- // indepenpent call to the platform ABI. To do that,
- // XPTC_InvokeByIndex() has to determine the method to call via vtable
- // access. The parameters for the method are read from the
--// nsXPTCVariant* and prepared for th native ABI. For the Linux/PPC
-+// nsXPTCVariant* and prepared for the native ABI. For the Linux/PPC
- // ABI this means that the first 8 integral and floating point
- // parameters are passed in registers.
-
---- /dev/null 2000-10-22 01:01:00.000000000 +0000
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2007-01-29 17:36:50.000000000 +0000
-@@ -0,0 +1,164 @@
+diff -up /dev/null mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
+--- /dev/null 2007-12-13 09:37:29.108040339 +0100
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2007-12-13 11:37:17.000000000 +0100
+@@ -0,0 +1,113 @@
+## ***** BEGIN LICENSE BLOCK *****
+ # Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ #
@@ -78,7 +38,7 @@
+ #
+ # ***** END LICENSE BLOCK *****
+
-+.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4
++.set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4
+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
@@ -93,122 +53,99 @@
+.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
+.set f30,30; .set f31,31
+
-+
-+#
-+# NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
-+# PRUint32 paramCount, nsXPTCVariant* params)
-+#
-+
-+ .section ".toc","aw"
+ .section ".text"
+ .align 2
-+ .globl NS_InvokeByIndex_P
++ .globl SharedStub
+ .section ".opd","aw"
+ .align 3
-+NS_InvokeByIndex_P:
-+ .quad .NS_InvokeByIndex_P,.TOC. at tocbase
-+ .previous
-+ .type NS_InvokeByIndex_P, at function
-+.NS_InvokeByIndex_P:
-+ mflr 0
-+ std 0,16(r1)
+
-+ std r29,-24(r1)
-+ std r30,-16(r1)
-+ std r31,-8(r1)
++SharedStub:
++ .quad .SharedStub,.TOC. at tocbase
++ .previous
++ .type SharedStub, at function
+
-+ mr r29,r3 # Save 'that' in r29
-+ mr r30,r4 # Save 'methodIndex' in r30
-+ mr r31,r1 # Save old frame
++.SharedStub:
++ mflr r0
+
-+ # Allocate stack frame with space for params. Since at least the
-+ # first 7 parameters (not including 'that') will be in registers,
-+ # we don't actually need stack space for those. We must ensure
-+ # that the stack remains 16-byte aligned.
-+ #
-+ # | ..128-byte stack frame.. | | 7 GP | 13 FP | 3 NV |
-+ # | |(params)........| regs | regs | regs |
-+ # (r1)...........(+112)....(+128)
-+ # (-23*8).(-16*8).(-3*8)..(r31)
++ std r4, -56(r1) # Save all GPRS
++ std r5, -48(r1)
++ std r6, -40(r1)
++ std r7, -32(r1)
++ std r8, -24(r1)
++ std r9, -16(r1)
++ std r10, -8(r1)
+
-+ # +stack frame, -unused stack params, +regs storage, +1 for alignment
-+ addi r7,r5,((112/8)-7+7+13+3+1)
-+ rldicr r7,r7,3,59 # multiply by 8 and mask with ~15
-+ neg r7,r7
-+ stdux r1,r1,r7
++ stfd f13, -64(r1) # ... and FPRS
++ stfd f12, -72(r1)
++ stfd f11, -80(r1)
++ stfd f10, -88(r1)
++ stfd f9, -96(r1)
++ stfd f8, -104(r1)
++ stfd f7, -112(r1)
++ stfd f6, -120(r1)
++ stfd f5, -128(r1)
++ stfd f4, -136(r1)
++ stfd f3, -144(r1)
++ stfd f2, -152(r1)
++ stfd f1, -160(r1)
+
++ subi r6,r1,56 # r6 --> gprData
++ subi r7,r1,160 # r7 --> fprData
++ addi r5,r1,112 # r5 --> extra stack args
+
-+ # Call invoke_copy_to_stack(PRUint64* gpregs, double* fpregs,
-+ # PRUint32 paramCount, nsXPTCVariant* s,
-+ # PRUint64* d))
++ std r0, 16(r1)
++
++ stdu r1,-288(r1)
++ # r3 has the 'self' pointer
++ # already
+
-+ # r5, r6 are passed through intact (paramCount, params)
-+ # r7 (d) has to be r1+112 -- where parameters are passed on the stack.
-+ # r3, r4 are above that, easier to address from r31 than from r1
++ mr r4,r11 # r4 is methodIndex selector,
++ # passed via r11 in the
++ # nsNSStubBase::StubXX() call
+
-+ subi r3,r31,(23*8) # r3 --> GPRS
-+ subi r4,r31,(16*8) # r4 --> FPRS
-+ addi r7,r1,112 # r7 --> params
-+ bl invoke_copy_to_stack
++ bl PrepareAndDispatch
+ nop
+
-+ # Set up to invoke function
-+
-+ ld r9,0(r29) # vtable (r29 is 'that')
-+ mr r3,r29 # self is first arg, obviously
-+
-+ sldi r30,r30,3 # Find function descriptor
-+ add r9,r9,r30
-+ ld r9,0(r9)
-+
-+ ld r0,0(r9) # Actual address from fd.
-+ std r2,40(r1) # Save r2 (TOC pointer)
-+
-+ mtctr 0
-+ ld r11,16(r9) # Environment pointer from fd.
-+ ld r2,8(r9) # TOC pointer from fd.
-+
-+ # Load FP and GP registers as required
-+ ld r4, -(23*8)(r31)
-+ ld r5, -(22*8)(r31)
-+ ld r6, -(21*8)(r31)
-+ ld r7, -(20*8)(r31)
-+ ld r8, -(19*8)(r31)
-+ ld r9, -(18*8)(r31)
-+ ld r10, -(17*8)(r31)
-+
-+ lfd f1, -(16*8)(r31)
-+ lfd f2, -(15*8)(r31)
-+ lfd f3, -(14*8)(r31)
-+ lfd f4, -(13*8)(r31)
-+ lfd f5, -(12*8)(r31)
-+ lfd f6, -(11*8)(r31)
-+ lfd f7, -(10*8)(r31)
-+ lfd f8, -(9*8)(r31)
-+ lfd f9, -(8*8)(r31)
-+ lfd f10, -(7*8)(r31)
-+ lfd f11, -(6*8)(r31)
-+ lfd f12, -(5*8)(r31)
-+ lfd f13, -(4*8)(r31)
-+
-+ bctrl # Do it
-+
-+ ld r2,40(r1) # Load our own TOC pointer
-+ ld r1,0(r1) # Revert stack frame
-+ ld 0,16(r1) # Reload lr
-+ ld 29,-24(r1) # Restore NVGPRS
-+ ld 30,-16(r1)
-+ ld 31,-8(r1)
-+ mtlr 0
++ ld 1,0(r1) # restore stack
++ ld r0,16(r1) # restore LR
++ mtlr r0
+ blr
+
-+ .size NS_InvokeByIndex_P,.-.NS_InvokeByIndex_P
++ .size SharedStub,.-.SharedStub
+
+ # Magic indicating no need for an executable stack
+ .section .note.GNU-stack, "", @progbits ; .previous
---- /dev/null 2000-10-22 01:01:00.000000000 +0000
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 2007-01-29 17:36:50.000000000 +0000
-@@ -0,0 +1,131 @@
+diff -up mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp.ppc64 mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp
+--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp.ppc64 2004-04-18 16:18:18.000000000 +0200
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp 2007-12-13 11:37:17.000000000 +0100
+@@ -44,7 +44,7 @@
+ // indepenpent call to the platform ABI. To do that,
+ // XPTC_InvokeByIndex() has to determine the method to call via vtable
+ // access. The parameters for the method are read from the
+-// nsXPTCVariant* and prepared for th native ABI. For the Linux/PPC
++// nsXPTCVariant* and prepared for the native ABI. For the Linux/PPC
+ // ABI this means that the first 8 integral and floating point
+ // parameters are passed in registers.
+
+diff -up mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.ppc64 mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
+--- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.ppc64 2007-11-29 08:02:08.000000000 +0100
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2007-12-13 12:04:01.000000000 +0100
+@@ -283,6 +283,11 @@ CPPSRCS := xptcinvoke_ppc_linux.cpp xpt
+ ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
+ AS := $(CC) -c -x assembler-with-cpp
+ endif
++ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
++CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
++ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
++AS := $(CC) -c -x assembler-with-cpp
++endif
+
+ #
+ # NetBSD/PPC
+diff -up /dev/null mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
+--- /dev/null 2007-12-13 09:37:29.108040339 +0100
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 2007-12-13 11:37:17.000000000 +0100
+@@ -0,0 +1,245 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
@@ -227,7 +164,7 @@
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
-+ * Portions created by the Initial Developer are Copyright (C) 1998
++ * Portions created by the Initial Developer are Copyright (C) 1999
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
@@ -250,47 +187,296 @@
+ *
+ * ***** END LICENSE BLOCK ***** */
+
-+// Platform specific code to invoke XPCOM methods on native objects
++// Implement shared vtbl methods.
+
-+// The purpose of NS_InvokeByIndex_P() is to map a platform
-+// independent call to the platform ABI. To do that,
-+// NS_InvokeByIndex_P() has to determine the method to call via vtable
-+// access. The parameters for the method are read from the
-+// nsXPTCVariant* and prepared for the native ABI.
++#include "xptcprivate.h"
++#include "xptiprivate.h"
++
++// The Linux/PPC64 ABI passes the first 8 integral
++// parameters and the first 13 floating point parameters in registers
++// (r3-r10 and f1-f13), no stack space is allocated for these by the
++// caller. The rest of the parameters are passed in the caller's stack
++// area. The stack pointer has to retain 16-byte alignment.
+
+// The PowerPC64 platform ABI can be found here:
+// http://www.freestandards.org/spec/ELF/ppc64/
+// and in particular:
+// http://www.freestandards.org/spec/ELF/ppc64/PPC-elf64abi-1.9.html#FUNC-CALL
+
-+#include <stdio.h>
-+#include "xptcprivate.h"
++#define PARAM_BUFFER_COUNT 16
++#define GPR_COUNT 7
++#define FPR_COUNT 13
+
-+// 8 integral parameters are passed in registers, not including 'that'
-+#define GPR_COUNT 7
++// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
++//
++// - 'args[]' contains the arguments passed on stack
++// - 'gprData[]' contains the arguments passed in integer registers
++// - 'fprData[]' contains the arguments passed in floating point registers
++//
++// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
++// and then the method gets called.
++#include <stdio.h>
++extern "C" nsresult
++PrepareAndDispatch(nsXPTCStubBase* self,
++ PRUint64 methodIndex,
++ PRUint64* args,
++ PRUint64 *gprData,
++ double *fprData)
++{
++ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
++ nsXPTCMiniVariant* dispatchParams = NULL;
++ const nsXPTMethodInfo* info;
++ PRUint32 paramCount;
++ PRUint32 i;
++ nsresult result = NS_ERROR_FAILURE;
+
-+// 8 floating point parameters are passed in registers, floats are
-+// promoted to doubles when passed in registers
-+#define FPR_COUNT 13
++ NS_ASSERTION(self,"no self");
+
-+extern "C" PRUint32
-+invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-+{
-+ return PRUint32(((paramCount * 2) + 3) & ~3);
-+}
++ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
++ NS_ASSERTION(info,"no method info");
++ if (! info)
++ return NS_ERROR_UNEXPECTED;
+
-+extern "C" void
-+invoke_copy_to_stack(PRUint64* gpregs,
-+ double* fpregs,
-+ PRUint32 paramCount,
-+ nsXPTCVariant* s,
-+ PRUint64* d)
-+{
-+ PRUint64 tempu64;
++ paramCount = info->GetParamCount();
+
-+ for(uint32 i = 0; i < paramCount; i++, s++) {
-+ if(s->IsPtrData())
-+ tempu64 = (PRUint64) s->ptr;
++ // setup variant array pointer
++ if(paramCount > PARAM_BUFFER_COUNT)
++ dispatchParams = new nsXPTCMiniVariant[paramCount];
++ else
++ dispatchParams = paramBuffer;
++
++ NS_ASSERTION(dispatchParams,"no place for params");
++ if (! dispatchParams)
++ return NS_ERROR_OUT_OF_MEMORY;
++
++ PRUint64* ap = args;
++ PRUint64 tempu64;
++
++ for(i = 0; i < paramCount; i++) {
++ const nsXPTParamInfo& param = info->GetParam(i);
++ const nsXPTType& type = param.GetType();
++ nsXPTCMiniVariant* dp = &dispatchParams[i];
++
++ if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
++ if (i < FPR_COUNT)
++ dp->val.d = fprData[i];
++ else
++ dp->val.d = *(double*) ap;
++ } else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
++ if (i < FPR_COUNT)
++ dp->val.f = (float) fprData[i]; // in registers floats are passed as doubles
++ else {
++ float *p = (float *)ap;
++ p++;
++ dp->val.f = *p;
++ }
++ } else { /* integer type or pointer */
++ if (i < GPR_COUNT)
++ tempu64 = gprData[i];
++ else
++ tempu64 = *ap;
++
++ if (param.IsOut() || !type.IsArithmetic())
++ dp->val.p = (void*) tempu64;
++ else if (type ==nsXPTType::T_I8)
++ dp->val.i8 = (PRInt8) tempu64;
++ else if (type ==nsXPTType::T_I16)
++ dp->val.i16 = (PRInt16) tempu64;
++ else if (type ==nsXPTType::T_I32)
++ dp->val.i32 = (PRInt32) tempu64;
++ else if (type ==nsXPTType::T_I64)
++ dp->val.i64 = (PRInt64) tempu64;
++ else if (type ==nsXPTType::T_U8)
++ dp->val.u8 = (PRUint8) tempu64;
++ else if (type ==nsXPTType::T_U16)
++ dp->val.u16 = (PRUint16) tempu64;
++ else if (type ==nsXPTType::T_U32)
++ dp->val.u32 = (PRUint32) tempu64;
++ else if (type ==nsXPTType::T_U64)
++ dp->val.u64 = (PRUint64) tempu64;
++ else if (type ==nsXPTType::T_BOOL)
++ dp->val.b = (PRBool) tempu64;
++ else if (type ==nsXPTType::T_CHAR)
++ dp->val.c = (char) tempu64;
++ else if (type ==nsXPTType::T_WCHAR)
++ dp->val.wc = (wchar_t) tempu64;
++ else
++ NS_ASSERTION(0, "bad type");
++ }
++
++ if (i >= 7)
++ ap++;
++ }
++
++ result = self->mOuter->CallMethod((PRUint16) methodIndex, info,
++ dispatchParams);
++
++ if (dispatchParams != paramBuffer)
++ delete [] dispatchParams;
++
++ return result;
++}
++
++// Load r11 with the constant 'n' and branch to SharedStub().
++//
++// XXX Yes, it's ugly that we're relying on gcc's name-mangling here;
++// however, it's quick, dirty, and'll break when the ABI changes on
++// us, which is what we want ;-).
++
++#if __GXX_ABI_VERSION < 100
++#error Prehistoric GCC not supported here
++#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__ ( \
++ ".section \".toc\",\"aw\" \n\t" \
++ ".section \".text\" \n\t" \
++ ".align 2 \n\t" \
++ ".if "#n" < 10 \n\t" \
++ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
++ ".section \".opd\",\"aw\" \n\t" \
++ ".align 3 \n\t" \
++"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
++ ".quad ._ZN14nsXPTCStubBase5Stub"#n"Ev,.TOC. at tocbase \n\t" \
++ ".previous \n\t" \
++ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev, at function \n\n" \
++"._ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
++ \
++ ".elseif "#n" < 100 \n\t" \
++ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
++ ".section \".opd\",\"aw\" \n\t" \
++ ".align 3 \n\t" \
++"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
++ ".quad ._ZN14nsXPTCStubBase6Stub"#n"Ev,.TOC. at tocbase \n\t" \
++ ".previous \n\t" \
++ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev, at function \n\n" \
++"._ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
++ \
++ ".elseif "#n" < 1000 \n\t" \
++ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
++ ".section \".opd\",\"aw\" \n\t" \
++ ".align 3 \n\t" \
++"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
++ ".quad ._ZN14nsXPTCStubBase7Stub"#n"Ev,.TOC. at tocbase \n\t" \
++ ".previous \n\t" \
++ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev, at 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 \n" \
++);
++#endif
++
++#define SENTINEL_ENTRY(n) \
++nsresult nsXPTCStubBase::Sentinel##n() \
++{ \
++ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
++ return NS_ERROR_NOT_IMPLEMENTED; \
++}
++
++#include "xptcstubsdef.inc"
+diff -up /dev/null mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp
+--- /dev/null 2007-12-13 09:37:29.108040339 +0100
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 2007-12-13 11:37:17.000000000 +0100
+@@ -0,0 +1,131 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
++/* ***** BEGIN LICENSE BLOCK *****
++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
++ *
++ * The contents of this file are subject to the Mozilla 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/MPL/
++ *
++ * 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 the Initial Developer are Copyright (C) 1998
++ * the Initial Developer. All Rights Reserved.
++ *
++ * Contributor(s):
++ * dwmw2 at infradead.org (David Woodhouse)
++ * Franz.Sirl-kernel at lauterbach.com (Franz Sirl)
++ * beard at netscape.com (Patrick Beard)
++ * waterson at netscape.com (Chris Waterson)
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either of the GNU General Public License Version 2 or later (the "GPL"),
++ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++ * in which case the provisions of the GPL or the LGPL are applicable instead
++ * of those above. If you wish to allow use of your version of this file only
++ * under the terms of either the GPL or the LGPL, and not to allow others to
++ * use your version of this file under the terms of the MPL, indicate your
++ * decision by deleting the provisions above and replace them with the notice
++ * and other provisions required by the GPL or the LGPL. If you do not delete
++ * the provisions above, a recipient may use your version of this file under
++ * the terms of any one of the MPL, the GPL or the LGPL.
++ *
++ * ***** END LICENSE BLOCK ***** */
++
++// Platform specific code to invoke XPCOM methods on native objects
++
++// The purpose of NS_InvokeByIndex_P() is to map a platform
++// independent call to the platform ABI. To do that,
++// NS_InvokeByIndex_P() has to determine the method to call via vtable
++// access. The parameters for the method are read from the
++// nsXPTCVariant* and prepared for the native ABI.
++
++// The PowerPC64 platform ABI can be found here:
++// http://www.freestandards.org/spec/ELF/ppc64/
++// and in particular:
++// http://www.freestandards.org/spec/ELF/ppc64/PPC-elf64abi-1.9.html#FUNC-CALL
++
++#include <stdio.h>
++#include "xptcprivate.h"
++
++// 8 integral parameters are passed in registers, not including 'that'
++#define GPR_COUNT 7
++
++// 8 floating point parameters are passed in registers, floats are
++// promoted to doubles when passed in registers
++#define FPR_COUNT 13
++
++extern "C" PRUint32
++invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
++{
++ return PRUint32(((paramCount * 2) + 3) & ~3);
++}
++
++extern "C" void
++invoke_copy_to_stack(PRUint64* gpregs,
++ double* fpregs,
++ PRUint32 paramCount,
++ nsXPTCVariant* s,
++ PRUint64* d)
++{
++ PRUint64 tempu64;
++
++ for(uint32 i = 0; i < paramCount; i++, s++) {
++ if(s->IsPtrData())
++ tempu64 = (PRUint64) s->ptr;
+ else {
+ switch(s->type) {
+ case nsXPTType::T_FLOAT: break;
@@ -340,9 +526,10 @@
+NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
+ PRUint32 paramCount, nsXPTCVariant* params);
+
---- /dev/null 2000-10-22 01:01:00.000000000 +0000
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2007-01-29 17:36:50.000000000 +0000
-@@ -0,0 +1,113 @@
+diff -up /dev/null mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
+--- /dev/null 2007-12-13 09:37:29.108040339 +0100
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2007-12-13 11:37:17.000000000 +0100
+@@ -0,0 +1,164 @@
+## ***** BEGIN LICENSE BLOCK *****
+ # Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ #
@@ -379,7 +566,7 @@
+ #
+ # ***** END LICENSE BLOCK *****
+
-+.set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4
++.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4
+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
@@ -394,313 +581,116 @@
+.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
+.set f30,30; .set f31,31
+
++
++#
++# NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
++# PRUint32 paramCount, nsXPTCVariant* params)
++#
++
++ .section ".toc","aw"
+ .section ".text"
+ .align 2
-+ .globl SharedStub
++ .globl NS_InvokeByIndex_P
+ .section ".opd","aw"
+ .align 3
-+
-+SharedStub:
-+ .quad .SharedStub,.TOC. at tocbase
++NS_InvokeByIndex_P:
++ .quad .NS_InvokeByIndex_P,.TOC. at tocbase
+ .previous
-+ .type SharedStub, at function
-+
-+.SharedStub:
-+ mflr r0
-+
-+ std r4, -56(r1) # Save all GPRS
-+ std r5, -48(r1)
-+ std r6, -40(r1)
-+ std r7, -32(r1)
-+ std r8, -24(r1)
-+ std r9, -16(r1)
-+ std r10, -8(r1)
-+
-+ stfd f13, -64(r1) # ... and FPRS
-+ stfd f12, -72(r1)
-+ stfd f11, -80(r1)
-+ stfd f10, -88(r1)
-+ stfd f9, -96(r1)
-+ stfd f8, -104(r1)
-+ stfd f7, -112(r1)
-+ stfd f6, -120(r1)
-+ stfd f5, -128(r1)
-+ stfd f4, -136(r1)
-+ stfd f3, -144(r1)
-+ stfd f2, -152(r1)
-+ stfd f1, -160(r1)
-+
-+ subi r6,r1,56 # r6 --> gprData
-+ subi r7,r1,160 # r7 --> fprData
-+ addi r5,r1,112 # r5 --> extra stack args
-+
-+ std r0, 16(r1)
-+
-+ stdu r1,-288(r1)
-+ # r3 has the 'self' pointer
-+ # already
-+
-+ mr r4,r11 # r4 is methodIndex selector,
-+ # passed via r11 in the
-+ # nsNSStubBase::StubXX() call
-+
-+ bl PrepareAndDispatch
-+ nop
-+
-+ ld 1,0(r1) # restore stack
-+ ld r0,16(r1) # restore LR
-+ mtlr r0
-+ blr
-+
-+ .size SharedStub,.-.SharedStub
-+
-+ # Magic indicating no need for an executable stack
-+ .section .note.GNU-stack, "", @progbits ; .previous
---- /dev/null 2000-10-22 01:01:00.000000000 +0000
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 2007-01-29 17:36:50.000000000 +0000
-@@ -0,0 +1,245 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Mozilla 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/MPL/
-+ *
-+ * 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 the Initial Developer are Copyright (C) 1999
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ * dwmw2 at infradead.org (David Woodhouse)
-+ * Franz.Sirl-kernel at lauterbach.com (Franz Sirl)
-+ * beard at netscape.com (Patrick Beard)
-+ * waterson at netscape.com (Chris Waterson)
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either of the GNU General Public License Version 2 or later (the "GPL"),
-+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the MPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the MPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+// Implement shared vtbl methods.
-+
-+#include "xptcprivate.h"
-+#include "xptiprivate.h"
-+
-+// The Linux/PPC64 ABI passes the first 8 integral
-+// parameters and the first 13 floating point parameters in registers
-+// (r3-r10 and f1-f13), no stack space is allocated for these by the
-+// caller. The rest of the parameters are passed in the caller's stack
-+// area. The stack pointer has to retain 16-byte alignment.
-+
-+// The PowerPC64 platform ABI can be found here:
-+// http://www.freestandards.org/spec/ELF/ppc64/
-+// and in particular:
-+// http://www.freestandards.org/spec/ELF/ppc64/PPC-elf64abi-1.9.html#FUNC-CALL
++ .type NS_InvokeByIndex_P, at function
++.NS_InvokeByIndex_P:
++ mflr 0
++ std 0,16(r1)
+
-+#define PARAM_BUFFER_COUNT 16
-+#define GPR_COUNT 7
-+#define FPR_COUNT 13
++ std r29,-24(r1)
++ std r30,-16(r1)
++ std r31,-8(r1)
+
-+// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
-+//
-+// - 'args[]' contains the arguments passed on stack
-+// - 'gprData[]' contains the arguments passed in integer registers
-+// - 'fprData[]' contains the arguments passed in floating point registers
-+//
-+// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
-+// and then the method gets called.
-+#include <stdio.h>
-+extern "C" nsresult
-+PrepareAndDispatch(nsXPTCStubBase* self,
-+ PRUint64 methodIndex,
-+ PRUint64* args,
-+ PRUint64 *gprData,
-+ double *fprData)
-+{
-+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-+ nsXPTCMiniVariant* dispatchParams = NULL;
-+ const nsXPTMethodInfo* info;
-+ PRUint32 paramCount;
-+ PRUint32 i;
-+ nsresult result = NS_ERROR_FAILURE;
++ mr r29,r3 # Save 'that' in r29
++ mr r30,r4 # Save 'methodIndex' in r30
++ mr r31,r1 # Save old frame
+
-+ NS_ASSERTION(self,"no self");
++ # Allocate stack frame with space for params. Since at least the
++ # first 7 parameters (not including 'that') will be in registers,
++ # we don't actually need stack space for those. We must ensure
++ # that the stack remains 16-byte aligned.
++ #
++ # | ..128-byte stack frame.. | | 7 GP | 13 FP | 3 NV |
++ # | |(params)........| regs | regs | regs |
++ # (r1)...........(+112)....(+128)
++ # (-23*8).(-16*8).(-3*8)..(r31)
+
-+ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
-+ NS_ASSERTION(info,"no method info");
-+ if (! info)
-+ return NS_ERROR_UNEXPECTED;
++ # +stack frame, -unused stack params, +regs storage, +1 for alignment
++ addi r7,r5,((112/8)-7+7+13+3+1)
++ rldicr r7,r7,3,59 # multiply by 8 and mask with ~15
++ neg r7,r7
++ stdux r1,r1,r7
+
-+ paramCount = info->GetParamCount();
+
-+ // setup variant array pointer
-+ if(paramCount > PARAM_BUFFER_COUNT)
-+ dispatchParams = new nsXPTCMiniVariant[paramCount];
-+ else
-+ dispatchParams = paramBuffer;
++ # Call invoke_copy_to_stack(PRUint64* gpregs, double* fpregs,
++ # PRUint32 paramCount, nsXPTCVariant* s,
++ # PRUint64* d))
+
-+ NS_ASSERTION(dispatchParams,"no place for params");
-+ if (! dispatchParams)
-+ return NS_ERROR_OUT_OF_MEMORY;
++ # r5, r6 are passed through intact (paramCount, params)
++ # r7 (d) has to be r1+112 -- where parameters are passed on the stack.
++ # r3, r4 are above that, easier to address from r31 than from r1
+
-+ PRUint64* ap = args;
-+ PRUint64 tempu64;
++ subi r3,r31,(23*8) # r3 --> GPRS
++ subi r4,r31,(16*8) # r4 --> FPRS
++ addi r7,r1,112 # r7 --> params
++ bl invoke_copy_to_stack
++ nop
+
-+ for(i = 0; i < paramCount; i++) {
-+ const nsXPTParamInfo& param = info->GetParam(i);
-+ const nsXPTType& type = param.GetType();
-+ nsXPTCMiniVariant* dp = &dispatchParams[i];
-+
-+ if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
-+ if (i < FPR_COUNT)
-+ dp->val.d = fprData[i];
-+ else
-+ dp->val.d = *(double*) ap;
-+ } else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
-+ if (i < FPR_COUNT)
-+ dp->val.f = (float) fprData[i]; // in registers floats are passed as doubles
-+ else {
-+ float *p = (float *)ap;
-+ p++;
-+ dp->val.f = *p;
-+ }
-+ } else { /* integer type or pointer */
-+ if (i < GPR_COUNT)
-+ tempu64 = gprData[i];
-+ else
-+ tempu64 = *ap;
++ # Set up to invoke function
+
-+ if (param.IsOut() || !type.IsArithmetic())
-+ dp->val.p = (void*) tempu64;
-+ else if (type ==nsXPTType::T_I8)
-+ dp->val.i8 = (PRInt8) tempu64;
-+ else if (type ==nsXPTType::T_I16)
-+ dp->val.i16 = (PRInt16) tempu64;
-+ else if (type ==nsXPTType::T_I32)
-+ dp->val.i32 = (PRInt32) tempu64;
-+ else if (type ==nsXPTType::T_I64)
-+ dp->val.i64 = (PRInt64) tempu64;
-+ else if (type ==nsXPTType::T_U8)
-+ dp->val.u8 = (PRUint8) tempu64;
-+ else if (type ==nsXPTType::T_U16)
-+ dp->val.u16 = (PRUint16) tempu64;
-+ else if (type ==nsXPTType::T_U32)
-+ dp->val.u32 = (PRUint32) tempu64;
-+ else if (type ==nsXPTType::T_U64)
-+ dp->val.u64 = (PRUint64) tempu64;
-+ else if (type ==nsXPTType::T_BOOL)
-+ dp->val.b = (PRBool) tempu64;
-+ else if (type ==nsXPTType::T_CHAR)
-+ dp->val.c = (char) tempu64;
-+ else if (type ==nsXPTType::T_WCHAR)
-+ dp->val.wc = (wchar_t) tempu64;
-+ else
-+ NS_ASSERTION(0, "bad type");
-+ }
++ ld r9,0(r29) # vtable (r29 is 'that')
++ mr r3,r29 # self is first arg, obviously
+
-+ if (i >= 7)
-+ ap++;
-+ }
++ sldi r30,r30,3 # Find function descriptor
++ add r9,r9,r30
++ ld r9,0(r9)
+
-+ result = self->mOuter->CallMethod((PRUint16) methodIndex, info,
-+ dispatchParams);
++ ld r0,0(r9) # Actual address from fd.
++ std r2,40(r1) # Save r2 (TOC pointer)
+
-+ if (dispatchParams != paramBuffer)
-+ delete [] dispatchParams;
++ mtctr 0
++ ld r11,16(r9) # Environment pointer from fd.
++ ld r2,8(r9) # TOC pointer from fd.
+
-+ return result;
-+}
++ # Load FP and GP registers as required
++ ld r4, -(23*8)(r31)
++ ld r5, -(22*8)(r31)
++ ld r6, -(21*8)(r31)
++ ld r7, -(20*8)(r31)
++ ld r8, -(19*8)(r31)
++ ld r9, -(18*8)(r31)
++ ld r10, -(17*8)(r31)
+
-+// Load r11 with the constant 'n' and branch to SharedStub().
-+//
-+// XXX Yes, it's ugly that we're relying on gcc's name-mangling here;
-+// however, it's quick, dirty, and'll break when the ABI changes on
-+// us, which is what we want ;-).
++ lfd f1, -(16*8)(r31)
++ lfd f2, -(15*8)(r31)
++ lfd f3, -(14*8)(r31)
++ lfd f4, -(13*8)(r31)
++ lfd f5, -(12*8)(r31)
++ lfd f6, -(11*8)(r31)
++ lfd f7, -(10*8)(r31)
++ lfd f8, -(9*8)(r31)
++ lfd f9, -(8*8)(r31)
++ lfd f10, -(7*8)(r31)
++ lfd f11, -(6*8)(r31)
++ lfd f12, -(5*8)(r31)
++ lfd f13, -(4*8)(r31)
+
-+#if __GXX_ABI_VERSION < 100
-+#error Prehistoric GCC not supported here
-+#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...
++ bctrl # Do it
+
-+# define STUB_ENTRY(n) \
-+__asm__ ( \
-+ ".section \".toc\",\"aw\" \n\t" \
-+ ".section \".text\" \n\t" \
-+ ".align 2 \n\t" \
-+ ".if "#n" < 10 \n\t" \
-+ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
-+ ".section \".opd\",\"aw\" \n\t" \
-+ ".align 3 \n\t" \
-+"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
-+ ".quad ._ZN14nsXPTCStubBase5Stub"#n"Ev,.TOC. at tocbase \n\t" \
-+ ".previous \n\t" \
-+ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev, at function \n\n" \
-+"._ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
-+ \
-+ ".elseif "#n" < 100 \n\t" \
-+ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
-+ ".section \".opd\",\"aw\" \n\t" \
-+ ".align 3 \n\t" \
-+"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
-+ ".quad ._ZN14nsXPTCStubBase6Stub"#n"Ev,.TOC. at tocbase \n\t" \
-+ ".previous \n\t" \
-+ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev, at function \n\n" \
-+"._ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
-+ \
-+ ".elseif "#n" < 1000 \n\t" \
-+ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
-+ ".section \".opd\",\"aw\" \n\t" \
-+ ".align 3 \n\t" \
-+"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
-+ ".quad ._ZN14nsXPTCStubBase7Stub"#n"Ev,.TOC. at tocbase \n\t" \
-+ ".previous \n\t" \
-+ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev, at 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 \n" \
-+);
-+#endif
++ ld r2,40(r1) # Load our own TOC pointer
++ ld r1,0(r1) # Revert stack frame
++ ld 0,16(r1) # Reload lr
++ ld 29,-24(r1) # Restore NVGPRS
++ ld 30,-16(r1)
++ ld 31,-8(r1)
++ mtlr 0
++ blr
+
-+#define SENTINEL_ENTRY(n) \
-+nsresult nsXPTCStubBase::Sentinel##n() \
-+{ \
-+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-+ return NS_ERROR_NOT_IMPLEMENTED; \
-+}
++ .size NS_InvokeByIndex_P,.-.NS_InvokeByIndex_P
+
-+#include "xptcstubsdef.inc"
++ # Magic indicating no need for an executable stack
++ .section .note.GNU-stack, "", @progbits ; .previous
mozilla-sqlite-build.patch:
Index: mozilla-sqlite-build.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xulrunner/devel/mozilla-sqlite-build.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mozilla-sqlite-build.patch 14 Nov 2007 10:24:26 -0000 1.1
+++ mozilla-sqlite-build.patch 14 Dec 2007 10:24:02 -0000 1.2
@@ -1,6 +1,6 @@
-diff -up mozilla/storage/build/Makefile.in.old mozilla/storage/build/Makefile.in
---- mozilla/storage/build/Makefile.in.old 2007-08-10 18:19:57.000000000 +0200
-+++ mozilla/storage/build/Makefile.in 2007-11-14 09:17:00.000000000 +0100
+diff -up mozilla/storage/build/Makefile.in.sqlite mozilla/storage/build/Makefile.in
+--- mozilla/storage/build/Makefile.in.sqlite 2007-08-10 18:19:57.000000000 +0200
++++ mozilla/storage/build/Makefile.in 2007-12-13 12:06:36.000000000 +0100
@@ -21,7 +21,6 @@
#
# Contributor(s):
@@ -21,9 +21,9 @@
EXTRA_DSO_LDOPTS += \
$(LIBS_DIR) \
$(EXTRA_DSO_LIBS) \
-diff -up mozilla/toolkit/library/libxul-config.mk.old mozilla/toolkit/library/libxul-config.mk
---- mozilla/toolkit/library/libxul-config.mk.old 2007-09-17 01:48:08.000000000 +0200
-+++ mozilla/toolkit/library/libxul-config.mk 2007-11-14 09:14:16.000000000 +0100
+diff -up mozilla/toolkit/library/libxul-config.mk.sqlite mozilla/toolkit/library/libxul-config.mk
+--- mozilla/toolkit/library/libxul-config.mk.sqlite 2007-12-08 02:38:35.000000000 +0100
++++ mozilla/toolkit/library/libxul-config.mk 2007-12-13 12:06:36.000000000 +0100
@@ -21,7 +21,6 @@
# the Initial Developer. All Rights Reserved.
#
@@ -40,9 +40,9 @@
endif
ifdef MOZ_PLACES
-diff -up mozilla/xpcom/stub/Makefile.in.old mozilla/xpcom/stub/Makefile.in
---- mozilla/xpcom/stub/Makefile.in.old 2007-10-13 23:13:52.000000000 +0200
-+++ mozilla/xpcom/stub/Makefile.in 2007-11-14 09:15:28.000000000 +0100
+diff -up mozilla/xpcom/stub/Makefile.in.sqlite mozilla/xpcom/stub/Makefile.in
+--- mozilla/xpcom/stub/Makefile.in.sqlite 2007-10-13 23:13:52.000000000 +0200
++++ mozilla/xpcom/stub/Makefile.in 2007-12-13 12:06:36.000000000 +0100
@@ -91,7 +91,6 @@ DEPENDENT_LIBS_LIST += \
ifdef MOZ_ENABLE_LIBXUL
@@ -51,9 +51,9 @@
$(LIB_PREFIX)softokn3$(DLL_SUFFIX) \
$(LIB_PREFIX)nss3$(DLL_SUFFIX) \
$(LIB_PREFIX)ssl3$(DLL_SUFFIX) \
-diff -up mozilla/config/static-config.mk.old mozilla/config/static-config.mk
---- mozilla/config/static-config.mk.old 2007-07-24 00:02:20.000000000 +0200
-+++ mozilla/config/static-config.mk 2007-11-14 09:14:16.000000000 +0100
+diff -up mozilla/config/static-config.mk.sqlite mozilla/config/static-config.mk
+--- mozilla/config/static-config.mk.sqlite 2007-07-24 00:02:20.000000000 +0200
++++ mozilla/config/static-config.mk 2007-12-13 12:06:36.000000000 +0100
@@ -98,10 +98,6 @@ ifdef MOZ_ENABLE_PANGO
STATIC_EXTRA_LIBS += $(MOZ_PANGO_LIBS)
endif
@@ -65,9 +65,9 @@
ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
STATIC_EXTRA_LIBS += $(MOZ_STARTUP_NOTIFICATION_LIBS)
endif
-diff -up mozilla/config/system-headers.old mozilla/config/system-headers
---- mozilla/config/system-headers.old 2007-10-12 14:34:46.000000000 +0200
-+++ mozilla/config/system-headers 2007-11-14 09:14:16.000000000 +0100
+diff -up mozilla/config/system-headers.sqlite mozilla/config/system-headers
+--- mozilla/config/system-headers.sqlite 2007-10-12 14:34:46.000000000 +0200
++++ mozilla/config/system-headers 2007-12-13 12:06:36.000000000 +0100
@@ -617,8 +617,6 @@ SIOUX.h
size_t.h
someincludefile.h
@@ -77,9 +77,9 @@
ssdef.h
sslerr.h
ssl.h
-diff -up mozilla/db/sqlite3/src/sqlite3file.h.old mozilla/db/sqlite3/src/sqlite3file.h
---- mozilla/db/sqlite3/src/sqlite3file.h.old 2007-07-25 04:18:54.000000000 +0200
-+++ mozilla/db/sqlite3/src/sqlite3file.h 2007-11-14 09:14:16.000000000 +0100
+diff -up mozilla/db/sqlite3/src/sqlite3file.h.sqlite mozilla/db/sqlite3/src/sqlite3file.h
+--- mozilla/db/sqlite3/src/sqlite3file.h.sqlite 2007-07-25 04:18:54.000000000 +0200
++++ mozilla/db/sqlite3/src/sqlite3file.h 2007-12-13 12:06:36.000000000 +0100
@@ -199,11 +199,7 @@ struct sqlite3OsVtbl {
/*
** Files other than os.c just reference the global virtual function table.
@@ -92,37 +92,27 @@
#endif /* _SQLITE_OS_C_ */
} // extern "C"
-diff -up mozilla/db/sqlite3/src/Makefile.in.old mozilla/db/sqlite3/src/Makefile.in
---- mozilla/db/sqlite3/src/Makefile.in.old 2007-09-16 03:47:04.000000000 +0200
-+++ mozilla/db/sqlite3/src/Makefile.in 2007-11-14 09:20:17.000000000 +0100
-@@ -45,15 +45,9 @@ VPATH = @srcdir@
+diff -up mozilla/db/sqlite3/src/Makefile.in.sqlite mozilla/db/sqlite3/src/Makefile.in
+--- mozilla/db/sqlite3/src/Makefile.in.sqlite 2007-12-01 08:17:37.000000000 +0100
++++ mozilla/db/sqlite3/src/Makefile.in 2007-12-13 12:12:37.000000000 +0100
+@@ -45,10 +45,10 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = sqlite3
-LIBRARY_NAME = sqlite3
-FORCE_SHARED_LIB = 1
-VISIBILITY_FLAGS =
--
--ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
--ifndef GNU_CC
--DEFFILE = $(win_srcdir)/sqlite.def
--endif
--endif
+-LIB_IS_C_ONLY = 1
+LIBRARY_NAME = sqlite3_s
+MODULE_NAME = sqlite3
+FORCE_STATIC_LIB = 1
++LIB_IS_C_ONLY = 1
- ifdef GNU_CC
- MODULE_OPTIMIZE_FLAGS = -O3
-@@ -83,7 +77,15 @@ DEFINES += -DOS2_HIGH_MEMORY
- endif
+ ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
+ ifndef GNU_CC
+@@ -85,6 +85,9 @@ endif
endif
-+ifdef ENABLE_TESTS
-+##LIBS = $(DIST)/lib/$(LIB_PREFIX)sqlite3_s.$(LIB_SUFFIX)
-+##SIMPLE_PROGRAMS = sqlite-shell
-+endif
-+
include $(topsrcdir)/config/rules.mk
+
+sqlite-shell.$(OBJ_SUFFIX): shell.c
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/xulrunner/devel/sources,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sources 20 Nov 2007 11:59:13 -0000 1.5
+++ sources 14 Dec 2007 10:24:02 -0000 1.6
@@ -1 +1 @@
-c2350415fb0172978981a42be68a9c8f xulrunner-20071120.tar.bz2
+f5eece8470fee0d0d83d85141ff074e1 xulrunner-20071212.tar.bz2
Index: xulrunner.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xulrunner/devel/xulrunner.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- xulrunner.spec 6 Dec 2007 09:57:48 -0000 1.32
+++ xulrunner.spec 14 Dec 2007 10:24:02 -0000 1.33
@@ -11,14 +11,14 @@
Summary: XUL Runtime for Gecko Applications
Name: xulrunner
Version: 1.9
-Release: 0.beta1.4%{?dist}
+Release: 0.beta2.1%{?dist}
URL: http://www.mozilla.org/projects/xulrunner/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Group: Applications/Internet
%if %{official_branding}
%define tarball xulrunner-%{version}-source.tar.bz2
%else
-%define tarball xulrunner-20071120.tar.bz2
+%define tarball xulrunner-20071212.tar.bz2
%endif
Source0: %{tarball}
Source10: %{name}-mozconfig
@@ -34,6 +34,8 @@
Patch2: camellia256.patch
Patch3: xulrunner-compile.patch
Patch4: mozilla-build.patch
+Patch5: xulrunner-path.patch
+Patch6: xulrunner-version.patch
# customization patches
Patch21: firefox-0.7.3-psfonts.patch
@@ -126,8 +128,10 @@
%patch2 -R -p1 -b .camellia256
%patch3 -p1
%patch4 -p1
+%patch5 -p1
+%patch6 -p1 -b .ver
-%patch104 -p0 -b .ppc64
+%patch104 -p1 -b .ppc64
%patch105 -p1 -b .sqlite
%patch106 -p1
@@ -170,7 +174,7 @@
#---------------------------------------------------------------------
%build
-INTERNAL_GECKO=`./config/milestone.pl --topsrcdir=.`
+INTERNAL_GECKO="1.9pre"
MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO}
# Build with -Os as it helps the browser; also, don't override mozilla's warning
@@ -196,7 +200,7 @@
%install
%{__rm} -rf $RPM_BUILD_ROOT
-INTERNAL_GECKO=`./config/milestone.pl --topsrcdir=.`
+INTERNAL_GECKO="1.9pre"
INTERNAL_APP_NAME=%{name}-${INTERNAL_GECKO}
MOZ_APP_DIR=%{_libdir}/${INTERNAL_APP_NAME}
@@ -204,7 +208,7 @@
%{__mkdir_p} $RPM_BUILD_ROOT/${MOZ_APP_DIR} \
$RPM_BUILD_ROOT%{_datadir}/idl/${INTERNAL_APP_NAME} \
- $RPM_BUILD_ROOT%{_includedir}/${INTERNAL_APP_NAME}
+ $RPM_BUILD_ROOT%{_includedir}/${INTERNAL_APP_NAME}
%{__install} -p -d dist/sdk/include $RPM_BUILD_ROOT%{_includedir}/${INTERNAL_APP_NAME}
%{__install} -p -d dist/sdk/idl $RPM_BUILD_ROOT%{_datadir}/idl/${INTERNAL_APP_NAME}
%{__install} -p dist/sdk/bin/* $RPM_BUILD_ROOT/$MOZ_APP_DIR
@@ -278,7 +282,7 @@
${MOZ_APP_DIR}
EOF
-GECKO_VERSION=$(./config/milestone.pl --topsrcdir='.')
+GECKO_VERSION=="1.9pre"
%{__cat} %{SOURCE101} | %{__sed} -e "s/@GECKO_VERSION@/$GECKO_VERSION/g" > \
%{_builddir}/add-gecko-provides
chmod 700 %{_builddir}/add-gecko-provides
@@ -292,17 +296,17 @@
touch $RPM_BUILD_ROOT${MOZ_APP_DIR}/components/xpti.dat
# remove unused files
-rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/crashreporter
-rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/crashreporter.ini
+%{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/crashreporter
+%{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/crashreporter.ini
#rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/*.a
-rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/bin
-rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/lib
-rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/include
-rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/idl
+%{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/bin
+%{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/lib
+%{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/include
+%{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/idl
-rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/sdk/lib
+%{__rm} -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/sdk/lib
ln -s ${MOZ_APP_DIR} $RPM_BUILD_ROOT${MOZ_APP_DIR}/sdk/lib
#---------------------------------------------------------------------
@@ -342,8 +346,7 @@
%dir %{_libdir}/%{name}-*/components
%ghost %{_libdir}/%{name}-*/components/compreg.dat
%ghost %{_libdir}/%{name}-*/components/xpti.dat
-%{_libdir}/%{name}-*/components/*.xpt
-%{_libdir}/%{name}-*/components/*.js
+%{_libdir}/%{name}-*/components/*
%{_libdir}/%{name}-*/defaults
%{_libdir}/%{name}-*/greprefs
%{_libdir}/%{name}-*/icons
@@ -384,6 +387,9 @@
#---------------------------------------------------------------------
%changelog
+* Wed Dec 12 2007 Martin Stransky <stransky at redhat.com> 1.9-0.beta2.1
+- updated to Beta 2.
+
* Thu Dec 06 2007 Martin Stransky <stransky at redhat.com> 1.9-0.beta1.4
- fixed mozilla-plugin.pc (#412971)
More information about the scm-commits
mailing list