rpms/firefox/FC-6 firefox-1.5-ppc64.patch,1.1.2.1,1.1.2.2
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Nov 22 11:07:58 UTC 2006
Author: dwmw2
Update of /cvs/dist/rpms/firefox/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv25763
Modified Files:
Tag: private-firefox-1_5_0_8-multilib-fix-branch
firefox-1.5-ppc64.patch
Log Message:
Fix stack alignment
firefox-1.5-ppc64.patch:
mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s | 149 ++++++
mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s | 101 ++++
xpcom/reflect/xptcall/src/md/unix/Makefile.in | 5
xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp | 132 +++++
xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp | 247 ++++++++++
5 files changed, 634 insertions(+)
Index: firefox-1.5-ppc64.patch
===================================================================
RCS file: /cvs/dist/rpms/firefox/FC-6/Attic/firefox-1.5-ppc64.patch,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- firefox-1.5-ppc64.patch 21 Nov 2006 18:39:02 -0000 1.1.2.1
+++ firefox-1.5-ppc64.patch 22 Nov 2006 11:07:56 -0000 1.1.2.2
@@ -1,4 +1,7 @@
-diff -uNr --exclude '*~' --exclude '*.ii' --exclude 'foo*' --exclude '*.o' --exclude '*tmp*' --exclude '*.ppc64' mozilla.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
+Updated version of patch, fixes 16-byte stack alignment after
+XPTC_InvokeByIndex().
+
+unchanged:
--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2006-11-21 17:09:28.000000000 +0000
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2006-11-20 10:13:38.000000000 +0000
@@ -267,6 +267,11 @@
@@ -13,10 +16,10 @@
#
# NetBSD/PPC
-diff -uNr --exclude '*~' --exclude '*.ii' --exclude 'foo*' --exclude '*.o' --exclude '*tmp*' --exclude '*.ppc64' mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
---- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 1970-01-01 01:00:00.000000000 +0100
-+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2006-11-21 14:01:45.000000000 +0000
-@@ -0,0 +1,148 @@
+diff -u mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
+--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2006-11-21 14:01:45.000000000 +0000
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2006-11-22 10:43:26.000000000 +0000
+@@ -0,0 +1,149 @@
+// -*- Mode: Asm -*-
+//
+// The contents of this file are subject to the Netscape Public
@@ -37,6 +40,7 @@
+// 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)
@@ -77,7 +81,6 @@
+ mflr 0
+ std 0,16(r1)
+
-+ std r28,-32(r1)
+ std r29,-24(r1)
+ std r30,-16(r1)
+ std r31,-8(r1)
@@ -86,17 +89,19 @@
+ mr r30,r4 // Save 'methodIndex' in r30
+ mr r31,r1 // Save old frame
+
-+ // Allocate stack frame with space for params
-+
-+ sldi r28,r5,3 // Max. 8 bytes per parameter
-+ addi r28,r28,128+(24*8) // Standard frame, 15 dwords for GP/FP, 4 for r28-r31
-+ neg r28,r28
-+ stdux r1,r1,r28
++ // 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. Start by rounding
++ // down to make sure the stack remains 16-byte aligned.
++
++ rldicr r7,r5,r5,59 // r7 = (r3 << 3) & ~15
++ addi r7,r7,128+(18*8) // Standard frame, 7 dwords for GPR,
++ // 13 dwords for FPR, 3 for r29-r31,
++ // less 5 of the extra unused params
++ neg r7,r7
++ stdux r1,r1,r7
+
+
-+ addi r28,r1,112 // Stack parameter area.
-+
-+
+ // Call invoke_copy_to_stack(PRUint64* gpregs, double* fpregs,
+ // PRUint32 paramCount, nsXPTCVariant* s,
+ // PRUint64* d))
@@ -154,8 +159,7 @@
+ ld r2,40(r1) // Load our own TOC pointer
+ ld r1,0(r1) // Revert stack frame
+ ld 0,16(r1) // Reload lr
-+ ld 28,-32(r1) // Restore NVGPRS
-+ ld 29,-24(r1)
++ ld 29,-24(r1) // Restore NVGPRS
+ ld 30,-16(r1)
+ ld 31,-8(r1)
+ mtlr 0
@@ -165,7 +169,7 @@
+
+ /* Magic indicating no need for an executable stack */
+ .section .note.GNU-stack, "", @progbits ; .previous
-diff -uNr --exclude '*~' --exclude '*.ii' --exclude 'foo*' --exclude '*.o' --exclude '*tmp*' --exclude '*.ppc64' mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp
+unchanged:
--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 1970-01-01 01:00:00.000000000 +0100
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 2006-11-21 17:00:06.000000000 +0000
@@ -0,0 +1,132 @@
@@ -301,10 +305,10 @@
+XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
+ PRUint32 paramCount, nsXPTCVariant* params);
+
-diff -uNr --exclude '*~' --exclude '*.ii' --exclude 'foo*' --exclude '*.o' --exclude '*tmp*' --exclude '*.ppc64' mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
---- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 1970-01-01 01:00:00.000000000 +0100
-+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2006-11-21 16:38:52.000000000 +0000
-@@ -0,0 +1,104 @@
+diff -u mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
+--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2006-11-21 16:38:52.000000000 +0000
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2006-11-22 10:51:14.000000000 +0000
+@@ -0,0 +1,101 @@
+// -*- Mode: Asm -*-
+//
+// The contents of this file are subject to the Netscape Public
@@ -324,7 +328,8 @@
+// Copyright (C) 1999 Netscape Communications Corporation. All
+// Rights Reserved.
+//
-+// Contributor(s):
++// 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)
@@ -359,7 +364,7 @@
+.SharedStub:
+ mflr r0
+
-+ std r4, -56(r1)
++ std r4, -56(r1) // Save all GPRS
+ std r5, -48(r1)
+ std r6, -40(r1)
+ std r7, -32(r1)
@@ -367,7 +372,7 @@
+ std r9, -16(r1)
+ std r10, -8(r1)
+
-+ stfd f13, -64(r1)
++ stfd f13, -64(r1) // ... and FPRS
+ stfd f12, -72(r1)
+ stfd f11, -80(r1)
+ stfd f10, -88(r1)
@@ -383,21 +388,17 @@
+
+ subi r6,r1,56 // r6 --> gprData
+ subi r7,r1,160 // r7 --> fprData
-+ addi r5,r1,112 // r5 <= pointer to callers args area,
-+ // beyond r3-r10/f1-f8 mapped range
++ 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 <= methodIndex selector, passed
-+ // via r11 in the nsXPTCStubBase::StubXX() call
++ // r3 has the 'self' pointer already
+
++ mr r4,r11 // r4 is methodIndex selector, passed
++ // via r11 in the nsXPTCStubBase::StubXX() call
+
-+ bl PrepareAndDispatch // Go!
++ bl PrepareAndDispatch
+
+ ld 1,0(r1) // restore stack
+ ld r0,16(r1) // restore LR
@@ -409,7 +410,7 @@
+
+/* Magic indicating no need for an executable stack */
+.section .note.GNU-stack, "", @progbits ; .previous
-diff -uNr --exclude '*~' --exclude '*.ii' --exclude 'foo*' --exclude '*.o' --exclude '*tmp*' --exclude '*.ppc64' mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
+unchanged:
--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 1970-01-01 01:00:00.000000000 +0100
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 2006-11-21 16:59:46.000000000 +0000
@@ -0,0 +1,247 @@
More information about the fedora-cvs-commits
mailing list