mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1899286 - Remove legacy AIX and HP-UX support r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D211846
This commit is contained in:
parent
28c259722c
commit
0962f14cfd
@ -285,13 +285,7 @@ fi
|
||||
if [ -n "$LD_LIBRARY_PATH_64" ]; then
|
||||
LD_LIBRARY_PATH_64=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH_64:+":$LD_LIBRARY_PATH_64"}
|
||||
fi
|
||||
#
|
||||
#
|
||||
## Set SHLIB_PATH for HPUX
|
||||
SHLIB_PATH=${MOZ_DIST_BIN}:${MRE_HOME}${SHLIB_PATH:+":$SHLIB_PATH"}
|
||||
#
|
||||
## Set LIBPATH for AIX
|
||||
LIBPATH=${MOZ_DIST_BIN}:${MRE_HOME}${LIBPATH:+":$LIBPATH"}
|
||||
|
||||
#
|
||||
## Set DYLD_LIBRARY_PATH for Mac OS X (Darwin)
|
||||
DYLD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MRE_HOME}${DYLD_LIBRARY_PATH:+":$DYLD_LIBRARY_PATH"}
|
||||
|
@ -22,16 +22,7 @@ nsresult UnaryExpr::evaluate(txIEvalContext* aContext,
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
double value = exprRes->numberValue();
|
||||
#ifdef HPUX
|
||||
/*
|
||||
* Negation of a zero doesn't produce a negative
|
||||
* zero on HPUX. Perform the operation by multiplying with
|
||||
* -1.
|
||||
*/
|
||||
return aContext->recycler()->getNumberResult(-1 * value, aResult);
|
||||
#else
|
||||
return aContext->recycler()->getNumberResult(-value, aResult);
|
||||
#endif
|
||||
}
|
||||
|
||||
TX_IMPL_EXPR_STUBS_1(UnaryExpr, NODESET_RESULT, expr)
|
||||
|
@ -76,23 +76,6 @@ endif
|
||||
|
||||
CFLAGS += $(MOZ_ZLIB_CFLAGS)
|
||||
|
||||
# Silence warnings on AIX/HP-UX from non-GNU compilers
|
||||
ifndef GNU_CC
|
||||
ifeq ($(OS_ARCH),AIX)
|
||||
# Suppress warnings from xlC
|
||||
# 1540-1281: offsetof() on null non-POD types
|
||||
# 1540-1608: anonymous unions using static data members
|
||||
CFLAGS += -qsuppress=1540-1281 -qsuppress=1540-1608
|
||||
CXXFLAGS += -qsuppress=1540-1281 -qsuppress=1540-1608
|
||||
endif
|
||||
ifeq ($(OS_ARCH),HP-UX)
|
||||
# Suppress warnings from aCC
|
||||
# 3055: anonymous unions declaring types
|
||||
# 4189: offsetof() on non-POD types
|
||||
CFLAGS += +W3055,4189
|
||||
CXXFLAGS += +W3055,4189
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OS_ARCH),SunOS)
|
||||
ifeq ($(TARGET_CPU),sparc)
|
||||
|
||||
|
@ -54,7 +54,7 @@ USE_LIBS += [
|
||||
"zlib",
|
||||
]
|
||||
|
||||
if CONFIG["OS_ARCH"] not in ("WINNT", "HP-UX"):
|
||||
if CONFIG["OS_ARCH"] != "WINNT":
|
||||
OS_LIBS += [
|
||||
"m",
|
||||
]
|
||||
|
@ -50,8 +50,6 @@ if CONFIG["OS_ARCH"] == "WINNT":
|
||||
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
|
||||
DEFINES["HAVE_LRINTF"] = True
|
||||
|
||||
if CONFIG["OS_ARCH"] == "AIX":
|
||||
DEFINES["alloca"] = "__alloca"
|
||||
|
||||
if CONFIG["OS_ARCH"] == "SunOS":
|
||||
DEFINES["HAVE_ALLOCA_H"] = True
|
||||
|
@ -42,9 +42,6 @@ SOURCES += [
|
||||
|
||||
LOCAL_INCLUDES += ['lib']
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'AIX':
|
||||
DEFINES['alloca'] = '__alloca'
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'SunOS':
|
||||
DEFINES['HAVE_ALLOCA_H'] = True
|
||||
|
||||
|
@ -139,7 +139,6 @@ class nsStandardURL : public nsIFileURL,
|
||||
static void InitGlobalObjects();
|
||||
static void ShutdownGlobalObjects();
|
||||
|
||||
public: /* internal -- HPUX compiler can't handle this being private */
|
||||
//
|
||||
// location and length of an url segment relative to mSpec
|
||||
//
|
||||
@ -171,6 +170,7 @@ class nsStandardURL : public nsIFileURL,
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
//
|
||||
// URL segment encoder : performs charset conversion and URL escaping.
|
||||
//
|
||||
|
@ -93,10 +93,6 @@ void LogTerm();
|
||||
# error need_to_define_your_file_path_separator_and_illegal_characters
|
||||
#endif
|
||||
|
||||
#ifdef AIX
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
# ifdef PATH_MAX
|
||||
# define MAXPATHLEN PATH_MAX
|
||||
|
@ -1,256 +0,0 @@
|
||||
;+# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
;+# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
LIBRARY xpcom
|
||||
DESCRIPTION "xpcom library"
|
||||
|
||||
EXPORTS
|
||||
?Stub3@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub4@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub5@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub6@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub7@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub8@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub9@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub10@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub11@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub12@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub13@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub14@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub15@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub16@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub17@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub18@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub19@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub20@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub21@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub22@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub23@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub24@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub25@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub26@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub27@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub28@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub29@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub30@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub31@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub32@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub33@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub34@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub35@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub36@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub37@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub38@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub39@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub40@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub41@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub42@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub43@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub44@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub45@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub46@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub47@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub48@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub49@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub50@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub51@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub52@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub53@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub54@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub55@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub56@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub57@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub58@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub59@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub60@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub61@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub62@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub63@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub64@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub65@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub66@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub67@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub68@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub69@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub70@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub71@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub72@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub73@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub74@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub75@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub76@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub77@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub78@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub79@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub80@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub81@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub82@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub83@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub84@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub85@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub86@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub87@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub88@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub89@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub90@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub91@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub92@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub93@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub94@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub95@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub96@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub97@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub98@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub99@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub100@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub101@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub102@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub103@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub104@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub105@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub106@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub107@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub108@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub109@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub110@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub111@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub112@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub113@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub114@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub115@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub116@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub117@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub118@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub119@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub120@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub121@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub122@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub123@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub124@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub125@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub126@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub127@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub128@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub129@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub130@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub131@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub132@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub133@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub134@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub135@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub136@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub137@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub138@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub139@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub140@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub141@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub142@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub143@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub144@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub145@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub146@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub147@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub148@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub149@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub150@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub151@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub152@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub153@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub154@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub155@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub156@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub157@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub158@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub159@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub160@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub161@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub162@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub163@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub164@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub165@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub166@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub167@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub168@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub169@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub170@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub171@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub172@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub173@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub174@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub175@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub176@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub177@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub178@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub179@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub180@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub181@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub182@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub183@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub184@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub185@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub186@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub187@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub188@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub189@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub190@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub191@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub192@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub193@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub194@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub195@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub196@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub197@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub198@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub199@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub200@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub201@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub202@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub203@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub204@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub205@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub206@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub207@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub208@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub209@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub210@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub211@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub212@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub213@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub214@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub215@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub216@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub217@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub218@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub219@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub220@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub221@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub222@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub223@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub224@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub225@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub226@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub227@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub228@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub229@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub230@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub231@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub232@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub233@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub234@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub235@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub236@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub237@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub238@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub239@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub240@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub241@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub242@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub243@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub244@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub245@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub246@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub247@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub248@nsXPTCStubBase@@UAAIXZ
|
||||
?Stub249@nsXPTCStubBase@@UAAIXZ
|
||||
|
@ -89,15 +89,8 @@ inline nsresult nsresultForErrno(int aErr) {
|
||||
case EROFS: /* Read-only file system. */
|
||||
return NS_ERROR_FILE_READ_ONLY;
|
||||
#endif
|
||||
/*
|
||||
* On AIX 4.3, ENOTEMPTY is defined as EEXIST,
|
||||
* so there can't be cases for both without
|
||||
* preprocessing.
|
||||
*/
|
||||
#if ENOTEMPTY != EEXIST
|
||||
case ENOTEMPTY:
|
||||
return NS_ERROR_FILE_DIR_NOT_EMPTY;
|
||||
#endif /* ENOTEMPTY != EEXIST */
|
||||
/* Note that nsIFile.createUnique() returns
|
||||
NS_ERROR_FILE_TOO_BIG when it cannot create a temporary
|
||||
file with a unique filename.
|
||||
|
@ -22,11 +22,6 @@
|
||||
// stat64 and lstat64 are deprecated on OS X. Normal stat and lstat are
|
||||
// 64-bit by default on OS X 10.6+.
|
||||
#if defined(HAVE_STAT64) && defined(HAVE_LSTAT64) && !defined(XP_DARWIN)
|
||||
# if defined(AIX)
|
||||
# if defined STAT
|
||||
# undef STAT
|
||||
# endif
|
||||
# endif
|
||||
# define STAT stat64
|
||||
# define LSTAT lstat64
|
||||
# define HAVE_STATS64 1
|
||||
|
@ -83,23 +83,6 @@ if CONFIG["TARGET_CPU"] == "arm" and CONFIG["OS_ARCH"] in ("Bitrig", "OpenBSD"):
|
||||
"xptcstubs_arm_openbsd.cpp",
|
||||
]
|
||||
|
||||
if CONFIG["OS_ARCH"] == "HP-UX":
|
||||
if CONFIG["CC"] != "gcc":
|
||||
if CONFIG["TARGET_CPU"] == "ia64":
|
||||
SOURCES += [
|
||||
"xptcinvoke_asm_ipf32.s",
|
||||
"xptcinvoke_ipf32.cpp",
|
||||
"xptcstubs_asm_ipf32.s",
|
||||
"xptcstubs_ipf32.cpp",
|
||||
]
|
||||
else:
|
||||
SOURCES += [
|
||||
"xptcinvoke_asm_pa32.s",
|
||||
"xptcinvoke_pa32.cpp",
|
||||
"xptcstubs_asm_pa32.s",
|
||||
"xptcstubs_pa32.cpp",
|
||||
]
|
||||
|
||||
if CONFIG["OS_ARCH"] == "Linux":
|
||||
if CONFIG["TARGET_CPU"] == "hppa":
|
||||
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
|
||||
@ -143,29 +126,6 @@ if CONFIG["OS_ARCH"] in ("Linux", "FreeBSD", "NetBSD", "OpenBSD"):
|
||||
"-fno-integrated-as",
|
||||
]
|
||||
|
||||
if CONFIG["OS_ARCH"] == "AIX":
|
||||
if CONFIG["HAVE_64BIT_BUILD"]:
|
||||
SOURCES += [
|
||||
"!xptcstubs_asm_ppc_aix64.s",
|
||||
"xptcinvoke_asm_ppc_aix64.s",
|
||||
"xptcinvoke_ppc_aix64.cpp",
|
||||
"xptcstubs_ppc_aix64.cpp",
|
||||
]
|
||||
else:
|
||||
SOURCES += [
|
||||
"!xptcstubs_asm_ppc_aix.s",
|
||||
"xptcinvoke_ppc_aix.cpp",
|
||||
"xptcstubs_ppc_aix.cpp",
|
||||
]
|
||||
if CONFIG["AIX_OBJMODEL"] == "ibm":
|
||||
SOURCES += [
|
||||
"xptcinvoke_asm_ppc_ibmobj_aix.s",
|
||||
]
|
||||
else:
|
||||
SOURCES += [
|
||||
"xptcinvoke_asm_ppc_aix.s",
|
||||
]
|
||||
|
||||
if CONFIG["TARGET_CPU"] == "ppc":
|
||||
if CONFIG["OS_ARCH"] in ("Linux", "FreeBSD"):
|
||||
SOURCES += [
|
||||
|
@ -1,145 +0,0 @@
|
||||
|
||||
// Select C numeric constant
|
||||
.radix C
|
||||
// for 64 bit mode, use .psr abi64
|
||||
.psr abi32
|
||||
// big endian
|
||||
.psr msb
|
||||
// Section has executable code
|
||||
.section .text, "ax","progbits"
|
||||
// procedure named 'NS_InvokeByIndex'
|
||||
.proc NS_InvokeByIndex
|
||||
// manual bundling
|
||||
.explicit
|
||||
|
||||
// extern "C" uint32_t
|
||||
// invoke_copy_to_stack(uint64_t* d,
|
||||
// const uint32_t paramCount, nsXPTCVariant* s)
|
||||
.global invoke_copy_to_stack
|
||||
// .exclass invoke_copy_to_stack, @fullyvisible
|
||||
.type invoke_copy_to_stack,@function
|
||||
|
||||
// .exclass NS_InvokeByIndex, @fullyvisible
|
||||
.type NS_InvokeByIndex,@function
|
||||
|
||||
// NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
// uint32_t paramCount, nsXPTCVariant* params);
|
||||
NS_InvokeByIndex::
|
||||
.prologue
|
||||
.save ar.pfs, r37
|
||||
// allocate 4 input args, 6 local args, and 8 output args
|
||||
alloc r37 = ar.pfs, 4, 6, 8, 0 // M
|
||||
nop.i 0 ;; // I
|
||||
|
||||
// unwind table already knows gp, no need to specify anything
|
||||
add r39 = 0, gp // A
|
||||
.save rp, r36
|
||||
mov r36 = rp // I
|
||||
.vframe r38
|
||||
add r38 = 0, sp ;; // A
|
||||
|
||||
// We first calculate the amount of extra memory stack space required
|
||||
// for the arguments, and register storage.
|
||||
// We then call invoke_copy_to_stack() to write the argument contents
|
||||
// to the specified memory regions.
|
||||
// We then copy the integer arguments to integer registers, and floating
|
||||
// arguments to float registers.
|
||||
// Lastly we load the virtual table jump pointer, and call the target
|
||||
// subroutine.
|
||||
|
||||
// in0 : that
|
||||
// in1 : methodIndex
|
||||
// in2 : paramCount
|
||||
// in3 : params
|
||||
|
||||
// stack frame size is 16 + (8 * even(paramCount)) + 64 + 64
|
||||
// 16 byte frame header
|
||||
// 8 * even(paramCount) memory argument area
|
||||
// 64 bytes integer register area
|
||||
// 64 bytes float register area
|
||||
// This scheme makes sure stack fram size is a multiple of 16
|
||||
|
||||
.body
|
||||
add r10 = 8, r0 // A
|
||||
// r41 points to float register area
|
||||
add r41 = -64, sp // A
|
||||
// r40 points to int register area
|
||||
add r40 = -128, sp ;; // A
|
||||
|
||||
add out1 = 0, r40 // A
|
||||
add out2 = 0, r41 // A
|
||||
tbit.z p14,p15 = in2,0 ;; // I
|
||||
|
||||
// compute 8 * even(paramCount)
|
||||
(p14) shladd r11 = in2, 3, r0 ;; // A
|
||||
(p15) shladd r11 = in2, 3, r10 ;; // A
|
||||
sub out0 = r40, r11 ;; // A
|
||||
|
||||
// advance the stack frame
|
||||
add sp = -16, out0 // A
|
||||
add out3 = 0, in2 // A
|
||||
add out4 = 0, in3 // A
|
||||
|
||||
// branch to invoke_copy_to_stack
|
||||
br.call.sptk.few rp = invoke_copy_to_stack ;; // B
|
||||
|
||||
// restore gp
|
||||
add gp = 0, r39 // A
|
||||
add out0 = 0, in0 // A
|
||||
|
||||
// load the integer and float registers
|
||||
ld8 out1 = [r40], 8 // M
|
||||
ldfd f8 = [r41], 8 ;; // M
|
||||
|
||||
ld8 out2 = [r40], 8 // M
|
||||
ldfd f9 = [r41], 8 ;; // M
|
||||
|
||||
ld8 out3 = [r40], 8 // M
|
||||
ldfd f10 = [r41], 8 ;; // M
|
||||
|
||||
ld8 out4 = [r40], 8 // M
|
||||
ldfd f11 = [r41], 8 ;; // M
|
||||
|
||||
ld8 out5 = [r40], 8 // M
|
||||
ldfd f12 = [r41], 8 ;; // M
|
||||
// 16 * methodIndex
|
||||
shladd r11 = in1, 4, r0 // A
|
||||
|
||||
ld8 out6 = [r40], 8 // M
|
||||
ldfd f13 = [r41], 8 ;; // M
|
||||
|
||||
ld8 out7 = [r40], 8 // M
|
||||
ldfd f14 = [r41], 8 // M
|
||||
addp4 r8 = 0, in0 ;; // A
|
||||
|
||||
// look up virtual base table and dispatch to target subroutine
|
||||
// This section assumes 32 bit pointer mode, and virtual base table
|
||||
// layout from the ABI http://www.codesourcery.com/cxx-abi/abi.html
|
||||
|
||||
// load base table
|
||||
ld4 r8 = [r8] ;; // M
|
||||
addp4 r8 = r11, r8 ;; // A
|
||||
|
||||
// first entry is jump pointer, second entry is gp
|
||||
addp4 r9 = 8, r8 ;; // A
|
||||
// load jump pointer
|
||||
ld8 r8 = [r8]
|
||||
|
||||
// load gp
|
||||
ld8 gp = [r9] ;; // M
|
||||
mov b6 = r8 ;; // I
|
||||
|
||||
// branch to target virtual function
|
||||
br.call.sptk.few rp = b6 ;; // B
|
||||
|
||||
// epilog
|
||||
mov ar.pfs = r37 // I
|
||||
mov rp = r36 ;; // I
|
||||
|
||||
add sp = 0, r38 // A
|
||||
add gp = 0, r39 // A
|
||||
br.ret.sptk.few rp ;; // B
|
||||
|
||||
.endp
|
||||
|
||||
|
@ -1,131 +0,0 @@
|
||||
.LEVEL 1.1
|
||||
framesz .EQU 128
|
||||
|
||||
; XPTC_InvokeByIndex(nsISuppots* that, uint32_t methodIndex,
|
||||
; uint32_t paramCount, nsXPTCVariant* params);
|
||||
|
||||
; g++ need to compile everything with -fvtable-thunks !
|
||||
|
||||
.SPACE $TEXT$,SORT=8
|
||||
.SUBSPA $CODE$,QUAD=0,ALIGN=4,ACCESS=0x2c,CODE_ONLY,SORT=24
|
||||
XPTC_InvokeByIndex
|
||||
.PROC
|
||||
.CALLINFO CALLER,FRAME=72,ENTRY_GR=%r3,SAVE_RP,SAVE_SP,ARGS_SAVED,ALLOCA_FRAME
|
||||
|
||||
; frame marker takes 48 bytes,
|
||||
; register spill area takes 8 bytes,
|
||||
; local stack area takes 72 bytes result in 128 bytes total
|
||||
|
||||
.ENTRY
|
||||
STW %rp,-20(%sp)
|
||||
STW,MA %r3,128(%sp)
|
||||
|
||||
LDO -framesz(%r30),%r28
|
||||
STW %r28,-4(%r30) ; save previous sp
|
||||
STW %r19,-32(%r30)
|
||||
|
||||
STW %r26,-36-framesz(%r30) ; save argument registers in
|
||||
STW %r25,-40-framesz(%r30) ; in PREVIOUS frame
|
||||
STW %r24,-44-framesz(%r30) ;
|
||||
STW %r23,-48-framesz(%r30) ;
|
||||
|
||||
B,L .+8,%r2
|
||||
ADDIL L'invoke_count_bytes-$PIC_pcrel$1+4,%r2,%r1
|
||||
LDO R'invoke_count_bytes-$PIC_pcrel$2+8(%r1),%r1
|
||||
$PIC_pcrel$1
|
||||
LDSID (%r1),%r31
|
||||
$PIC_pcrel$2
|
||||
MTSP %r31,%sr0
|
||||
.CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26;out=28
|
||||
BE,L 0(%sr0,%r1),%r31
|
||||
COPY %r31,%r2
|
||||
|
||||
CMPIB,>= 0,%r28, .+76
|
||||
COPY %r30,%r3 ; copy stack ptr to saved stack ptr
|
||||
ADD %r30,%r28,%r30 ; extend stack frame
|
||||
LDW -4(%r3),%r28 ; move frame
|
||||
STW %r28,-4(%r30)
|
||||
LDW -8(%r3),%r28
|
||||
STW %r28,-8(%r30)
|
||||
LDW -12(%r3),%r28
|
||||
STW %r28,-12(%r30)
|
||||
LDW -16(%r3),%r28
|
||||
STW %r28,-16(%r30)
|
||||
LDW -20(%r3),%r28
|
||||
STW %r28,-20(%r30)
|
||||
LDW -24(%r3),%r28
|
||||
STW %r28,-24(%r30)
|
||||
LDW -28(%r3),%r28
|
||||
STW %r28,-28(%r30)
|
||||
LDW -32(%r3),%r28
|
||||
STW %r28,-32(%r30)
|
||||
|
||||
LDO -40(%r30),%r26 ; load copy address
|
||||
LDW -44-framesz(%r3),%r25 ; load rest of 2 arguments
|
||||
LDW -48-framesz(%r3),%r24 ;
|
||||
|
||||
LDW -32(%r30),%r19 ; shared lib call destroys r19; reload
|
||||
B,L .+8,%r2
|
||||
ADDIL L'invoke_copy_to_stack-$PIC_pcrel$3+4,%r2,%r1
|
||||
LDO R'invoke_copy_to_stack-$PIC_pcrel$4+8(%r1),%r1
|
||||
$PIC_pcrel$3
|
||||
LDSID (%r1),%r31
|
||||
$PIC_pcrel$4
|
||||
MTSP %r31,%sr0
|
||||
.CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26
|
||||
BE,L 0(%sr0,%r1),%r31
|
||||
COPY %r31,%r2
|
||||
|
||||
LDO -48(%r30),%r20
|
||||
EXTRW,U,= %r28,31,1,%r22
|
||||
FLDD 0(%r20),%fr7 ; load double arg 1
|
||||
EXTRW,U,= %r28,30,1,%r22
|
||||
FLDW 8(%r20),%fr5L ; load float arg 1
|
||||
EXTRW,U,= %r28,29,1,%r22
|
||||
FLDW 4(%r20),%fr6L ; load float arg 2
|
||||
EXTRW,U,= %r28,28,1,%r22
|
||||
FLDW 0(%r20),%fr7L ; load float arg 3
|
||||
|
||||
LDW -36-framesz(%r3),%r26 ; load ptr to 'that'
|
||||
LDW -40(%r30),%r25 ; load the rest of dispatch argument registers
|
||||
LDW -44(%r30),%r24
|
||||
LDW -48(%r30),%r23
|
||||
|
||||
LDW -36-framesz(%r3),%r20 ; load vtable addr
|
||||
LDW -40-framesz(%r3),%r28 ; load index
|
||||
LDW 0(%r20),%r20 ; follow vtable
|
||||
LDO 16(%r20),%r20 ; offset vtable by 16 bytes (g++: 8, aCC: 16)
|
||||
SH2ADDL %r28,%r20,%r28 ; add 4*index to vtable entry
|
||||
LDW 0(%r28),%r22 ; load vtable entry
|
||||
|
||||
B,L .+8,%r2
|
||||
ADDIL L'$$dyncall_external-$PIC_pcrel$5+4,%r2,%r1
|
||||
LDO R'$$dyncall_external-$PIC_pcrel$6+8(%r1),%r1
|
||||
$PIC_pcrel$5
|
||||
LDSID (%r1),%r31
|
||||
$PIC_pcrel$6
|
||||
MTSP %r31,%sr0
|
||||
.CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR
|
||||
;in=22-26;out=28;
|
||||
BE,L 0(%sr0,%r1),%r31
|
||||
COPY %r31,%r2
|
||||
|
||||
LDW -32(%r30),%r19
|
||||
COPY %r3,%r30 ; restore saved stack ptr
|
||||
|
||||
LDW -148(%sp),%rp
|
||||
BVE (%rp)
|
||||
.EXIT
|
||||
LDW,MB -128(%sp),%r3
|
||||
|
||||
.PROCEND ;in=23,24,25,26;
|
||||
|
||||
.ALIGN 8
|
||||
.SPACE $TEXT$
|
||||
.SUBSPA $CODE$
|
||||
.IMPORT $$dyncall_external,MILLICODE
|
||||
.IMPORT invoke_count_bytes,CODE
|
||||
.IMPORT invoke_copy_to_stack,CODE
|
||||
.EXPORT XPTC_InvokeByIndex,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR,LONG_RETURN
|
||||
.END
|
||||
|
@ -1,128 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
.set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4
|
||||
.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
|
||||
.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
|
||||
.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
|
||||
.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
|
||||
.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
|
||||
.set r30,30; .set r31,31
|
||||
.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
|
||||
.set BO_IF,12
|
||||
.set CR0_EQ,2
|
||||
|
||||
.rename H.10.NO_SYMBOL{PR},""
|
||||
.rename H.18.NS_InvokeByIndex{TC},"NS_InvokeByIndex"
|
||||
|
||||
|
||||
# .text section
|
||||
|
||||
.csect H.10.NO_SYMBOL{PR}
|
||||
.globl .NS_InvokeByIndex
|
||||
.globl NS_InvokeByIndex{DS}
|
||||
.extern .invoke_copy_to_stack
|
||||
.extern ._ptrgl{PR}
|
||||
|
||||
#
|
||||
# NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
# uint32_t paramCount, nsXPTCVariant* params)
|
||||
#
|
||||
|
||||
.NS_InvokeByIndex:
|
||||
mflr r0
|
||||
std r31,-8(sp)
|
||||
#
|
||||
# save off the incoming values in the caller's parameter area
|
||||
#
|
||||
std r3,48(sp) # that
|
||||
std r4,56(sp) # methodIndex
|
||||
std r5,64(sp) # paramCount
|
||||
std r6,72(sp) # params
|
||||
std r0,16(sp)
|
||||
stdu sp,-168(sp) # 2*24=48 for linkage area,
|
||||
# 8*13=104 for fprData area
|
||||
# 16 for saved registers
|
||||
|
||||
# prepare args for 'invoke_copy_to_stack' call
|
||||
#
|
||||
ld r4,232(sp) # paramCount (168+8+56)
|
||||
ld r5,240(sp) # params
|
||||
mr r6,sp # fprData
|
||||
sldi r3,r4,3 # number of bytes of stack required
|
||||
# is at most numParams*8
|
||||
addi r3,r3,56 # linkage area (48) + this (8)
|
||||
mr r31,sp # save original stack top
|
||||
subfc sp,r3,sp # bump the stack
|
||||
addi r3,sp,56 # parameter pointer excludes linkage area
|
||||
# size + 'this'
|
||||
|
||||
bl .invoke_copy_to_stack
|
||||
nop
|
||||
|
||||
lfd f1,0(r31) # Restore floating point registers
|
||||
lfd f2,8(r31)
|
||||
lfd f3,16(r31)
|
||||
lfd f4,24(r31)
|
||||
lfd f5,32(r31)
|
||||
lfd f6,40(r31)
|
||||
lfd f7,48(r31)
|
||||
lfd f8,56(r31)
|
||||
lfd f9,64(r31)
|
||||
lfd f10,72(r31)
|
||||
lfd f11,80(r31)
|
||||
lfd f12,88(r31)
|
||||
lfd f13,96(r31)
|
||||
|
||||
ld r3,216(r31) # that (168+48)
|
||||
ld r4,0(r3) # get vTable from 'that'
|
||||
ld r5,224(r31) # methodIndex (168+56)
|
||||
sldi r5,r5,3 # methodIndex * 8
|
||||
# No junk at the start of 64bit vtable !!!
|
||||
ldx r11,r5,r4 # get function pointer (this jumps
|
||||
# either to the function if no adjustment
|
||||
# is needed (displacement = 0), or it
|
||||
# jumps to the thunk code, which will jump
|
||||
# to the function at the end)
|
||||
|
||||
# No adjustment of the that pointer in 64bit mode, this is done
|
||||
# by the thunk code
|
||||
|
||||
ld r4,56(sp)
|
||||
ld r5,64(sp)
|
||||
ld r6,72(sp)
|
||||
ld r7,80(sp)
|
||||
ld r8,88(sp)
|
||||
ld r9,96(sp)
|
||||
ld r10,104(sp)
|
||||
|
||||
bl ._ptrgl{PR}
|
||||
nop
|
||||
|
||||
mr sp,r31
|
||||
ld r0,184(sp) # 168+16
|
||||
addi sp,sp,168
|
||||
mtlr r0
|
||||
ld r31,-8(sp)
|
||||
blr
|
||||
|
||||
# .data section
|
||||
|
||||
.toc # 0x00000038
|
||||
T.18.NS_InvokeByIndex:
|
||||
.tc H.18.NS_InvokeByIndex{TC},NS_InvokeByIndex{DS}
|
||||
|
||||
.csect NS_InvokeByIndex{DS}
|
||||
.llong .NS_InvokeByIndex # "\0\0\0\0"
|
||||
.llong TOC{TC0} # "\0\0\0008"
|
||||
.llong 0x00000000 # "\0\0\0\0"
|
||||
# End csect NS_InvokeByIndex{DS}
|
||||
|
||||
# .bss section
|
@ -1,129 +0,0 @@
|
||||
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "xptcprivate.h"
|
||||
|
||||
// "This code is for IA64 only"
|
||||
|
||||
|
||||
/* invoke_copy_to_stack() will copy from variant array 's' to
|
||||
* the stack argument area 'mloc', the integer register area 'iloc', and
|
||||
* the float register area 'floc'.
|
||||
*
|
||||
*/
|
||||
extern "C" void
|
||||
invoke_copy_to_stack(uint64_t* mloc, uint64_t* iloc, uint64_t* floc,
|
||||
const uint32_t paramCount, nsXPTCVariant* s)
|
||||
{
|
||||
uint64_t* dest = mloc;
|
||||
uint32_t len = paramCount;
|
||||
nsXPTCVariant* source = s;
|
||||
|
||||
uint32_t indx;
|
||||
uint32_t endlen;
|
||||
endlen = (len > 7) ? 7 : len;
|
||||
/* handle the memory arguments */
|
||||
for (indx = 7; indx < len; ++indx)
|
||||
{
|
||||
if (source[indx].IsPtrData())
|
||||
{
|
||||
#ifdef __LP64__
|
||||
/* 64 bit pointer mode */
|
||||
*((void**) dest) = source[indx].ptr;
|
||||
#else
|
||||
/* 32 bit pointer mode */
|
||||
uint32_t* adr = (uint32_t*) dest;
|
||||
*(adr) = 0;
|
||||
*(adr+1) = (uint32_t) source[indx].ptr;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
switch (source[indx].type)
|
||||
{
|
||||
case nsXPTType::T_I8 : *(dest) = source[indx].val.i8; break;
|
||||
case nsXPTType::T_I16 : *(dest) = source[indx].val.i16; break;
|
||||
case nsXPTType::T_I32 : *(dest) = source[indx].val.i32; break;
|
||||
case nsXPTType::T_I64 : *(dest) = source[indx].val.i64; break;
|
||||
case nsXPTType::T_U8 : *(dest) = source[indx].val.u8; break;
|
||||
case nsXPTType::T_U16 : *(dest) = source[indx].val.u16; break;
|
||||
case nsXPTType::T_U32 : *(dest) = source[indx].val.u32; break;
|
||||
case nsXPTType::T_U64 : *(dest) = source[indx].val.u64; break;
|
||||
case nsXPTType::T_FLOAT : *(dest) = source[indx].val.u32; break;
|
||||
case nsXPTType::T_DOUBLE: *(dest) = source[indx].val.u64; break;
|
||||
case nsXPTType::T_BOOL : *(dest) = source[indx].val.b; break;
|
||||
case nsXPTType::T_CHAR : *(dest) = source[indx].val.c; break;
|
||||
case nsXPTType::T_WCHAR : *(dest) = source[indx].val.wc; break;
|
||||
default:
|
||||
// all the others are plain pointer types
|
||||
#ifdef __LP64__
|
||||
/* 64 bit pointer mode */
|
||||
*((void**) dest) = source[indx].val.p;
|
||||
#else
|
||||
{
|
||||
/* 32 bit pointer mode */
|
||||
uint32_t* adr = (uint32_t*) dest;
|
||||
*(adr) = 0;
|
||||
*(adr+1) = (uint32_t) source[indx].val.p;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
++dest;
|
||||
}
|
||||
/* process register arguments */
|
||||
dest = iloc;
|
||||
for (indx = 0; indx < endlen; ++indx)
|
||||
{
|
||||
if (source[indx].IsPtrData())
|
||||
{
|
||||
#ifdef __LP64__
|
||||
/* 64 bit pointer mode */
|
||||
*((void**) dest) = source[indx].ptr;
|
||||
#else
|
||||
/* 32 bit pointer mode */
|
||||
uint32_t* adr = (uint32_t*) dest;
|
||||
*(adr) = 0;
|
||||
*(adr+1) = (uint32_t) source[indx].ptr;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
switch (source[indx].type)
|
||||
{
|
||||
case nsXPTType::T_I8 : *(dest) = source[indx].val.i8; break;
|
||||
case nsXPTType::T_I16 : *(dest) = source[indx].val.i16; break;
|
||||
case nsXPTType::T_I32 : *(dest) = source[indx].val.i32; break;
|
||||
case nsXPTType::T_I64 : *(dest) = source[indx].val.i64; break;
|
||||
case nsXPTType::T_U8 : *(dest) = source[indx].val.u8; break;
|
||||
case nsXPTType::T_U16 : *(dest) = source[indx].val.u16; break;
|
||||
case nsXPTType::T_U32 : *(dest) = source[indx].val.u32; break;
|
||||
case nsXPTType::T_U64 : *(dest) = source[indx].val.u64; break;
|
||||
case nsXPTType::T_FLOAT :
|
||||
*((double*) (floc++)) = (double) source[indx].val.f;
|
||||
break;
|
||||
case nsXPTType::T_DOUBLE:
|
||||
*((double*) (floc++)) = source[indx].val.d;
|
||||
break;
|
||||
case nsXPTType::T_BOOL : *(dest) = source[indx].val.b; break;
|
||||
case nsXPTType::T_CHAR : *(dest) = source[indx].val.c; break;
|
||||
case nsXPTType::T_WCHAR : *(dest) = source[indx].val.wc; break;
|
||||
default:
|
||||
// all the others are plain pointer types
|
||||
#ifdef __LP64__
|
||||
/* 64 bit pointer mode */
|
||||
*((void**) dest) = source[indx].val.p;
|
||||
#else
|
||||
{
|
||||
/* 32 bit pointer mode */
|
||||
uint32_t* adr = (uint32_t*) dest;
|
||||
*(adr) = 0;
|
||||
*(adr+1) = (uint32_t) source[indx].val.p;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
++dest;
|
||||
}
|
||||
|
||||
}
|
@ -7,10 +7,6 @@
|
||||
|
||||
#include "xptcprivate.h"
|
||||
|
||||
#if _HPUX
|
||||
#error "This code is for HP-PA RISC 32 bit mode only"
|
||||
#endif
|
||||
|
||||
#include <alloca.h>
|
||||
|
||||
typedef unsigned nsXPCVariant;
|
||||
|
@ -1,73 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* Platform specific code to invoke XPCOM methods on native objects */
|
||||
|
||||
#include "xptcprivate.h"
|
||||
|
||||
#ifndef AIX
|
||||
#error "This code is for PowerPC only"
|
||||
#endif
|
||||
|
||||
extern "C" void
|
||||
invoke_copy_to_stack(uint32_t* d, uint32_t paramCount, nsXPTCVariant* s, double *fprData)
|
||||
{
|
||||
/*
|
||||
We need to copy the parameters for this function to locals and use them
|
||||
from there since the parameters occupy the same stack space as the stack
|
||||
we're trying to populate.
|
||||
*/
|
||||
uint32_t *l_d = d;
|
||||
nsXPTCVariant *l_s = s;
|
||||
uint32_t l_paramCount = paramCount, fpCount = 0;
|
||||
double *l_fprData = fprData;
|
||||
|
||||
typedef struct {
|
||||
uint32_t hi;
|
||||
uint32_t lo;
|
||||
} DU; // have to move 64 bit entities as 32 bit halves since
|
||||
// stack slots are not guaranteed 16 byte aligned
|
||||
|
||||
for(uint32_t i = 0; i < l_paramCount; i++, l_d++, l_s++)
|
||||
{
|
||||
if(l_s->IsPtrData())
|
||||
{
|
||||
*((void**)l_d) = l_s->ptr;
|
||||
continue;
|
||||
}
|
||||
switch(l_s->type)
|
||||
{
|
||||
case nsXPTType::T_I8 : *((int32_t*) l_d) = l_s->val.i8; break;
|
||||
case nsXPTType::T_I16 : *((int32_t*) l_d) = l_s->val.i16; break;
|
||||
case nsXPTType::T_I32 : *((int32_t*) l_d) = l_s->val.i32; break;
|
||||
case nsXPTType::T_I64 :
|
||||
case nsXPTType::T_U64 :
|
||||
*((uint32_t*) l_d++) = ((DU *)l_s)->hi;
|
||||
*((uint32_t*) l_d) = ((DU *)l_s)->lo;
|
||||
break;
|
||||
case nsXPTType::T_DOUBLE :
|
||||
*((uint32_t*) l_d++) = ((DU *)l_s)->hi;
|
||||
*((uint32_t*) l_d) = ((DU *)l_s)->lo;
|
||||
if(fpCount < 13)
|
||||
l_fprData[fpCount++] = l_s->val.d;
|
||||
break;
|
||||
case nsXPTType::T_U8 : *((uint32_t*) l_d) = l_s->val.u8; break;
|
||||
case nsXPTType::T_U16 : *((uint32_t*) l_d) = l_s->val.u16; break;
|
||||
case nsXPTType::T_U32 : *((uint32_t*) l_d) = l_s->val.u32; break;
|
||||
case nsXPTType::T_FLOAT :
|
||||
*((float*) l_d) = l_s->val.f;
|
||||
if(fpCount < 13)
|
||||
l_fprData[fpCount++] = l_s->val.f;
|
||||
break;
|
||||
case nsXPTType::T_BOOL : *((uint32_t*) l_d) = l_s->val.b; break;
|
||||
case nsXPTType::T_CHAR : *((uint32_t*) l_d) = l_s->val.c; break;
|
||||
case nsXPTType::T_WCHAR : *((int32_t*) l_d) = l_s->val.wc; break;
|
||||
default:
|
||||
// all the others are plain pointer types
|
||||
*((void**)l_d) = l_s->val.p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* Platform specific code to invoke XPCOM methods on native objects */
|
||||
|
||||
#include "xptcprivate.h"
|
||||
|
||||
#ifdef _AIX
|
||||
|
||||
extern "C" void
|
||||
invoke_copy_to_stack(uint64_t* d, uint32_t paramCount, nsXPTCVariant* s, double *fprData)
|
||||
{
|
||||
/*
|
||||
We need to copy the parameters for this function to locals and use them
|
||||
from there since the parameters occupy the same stack space as the stack
|
||||
we're trying to populate.
|
||||
*/
|
||||
uint64_t *l_d = d;
|
||||
nsXPTCVariant *l_s = s;
|
||||
uint32_t l_paramCount = paramCount, fpCount = 0;
|
||||
double *l_fprData = fprData;
|
||||
|
||||
for(uint32_t i = 0; i < l_paramCount; i++, l_d++, l_s++)
|
||||
{
|
||||
if(l_s->IsPtrData())
|
||||
{
|
||||
*l_d = (uint64_t)l_s->ptr;
|
||||
continue;
|
||||
}
|
||||
switch(l_s->type)
|
||||
{
|
||||
case nsXPTType::T_I8: *l_d = (uint64_t)l_s->val.i8; break;
|
||||
case nsXPTType::T_I16: *l_d = (uint64_t)l_s->val.i16; break;
|
||||
case nsXPTType::T_I32: *l_d = (uint64_t)l_s->val.i32; break;
|
||||
case nsXPTType::T_I64: *l_d = (uint64_t)l_s->val.i64; break;
|
||||
case nsXPTType::T_U8: *l_d = (uint64_t)l_s->val.u8; break;
|
||||
case nsXPTType::T_U16: *l_d = (uint64_t)l_s->val.u16; break;
|
||||
case nsXPTType::T_U32: *l_d = (uint64_t)l_s->val.u32; break;
|
||||
case nsXPTType::T_U64: *l_d = (uint64_t)l_s->val.u64; break;
|
||||
case nsXPTType::T_BOOL: *l_d = (uint64_t)l_s->val.b; break;
|
||||
case nsXPTType::T_CHAR: *l_d = (uint64_t)l_s->val.c; break;
|
||||
case nsXPTType::T_WCHAR: *l_d = (uint64_t)l_s->val.wc; break;
|
||||
|
||||
case nsXPTType::T_DOUBLE:
|
||||
*((double*)l_d) = l_s->val.d;
|
||||
if(fpCount < 13)
|
||||
l_fprData[fpCount++] = l_s->val.d;
|
||||
break;
|
||||
case nsXPTType::T_FLOAT:
|
||||
*((float*)l_d) = l_s->val.f;
|
||||
if(fpCount < 13)
|
||||
l_fprData[fpCount++] = l_s->val.f;
|
||||
break;
|
||||
default:
|
||||
// all the others are plain pointer types
|
||||
*l_d = (uint64_t)l_s->val.p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1,123 +0,0 @@
|
||||
|
||||
// Select C numeric constant
|
||||
.radix C
|
||||
.psr abi32
|
||||
.psr msb
|
||||
// Section has executable code
|
||||
.section .text, "ax","progbits"
|
||||
// procedure named 'SharedStub'
|
||||
.proc SharedStub
|
||||
// manual bundling
|
||||
.explicit
|
||||
|
||||
.global PrepareAndDispatch
|
||||
// .exclass PrepareAndDispatch, @fullyvisible
|
||||
.type PrepareAndDispatch,@function
|
||||
|
||||
SharedStub::
|
||||
// 10 arguments, first 8 are the input arguments of previous
|
||||
// function call. The 9th one is methodIndex and the 10th is the
|
||||
// pointer to the remaining input arguments. The last two arguments
|
||||
// are passed in memory.
|
||||
.prologue
|
||||
.save ar.pfs , r41
|
||||
// allocate 8 input args, 4 local args, and 5 output args
|
||||
alloc r41 = ar.pfs, 8, 4, 5, 0 // M
|
||||
.save rp, r40
|
||||
mov r40 = rp // I
|
||||
addp4 out4 = 28, sp ;; // I
|
||||
|
||||
.save ar.unat, r42
|
||||
mov r42 = ar.unat // M
|
||||
.fframe 144
|
||||
add sp = -144, sp // A
|
||||
// unwind table already knows gp, don't need to specify anything
|
||||
add r43 = 0, gp ;; // A
|
||||
|
||||
// We have possible 8 integer registers and 8 float registers that could
|
||||
// be arguments. We also have a stack region from the previous
|
||||
// stack frame that may hold some stack arguments.
|
||||
// We need to write the integer registers to a memory region, write
|
||||
// the float registers to a memory region (making sure we don't step
|
||||
// on NAT while touching the registers). We also mark the memory
|
||||
// address of the stack arguments.
|
||||
// We then call PrepareAndDispatch() specifying the three memory
|
||||
// region pointers.
|
||||
|
||||
|
||||
.body
|
||||
add out0 = 0, in0 // A move self ptr
|
||||
// 144 bytes = 16 byte stack header + 64 byte int space + 64 byte float space
|
||||
// methodIndex is at 144 + 16 bytes away from current sp
|
||||
// (current frame + previous frame header)
|
||||
ld4 out4 = [out4] // A restarg address
|
||||
add r11 = 160, sp ;; // A address of methodIndex
|
||||
|
||||
ld8 out1 = [r11] // M load methodIndex
|
||||
// sp + 16 is the start of intargs
|
||||
add out2 = 16, sp // A address of intargs
|
||||
// the intargs take up 64 bytes, so sp + 16 + 64 is the start of floatargs
|
||||
add out3 = 80, sp ;; // A address of floatargs
|
||||
|
||||
add r11 = 0, out2 ;; // A
|
||||
st8.spill [r11] = in1, 8 // M
|
||||
add r10 = 0, out3 ;; // A
|
||||
|
||||
st8.spill [r11] = in2, 8 ;; // M
|
||||
st8.spill [r11] = in3, 8 // M
|
||||
nop.i 0 ;; // I
|
||||
|
||||
st8.spill [r11] = in4, 8 ;; // M
|
||||
st8.spill [r11] = in5, 8 // M
|
||||
nop.i 0 ;; // I
|
||||
|
||||
st8.spill [r11] = in6, 8 ;; // M
|
||||
st8.spill [r11] = in7 // M
|
||||
fclass.nm p14,p15 = f8,@nat ;; // F
|
||||
|
||||
(p14) stfd [r10] = f8, 8 // M
|
||||
(p15) add r10 = 8, r10 // A
|
||||
fclass.nm p12,p13 = f9,@nat ;; // F
|
||||
|
||||
(p12) stfd [r10] = f9, 8 // M
|
||||
(p13) add r10 = 8, r10 // A
|
||||
fclass.nm p14,p15 =f10,@nat ;; // F
|
||||
|
||||
(p14) stfd [r10] = f10, 8 // M
|
||||
(p15) add r10 = 8, r10 // A
|
||||
fclass.nm p12,p13 =f11,@nat ;; // F
|
||||
|
||||
(p12) stfd [r10] = f11, 8 // M
|
||||
(p13) add r10 = 8, r10 // A
|
||||
fclass.nm p14,p15 =f12,@nat ;; // F
|
||||
|
||||
(p14) stfd [r10] = f12, 8 // M
|
||||
(p15) add r10 = 8, r10 // A
|
||||
fclass.nm p12,p13 =f13,@nat ;; // F
|
||||
|
||||
(p12) stfd [r10] = f13, 8 // M
|
||||
(p13) add r10 = 8, r10 // A
|
||||
fclass.nm p14,p15 =f14,@nat ;; // F
|
||||
|
||||
(p14) stfd [r10] = f14, 8 // M
|
||||
(p15) add r10 = 8, r10 // A
|
||||
fclass.nm p12,p13 =f15,@nat ;; // F
|
||||
|
||||
(p12) stfd [r10] = f15, 8 // M
|
||||
(p13) add r10 = 8, r10 // A
|
||||
|
||||
// branch to PrepareAndDispatch
|
||||
br.call.dptk.few rp = PrepareAndDispatch ;; // B
|
||||
|
||||
// epilog
|
||||
mov ar.unat = r42 // M
|
||||
mov ar.pfs = r41 // I
|
||||
mov rp = r40 ;; // I
|
||||
|
||||
add gp = 0, r43 // A
|
||||
add sp = 144, sp // A
|
||||
br.ret.dptk.few rp ;; // B
|
||||
|
||||
.endp
|
||||
|
||||
|
@ -1,68 +0,0 @@
|
||||
.LEVEL 1.1
|
||||
|
||||
curframesz .EQU 128
|
||||
; SharedStub has stack size of 128 bytes
|
||||
|
||||
lastframesz .EQU 64
|
||||
; the StubN C++ function has a small stack size of 64 bytes
|
||||
|
||||
.SPACE $TEXT$,SORT=8
|
||||
.SUBSPA $CODE$,QUAD=0,ALIGN=4,ACCESS=0x2c,CODE_ONLY,SORT=24
|
||||
SharedStub
|
||||
.PROC
|
||||
.CALLINFO CALLER,FRAME=80,SAVE_RP,ARGS_SAVED
|
||||
|
||||
.ENTRY
|
||||
STW %rp,-20(%sp)
|
||||
LDO 128(%sp),%sp
|
||||
|
||||
STW %r19,-32(%r30)
|
||||
STW %r26,-36-curframesz(%r30) ; save arg0 in previous frame
|
||||
|
||||
LDO -80(%r30),%r28
|
||||
FSTD,MA %fr5,8(%r28) ; save darg0
|
||||
FSTD,MA %fr7,8(%r28) ; save darg1
|
||||
FSTW,MA %fr4L,4(%r28) ; save farg0
|
||||
FSTW,MA %fr5L,4(%r28) ; save farg1
|
||||
FSTW,MA %fr6L,4(%r28) ; save farg2
|
||||
FSTW,MA %fr7L,4(%r28) ; save farg3
|
||||
|
||||
; Former value of register 26 is already properly saved by StubN,
|
||||
; but register 25-23 are not because of the arguments mismatch
|
||||
STW %r25,-40-curframesz-lastframesz(%r30) ; save r25
|
||||
STW %r24,-44-curframesz-lastframesz(%r30) ; save r24
|
||||
STW %r23,-48-curframesz-lastframesz(%r30) ; save r23
|
||||
COPY %r26,%r25 ; method index is arg1
|
||||
LDW -36-curframesz-lastframesz(%r30),%r26 ; self is arg0
|
||||
LDO -40-curframesz-lastframesz(%r30),%r24 ; normal args is arg2
|
||||
LDO -80(%r30),%r23 ; floating args is arg3
|
||||
|
||||
BL .+8,%r2
|
||||
ADDIL L'PrepareAndDispatch-$PIC_pcrel$0+4,%r2
|
||||
LDO R'PrepareAndDispatch-$PIC_pcrel$1+8(%r1),%r1
|
||||
$PIC_pcrel$0
|
||||
LDSID (%r1),%r31
|
||||
$PIC_pcrel$1
|
||||
MTSP %r31,%sr0
|
||||
.CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR
|
||||
;in=23-26;out=28;
|
||||
BLE 0(%sr0,%r1)
|
||||
COPY %r31,%r2
|
||||
|
||||
LDW -32(%r30),%r19
|
||||
|
||||
LDW -148(%sp),%rp
|
||||
BVE (%rp)
|
||||
.EXIT
|
||||
LDO -128(%sp),%sp
|
||||
|
||||
|
||||
.PROCEND ;in=26;out=28;
|
||||
|
||||
.ALIGN 8
|
||||
.SPACE $TEXT$
|
||||
.SUBSPA $CODE$
|
||||
.IMPORT PrepareAndDispatch,CODE
|
||||
.EXPORT SharedStub,ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR,LONG_RETURN
|
||||
.END
|
||||
|
@ -1,119 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
.set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4
|
||||
.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
|
||||
.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
|
||||
.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
|
||||
.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
|
||||
.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
|
||||
.set r30,30; .set r31,31
|
||||
.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
|
||||
|
||||
# Define the correct name of the stub function based on the object model
|
||||
|
||||
define(STUB_NAME,
|
||||
ifelse(AIX_OBJMODEL, ibm,
|
||||
`Stub'$1`__EI14nsXPTCStubBaseFv',
|
||||
`Stub'$1`__14nsXPTCStubBaseFv'))
|
||||
|
||||
define(STUB_ENTRY, `
|
||||
.rename H.10.NO_SYMBOL{PR},""
|
||||
.rename H.18.'STUB_NAME($1)`{TC},"'STUB_NAME($1)`"
|
||||
.csect H.10.NO_SYMBOL{PR}
|
||||
.globl .'STUB_NAME($1)`
|
||||
.globl 'STUB_NAME($1)`{DS}
|
||||
|
||||
.'STUB_NAME($1)`:
|
||||
li r12, '$1`
|
||||
b .SharedStub
|
||||
nop
|
||||
|
||||
|
||||
.toc
|
||||
T.18.'STUB_NAME($1)`:
|
||||
.tc H.18.'STUB_NAME($1)`{TC},'STUB_NAME($1)`{DS}
|
||||
.csect 'STUB_NAME($1)`{DS}
|
||||
.long .'STUB_NAME($1)`
|
||||
.long TOC{TC0}
|
||||
.long 0x00000000
|
||||
')
|
||||
|
||||
define(SENTINEL_ENTRY, `')
|
||||
|
||||
include(xptcstubsdef.inc)
|
||||
|
||||
.rename H.10.NO_SYMBOL{PR},""
|
||||
.rename H.18.SharedStub{TC},"SharedStub"
|
||||
|
||||
# .text section
|
||||
.csect H.10.NO_SYMBOL{PR}
|
||||
.globl .SharedStub
|
||||
.globl SharedStub{DS}
|
||||
.extern .PrepareAndDispatch
|
||||
|
||||
.SharedStub:
|
||||
mflr r0
|
||||
stw r0,8(sp)
|
||||
|
||||
stwu sp,-176(sp) # room for linkage (24), fprData (104), gprData(28)
|
||||
# outgoing params to PrepareAndDispatch (20)
|
||||
|
||||
stw r4,44(sp) # link area (24) + PrepareAndDispatch params (20)
|
||||
stw r5,48(sp)
|
||||
stw r6,52(sp)
|
||||
stw r7,56(sp)
|
||||
stw r8,60(sp)
|
||||
stw r9,64(sp)
|
||||
stw r10,68(sp)
|
||||
stfd f1,72(sp)
|
||||
stfd f2,80(sp)
|
||||
stfd f3,88(sp)
|
||||
stfd f4,96(sp)
|
||||
stfd f5,104(sp)
|
||||
stfd f6,112(sp)
|
||||
stfd f7,120(sp)
|
||||
stfd f8,128(sp)
|
||||
stfd f9,136(sp)
|
||||
stfd f10,144(sp)
|
||||
stfd f11,152(sp)
|
||||
stfd f12,156(sp)
|
||||
stfd f13,164(sp)
|
||||
|
||||
addi r6,sp,44 # gprData
|
||||
|
||||
addi r7,sp,72 # fprData
|
||||
# r3 has the 'self' pointer already
|
||||
mr r4,r12 # methodIndex selector (it is now LATER)
|
||||
addi r5,sp,232 # pointer to callers args area, beyond r3-r10
|
||||
# mapped range
|
||||
|
||||
bl .PrepareAndDispatch
|
||||
nop
|
||||
|
||||
|
||||
lwz r0,184(sp)
|
||||
addi sp,sp,176
|
||||
mtlr r0
|
||||
blr
|
||||
|
||||
# .data section
|
||||
|
||||
.toc # 0x00000038
|
||||
T.18.SharedStub:
|
||||
.tc H.18.SharedStub{TC},SharedStub{DS}
|
||||
|
||||
.csect SharedStub{DS}
|
||||
.long .SharedStub # "\0\0\0\0"
|
||||
.long TOC{TC0} # "\0\0\0008"
|
||||
.long 0x00000000 # "\0\0\0\0"
|
||||
# End csect SharedStub{DS}
|
||||
|
||||
# .bss section
|
@ -1,97 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
.set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4
|
||||
.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
|
||||
.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
|
||||
.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
|
||||
.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
|
||||
.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
|
||||
.set r30,30; .set r31,31
|
||||
.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
|
||||
# Define the correct name of the stub function based on the object model
|
||||
define(STUB_NAME,
|
||||
ifelse(AIX_OBJMODEL, ibm,
|
||||
`Stub'$1`__EI14nsXPTCStubBaseFv',
|
||||
`Stub'$1`__14nsXPTCStubBaseFv'))
|
||||
define(STUB_ENTRY, `
|
||||
.rename H.10.NO_SYMBOL{PR},""
|
||||
.rename H.18.'STUB_NAME($1)`{TC},"'STUB_NAME($1)`"
|
||||
.csect H.10.NO_SYMBOL{PR}
|
||||
.globl .'STUB_NAME($1)`
|
||||
.globl 'STUB_NAME($1)`{DS}
|
||||
.'STUB_NAME($1)`:
|
||||
li r12, '$1`
|
||||
b .SharedStub
|
||||
nop
|
||||
.toc
|
||||
T.18.'STUB_NAME($1)`:
|
||||
.tc H.18.'STUB_NAME($1)`{TC},'STUB_NAME($1)`{DS}
|
||||
.csect 'STUB_NAME($1)`{DS}
|
||||
.llong .'STUB_NAME($1)`
|
||||
.llong TOC{TC0}
|
||||
.llong 0x00000000
|
||||
')
|
||||
define(SENTINEL_ENTRY, `')
|
||||
include(xptcstubsdef.inc)
|
||||
.rename H.10.NO_SYMBOL{PR},""
|
||||
.rename H.18.SharedStub{TC},"SharedStub"
|
||||
# .text section
|
||||
.csect H.10.NO_SYMBOL{PR}
|
||||
.globl .SharedStub
|
||||
.globl SharedStub{DS}
|
||||
.extern .PrepareAndDispatch
|
||||
.SharedStub:
|
||||
mflr r0
|
||||
std r0,16(sp)
|
||||
stdu sp,-248(sp) # room for linkage (24*2), fprData (104), gprData(28*2)
|
||||
# outgoing params to PrepareAndDispatch (40)
|
||||
std r4,88(sp) # link area (48) + PrepareAndDispatch params (20)
|
||||
std r5,96(sp)
|
||||
std r6,104(sp)
|
||||
std r7,112(sp)
|
||||
std r8,120(sp)
|
||||
std r9,128(sp)
|
||||
std r10,136(sp)
|
||||
stfd f1,144(sp)
|
||||
stfd f2,152(sp)
|
||||
stfd f3,160(sp)
|
||||
stfd f4,168(sp)
|
||||
stfd f5,176(sp)
|
||||
stfd f6,184(sp)
|
||||
stfd f7,192(sp)
|
||||
stfd f8,200(sp)
|
||||
stfd f9,208(sp)
|
||||
stfd f10,216(sp)
|
||||
stfd f11,224(sp)
|
||||
stfd f12,232(sp)
|
||||
stfd f13,240(sp)
|
||||
addi r6,sp,88 # gprData
|
||||
addi r7,sp,144 # fprData
|
||||
# r3 has the 'self' pointer already
|
||||
mr r4,r12 # methodIndex selector (it is now LATER)
|
||||
addi r5,sp,360 # pointer to callers args area, beyond r3-r10
|
||||
# mapped range
|
||||
bl .PrepareAndDispatch
|
||||
nop
|
||||
ld r0,264(sp)
|
||||
addi sp,sp,248
|
||||
mtlr r0
|
||||
blr
|
||||
# .data section
|
||||
.toc # 0x00000038
|
||||
T.18.SharedStub:
|
||||
.tc H.18.SharedStub{TC},SharedStub{DS}
|
||||
.csect SharedStub{DS}
|
||||
.llong .SharedStub # "\0\0\0\0"
|
||||
.llong TOC{TC0} # "\0\0\0008"
|
||||
.llong 0x00000000 # "\0\0\0\0"
|
||||
# End csect SharedStub{DS}
|
||||
# .bss section
|
@ -1,139 +0,0 @@
|
||||
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
||||
#include "xptcprivate.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// "This code is for IA64 only"
|
||||
|
||||
/* Implement shared vtbl methods. */
|
||||
|
||||
extern "C" nsresult ATTRIBUTE_USED
|
||||
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex,
|
||||
uint64_t* intargs, uint64_t* floatargs, uint64_t* restargs)
|
||||
{
|
||||
|
||||
|
||||
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
|
||||
const nsXPTMethodInfo* info;
|
||||
uint64_t* iargs = intargs;
|
||||
uint64_t* fargs = floatargs;
|
||||
uint8_t paramCount;
|
||||
uint8_t i;
|
||||
|
||||
NS_ASSERTION(self,"no self");
|
||||
|
||||
self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
|
||||
NS_ASSERTION(info,"no interface info");
|
||||
|
||||
paramCount = info->ParamCount();
|
||||
|
||||
const uint8_t indexOfJSContext = info->IndexOfJSContext();
|
||||
|
||||
for(i = 0; i < paramCount; ++i)
|
||||
{
|
||||
int isfloat = 0;
|
||||
const nsXPTParamInfo& param = info->Param(i);
|
||||
const nsXPTType& type = param.GetType();
|
||||
nsXPTCMiniVariant* dp = ¶mBuffer[i];
|
||||
|
||||
MOZ_CRASH("NYI: support implicit JSContext*, bug 1475699");
|
||||
|
||||
if(param.IsOut() || !type.IsArithmetic())
|
||||
{
|
||||
#ifdef __LP64__
|
||||
/* 64 bit pointer mode */
|
||||
dp->val.p = (void*) *iargs;
|
||||
#else
|
||||
/* 32 bit pointer mode */
|
||||
uint32_t* adr = (uint32_t*) iargs;
|
||||
dp->val.p = (void*) (*(adr+1));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
switch(type)
|
||||
{
|
||||
case nsXPTType::T_I8 : dp->val.i8 = *(iargs); break;
|
||||
case nsXPTType::T_I16 : dp->val.i16 = *(iargs); break;
|
||||
case nsXPTType::T_I32 : dp->val.i32 = *(iargs); break;
|
||||
case nsXPTType::T_I64 : dp->val.i64 = *(iargs); break;
|
||||
case nsXPTType::T_U8 : dp->val.u8 = *(iargs); break;
|
||||
case nsXPTType::T_U16 : dp->val.u16 = *(iargs); break;
|
||||
case nsXPTType::T_U32 : dp->val.u32 = *(iargs); break;
|
||||
case nsXPTType::T_U64 : dp->val.u64 = *(iargs); break;
|
||||
case nsXPTType::T_FLOAT :
|
||||
isfloat = 1;
|
||||
if (i < 7)
|
||||
dp->val.f = (float) *((double*) fargs); /* register */
|
||||
else
|
||||
dp->val.u32 = *(fargs); /* memory */
|
||||
break;
|
||||
case nsXPTType::T_DOUBLE :
|
||||
isfloat = 1;
|
||||
dp->val.u64 = *(fargs);
|
||||
break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *(iargs); break;
|
||||
case nsXPTType::T_CHAR : dp->val.c = *(iargs); break;
|
||||
case nsXPTType::T_WCHAR : dp->val.wc = *(iargs); break;
|
||||
default:
|
||||
NS_ERROR("bad type");
|
||||
break;
|
||||
}
|
||||
if (i < 7)
|
||||
{
|
||||
/* we are parsing register arguments */
|
||||
if (i == 6)
|
||||
{
|
||||
// run out of register arguments, move on to memory arguments
|
||||
iargs = restargs;
|
||||
fargs = restargs;
|
||||
}
|
||||
else
|
||||
{
|
||||
++iargs; // advance one integer register slot
|
||||
if (isfloat) ++fargs; // advance float register slot if isfloat
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* we are parsing memory arguments */
|
||||
++iargs;
|
||||
++fargs;
|
||||
}
|
||||
}
|
||||
|
||||
nsresult result = self->mOuter->CallMethod((uint16_t) methodIndex, info,
|
||||
paramBuffer);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
extern "C" nsresult SharedStub(uint64_t,uint64_t,uint64_t,uint64_t,
|
||||
uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t *);
|
||||
|
||||
/* Variable a0-a7 were put there so we can have access to the 8 input
|
||||
registers on Stubxyz entry */
|
||||
|
||||
#define STUB_ENTRY(n) \
|
||||
nsresult nsXPTCStubBase::Stub##n(uint64_t a1, \
|
||||
uint64_t a2,uint64_t a3,uint64_t a4,uint64_t a5,uint64_t a6,uint64_t a7, \
|
||||
uint64_t a8) \
|
||||
{ uint64_t a0 = (uint64_t) this; \
|
||||
return SharedStub(a0,a1,a2,a3,a4,a5,a6,a7,(uint64_t) n, &a8); \
|
||||
}
|
||||
|
||||
#define SENTINEL_ENTRY(n) \
|
||||
nsresult nsXPTCStubBase::Sentinel##n() \
|
||||
{ \
|
||||
NS_ERROR("nsXPTCStubBase::Sentinel called"); \
|
||||
return NS_ERROR_NOT_IMPLEMENTED; \
|
||||
}
|
||||
|
||||
#include "xptcstubsdef.inc"
|
@ -9,10 +9,6 @@
|
||||
|
||||
#include "xptcprivate.h"
|
||||
|
||||
#if _HPUX
|
||||
#error "This code is for HP-PA RISC 32 bit mode only"
|
||||
#endif
|
||||
|
||||
extern "C" nsresult ATTRIBUTE_USED
|
||||
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex,
|
||||
uint32_t* args, uint32_t* floatargs)
|
||||
|
@ -1,181 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* Implement shared vtbl methods. */
|
||||
|
||||
#include "xptcprivate.h"
|
||||
|
||||
#if defined(AIX)
|
||||
|
||||
/*
|
||||
For PPC (AIX & MAC), the first 8 integral and the first 13 f.p. parameters
|
||||
arrive in a separate chunk of data that has been loaded from the registers.
|
||||
The args pointer has been set to the start of the parameters BEYOND the ones
|
||||
arriving in registers
|
||||
*/
|
||||
extern "C" nsresult ATTRIBUTE_USED
|
||||
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args, uint32_t *gprData, double *fprData)
|
||||
{
|
||||
typedef struct {
|
||||
uint32_t hi;
|
||||
uint32_t lo; // have to move 64 bit entities as 32 bit halves since
|
||||
} DU; // stack slots are not guaranteed 16 byte aligned
|
||||
|
||||
#define PARAM_GPR_COUNT 7
|
||||
|
||||
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
|
||||
const nsXPTMethodInfo* info = nullptr;
|
||||
uint8_t paramCount;
|
||||
uint8_t i;
|
||||
|
||||
NS_ASSERTION(self,"no self");
|
||||
|
||||
self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
|
||||
NS_ASSERTION(info,"no method info");
|
||||
|
||||
paramCount = info->ParamCount();
|
||||
|
||||
const uint8_t indexOfJSContext = info->IndexOfJSContext();
|
||||
|
||||
uint32_t* ap = args;
|
||||
uint32_t iCount = 0;
|
||||
uint32_t fpCount = 0;
|
||||
for(i = 0; i < paramCount; i++)
|
||||
{
|
||||
const nsXPTParamInfo& param = info->Param(i);
|
||||
const nsXPTType& type = param.GetType();
|
||||
nsXPTCMiniVariant* dp = ¶mBuffer[i];
|
||||
|
||||
if (i == indexOfJSContext) {
|
||||
if (iCount < PARAM_GPR_COUNT)
|
||||
iCount++;
|
||||
else
|
||||
ap++;
|
||||
}
|
||||
|
||||
if(param.IsOut() || !type.IsArithmetic())
|
||||
{
|
||||
if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.p = (void*) gprData[iCount++];
|
||||
else
|
||||
dp->val.p = (void*) *ap++;
|
||||
continue;
|
||||
}
|
||||
// else
|
||||
switch(type)
|
||||
{
|
||||
case nsXPTType::T_I8 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.i8 = (int8_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.i8 = (int8_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_I16 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.i16 = (int16_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.i16 = (int16_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_I32 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.i32 = (int32_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.i32 = (int32_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_I64 : if (iCount < PARAM_GPR_COUNT)
|
||||
((DU *)dp)->hi = (int32_t) gprData[iCount++];
|
||||
else
|
||||
((DU *)dp)->hi = (int32_t) *ap++;
|
||||
if (iCount < PARAM_GPR_COUNT)
|
||||
((DU *)dp)->lo = (uint32_t) gprData[iCount++];
|
||||
else
|
||||
((DU *)dp)->lo = (uint32_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_U8 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.u8 = (uint8_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.u8 = (uint8_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_U16 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.u16 = (uint16_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.u16 = (uint16_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_U32 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.u32 = (uint32_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.u32 = (uint32_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_U64 : if (iCount < PARAM_GPR_COUNT)
|
||||
((DU *)dp)->hi = (uint32_t) gprData[iCount++];
|
||||
else
|
||||
((DU *)dp)->hi = (uint32_t) *ap++;
|
||||
if (iCount < PARAM_GPR_COUNT)
|
||||
((DU *)dp)->lo = (uint32_t) gprData[iCount++];
|
||||
else
|
||||
((DU *)dp)->lo = (uint32_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_FLOAT : if (fpCount < 13) {
|
||||
dp->val.f = (float) fprData[fpCount++];
|
||||
if (iCount < PARAM_GPR_COUNT)
|
||||
++iCount;
|
||||
else
|
||||
++ap;
|
||||
}
|
||||
else
|
||||
dp->val.f = *((float*) ap++);
|
||||
break;
|
||||
case nsXPTType::T_DOUBLE : if (fpCount < 13) {
|
||||
dp->val.d = (double) fprData[fpCount++];
|
||||
if (iCount < PARAM_GPR_COUNT)
|
||||
++iCount;
|
||||
else
|
||||
++ap;
|
||||
if (iCount < PARAM_GPR_COUNT)
|
||||
++iCount;
|
||||
else
|
||||
++ap;
|
||||
}
|
||||
else {
|
||||
dp->val.f = *((double*) ap);
|
||||
ap += 2;
|
||||
}
|
||||
break;
|
||||
case nsXPTType::T_BOOL : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.b = (bool) gprData[iCount++];
|
||||
else
|
||||
dp->val.b = (bool) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_CHAR : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.c = (char) gprData[iCount++];
|
||||
else
|
||||
dp->val.c = (char) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_WCHAR : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.wc = (wchar_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.wc = (wchar_t) *ap++;
|
||||
break;
|
||||
default:
|
||||
NS_ERROR("bad type");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
|
||||
paramBuffer);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#define STUB_ENTRY(n)
|
||||
|
||||
#define SENTINEL_ENTRY(n) \
|
||||
nsresult nsXPTCStubBase::Sentinel##n() \
|
||||
{ \
|
||||
NS_ERROR("nsXPTCStubBase::Sentinel called"); \
|
||||
return NS_ERROR_NOT_IMPLEMENTED; \
|
||||
}
|
||||
|
||||
#include "xptcstubsdef.inc"
|
||||
|
||||
#endif /* AIX */
|
@ -1,168 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* Implement shared vtbl methods. */
|
||||
|
||||
#include "xptcprivate.h"
|
||||
|
||||
#if defined(AIX)
|
||||
|
||||
/*
|
||||
For PPC (AIX & MAC), the first 8 integral and the first 13 f.p. parameters
|
||||
arrive in a separate chunk of data that has been loaded from the registers.
|
||||
The args pointer has been set to the start of the parameters BEYOND the ones
|
||||
arriving in registers
|
||||
*/
|
||||
extern "C" nsresult ATTRIBUTE_USED
|
||||
PrepareAndDispatch(nsXPTCStubBase* self, uint64_t methodIndex, uint64_t* args, uint64_t *gprData, double *fprData)
|
||||
{
|
||||
|
||||
#define PARAM_GPR_COUNT 7
|
||||
|
||||
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
|
||||
const nsXPTMethodInfo* info = nullptr;
|
||||
uint8_t paramCount;
|
||||
uint8_t i;
|
||||
|
||||
NS_ASSERTION(self,"no self");
|
||||
|
||||
self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
|
||||
NS_ASSERTION(info,"no method info");
|
||||
|
||||
paramCount = info->ParamCount();
|
||||
|
||||
const uint8_t indexOfJSContext = info->IndexOfJSContext();
|
||||
|
||||
uint64_t* ap = args;
|
||||
uint32_t iCount = 0;
|
||||
uint32_t fpCount = 0;
|
||||
for(i = 0; i < paramCount; i++)
|
||||
{
|
||||
const nsXPTParamInfo& param = info->Param(i);
|
||||
const nsXPTType& type = param.GetType();
|
||||
nsXPTCMiniVariant* dp = ¶mBuffer[i];
|
||||
|
||||
if (i == indexOfJSContext) {
|
||||
if (iCount < PARAM_GPR_COUNT)
|
||||
iCount++;
|
||||
else
|
||||
ap++;
|
||||
}
|
||||
|
||||
if(param.IsOut() || !type.IsArithmetic())
|
||||
{
|
||||
if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.p = (void*) gprData[iCount++];
|
||||
else
|
||||
dp->val.p = (void*) *ap++;
|
||||
continue;
|
||||
}
|
||||
// else
|
||||
switch(type)
|
||||
{
|
||||
case nsXPTType::T_I8 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.i8 = (int8_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.i8 = (int8_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_I16 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.i16 = (int16_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.i16 = (int16_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_I32 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.i32 = (int32_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.i32 = (int32_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_I64 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.i64 = (int64_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.i64 = (int64_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_U8 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.u8 = (uint8_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.u8 = (uint8_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_U16 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.u16 = (uint16_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.u16 = (uint16_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_U32 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.u32 = (uint32_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.u32 = (uint32_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_U64 : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.u64 = (uint64_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.u64 = (uint64_t) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_FLOAT : if (fpCount < 13) {
|
||||
dp->val.f = (float) fprData[fpCount++];
|
||||
if (iCount < PARAM_GPR_COUNT)
|
||||
++iCount;
|
||||
else
|
||||
++ap;
|
||||
}
|
||||
else
|
||||
dp->val.f = *((float*) ap++);
|
||||
break;
|
||||
case nsXPTType::T_DOUBLE : if (fpCount < 13) {
|
||||
dp->val.d = (double) fprData[fpCount++];
|
||||
if (iCount < PARAM_GPR_COUNT)
|
||||
++iCount;
|
||||
else
|
||||
++ap;
|
||||
if (iCount < PARAM_GPR_COUNT)
|
||||
++iCount;
|
||||
else
|
||||
++ap;
|
||||
}
|
||||
else {
|
||||
dp->val.f = *((double*) ap);
|
||||
ap += 2;
|
||||
}
|
||||
break;
|
||||
case nsXPTType::T_BOOL : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.b = (bool) gprData[iCount++];
|
||||
else
|
||||
dp->val.b = (bool) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_CHAR : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.c = (char) gprData[iCount++];
|
||||
else
|
||||
dp->val.c = (char) *ap++;
|
||||
break;
|
||||
case nsXPTType::T_WCHAR : if (iCount < PARAM_GPR_COUNT)
|
||||
dp->val.wc = (wchar_t) gprData[iCount++];
|
||||
else
|
||||
dp->val.wc = (wchar_t) *ap++;
|
||||
break;
|
||||
default:
|
||||
NS_ERROR("bad type");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
|
||||
paramBuffer);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#define STUB_ENTRY(n)
|
||||
|
||||
#define SENTINEL_ENTRY(n) \
|
||||
nsresult nsXPTCStubBase::Sentinel##n() \
|
||||
{ \
|
||||
NS_ERROR("nsXPTCStubBase::Sentinel called"); \
|
||||
return NS_ERROR_NOT_IMPLEMENTED; \
|
||||
}
|
||||
|
||||
#include "xptcstubsdef.inc"
|
||||
|
||||
#endif /* AIX */
|
Loading…
Reference in New Issue
Block a user