64 lines
2.5 KiB
Diff
64 lines
2.5 KiB
Diff
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++;
|
|
|