forked from pool/MozillaFirefox
* mozilla-ppc64le.patch: general support
* mozilla-libffi-ppc64le.patch: libffi backport * mozilla-xpcom-ppc64le.patch: port xpcom OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=361
This commit is contained in:
parent
65e2d4d5d7
commit
89fd780e78
@ -2,9 +2,9 @@
|
||||
Thu Dec 12 21:19:54 UTC 2013 - uweigand@de.ibm.com
|
||||
|
||||
- Add support for powerpc64le-linux.
|
||||
* ppc64le-support.patch: general support
|
||||
* libffi-ppc64le.patch: libffi backport
|
||||
* xpcom-ppc64le.patch: port xpcom
|
||||
* mozilla-ppc64le.patch: general support
|
||||
* mozilla-libffi-ppc64le.patch: libffi backport
|
||||
* mozilla-xpcom-ppc64le.patch: port xpcom
|
||||
- Add build fix from mainline.
|
||||
* mozilla-bug929439.patch
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package MozillaFirefox
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# 2006-2013 Wolfgang Rosenauer
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@ -105,10 +105,10 @@ Patch10: mozilla-sle11.patch
|
||||
Patch12: mozilla-arm-disable-edsp.patch
|
||||
Patch13: mozilla-ppc.patch
|
||||
Patch14: mozilla-libproxy-compat.patch
|
||||
Patch15: libffi-ppc64le.patch
|
||||
Patch16: xpcom-ppc64le.patch
|
||||
Patch17: ppc64le-support.patch
|
||||
Patch18: mozilla-bug929439.patch
|
||||
Patch15: mozilla-bug929439.patch
|
||||
Patch16: mozilla-ppc64le.patch
|
||||
Patch17: mozilla-libffi-ppc64le.patch
|
||||
Patch18: mozilla-xpcom-ppc64le.patch
|
||||
# Firefox/browser
|
||||
Patch30: firefox-browser-css.patch
|
||||
Patch31: firefox-kde.patch
|
||||
|
File diff suppressed because it is too large
Load Diff
257
mozilla-ppc64le.patch
Normal file
257
mozilla-ppc64le.patch
Normal file
@ -0,0 +1,257 @@
|
||||
# HG changeset patch
|
||||
# Parent cad86882605788345b2791275efc6e1fa7500dbd
|
||||
# User Ulrich Weigand <uweigand@de.ibm.com>
|
||||
General PPC64 LE support
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -1079,17 +1079,17 @@ esac
|
||||
|
||||
# Only set CPU_ARCH if we recognize the value of OS_TEST
|
||||
|
||||
case "$OS_TEST" in
|
||||
*86 | i86pc)
|
||||
CPU_ARCH=x86
|
||||
;;
|
||||
|
||||
-powerpc64 | ppc64)
|
||||
+powerpc64 | ppc64 | powerpc64le | ppc64le)
|
||||
CPU_ARCH=ppc64
|
||||
;;
|
||||
|
||||
powerpc | ppc | rs6000)
|
||||
CPU_ARCH=ppc
|
||||
;;
|
||||
|
||||
Alpha | alpha | ALPHA)
|
||||
diff --git a/js/src/assembler/wtf/Platform.h b/js/src/assembler/wtf/Platform.h
|
||||
--- a/js/src/assembler/wtf/Platform.h
|
||||
+++ b/js/src/assembler/wtf/Platform.h
|
||||
@@ -160,26 +160,32 @@
|
||||
/* WTF_CPU_PPC - PowerPC 32-bit */
|
||||
#if defined(__ppc__) \
|
||||
|| defined(__PPC__) \
|
||||
|| defined(__powerpc__) \
|
||||
|| defined(__powerpc) \
|
||||
|| defined(__POWERPC__) \
|
||||
|| defined(_M_PPC) \
|
||||
|| defined(__PPC)
|
||||
+#if !defined(__ppc64__) && !defined(__PPC64__)
|
||||
#define WTF_CPU_PPC 1
|
||||
+#endif
|
||||
+#if !defined(__LITTLE_ENDIAN__)
|
||||
#define WTF_CPU_BIG_ENDIAN 1
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* WTF_CPU_PPC64 - PowerPC 64-bit */
|
||||
#if defined(__ppc64__) \
|
||||
|| defined(__PPC64__)
|
||||
#define WTF_CPU_PPC64 1
|
||||
+#if !defined(__LITTLE_ENDIAN__)
|
||||
#define WTF_CPU_BIG_ENDIAN 1
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* WTF_CPU_SH4 - SuperH SH-4 */
|
||||
#if defined(__SH4__)
|
||||
#define WTF_CPU_SH4 1
|
||||
#endif
|
||||
|
||||
/* WTF_CPU_SPARC32 - SPARC 32-bit */
|
||||
#if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
|
||||
diff --git a/js/src/configure.in b/js/src/configure.in
|
||||
--- a/js/src/configure.in
|
||||
+++ b/js/src/configure.in
|
||||
@@ -910,17 +910,17 @@ esac
|
||||
|
||||
# Only set CPU_ARCH if we recognize the value of OS_TEST
|
||||
|
||||
case "$OS_TEST" in
|
||||
*86 | i86pc)
|
||||
CPU_ARCH=x86
|
||||
;;
|
||||
|
||||
-powerpc64 | ppc64)
|
||||
+powerpc64 | ppc64 | powerpc64le | ppc64le)
|
||||
CPU_ARCH=ppc64
|
||||
;;
|
||||
|
||||
powerpc | ppc | rs6000)
|
||||
CPU_ARCH=ppc
|
||||
;;
|
||||
|
||||
Alpha | alpha | ALPHA)
|
||||
diff --git a/js/src/jscpucfg.h b/js/src/jscpucfg.h
|
||||
--- a/js/src/jscpucfg.h
|
||||
+++ b/js/src/jscpucfg.h
|
||||
@@ -26,17 +26,17 @@
|
||||
# define HAVE_VA_LIST_AS_ARRAY 1
|
||||
# endif
|
||||
|
||||
# define IS_LITTLE_ENDIAN 1
|
||||
# undef IS_BIG_ENDIAN
|
||||
# define JS_BYTES_PER_WORD 4
|
||||
# define JS_BITS_PER_WORD_LOG2 5
|
||||
|
||||
-#elif defined(__APPLE__)
|
||||
+#elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__)
|
||||
# if __LITTLE_ENDIAN__
|
||||
# define IS_LITTLE_ENDIAN 1
|
||||
# undef IS_BIG_ENDIAN
|
||||
# elif __BIG_ENDIAN__
|
||||
# undef IS_LITTLE_ENDIAN
|
||||
# define IS_BIG_ENDIAN 1
|
||||
# endif
|
||||
|
||||
@@ -88,18 +88,17 @@
|
||||
# if defined(_STACK_GROWS_UPWARD)
|
||||
# define JS_STACK_GROWTH_DIRECTION (1)
|
||||
# elif defined(_STACK_GROWS_DOWNWARD)
|
||||
# define JS_STACK_GROWTH_DIRECTION (-1)
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#elif defined(__sparc) || defined(__sparc__) || \
|
||||
- defined(_POWER) || defined(__powerpc__) || \
|
||||
- defined(__ppc__) || defined(__hppa) || \
|
||||
+ defined(_POWER) || defined(__hppa) || \
|
||||
defined(_MIPSEB) || defined(_BIG_ENDIAN)
|
||||
/* IA64 running HP-UX will have _BIG_ENDIAN defined.
|
||||
* IA64 running Linux will have endian.h and be handled above.
|
||||
*/
|
||||
# undef IS_LITTLE_ENDIAN
|
||||
# define IS_BIG_ENDIAN 1
|
||||
|
||||
#else /* !defined(__sparc) && !defined(__sparc__) && ... */
|
||||
diff --git a/media/webrtc/trunk/webrtc/typedefs.h b/media/webrtc/trunk/webrtc/typedefs.h
|
||||
--- a/media/webrtc/trunk/webrtc/typedefs.h
|
||||
+++ b/media/webrtc/trunk/webrtc/typedefs.h
|
||||
@@ -47,23 +47,33 @@
|
||||
//#define WEBRTC_ARCH_ARM_FAMILY
|
||||
//#define WEBRTC_ARCH_ARMEL
|
||||
#define WEBRTC_ARCH_32_BITS
|
||||
#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
#define WEBRTC_LITTLE_ENDIAN
|
||||
#elif defined(__powerpc64__)
|
||||
#define WEBRTC_ARCH_PPC64 1
|
||||
#define WEBRTC_ARCH_64_BITS 1
|
||||
+#ifdef __LITTLE_ENDIAN__
|
||||
+#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+#define WEBRTC_LITTLE_ENDIAN
|
||||
+#else
|
||||
#define WEBRTC_ARCH_BIG_ENDIAN
|
||||
#define WEBRTC_BIG_ENDIAN
|
||||
+#endif
|
||||
#elif defined(__ppc__) || defined(__powerpc__)
|
||||
#define WEBRTC_ARCH_PPC 1
|
||||
#define WEBRTC_ARCH_32_BITS 1
|
||||
+#ifdef __LITTLE_ENDIAN__
|
||||
+#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+#define WEBRTC_LITTLE_ENDIAN
|
||||
+#else
|
||||
#define WEBRTC_ARCH_BIG_ENDIAN
|
||||
#define WEBRTC_BIG_ENDIAN
|
||||
+#endif
|
||||
#elif defined(__sparc64__)
|
||||
#define WEBRTC_ARCH_SPARC 1
|
||||
#define WEBRTC_ARCH_64_BITS 1
|
||||
#define WEBRTC_ARCH_BIG_ENDIAN
|
||||
#define WEBRTC_BIG_ENDIAN
|
||||
#elif defined(__sparc__)
|
||||
#define WEBRTC_ARCH_SPARC 1
|
||||
#define WEBRTC_ARCH_32_BITS 1
|
||||
diff --git a/mfbt/Endian.h b/mfbt/Endian.h
|
||||
--- a/mfbt/Endian.h
|
||||
+++ b/mfbt/Endian.h
|
||||
@@ -86,17 +86,17 @@
|
||||
# error "CPU type is unknown"
|
||||
# endif
|
||||
#elif defined(_WIN32)
|
||||
# if defined(_M_IX86)
|
||||
# define MOZ_LITTLE_ENDIAN 1
|
||||
# else
|
||||
# error "CPU type is unknown"
|
||||
# endif
|
||||
-#elif defined(__APPLE__)
|
||||
+#elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__)
|
||||
# if __LITTLE_ENDIAN__
|
||||
# define MOZ_LITTLE_ENDIAN 1
|
||||
# elif __BIG_ENDIAN__
|
||||
# define MOZ_BIG_ENDIAN 1
|
||||
# endif
|
||||
#elif defined(__GNUC__) && \
|
||||
defined(__BYTE_ORDER__) && \
|
||||
defined(__ORDER_LITTLE_ENDIAN__) && \
|
||||
@@ -114,18 +114,17 @@
|
||||
# endif
|
||||
/*
|
||||
* We can't include useful headers like <endian.h> or <sys/isa_defs.h>
|
||||
* here because they're not present on all platforms. Instead we have
|
||||
* this big conditional that ideally will catch all the interesting
|
||||
* cases.
|
||||
*/
|
||||
#elif defined(__sparc) || defined(__sparc__) || \
|
||||
- defined(_POWER) || defined(__powerpc__) || \
|
||||
- defined(__ppc__) || defined(__hppa) || \
|
||||
+ defined(_POWER) || defined(__hppa) || \
|
||||
defined(_MIPSEB) || defined(__ARMEB__) || \
|
||||
defined(__s390__) || \
|
||||
(defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
|
||||
(defined(__ia64) && defined(__BIG_ENDIAN__))
|
||||
# define MOZ_BIG_ENDIAN 1
|
||||
#elif defined(__i386) || defined(__i386__) || \
|
||||
defined(__x86_64) || defined(__x86_64__) || \
|
||||
defined(_MIPSEL) || defined(__ARMEL__) || \
|
||||
diff --git a/nsprpub/pr/include/md/_linux.cfg b/nsprpub/pr/include/md/_linux.cfg
|
||||
--- a/nsprpub/pr/include/md/_linux.cfg
|
||||
+++ b/nsprpub/pr/include/md/_linux.cfg
|
||||
@@ -24,18 +24,23 @@
|
||||
#elif defined(__GNU__)
|
||||
#define PR_AF_INET6 26 /* same as AF_INET6 */
|
||||
#else
|
||||
#define PR_AF_INET6 10 /* same as AF_INET6 */
|
||||
#endif
|
||||
|
||||
#ifdef __powerpc64__
|
||||
|
||||
+#ifdef __LITTLE_ENDIAN__
|
||||
+#define IS_LITTLE_ENDIAN 1
|
||||
+#undef IS_BIG_ENDIAN
|
||||
+#else
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
+#endif
|
||||
#define IS_64
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 8
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
@@ -70,18 +75,23 @@
|
||||
#define PR_ALIGN_OF_POINTER 8
|
||||
#define PR_ALIGN_OF_WORD 8
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__powerpc__)
|
||||
|
||||
+#ifdef __LITTLE_ENDIAN__
|
||||
+#define IS_LITTLE_ENDIAN 1
|
||||
+#undef IS_BIG_ENDIAN
|
||||
+#else
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
+#endif
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
@ -1,8 +1,39 @@
|
||||
Index: mozilla/xpcom/reflect/xptcall/src/md/unix/moz.build
|
||||
===================================================================
|
||||
--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/moz.build
|
||||
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/moz.build
|
||||
@@ -198,6 +198,13 @@ if CONFIG['OS_TEST'] == 'powerpc64':
|
||||
# HG changeset patch
|
||||
# Parent eaf8cf90f24bed087b8dc3900e57dc481c62e2a8
|
||||
# User Ulrich Weigand <uweigand@de.ibm.com>
|
||||
PPC64 LE support for XPCOM
|
||||
|
||||
diff --git a/xpcom/reflect/xptcall/src/md/unix/Makefile.in b/xpcom/reflect/xptcall/src/md/unix/Makefile.in
|
||||
--- a/xpcom/reflect/xptcall/src/md/unix/Makefile.in
|
||||
+++ b/xpcom/reflect/xptcall/src/md/unix/Makefile.in
|
||||
@@ -161,17 +161,17 @@ endif
|
||||
ifneq (,$(filter Linuxpowerpc FreeBSDpowerpc,$(OS_ARCH)$(OS_TEST)))
|
||||
ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
|
||||
AS := $(CC) -c -x assembler-with-cpp
|
||||
endif
|
||||
|
||||
#
|
||||
# Linux/PPC64
|
||||
#
|
||||
-ifneq (,$(filter Linuxpowerpc64 FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST)))
|
||||
+ifneq (,$(filter Linuxpowerpc64 Linuxpowerpc64le FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST)))
|
||||
ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
|
||||
AS := $(CC) -c -x assembler-with-cpp
|
||||
endif
|
||||
|
||||
#
|
||||
# NetBSD/PPC
|
||||
#
|
||||
ifneq (,$(filter NetBSDmacppc NetBSDbebox NetBSDofppc NetBSDprep NetBSDamigappc,$(OS_ARCH)$(OS_TEST)))
|
||||
diff --git a/xpcom/reflect/xptcall/src/md/unix/moz.build b/xpcom/reflect/xptcall/src/md/unix/moz.build
|
||||
--- a/xpcom/reflect/xptcall/src/md/unix/moz.build
|
||||
+++ b/xpcom/reflect/xptcall/src/md/unix/moz.build
|
||||
@@ -193,16 +193,23 @@ if CONFIG['OS_TEST'] == 'powerpc':
|
||||
|
||||
if CONFIG['OS_TEST'] == 'powerpc64':
|
||||
if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'):
|
||||
CPP_SOURCES += [
|
||||
'xptcinvoke_ppc64_linux.cpp',
|
||||
'xptcstubs_ppc64_linux.cpp',
|
||||
]
|
||||
|
||||
@ -16,24 +47,20 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/moz.build
|
||||
if CONFIG['OS_TEST'] in ('macppc', 'bebox', 'ofppc', 'prep', 'amigappc'):
|
||||
if CONFIG['OS_ARCH'] == 'NetBSD':
|
||||
CPP_SOURCES += [
|
||||
Index: mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
|
||||
===================================================================
|
||||
--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in
|
||||
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
|
||||
@@ -166,7 +166,7 @@ endif
|
||||
#
|
||||
# Linux/PPC64
|
||||
#
|
||||
-ifneq (,$(filter Linuxpowerpc64 FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST)))
|
||||
+ifneq (,$(filter Linuxpowerpc64 Linuxpowerpc64le FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST)))
|
||||
ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
|
||||
AS := $(CC) -c -x assembler-with-cpp
|
||||
endif
|
||||
Index: 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
|
||||
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
|
||||
@@ -17,12 +17,29 @@
|
||||
'xptcinvoke_ppc_netbsd.cpp',
|
||||
'xptcstubs_ppc_netbsd.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'powerpc':
|
||||
diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
|
||||
--- a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
|
||||
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
|
||||
@@ -12,33 +12,51 @@
|
||||
.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
|
||||
.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
|
||||
.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
|
||||
.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
|
||||
.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
|
||||
.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
|
||||
.set f30,30; .set f31,31
|
||||
|
||||
@ -63,7 +90,11 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
|
||||
.section ".toc","aw"
|
||||
.section ".text"
|
||||
.align 2
|
||||
@@ -34,6 +51,7 @@ NS_InvokeByIndex:
|
||||
.globl NS_InvokeByIndex
|
||||
.section ".opd","aw"
|
||||
.align 3
|
||||
NS_InvokeByIndex:
|
||||
.quad .NS_InvokeByIndex,.TOC.@tocbase
|
||||
.previous
|
||||
.type NS_InvokeByIndex,@function
|
||||
.NS_InvokeByIndex:
|
||||
@ -71,7 +102,17 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
|
||||
mflr 0
|
||||
std 0,16(r1)
|
||||
|
||||
@@ -56,7 +74,7 @@ NS_InvokeByIndex:
|
||||
std r29,-24(r1)
|
||||
std r30,-16(r1)
|
||||
std r31,-8(r1)
|
||||
|
||||
mr r29,r3 # Save 'that' in r29
|
||||
@@ -51,51 +69,55 @@ NS_InvokeByIndex:
|
||||
# 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)
|
||||
|
||||
# +stack frame, -unused stack params, +regs storage, +1 for alignment
|
||||
@ -80,7 +121,15 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
|
||||
rldicr r7,r7,3,59 # multiply by 8 and mask with ~15
|
||||
neg r7,r7
|
||||
stdux r1,r1,r7
|
||||
@@ -72,7 +90,7 @@ NS_InvokeByIndex:
|
||||
|
||||
|
||||
# Call invoke_copy_to_stack(uint64_t* gpregs, double* fpregs,
|
||||
# uint32_t paramCount, nsXPTCVariant* s,
|
||||
# uint64_t* d))
|
||||
|
||||
# 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
|
||||
|
||||
subi r3,r31,(23*8) # r3 --> GPRS
|
||||
subi r4,r31,(16*8) # r4 --> FPRS
|
||||
@ -89,7 +138,10 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
|
||||
bl invoke_copy_to_stack
|
||||
nop
|
||||
|
||||
@@ -83,14 +101,18 @@ NS_InvokeByIndex:
|
||||
# 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
|
||||
@ -113,7 +165,17 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
|
||||
|
||||
# Load FP and GP registers as required
|
||||
ld r4, -(23*8)(r31)
|
||||
@@ -117,7 +139,7 @@ NS_InvokeByIndex:
|
||||
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)
|
||||
@@ -112,21 +134,25 @@ NS_InvokeByIndex:
|
||||
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
|
||||
|
||||
@ -122,7 +184,8 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
|
||||
ld r1,0(r1) # Revert stack frame
|
||||
ld 0,16(r1) # Reload lr
|
||||
ld 29,-24(r1) # Restore NVGPRS
|
||||
@@ -126,7 +148,11 @@ NS_InvokeByIndex:
|
||||
ld 30,-16(r1)
|
||||
ld 31,-8(r1)
|
||||
mtlr 0
|
||||
blr
|
||||
|
||||
@ -134,11 +197,15 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
|
||||
|
||||
# Magic indicating no need for an executable stack
|
||||
.section .note.GNU-stack, "", @progbits ; .previous
|
||||
Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp
|
||||
===================================================================
|
||||
--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp
|
||||
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp
|
||||
@@ -74,7 +74,9 @@ invoke_copy_to_stack(uint64_t* gpregs,
|
||||
diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp
|
||||
--- a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp
|
||||
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp
|
||||
@@ -69,17 +69,19 @@ invoke_copy_to_stack(uint64_t* gpregs,
|
||||
else
|
||||
*(double *)d = s->val.d;
|
||||
}
|
||||
else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
|
||||
if (i < FPR_COUNT) {
|
||||
fpregs[i] = s->val.f; // if passed in registers, floats are promoted to doubles
|
||||
} else {
|
||||
float *p = (float *)d;
|
||||
@ -148,11 +215,20 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp
|
||||
*p = s->val.f;
|
||||
}
|
||||
}
|
||||
Index: 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
|
||||
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
|
||||
@@ -17,6 +17,27 @@
|
||||
else {
|
||||
if (i < GPR_COUNT)
|
||||
gpregs[i] = tempu64;
|
||||
else
|
||||
*d = tempu64;
|
||||
diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
|
||||
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
|
||||
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
|
||||
@@ -12,28 +12,50 @@
|
||||
.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
|
||||
.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
|
||||
.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
|
||||
.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
|
||||
.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
|
||||
.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
|
||||
.set f30,30; .set f31,31
|
||||
|
||||
@ -180,7 +256,12 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
|
||||
.section ".text"
|
||||
.align 2
|
||||
.globl SharedStub
|
||||
@@ -29,6 +50,7 @@ SharedStub:
|
||||
.section ".opd","aw"
|
||||
.align 3
|
||||
|
||||
SharedStub:
|
||||
.quad .SharedStub,.TOC.@tocbase
|
||||
.previous
|
||||
.type SharedStub,@function
|
||||
|
||||
.SharedStub:
|
||||
@ -188,7 +269,17 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
|
||||
mflr r0
|
||||
|
||||
std r4, -56(r1) # Save all GPRS
|
||||
@@ -55,7 +77,7 @@ SharedStub:
|
||||
std r5, -48(r1)
|
||||
std r6, -40(r1)
|
||||
std r7, -32(r1)
|
||||
std r8, -24(r1)
|
||||
std r9, -16(r1)
|
||||
@@ -50,17 +72,17 @@ SharedStub:
|
||||
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
|
||||
@ -197,7 +288,17 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
|
||||
|
||||
std r0, 16(r1)
|
||||
|
||||
@@ -75,7 +97,11 @@ SharedStub:
|
||||
stdu r1,-288(r1)
|
||||
# r3 has the 'self' pointer
|
||||
# already
|
||||
|
||||
mr r4,r11 # r4 is methodIndex selector,
|
||||
@@ -70,12 +92,16 @@ SharedStub:
|
||||
bl PrepareAndDispatch
|
||||
nop
|
||||
|
||||
ld 1,0(r1) # restore stack
|
||||
ld r0,16(r1) # restore LR
|
||||
mtlr r0
|
||||
blr
|
||||
|
||||
@ -209,11 +310,15 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
|
||||
|
||||
# Magic indicating no need for an executable stack
|
||||
.section .note.GNU-stack, "", @progbits ; .previous
|
||||
Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
|
||||
===================================================================
|
||||
--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
|
||||
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
|
||||
@@ -83,7 +83,9 @@ PrepareAndDispatch(nsXPTCStubBase* self,
|
||||
diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
|
||||
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
|
||||
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
|
||||
@@ -78,17 +78,19 @@ PrepareAndDispatch(nsXPTCStubBase* self,
|
||||
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;
|
||||
@ -223,7 +328,17 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
|
||||
dp->val.f = *p;
|
||||
}
|
||||
} else { /* integer type or pointer */
|
||||
@@ -153,6 +155,43 @@ PrepareAndDispatch(nsXPTCStubBase* self,
|
||||
if (i < GPR_COUNT)
|
||||
tempu64 = gprData[i];
|
||||
else
|
||||
tempu64 = *ap;
|
||||
|
||||
@@ -148,16 +150,53 @@ PrepareAndDispatch(nsXPTCStubBase* self,
|
||||
// Create names would be like:
|
||||
// _ZN14nsXPTCStubBase5Stub1Ev
|
||||
// _ZN14nsXPTCStubBase6Stub12Ev
|
||||
// _ZN14nsXPTCStubBase7Stub123Ev
|
||||
// _ZN14nsXPTCStubBase8Stub1234Ev
|
||||
// etc.
|
||||
// Use assembler directives to get the names right...
|
||||
|
||||
@ -267,7 +382,17 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
|
||||
# define STUB_ENTRY(n) \
|
||||
__asm__ ( \
|
||||
".section \".toc\",\"aw\" \n\t" \
|
||||
@@ -195,6 +234,7 @@ __asm__ (
|
||||
".section \".text\" \n\t" \
|
||||
".align 2 \n\t" \
|
||||
".if "#n" < 10 \n\t" \
|
||||
".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
|
||||
".section \".opd\",\"aw\" \n\t" \
|
||||
@@ -190,16 +229,17 @@ PrepareAndDispatch(nsXPTCStubBase* self,
|
||||
\
|
||||
".else \n\t" \
|
||||
".err \"stub number "#n" >= 1000 not yet supported\"\n" \
|
||||
".endif \n\t" \
|
||||
\
|
||||
"li 11,"#n" \n\t" \
|
||||
"b SharedStub \n" \
|
||||
);
|
||||
@ -275,3 +400,8 @@ Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
|
||||
|
||||
#define SENTINEL_ENTRY(n) \
|
||||
nsresult nsXPTCStubBase::Sentinel##n() \
|
||||
{ \
|
||||
NS_ERROR("nsXPTCStubBase::Sentinel called"); \
|
||||
return NS_ERROR_NOT_IMPLEMENTED; \
|
||||
}
|
||||
|
@ -1,159 +0,0 @@
|
||||
Index: mozilla/configure.in
|
||||
===================================================================
|
||||
--- mozilla.orig/configure.in
|
||||
+++ mozilla/configure.in
|
||||
@@ -1084,7 +1084,7 @@ case "$OS_TEST" in
|
||||
CPU_ARCH=x86
|
||||
;;
|
||||
|
||||
-powerpc64 | ppc64)
|
||||
+powerpc64 | ppc64 | powerpc64le | ppc64le)
|
||||
CPU_ARCH=ppc64
|
||||
;;
|
||||
|
||||
Index: mozilla/js/src/configure.in
|
||||
===================================================================
|
||||
--- mozilla.orig/js/src/configure.in
|
||||
+++ mozilla/js/src/configure.in
|
||||
@@ -915,7 +915,7 @@ case "$OS_TEST" in
|
||||
CPU_ARCH=x86
|
||||
;;
|
||||
|
||||
-powerpc64 | ppc64)
|
||||
+powerpc64 | ppc64 | powerpc64le | ppc64le)
|
||||
CPU_ARCH=ppc64
|
||||
;;
|
||||
|
||||
Index: mozilla/mfbt/Endian.h
|
||||
===================================================================
|
||||
--- mozilla.orig/mfbt/Endian.h
|
||||
+++ mozilla/mfbt/Endian.h
|
||||
@@ -91,7 +91,7 @@
|
||||
# else
|
||||
# error "CPU type is unknown"
|
||||
# endif
|
||||
-#elif defined(__APPLE__)
|
||||
+#elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__)
|
||||
# if __LITTLE_ENDIAN__
|
||||
# define MOZ_LITTLE_ENDIAN 1
|
||||
# elif __BIG_ENDIAN__
|
||||
@@ -119,8 +119,7 @@
|
||||
* cases.
|
||||
*/
|
||||
#elif defined(__sparc) || defined(__sparc__) || \
|
||||
- defined(_POWER) || defined(__powerpc__) || \
|
||||
- defined(__ppc__) || defined(__hppa) || \
|
||||
+ defined(_POWER) || defined(__hppa) || \
|
||||
defined(_MIPSEB) || defined(__ARMEB__) || \
|
||||
defined(__s390__) || \
|
||||
(defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
|
||||
Index: mozilla/js/src/jscpucfg.h
|
||||
===================================================================
|
||||
--- mozilla.orig/js/src/jscpucfg.h
|
||||
+++ mozilla/js/src/jscpucfg.h
|
||||
@@ -31,7 +31,7 @@
|
||||
# define JS_BYTES_PER_WORD 4
|
||||
# define JS_BITS_PER_WORD_LOG2 5
|
||||
|
||||
-#elif defined(__APPLE__)
|
||||
+#elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__)
|
||||
# if __LITTLE_ENDIAN__
|
||||
# define IS_LITTLE_ENDIAN 1
|
||||
# undef IS_BIG_ENDIAN
|
||||
@@ -93,8 +93,7 @@
|
||||
# endif
|
||||
|
||||
#elif defined(__sparc) || defined(__sparc__) || \
|
||||
- defined(_POWER) || defined(__powerpc__) || \
|
||||
- defined(__ppc__) || defined(__hppa) || \
|
||||
+ defined(_POWER) || defined(__hppa) || \
|
||||
defined(_MIPSEB) || defined(_BIG_ENDIAN)
|
||||
/* IA64 running HP-UX will have _BIG_ENDIAN defined.
|
||||
* IA64 running Linux will have endian.h and be handled above.
|
||||
Index: mozilla/js/src/assembler/wtf/Platform.h
|
||||
===================================================================
|
||||
--- mozilla.orig/js/src/assembler/wtf/Platform.h
|
||||
+++ mozilla/js/src/assembler/wtf/Platform.h
|
||||
@@ -165,16 +165,22 @@
|
||||
|| defined(__POWERPC__) \
|
||||
|| defined(_M_PPC) \
|
||||
|| defined(__PPC)
|
||||
+#if !defined(__ppc64__) && !defined(__PPC64__)
|
||||
#define WTF_CPU_PPC 1
|
||||
+#endif
|
||||
+#if !defined(__LITTLE_ENDIAN__)
|
||||
#define WTF_CPU_BIG_ENDIAN 1
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* WTF_CPU_PPC64 - PowerPC 64-bit */
|
||||
#if defined(__ppc64__) \
|
||||
|| defined(__PPC64__)
|
||||
#define WTF_CPU_PPC64 1
|
||||
+#if !defined(__LITTLE_ENDIAN__)
|
||||
#define WTF_CPU_BIG_ENDIAN 1
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* WTF_CPU_SH4 - SuperH SH-4 */
|
||||
#if defined(__SH4__)
|
||||
Index: mozilla/nsprpub/pr/include/md/_linux.cfg
|
||||
===================================================================
|
||||
--- mozilla.orig/nsprpub/pr/include/md/_linux.cfg
|
||||
+++ mozilla/nsprpub/pr/include/md/_linux.cfg
|
||||
@@ -29,8 +29,13 @@
|
||||
|
||||
#ifdef __powerpc64__
|
||||
|
||||
+#ifdef __LITTLE_ENDIAN__
|
||||
+#define IS_LITTLE_ENDIAN 1
|
||||
+#undef IS_BIG_ENDIAN
|
||||
+#else
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
+#endif
|
||||
#define IS_64
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
@@ -75,8 +80,13 @@
|
||||
|
||||
#elif defined(__powerpc__)
|
||||
|
||||
+#ifdef __LITTLE_ENDIAN__
|
||||
+#define IS_LITTLE_ENDIAN 1
|
||||
+#undef IS_BIG_ENDIAN
|
||||
+#else
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
+#endif
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
Index: mozilla/media/webrtc/trunk/webrtc/typedefs.h
|
||||
===================================================================
|
||||
--- mozilla.orig/media/webrtc/trunk/webrtc/typedefs.h
|
||||
+++ mozilla/media/webrtc/trunk/webrtc/typedefs.h
|
||||
@@ -52,13 +52,23 @@
|
||||
#elif defined(__powerpc64__)
|
||||
#define WEBRTC_ARCH_PPC64 1
|
||||
#define WEBRTC_ARCH_64_BITS 1
|
||||
+#ifdef __LITTLE_ENDIAN__
|
||||
+#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+#define WEBRTC_LITTLE_ENDIAN
|
||||
+#else
|
||||
#define WEBRTC_ARCH_BIG_ENDIAN
|
||||
#define WEBRTC_BIG_ENDIAN
|
||||
+#endif
|
||||
#elif defined(__ppc__) || defined(__powerpc__)
|
||||
#define WEBRTC_ARCH_PPC 1
|
||||
#define WEBRTC_ARCH_32_BITS 1
|
||||
+#ifdef __LITTLE_ENDIAN__
|
||||
+#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+#define WEBRTC_LITTLE_ENDIAN
|
||||
+#else
|
||||
#define WEBRTC_ARCH_BIG_ENDIAN
|
||||
#define WEBRTC_BIG_ENDIAN
|
||||
+#endif
|
||||
#elif defined(__sparc64__)
|
||||
#define WEBRTC_ARCH_SPARC 1
|
||||
#define WEBRTC_ARCH_64_BITS 1
|
Loading…
Reference in New Issue
Block a user