Bug 1513725 - fix xptcall stubs for aarch64 for bool params, r=froydnj
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 22 Jan 2019 16:36:34 +0000
changeset 514847 b4f6235387606ef6fbf72556f25e46b20816903f
parent 514846 3ce0400d75993b11d6ec68239c5d3416ffe57997
child 514848 099f631b90046b102aa1868455f03b7f9942eaba
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1513725
milestone66.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 1513725 - fix xptcall stubs for aarch64 for bool params, r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D17252
xpcom/reflect/xptcall/md/unix/xptcstubs_aarch64.cpp
xpcom/reflect/xptcall/md/win32/xptcstubs_aarch64.cpp
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_aarch64.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_aarch64.cpp
@@ -147,19 +147,19 @@ PrepareAndDispatch(nsXPTCStubBase* self,
                     memcpy(&dp->val.d, &fprData[next_fpr++], sizeof(dp->val.d));
                 } else {
                     memcpy(&dp->val.d, ap++, sizeof(dp->val.d));
                 }
                 break;
 
             case nsXPTType::T_BOOL:
                 if (next_gpr < PARAM_GPR_COUNT) {
-                    dp->val.b  = (bool)gprData[next_gpr++];
+                    dp->val.b  = (bool)(uint8_t)gprData[next_gpr++];
                 } else {
-                    dp->val.b  = (bool)*ap++;
+                    dp->val.b  = (bool)(uint8_t)*ap++;
                 }
                 break;
 
             case nsXPTType::T_CHAR:
                 if (next_gpr < PARAM_GPR_COUNT) {
                     dp->val.c  = (char)gprData[next_gpr++];
                 } else {
                     dp->val.c  = (char)*ap++;
--- a/xpcom/reflect/xptcall/md/win32/xptcstubs_aarch64.cpp
+++ b/xpcom/reflect/xptcall/md/win32/xptcstubs_aarch64.cpp
@@ -145,19 +145,19 @@ PrepareAndDispatch(nsXPTCStubBase* self,
                     memcpy(&dp->val.d, &fprData[next_fpr++], sizeof(dp->val.d));
                 } else {
                     memcpy(&dp->val.d, ap++, sizeof(dp->val.d));
                 }
                 break;
 
             case nsXPTType::T_BOOL:
                 if (next_gpr < PARAM_GPR_COUNT) {
-                    dp->val.b  = (bool)gprData[next_gpr++];
+                    dp->val.b  = (bool)(uint8_t)gprData[next_gpr++];
                 } else {
-                    dp->val.b  = (bool)*ap++;
+                    dp->val.b  = (bool)(uint8_t)*ap++;
                 }
                 break;
 
             case nsXPTType::T_CHAR:
                 if (next_gpr < PARAM_GPR_COUNT) {
                     dp->val.c  = (char)gprData[next_gpr++];
                 } else {
                     dp->val.c  = (char)*ap++;