Bug 652571 - xptstubs on unix x86_64 does not pass float correctly. r=espindola
authorMook <marky+mozhg@activestate.com>
Fri, 23 Sep 2011 14:50:26 -0700
changeset 78764 cba5d081f15dd48082f17a9de987f43284432cfd
parent 78750 4297a90d3beab95f18357ebb281fe21c1a0d9ae6
child 78765 c311fa8314f79aac79701f7a5fa7cbbe016c7a69
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersespindola
bugs652571
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 652571 - xptstubs on unix x86_64 does not pass float correctly. r=espindola
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_darwin.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_solaris.cpp
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_darwin.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_darwin.cpp
@@ -109,17 +109,17 @@ PrepareAndDispatch(nsXPTCStubBase * self
                 dp->val.d = *(double*) ap++;
             continue;
         }
         else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
             if (nr_fpr < FPR_COUNT)
                 // The value in %xmm register is already prepared to
                 // be retrieved as a float. Therefore, we pass the
                 // value verbatim, as a double without conversion.
-                dp->val.d = *(double*) ap++;
+                dp->val.d = fpregs[nr_fpr++];
             else
                 dp->val.f = *(float*) ap++;
             continue;
         }
         else {
             if (nr_gpr < GPR_COUNT)
                 value = gpregs[nr_gpr++];
             else
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
@@ -109,17 +109,17 @@ PrepareAndDispatch(nsXPTCStubBase * self
                 dp->val.d = *(double*) ap++;
             continue;
         }
         else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
             if (nr_fpr < FPR_COUNT)
                 // The value in %xmm register is already prepared to
                 // be retrieved as a float. Therefore, we pass the
                 // value verbatim, as a double without conversion.
-                dp->val.d = *(double*) ap++;
+                dp->val.d = fpregs[nr_fpr++];
             else
                 dp->val.f = *(float*) ap++;
             continue;
         }
         else {
             if (nr_gpr < GPR_COUNT)
                 value = gpregs[nr_gpr++];
             else
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_solaris.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_solaris.cpp
@@ -109,17 +109,17 @@ PrepareAndDispatch(nsXPTCStubBase * self
                 dp->val.d = *(double*) ap++;
             continue;
         }
         else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
             if (nr_fpr < FPR_COUNT)
                 // The value in %xmm register is already prepared to
                 // be retrieved as a float. Therefore, we pass the
                 // value verbatim, as a double without conversion.
-                dp->val.d = *(double*) ap++;
+                dp->val.d = fpregs[nr_fpr++];
             else
                 dp->val.f = *(float*) ap++;
             continue;
         }
         else {
             if (nr_gpr < GPR_COUNT)
                 value = gpregs[nr_gpr++];
             else