thunderbird: also add ppc64 xptcall patch
This commit is contained in:
parent
03662a248a
commit
273b9e8e87
1 changed files with 63 additions and 0 deletions
63
srcpkgs/thunderbird/patches/ff85-ppc64-xptcall.patch
Normal file
63
srcpkgs/thunderbird/patches/ff85-ppc64-xptcall.patch
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc64_linux.cpp b/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc64_linux.cpp
|
||||||
|
--- xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc64_linux.cpp
|
||||||
|
+++ xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc64_linux.cpp
|
||||||
|
@@ -91,7 +91,13 @@
|
||||||
|
if (!s->IsIndirect() && s->type == nsXPTType::T_DOUBLE) {
|
||||||
|
if (nr_fpr < FPR_COUNT) {
|
||||||
|
fpregs[nr_fpr++] = s->val.d;
|
||||||
|
- nr_gpr++;
|
||||||
|
+ // Even if we have enough FPRs, still skip space in
|
||||||
|
+ // the parameter area if we ran out of placeholder GPRs.
|
||||||
|
+ if (nr_gpr < GPR_COUNT) {
|
||||||
|
+ nr_gpr++;
|
||||||
|
+ } else {
|
||||||
|
+ d++;
|
||||||
|
+ }
|
||||||
|
} else {
|
||||||
|
*((double *)d) = s->val.d;
|
||||||
|
d++;
|
||||||
|
@@ -101,7 +107,11 @@
|
||||||
|
if (nr_fpr < FPR_COUNT) {
|
||||||
|
// Single-precision floats are passed in FPRs too.
|
||||||
|
fpregs[nr_fpr++] = s->val.f;
|
||||||
|
- nr_gpr++;
|
||||||
|
+ if (nr_gpr < GPR_COUNT) {
|
||||||
|
+ nr_gpr++;
|
||||||
|
+ } else {
|
||||||
|
+ d++;
|
||||||
|
+ }
|
||||||
|
} else {
|
||||||
|
#ifdef __LITTLE_ENDIAN__
|
||||||
|
*((float *)d) = s->val.f;
|
||||||
|
diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc64_linux.cpp b/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc64_linux.cpp
|
||||||
|
--- xpcom/reflect/xptcall/md/unix/xptcstubs_ppc64_linux.cpp
|
||||||
|
+++ xpcom/reflect/xptcall/md/unix/xptcstubs_ppc64_linux.cpp
|
||||||
|
@@ -103,7 +103,13 @@
|
||||||
|
if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
|
||||||
|
if (nr_fpr < FPR_COUNT) {
|
||||||
|
dp->val.d = fpregs[nr_fpr++];
|
||||||
|
- nr_gpr++;
|
||||||
|
+ // Even if we have enough FPRs, still skip space in
|
||||||
|
+ // the parameter area if we ran out of placeholder GPRs.
|
||||||
|
+ if (nr_gpr < GPR_COUNT) {
|
||||||
|
+ nr_gpr++;
|
||||||
|
+ } else {
|
||||||
|
+ ap++;
|
||||||
|
+ }
|
||||||
|
} else {
|
||||||
|
dp->val.d = *(double*)ap++;
|
||||||
|
}
|
||||||
|
@@ -113,7 +119,11 @@
|
||||||
|
if (nr_fpr < FPR_COUNT) {
|
||||||
|
// Single-precision floats are passed in FPRs too.
|
||||||
|
dp->val.f = (float)fpregs[nr_fpr++];
|
||||||
|
- nr_gpr++;
|
||||||
|
+ if (nr_gpr < GPR_COUNT) {
|
||||||
|
+ nr_gpr++;
|
||||||
|
+ } else {
|
||||||
|
+ ap++;
|
||||||
|
+ }
|
||||||
|
} else {
|
||||||
|
#ifdef __LITTLE_ENDIAN__
|
||||||
|
dp->val.f = *(float*)ap++;
|
||||||
|
|
Loading…
Reference in a new issue