summaryrefslogtreecommitdiffstats
path: root/xpcom
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-04-05 20:01:10 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-04-05 20:01:10 +0200
commitc3b63b831cd2c64700e875b28540212c7c881ac6 (patch)
treeedd98fcbd2004d3b562904f822bf6c3322fc7f52 /xpcom
parentd432e068a21c815d5d5e7bcbc1cc8c6e77a7d1e0 (diff)
parentcc07da9cb4d6e7a53f8d953427ffc2bca2e0c2df (diff)
downloadUXP-c3b63b831cd2c64700e875b28540212c7c881ac6.tar
UXP-c3b63b831cd2c64700e875b28540212c7c881ac6.tar.gz
UXP-c3b63b831cd2c64700e875b28540212c7c881ac6.tar.lz
UXP-c3b63b831cd2c64700e875b28540212c7c881ac6.tar.xz
UXP-c3b63b831cd2c64700e875b28540212c7c881ac6.zip
Merge branch 'master' into 816
Diffstat (limited to 'xpcom')
-rw-r--r--xpcom/base/nsCycleCollector.cpp5
-rw-r--r--xpcom/base/nsCycleCollectorTraceJSHelpers.cpp5
-rw-r--r--xpcom/base/nsDebugImpl.cpp8
-rw-r--r--xpcom/base/nsMemoryReporterManager.cpp83
-rw-r--r--xpcom/base/nsObjCExceptions.h78
-rw-r--r--xpcom/build/nsXPCOMPrivate.h4
-rw-r--r--xpcom/ds/nsMathUtils.h4
-rw-r--r--xpcom/glue/nsCycleCollectionParticipant.h45
-rw-r--r--xpcom/glue/nsTArray.h18
-rw-r--r--xpcom/io/nsLocalFile.h7
-rw-r--r--xpcom/io/nsLocalFileUnix.cpp16
-rw-r--r--xpcom/io/nsLocalFileUnix.h5
-rw-r--r--xpcom/reflect/xptcall/md/unix/Makefile.in30
-rw-r--r--xpcom/reflect/xptcall/md/unix/moz.build82
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_aix.s129
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_aix64.s128
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_ibmobj_aix.s124
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparc_solaris_GCC3.s52
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparc_solaris_SUNW.s56
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparcv9_solaris_SUNW.s85
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_solaris_SUNW.s55
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_aix.cpp74
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_aix64.cpp63
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc_solaris.cpp131
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcinvoke_sparcv9_solaris.cpp73
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcinvoke_x86_64_solaris.cpp149
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcinvoke_x86_solaris.cpp67
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcstubs_asm_ppc_aix.s.m4119
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcstubs_asm_ppc_aix64.s.m497
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcstubs_asm_sparc_solaris.s49
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcstubs_asm_sparcv9_solaris.s50
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcstubs_asm_x86_64_solaris_SUNW.s63
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcstubs_asm_x86_solaris_SUNW.s78
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix.cpp185
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix64.cpp172
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_solaris.cpp112
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcstubs_sparcv9_solaris.cpp101
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_solaris.cpp139
-rw-r--r--xpcom/reflect/xptcall/md/unix/xptcstubs_x86_solaris.cpp77
-rw-r--r--xpcom/reflect/xptcall/status.html25
-rw-r--r--xpcom/threads/nsThread.cpp4
41 files changed, 56 insertions, 2791 deletions
diff --git a/xpcom/base/nsCycleCollector.cpp b/xpcom/base/nsCycleCollector.cpp
index d6dc26954..06ed42326 100644
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -2265,7 +2265,7 @@ CCGraphBuilder::BuildGraph(SliceBudget& aBudget)
SetFirstChild();
if (pi->mParticipant) {
- nsresult rv = pi->mParticipant->Traverse(pi->mPointer, *this);
+ nsresult rv = pi->mParticipant->TraverseNativeAndJS(pi->mPointer, *this);
MOZ_RELEASE_ASSERT(!NS_FAILED(rv), "Cycle collector Traverse method failed");
}
@@ -2539,7 +2539,7 @@ static bool
MayHaveChild(void* aObj, nsCycleCollectionParticipant* aCp)
{
ChildFinder cf;
- aCp->Traverse(aObj, cf);
+ aCp->TraverseNativeAndJS(aObj, cf);
return cf.MayHaveChild();
}
@@ -2596,7 +2596,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(JSPurpleBuffer)
CycleCollectionNoteChild(cb, tmp, "self");
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
#define NS_TRACE_SEGMENTED_ARRAY(_field, _type) \
diff --git a/xpcom/base/nsCycleCollectorTraceJSHelpers.cpp b/xpcom/base/nsCycleCollectorTraceJSHelpers.cpp
index 7c48002e3..f65a92e61 100644
--- a/xpcom/base/nsCycleCollectorTraceJSHelpers.cpp
+++ b/xpcom/base/nsCycleCollectorTraceJSHelpers.cpp
@@ -21,8 +21,9 @@ CycleCollectionNoteEdgeNameImpl(nsCycleCollectionTraversalCallback& aCallback,
}
void
-nsScriptObjectTracer::NoteJSChild(JS::GCCellPtr aGCThing, const char* aName,
- void* aClosure)
+nsCycleCollectionParticipant::NoteJSChild(JS::GCCellPtr aGCThing,
+ const char* aName,
+ void* aClosure)
{
nsCycleCollectionTraversalCallback* cb =
static_cast<nsCycleCollectionTraversalCallback*>(aClosure);
diff --git a/xpcom/base/nsDebugImpl.cpp b/xpcom/base/nsDebugImpl.cpp
index 96487acda..a81eb3d71 100644
--- a/xpcom/base/nsDebugImpl.cpp
+++ b/xpcom/base/nsDebugImpl.cpp
@@ -450,12 +450,6 @@ RealBreak()
".object_arch armv4t\n"
#endif
"BKPT #0");
-#elif defined(SOLARIS)
-#if defined(__i386__) || defined(__i386) || defined(__x86_64__)
- asm("int $3");
-#else
- raise(SIGTRAP);
-#endif
#else
#warning do not know how to break on this platform
#endif
@@ -530,8 +524,6 @@ Break(const char* aMsg)
RealBreak();
#elif defined(__arm__)
RealBreak();
-#elif defined(SOLARIS)
- RealBreak();
#else
#warning do not know how to break on this platform
#endif
diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp
index bfeda063b..88964f9b5 100644
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -317,85 +317,6 @@ VsizeMaxContiguousDistinguishedAmount(int64_t* aN)
}
#endif // FreeBSD
-#elif defined(SOLARIS)
-
-#include <procfs.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-static void
-XMappingIter(int64_t& aVsize, int64_t& aResident)
-{
- aVsize = -1;
- aResident = -1;
- int mapfd = open("/proc/self/xmap", O_RDONLY);
- struct stat st;
- prxmap_t* prmapp = nullptr;
- if (mapfd >= 0) {
- if (!fstat(mapfd, &st)) {
- int nmap = st.st_size / sizeof(prxmap_t);
- while (1) {
- // stat(2) on /proc/<pid>/xmap returns an incorrect value,
- // prior to the release of Solaris 11.
- // Here is a workaround for it.
- nmap *= 2;
- prmapp = (prxmap_t*)malloc((nmap + 1) * sizeof(prxmap_t));
- if (!prmapp) {
- // out of memory
- break;
- }
- int n = pread(mapfd, prmapp, (nmap + 1) * sizeof(prxmap_t), 0);
- if (n < 0) {
- break;
- }
- if (nmap >= n / sizeof(prxmap_t)) {
- aVsize = 0;
- aResident = 0;
- for (int i = 0; i < n / sizeof(prxmap_t); i++) {
- aVsize += prmapp[i].pr_size;
- aResident += prmapp[i].pr_rss * prmapp[i].pr_pagesize;
- }
- break;
- }
- free(prmapp);
- }
- free(prmapp);
- }
- close(mapfd);
- }
-}
-
-#define HAVE_VSIZE_AND_RESIDENT_REPORTERS 1
-static MOZ_MUST_USE nsresult
-VsizeDistinguishedAmount(int64_t* aN)
-{
- int64_t vsize, resident;
- XMappingIter(vsize, resident);
- if (vsize == -1) {
- return NS_ERROR_FAILURE;
- }
- *aN = vsize;
- return NS_OK;
-}
-
-static MOZ_MUST_USE nsresult
-ResidentDistinguishedAmount(int64_t* aN)
-{
- int64_t vsize, resident;
- XMappingIter(vsize, resident);
- if (resident == -1) {
- return NS_ERROR_FAILURE;
- }
- *aN = resident;
- return NS_OK;
-}
-
-static MOZ_MUST_USE nsresult
-ResidentFastDistinguishedAmount(int64_t* aN)
-{
- return ResidentDistinguishedAmount(aN);
-}
-
#elif defined(XP_MACOSX)
#include <mach/mach_init.h>
@@ -1145,13 +1066,9 @@ ResidentPeakDistinguishedAmount(int64_t* aN)
if (0 == getrusage(RUSAGE_SELF, &usage)) {
// The units for ru_maxrrs:
// - Mac: bytes
- // - Solaris: pages? But some sources it actually always returns 0, so
- // check for that
// - Linux, {Net/Open/Free}BSD, DragonFly: KiB
#ifdef XP_MACOSX
*aN = usage.ru_maxrss;
-#elif defined(SOLARIS)
- *aN = usage.ru_maxrss * getpagesize();
#else
*aN = usage.ru_maxrss * 1024;
#endif
diff --git a/xpcom/base/nsObjCExceptions.h b/xpcom/base/nsObjCExceptions.h
index b3ed532ec..e542a22f8 100644
--- a/xpcom/base/nsObjCExceptions.h
+++ b/xpcom/base/nsObjCExceptions.h
@@ -13,10 +13,6 @@
#import <Foundation/Foundation.h>
-#ifdef DEBUG
-#import <ExceptionHandling/NSExceptionHandler.h>
-#endif
-
#include <unistd.h>
#include <signal.h>
#include "nsError.h"
@@ -40,80 +36,6 @@ nsObjCExceptionLog(NSException* aException)
{
NSLog(@"Mozilla has caught an Obj-C exception [%@: %@]",
[aException name], [aException reason]);
-
-#ifdef DEBUG
- @try {
- // Try to get stack information out of the exception. 10.5 returns the stack
- // info with the callStackReturnAddresses selector.
- NSArray* stackTrace = nil;
- if ([aException respondsToSelector:@selector(callStackReturnAddresses)]) {
- NSArray* addresses = (NSArray*)
- [aException performSelector:@selector(callStackReturnAddresses)];
- if ([addresses count]) {
- stackTrace = addresses;
- }
- }
-
- // 10.4 doesn't respond to callStackReturnAddresses so we'll try to pull the
- // stack info out of the userInfo. It might not be there, sadly :(
- if (!stackTrace) {
- stackTrace = [[aException userInfo] objectForKey:NSStackTraceKey];
- }
-
- if (stackTrace) {
- // The command line should look like this:
- // /usr/bin/atos -p <pid> -printHeader <stack frame addresses>
- NSMutableArray* args =
- [NSMutableArray arrayWithCapacity:[stackTrace count] + 3];
-
- [args addObject:@"-p"];
- int pid = [[NSProcessInfo processInfo] processIdentifier];
- [args addObject:[NSString stringWithFormat:@"%d", pid]];
-
- [args addObject:@"-printHeader"];
-
- unsigned int stackCount = [stackTrace count];
- unsigned int stackIndex = 0;
- for (; stackIndex < stackCount; stackIndex++) {
- unsigned long address =
- [[stackTrace objectAtIndex:stackIndex] unsignedLongValue];
- [args addObject:[NSString stringWithFormat:@"0x%lx", address]];
- }
-
- NSPipe* outPipe = [NSPipe pipe];
-
- NSTask* task = [[NSTask alloc] init];
- [task setLaunchPath:@"/usr/bin/atos"];
- [task setArguments:args];
- [task setStandardOutput:outPipe];
- [task setStandardError:outPipe];
-
- NSLog(@"Generating stack trace for Obj-C exception...");
-
- // This will throw an exception if the atos tool cannot be found, and in
- // that case we'll just hit our @catch block below.
- [task launch];
-
- [task waitUntilExit];
- [task release];
-
- NSData* outData =
- [[outPipe fileHandleForReading] readDataToEndOfFile];
- NSString* outString =
- [[NSString alloc] initWithData:outData encoding:NSUTF8StringEncoding];
-
- NSLog(@"Stack trace:\n%@", outString);
-
- [outString release];
- } else {
- NSLog(@"<No stack information available for Obj-C exception>");
- }
- }
- @catch (NSException* exn) {
- NSLog(@"Failed to generate stack trace for Obj-C exception [%@: %@]",
- [exn name], [exn reason]);
- }
-#endif
}
__attribute__((unused))
diff --git a/xpcom/build/nsXPCOMPrivate.h b/xpcom/build/nsXPCOMPrivate.h
index 99a994013..143ed034e 100644
--- a/xpcom/build/nsXPCOMPrivate.h
+++ b/xpcom/build/nsXPCOMPrivate.h
@@ -281,10 +281,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
diff --git a/xpcom/ds/nsMathUtils.h b/xpcom/ds/nsMathUtils.h
index b10b8144e..cbbd38611 100644
--- a/xpcom/ds/nsMathUtils.h
+++ b/xpcom/ds/nsMathUtils.h
@@ -11,10 +11,6 @@
#include <cmath>
#include <float.h>
-#ifdef SOLARIS
-#include <ieeefp.h>
-#endif
-
/*
* round
*/
diff --git a/xpcom/glue/nsCycleCollectionParticipant.h b/xpcom/glue/nsCycleCollectionParticipant.h
index 2dfbb6750..5d03acd26 100644
--- a/xpcom/glue/nsCycleCollectionParticipant.h
+++ b/xpcom/glue/nsCycleCollectionParticipant.h
@@ -113,11 +113,38 @@ private:
class NS_NO_VTABLE nsCycleCollectionParticipant
{
public:
- constexpr nsCycleCollectionParticipant() : mMightSkip(false) {}
- constexpr explicit nsCycleCollectionParticipant(bool aSkip) : mMightSkip(aSkip) {}
+ constexpr nsCycleCollectionParticipant()
+ : mMightSkip(false)
+ , mTraverseShouldTrace(false)
+ {
+ }
+
+ constexpr explicit nsCycleCollectionParticipant(bool aSkip,
+ bool aTraverseShouldTrace = false)
+ : mMightSkip(aSkip)
+ , mTraverseShouldTrace(aTraverseShouldTrace)
+ {
+ }
NS_IMETHOD Traverse(void* aPtr, nsCycleCollectionTraversalCallback& aCb) = 0;
+ nsresult TraverseNativeAndJS(void* aPtr,
+ nsCycleCollectionTraversalCallback& aCb)
+ {
+ nsresult rv = Traverse(aPtr, aCb);
+ if (mTraverseShouldTrace) {
+ // Note, we always call Trace, even if Traverse returned
+ // NS_SUCCESS_INTERRUPTED_TRAVERSE.
+ TraceCallbackFunc noteJsChild(&nsCycleCollectionParticipant::NoteJSChild);
+ Trace(aPtr, noteJsChild, &aCb);
+ }
+ return rv;
+ }
+
+ // Implemented in nsCycleCollectorTraceJSHelpers.cpp.
+ static void NoteJSChild(JS::GCCellPtr aGCThing, const char* aName,
+ void* aClosure);
+
NS_IMETHOD_(void) Root(void* aPtr) = 0;
NS_IMETHOD_(void) Unlink(void* aPtr) = 0;
NS_IMETHOD_(void) Unroot(void* aPtr) = 0;
@@ -172,26 +199,24 @@ protected:
private:
const bool mMightSkip;
+ const bool mTraverseShouldTrace;
};
class NS_NO_VTABLE nsScriptObjectTracer : public nsCycleCollectionParticipant
{
public:
constexpr nsScriptObjectTracer()
- : nsCycleCollectionParticipant(false)
+ : nsCycleCollectionParticipant(false, true)
{
}
constexpr explicit nsScriptObjectTracer(bool aSkip)
- : nsCycleCollectionParticipant(aSkip)
+ : nsCycleCollectionParticipant(aSkip, true)
{
}
NS_IMETHOD_(void) Trace(void* aPtr, const TraceCallbacks& aCb,
void* aClosure) override = 0;
- // Implemented in nsCycleCollectorTraceJSHelpers.cpp.
- static void NoteJSChild(JS::GCCellPtr aGCThing, const char* aName,
- void* aClosure);
};
class NS_NO_VTABLE nsXPCOMCycleCollectionParticipant : public nsScriptObjectTracer
@@ -440,12 +465,6 @@ DowncastCCParticipant(void* aPtr)
#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE_RAWPTR(_field) \
CycleCollectionNoteChild(cb, tmp->_field, #_field);
-#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS \
- { \
- TraceCallbackFunc noteJsChild(&nsScriptObjectTracer::NoteJSChild); \
- Trace(p, noteJsChild, &cb); \
- }
-
#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END \
(void)tmp; \
return NS_OK; \
diff --git a/xpcom/glue/nsTArray.h b/xpcom/glue/nsTArray.h
index 82586a79a..64af17bbb 100644
--- a/xpcom/glue/nsTArray.h
+++ b/xpcom/glue/nsTArray.h
@@ -1503,6 +1503,24 @@ public:
mozilla::Forward<Item>(aItem));
}
+ // Reconstruct the element at the given index, and return a pointer to the
+ // reconstructed element. This will destroy the existing element and
+ // default-construct a new one, giving you a state much like what single-arg
+ // InsertElementAt(), or no-arg AppendElement() does, but without changing the
+ // length of the array.
+ //
+ // array[idx] = T()
+ //
+ // would accomplish the same thing as long as T has the appropriate moving
+ // operator=, but some types don't for various reasons.
+ elem_type* ReconstructElementAt(index_type aIndex)
+ {
+ elem_type* elem = &ElementAt(aIndex);
+ elem_traits::Destruct(elem);
+ elem_traits::Construct(elem);
+ return elem;
+ }
+
// This method searches for the smallest index of an element that is strictly
// greater than |aItem|. If |aItem| is inserted at this index, the array will
// remain sorted and |aItem| would come after all elements that are equal to
diff --git a/xpcom/io/nsLocalFile.h b/xpcom/io/nsLocalFile.h
index f7bdb86f7..a8e0a1279 100644
--- a/xpcom/io/nsLocalFile.h
+++ b/xpcom/io/nsLocalFile.h
@@ -91,15 +91,8 @@ 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.
diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
index 194e5835e..272153bba 100644
--- a/xpcom/io/nsLocalFileUnix.cpp
+++ b/xpcom/io/nsLocalFileUnix.cpp
@@ -1591,22 +1591,6 @@ nsLocalFile::IsExecutable(bool* aResult)
// Then check the execute bit.
*aResult = (access(mPath.get(), X_OK) == 0);
-#ifdef SOLARIS
- // On Solaris, access will always return 0 for root user, however
- // the file is only executable if S_IXUSR | S_IXGRP | S_IXOTH is set.
- // See bug 351950, https://bugzilla.mozilla.org/show_bug.cgi?id=351950
- if (*aResult) {
- struct STAT buf;
-
- *aResult = (STAT(mPath.get(), &buf) == 0);
- if (*aResult || errno == EACCES) {
- *aResult = *aResult && (buf.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH));
- return NS_OK;
- }
-
- return NSRESULT_FOR_ERRNO();
- }
-#endif
if (*aResult || errno == EACCES) {
return NS_OK;
}
diff --git a/xpcom/io/nsLocalFileUnix.h b/xpcom/io/nsLocalFileUnix.h
index 9a3e7d6af..5ef581ed1 100644
--- a/xpcom/io/nsLocalFileUnix.h
+++ b/xpcom/io/nsLocalFileUnix.h
@@ -65,11 +65,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
diff --git a/xpcom/reflect/xptcall/md/unix/Makefile.in b/xpcom/reflect/xptcall/md/unix/Makefile.in
index 716d79623..4a5bc6f02 100644
--- a/xpcom/reflect/xptcall/md/unix/Makefile.in
+++ b/xpcom/reflect/xptcall/md/unix/Makefile.in
@@ -24,13 +24,6 @@ endif
# PowerPC
######################################################################
#
-# AIX/PPC
-#
-ifeq ($(OS_ARCH),AIX)
-# #24617 Building the CPP's (CXX) optimized causes a crash
-CXXFLAGS := $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(CXXFLAGS))
-endif
-
include $(topsrcdir)/config/rules.mk
ifeq ($(OS_ARCH),Linux)
@@ -43,26 +36,3 @@ ifeq ($(OS_ARCH),Darwin)
xptcstubs_asm_ppc_darwin.s: xptcstubs_asm_ppc_darwin.s.m4 $(DIST)/include/xptcstubsdef.inc Makefile
gm4 $(INCLUDES) $< > $@
endif
-
-ifeq ($(OS_ARCH),AIX)
-ifdef HAVE_64BIT_BUILD
-xptcstubs_asm_ppc_aix64.s: xptcstubs_asm_ppc_aix64.s.m4 $(DIST)/include/xptcstubsdef.inc Makefile
- m4 -DAIX_OBJMODEL=$(AIX_OBJMODEL) $(INCLUDES) -I. $< > $@
-else
-xptcstubs_asm_ppc_aix.s: xptcstubs_asm_ppc_aix.s.m4 $(DIST)/include/xptcstubsdef.inc Makefile
- m4 -DAIX_OBJMODEL=$(AIX_OBJMODEL) $(INCLUDES) -I. $< > $@
-endif
-endif
-
-ifeq ($(OS_ARCH),SunOS)
-ifeq (86,$(findstring 86,$(OS_TEST)))
-ifndef GNU_CC
-xptcstubsdef_asm.solx86: $(DIST)/include/xptcstubsdef.inc
- sed \
- -e 's/^\(STUB_ENTRY\)(\([0-9]\))/\11\(\2\)/' \
- -e 's/^\(STUB_ENTRY\)(\([0-9][0-9]\))/\12\(\2\)/' \
- -e 's/^\(STUB_ENTRY\)(\([0-9][0-9][0-9]\))/\13\(\2\)/' \
- $(DIST)/include/xptcstubsdef.inc > $@
-endif
-endif
-endif
diff --git a/xpcom/reflect/xptcall/md/unix/moz.build b/xpcom/reflect/xptcall/md/unix/moz.build
index 148d3bf35..d455ed854 100644
--- a/xpcom/reflect/xptcall/md/unix/moz.build
+++ b/xpcom/reflect/xptcall/md/unix/moz.build
@@ -46,36 +46,6 @@ if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'):
'xptcstubs_ipf64.cpp'
]
-if CONFIG['OS_ARCH'] == 'SunOS' and '86' in CONFIG['OS_TEST']:
- GENERATED_FILES = [
- 'xptcstubsdef_asm.solx86',
- ]
- if CONFIG['OS_TEST'] == 'x86_64':
- if CONFIG['GNU_CC']:
- SOURCES += [
- 'xptcinvoke_x86_64_unix.cpp',
- 'xptcstubs_x86_64_linux.cpp'
- ]
- else:
- ASFLAGS += ['-xarch=amd64']
- SOURCES += [
- 'xptcinvoke_x86_64_solaris.cpp',
- 'xptcstubs_asm_x86_64_solaris_SUNW.s',
- 'xptcstubs_x86_64_solaris.cpp',
- ]
- else:
- if CONFIG['GNU_CC']:
- SOURCES += [
- 'xptcinvoke_gcc_x86_unix.cpp',
- 'xptcstubs_gcc_x86_unix.cpp'
- ]
- else:
- SOURCES += [
- 'xptcinvoke_asm_x86_solaris_SUNW.s',
- 'xptcinvoke_x86_solaris.cpp',
- 'xptcstubs_asm_x86_solaris_SUNW.s',
- 'xptcstubs_x86_solaris.cpp'
- ]
if CONFIG['OS_TEST'] == 'alpha':
if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD'):
@@ -157,29 +127,6 @@ if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD', 'OpenBSD'):
'xptcstubs_mips.cpp',
]
-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['OS_TEST'] == 'powerpc':
if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'):
SOURCES += [
@@ -247,35 +194,6 @@ if CONFIG['OS_ARCH'] in ('OpenBSD', 'FreeBSD') and CONFIG['OS_TEST'] == 'sparc64
'xptcstubs_sparc64_openbsd.cpp',
]
-if CONFIG['OS_ARCH'] == 'SunOS' and '86' not in CONFIG['OS_TEST']:
- if CONFIG['HAVE_64BIT_BUILD']:
- ASFLAGS += ['-xarch=v9']
- SOURCES += [
- 'xptcinvoke_sparcv9_solaris.cpp',
- 'xptcstubs_sparcv9_solaris.cpp',
- ]
- else:
- SOURCES += [
- 'xptcinvoke_sparc_solaris.cpp',
- 'xptcstubs_sparc_solaris.cpp',
- ]
- if CONFIG['GNU_CC']:
- SOURCES += [
- 'xptcinvoke_asm_sparc_solaris_GCC3.s',
- 'xptcstubs_asm_sparc_solaris.s',
- ]
- else:
- if CONFIG['HAVE_64BIT_BUILD']:
- SOURCES += [
- 'xptcinvoke_asm_sparcv9_solaris_SUNW.s',
- 'xptcstubs_asm_sparcv9_solaris.s',
- ]
- else:
- SOURCES += [
- 'xptcinvoke_asm_sparc_solaris_SUNW.s',
- 'xptcstubs_asm_sparc_solaris.s',
- ]
-
if CONFIG['OS_ARCH'] == 'Linux':
if CONFIG['OS_TEST'] == 's390':
SOURCES += [
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_aix.s b/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_aix.s
deleted file mode 100644
index eb6b6661d..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_aix.s
+++ /dev/null
@@ -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/.
-
-.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
- stw r31,-4(sp)
-#
-# save off the incoming values in the caller's parameter area
-#
- stw r3,24(sp) # that
- stw r4,28(sp) # methodIndex
- stw r5,32(sp) # paramCount
- stw r6,36(sp) # params
- stw r0,8(sp)
- stwu sp,-136(sp) # = 24 for linkage area, 8 * 13 for fprData area, 8 for saved registers
-
-# prepare args for 'invoke_copy_to_stack' call
-#
- lwz r4,168(sp) # paramCount
- lwz r5,172(sp) # params
- mr r6,sp # fprData
- slwi r3,r4,3 # number of bytes of stack required
- # at most 8*paramCount
- addi r3,r3,28 # linkage area
- mr r31,sp # save original stack top
- subfc sp,r3,sp # bump the stack
- addi r3,sp,28 # 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)
-
- lwz r3,160(r31) # that
- lwz r4,0(r3) # get vTable from 'that'
- lwz r5,164(r31) # methodIndex
- slwi r5,r5,3 # methodIndex * 8
- addi r5,r5,8 # step over junk at start of vTable !
- lwzx r11,r5,r4 # get function pointer
-
- addi r5,r5,4 # We need to manually adjust the 'that' pointer, this is CFRONT based
- lwzx r5,r4,r5 # offset = r4(vtable) + r5(methodIndex offset) - 4
- add r3,r5,r3 # adjust 'that' r3 = r3 + r5
-
- lwz r4,28(sp)
- lwz r5,32(sp)
- lwz r6,36(sp)
- lwz r7,40(sp)
- lwz r8,44(sp)
- lwz r9,48(sp)
- lwz r10,52(sp)
-
- bl ._ptrgl{PR}
- nop
-
- mr sp,r31
- lwz r0,144(sp)
- addi sp,sp,136
- mtlr r0
- lwz r31,-4(sp)
- blr
-
-
-# .data section
-
- .toc # 0x00000038
-T.18.NS_InvokeByIndex:
- .tc H.18.NS_InvokeByIndex{TC},NS_InvokeByIndex{DS}
-
- .csect NS_InvokeByIndex{DS}
- .long .NS_InvokeByIndex # "\0\0\0\0"
- .long TOC{TC0} # "\0\0\0008"
- .long 0x00000000 # "\0\0\0\0"
-# End csect NS_InvokeByIndex{DS}
-
-# .bss section
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_aix64.s b/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_aix64.s
deleted file mode 100644
index 722583de5..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_aix64.s
+++ /dev/null
@@ -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
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_ibmobj_aix.s b/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_ibmobj_aix.s
deleted file mode 100644
index 414a6536f..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_ppc_ibmobj_aix.s
+++ /dev/null
@@ -1,124 +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/.
-
-.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
- stw r31,-4(sp)
-#
-# save off the incoming values in the caller's parameter area
-#
- stw r3,24(sp) # that
- stw r4,28(sp) # methodIndex
- stw r5,32(sp) # paramCount
- stw r6,36(sp) # params
- stw r0,8(sp)
- stwu sp,-136(sp) # = 24 for linkage area, 8 * 13 for fprData area, 8 for saved registers
-
-# prepare args for 'invoke_copy_to_stack' call
-#
- lwz r4,168(sp) # paramCount
- lwz r5,172(sp) # params
- mr r6,sp # fprData
- slwi r3,r4,3 # number of bytes of stack required
- # at most 8*paramCount
- addi r3,r3,28 # linkage area
- mr r31,sp # save original stack top
- subfc sp,r3,sp # bump the stack
- addi r3,sp,28 # 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)
-
- lwz r3,160(r31) # that
- lwz r4,0(r3) # get vTable from 'that'
- lwz r5,164(r31) # methodIndex
- slwi r5,r5,2 # methodIndex * 4
- lwzx r11,r5,r4 # get function pointer
-
- lwz r4,28(sp)
- lwz r5,32(sp)
- lwz r6,36(sp)
- lwz r7,40(sp)
- lwz r8,44(sp)
- lwz r9,48(sp)
- lwz r10,52(sp)
-
- bl ._ptrgl{PR}
- nop
-
- mr sp,r31
- lwz r0,144(sp)
- addi sp,sp,136
- mtlr r0
- lwz r31,-4(sp)
- blr
-
-
-# .data section
-
- .toc # 0x00000038
-T.18.NS_InvokeByIndex:
- .tc H.18.NS_InvokeByIndex{TC},NS_InvokeByIndex{DS}
-
- .csect NS_InvokeByIndex{DS}
- .long .NS_InvokeByIndex # "\0\0\0\0"
- .long TOC{TC0} # "\0\0\0008"
- .long 0x00000000 # "\0\0\0\0"
-# End csect NS_InvokeByIndex{DS}
-
-# .bss section
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparc_solaris_GCC3.s b/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparc_solaris_GCC3.s
deleted file mode 100644
index 54adcd147..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparc_solaris_GCC3.s
+++ /dev/null
@@ -1,52 +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 for
- * solaris/sparc with gcc 3 ABI.
- */
- .global NS_InvokeByIndex
-/*
- * NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
- * uint32_t paramCount, nsXPTCVariant* params);
- */
-NS_InvokeByIndex:
- save %sp,-(64 + 32),%sp ! room for the register window and
- ! struct pointer, rounded up to 0 % 32
- mov %i2,%o0 ! paramCount
- call invoke_count_words ! returns the required stack size in %o0
- mov %i3,%o1 ! params
-
- sll %o0,2,%l0 ! number of bytes
- sub %sp,%l0,%sp ! create the additional stack space
-
- mov %sp,%o0 ! pointer for copied args
- add %o0,72,%o0 ! step past the register window, the
- ! struct result pointer and the 'this' slot
- mov %i2,%o1 ! paramCount
- call invoke_copy_to_stack
- mov %i3,%o2 ! params
-!
-! calculate the target address from the vtable
-!
- ld [%i0],%l1 ! *that --> vTable
- sll %i1,2,%i1 ! multiply index by 4
- add %i1,%l1,%l1 ! l1 now points to vTable entry
- ld [%l1],%l0 ! target address
-
-.L5: ld [%sp + 88],%o5
-.L4: ld [%sp + 84],%o4
-.L3: ld [%sp + 80],%o3
-.L2: ld [%sp + 76],%o2
-.L1: ld [%sp + 72],%o1
-.L0:
- jmpl %l0,%o7 ! call the routine
-! always have a 'this', from the incoming 'that'
- mov %i0,%o0
-
- mov %o0,%i0 ! propagate return value
- ret
- restore
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparc_solaris_SUNW.s b/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparc_solaris_SUNW.s
deleted file mode 100644
index 013770392..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparc_solaris_SUNW.s
+++ /dev/null
@@ -1,56 +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 */
-
- .global NS_InvokeByIndex
- .type NS_InvokeByIndex, #function
-/*
- NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
- uint32_t paramCount, nsXPTCVariant* params);
-
-*/
-NS_InvokeByIndex:
- save %sp,-(64 + 32),%sp ! room for the register window and
- ! struct pointer, rounded up to 0 % 32
- sll %i2,3,%l0 ! assume the worst case
- ! paramCount * 2 * 4 bytes
- cmp %l0, 0 ! are there any args? If not,
- be .invoke ! no need to copy args to stack
-
- sub %sp,%l0,%sp ! create the additional stack space
- add %sp,72,%o0 ! step past the register window, the
- ! struct result pointer and the 'this' slot
- mov %i2,%o1 ! paramCount
- call invoke_copy_to_stack
- mov %i3,%o2 ! params
-
-!
-! load arguments from stack into the outgoing registers
-!
- ld [%sp + 72],%o1
- ld [%sp + 76],%o2
- ld [%sp + 80],%o3
- ld [%sp + 84],%o4
- ld [%sp + 88],%o5
-
-!
-! calculate the target address from the vtable
-!
-.invoke:
- sll %i1,2,%l0 ! index *= 4
- add %l0,8,%l0 ! there are 2 extra entries in the vTable
- ld [%i0],%l1 ! *that --> address of vtable
- ld [%l0 + %l1],%l0 ! that->vtable[index * 4 + 8] --> address
-
- jmpl %l0,%o7 ! call the routine
- mov %i0,%o0 ! move 'this' pointer to out register
-
- mov %o0,%i0 ! propagate return value
- ret
- restore
-
- .size NS_InvokeByIndex, .-NS_InvokeByIndex
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparcv9_solaris_SUNW.s b/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparcv9_solaris_SUNW.s
deleted file mode 100644
index 34861abc0..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparcv9_solaris_SUNW.s
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: asm; 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/. */
-
-/*
- Platform specific code to invoke XPCOM methods on native objects
- for sparcv9 Solaris.
-
- See the SPARC Compliance Definition (SCD) Chapter 3
- for more information about what is going on here, including
- the use of BIAS (0x7ff).
- The SCD is available from http://www.sparc.com/.
-*/
-
- .global NS_InvokeByIndex
- .type NS_InvokeByIndex, #function
-
-/*
- NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
- uint32_t paramCount, nsXPTCVariant* params);
-
-*/
-NS_InvokeByIndex:
- save %sp,-(128 + 64),%sp ! room for the register window and
- ! struct pointer, rounded up to 0 % 64
- sll %i2,4,%l0 ! assume the worst case
- ! paramCount * 2 * 8 bytes
- cmp %l0, 0 ! are there any args? If not,
- be .invoke ! no need to copy args to stack
-
- sub %sp,%l0,%sp ! create the additional stack space
- add %sp,0x7ff+136,%o0 ! step past the register window, the
- ! struct result pointer and the 'this' slot
- mov %i2,%o1 ! paramCount
- call invoke_copy_to_stack
- mov %i3,%o2 ! params
-
-!
-! load arguments from stack into the outgoing registers
-! BIAS is 0x7ff (2047)
-!
-
-! load the %o1..5 64bit (extended word) output registers registers
- ldx [%sp + 0x7ff + 136],%o1 ! %i1
- ldx [%sp + 0x7ff + 144],%o2 ! %i2
- ldx [%sp + 0x7ff + 152],%o3 ! %i3
- ldx [%sp + 0x7ff + 160],%o4 ! %i4
- ldx [%sp + 0x7ff + 168],%o5 ! %i5
-
-! load the even number double registers starting with %d2
- ldd [%sp + 0x7ff + 136],%d2
- ldd [%sp + 0x7ff + 144],%d4
- ldd [%sp + 0x7ff + 152],%d6
- ldd [%sp + 0x7ff + 160],%d8
- ldd [%sp + 0x7ff + 168],%d10
- ldd [%sp + 0x7ff + 176],%d12
- ldd [%sp + 0x7ff + 184],%d14
- ldd [%sp + 0x7ff + 192],%d16
- ldd [%sp + 0x7ff + 200],%d18
- ldd [%sp + 0x7ff + 208],%d20
- ldd [%sp + 0x7ff + 216],%d22
- ldd [%sp + 0x7ff + 224],%d24
- ldd [%sp + 0x7ff + 232],%d26
- ldd [%sp + 0x7ff + 240],%d28
- ldd [%sp + 0x7ff + 248],%d30
-
-!
-! calculate the target address from the vtable
-!
-.invoke:
- sll %i1,3,%l0 ! index *= 8
- add %l0,16,%l0 ! there are 2 extra entries in the vTable (16bytes)
- ldx [%i0],%l1 ! *that --> address of vtable
- ldx [%l0 + %l1],%l0 ! that->vtable[index * 8 + 16] --> address
-
- jmpl %l0,%o7 ! call the routine
- mov %i0,%o0 ! move 'this' pointer to out register
-
- mov %o0,%i0 ! propagate return value
- ret
- restore
-
- .size NS_InvokeByIndex, .-NS_InvokeByIndex
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_solaris_SUNW.s b/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_solaris_SUNW.s
deleted file mode 100644
index af665a162..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_solaris_SUNW.s
+++ /dev/null
@@ -1,55 +0,0 @@
- .globl NS_InvokeByIndex
- .type NS_InvokeByIndex, @function
-NS_InvokeByIndex:
- push %ebp
- movl %esp,%ebp
- push %ebx
- call .CG0.66
-.CG0.66:
- pop %ebx
- addl $_GLOBAL_OFFSET_TABLE_+0x1,%ebx
- push 20(%ebp)
- push 16(%ebp)
- push 12(%ebp)
- push 8(%ebp)
- / INLINE: invoke_by_index
-
-
-
- pushl %ebx
- pushl %esi
- movl %esp, %ebx
-
- pushl 0x14(%ebp)
- pushl 0x10(%ebp)
- call invoke_count_words
- mov %ebx, %esp
-
- sall $0x2 , %eax
- subl %eax, %esp
- movl %esp, %esi
-
- pushl %esp
- pushl 0x14(%ebp)
- pushl 0x10(%ebp)
- call invoke_copy_to_stack
- movl %esi, %esp
-
- movl 0x8(%ebp), %ecx
- pushl %ecx
- movl (%ecx), %edx
- movl 0xc(%ebp), %eax
- movl 0x8(%edx, %eax, 4), %edx
-
- call *%edx
- mov %ebx, %esp
- popl %esi
- popl %ebx
- / INLINE_END
- addl $16,%esp
- pop %ebx
- movl %ebp,%esp
- pop %ebp
- ret
- .size NS_InvokeByIndex, . - NS_InvokeByIndex
-
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_aix.cpp b/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_aix.cpp
deleted file mode 100644
index ba2a5dab0..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_aix.cpp
+++ /dev/null
@@ -1,74 +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;
- }
- }
-}
-
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_aix64.cpp b/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_aix64.cpp
deleted file mode 100644
index 616c2f687..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_aix64.cpp
+++ /dev/null
@@ -1,63 +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
-
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc_solaris.cpp b/xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc_solaris.cpp
deleted file mode 100644
index 126ef1dad..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc_solaris.cpp
+++ /dev/null
@@ -1,131 +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"
-
-/* solaris defines __sparc for workshop compilers and
- linux defines __sparc__ */
-
-#if !defined(__sparc) && !defined(__sparc__)
-#error "This code is for Sparc only"
-#endif
-
-typedef unsigned nsXPCVariant;
-
-extern "C" uint32_t
-invoke_count_words(uint32_t paramCount, nsXPTCVariant* s)
-{
- uint32_t result = 0;
- for(uint32_t i = 0; i < paramCount; i++, s++)
- {
- if(s->IsPtrData())
- {
- result++;
- continue;
- }
- switch(s->type)
- {
- case nsXPTType::T_I8 :
- case nsXPTType::T_I16 :
- case nsXPTType::T_I32 :
- result++;
- break;
- case nsXPTType::T_I64 :
- result+=2;
- break;
- case nsXPTType::T_U8 :
- case nsXPTType::T_U16 :
- case nsXPTType::T_U32 :
- result++;
- break;
- case nsXPTType::T_U64 :
- result+=2;
- break;
- case nsXPTType::T_FLOAT :
- result++;
- break;
- case nsXPTType::T_DOUBLE :
- result+=2;
- break;
- case nsXPTType::T_BOOL :
- case nsXPTType::T_CHAR :
- case nsXPTType::T_WCHAR :
- result++;
- break;
- default:
- // all the others are plain pointer types
- result++;
- break;
- }
- }
- // nuts, I know there's a cooler way of doing this, but it's late
- // now and it'll probably come to me in the morning.
- if (result & 0x3) result += 4 - (result & 0x3); // ensure q-word alignment
- return result;
-}
-
-extern "C" uint32_t
-invoke_copy_to_stack(uint32_t* d, uint32_t paramCount, nsXPTCVariant* s)
-{
-/*
- 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;
- uint32_t regCount = 0; // return the number of registers to load from the stack
-
- 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 (regCount < 5) regCount++;
- if(l_s->IsPtrData())
- {
- if(l_s->type == nsXPTType::T_JSVAL)
- {
- // On SPARC, we need to pass a pointer to HandleValue
- *((void**)l_d) = &l_s->ptr;
- } else
- {
- *((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 :
- case nsXPTType::T_DOUBLE : *((uint32_t*) l_d++) = ((DU *)l_s)->hi;
- if (regCount < 5) regCount++;
- *((uint32_t*) l_d) = ((DU *)l_s)->lo;
- 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; 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;
- }
- }
- return regCount;
-}
-
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_sparcv9_solaris.cpp b/xpcom/reflect/xptcall/md/unix/xptcinvoke_sparcv9_solaris.cpp
deleted file mode 100644
index 0d2d6b0a8..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_sparcv9_solaris.cpp
+++ /dev/null
@@ -1,73 +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/. */
-
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-#if !defined(__sparc) && !defined(__sparc__)
-#error "This code is for Sparc only"
-#endif
-
-/* Prototype specifies unmangled function name */
-extern "C" uint64_t
-invoke_copy_to_stack(uint64_t* d, uint32_t paramCount, nsXPTCVariant* s);
-
-extern "C" uint64_t
-invoke_copy_to_stack(uint64_t* d, uint32_t paramCount, nsXPTCVariant* s)
-{
- /*
- 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;
- uint64_t l_paramCount = paramCount;
- uint64_t regCount = 0; // return the number of registers to load from the stack
-
- for(uint64_t i = 0; i < l_paramCount; i++, l_d++, l_s++)
- {
- if (regCount < 5) regCount++;
-
- if (l_s->IsPtrData())
- {
- *l_d = (uint64_t)l_s->ptr;
- continue;
- }
- switch (l_s->type)
- {
- case nsXPTType::T_I8 : *((int64_t*)l_d) = l_s->val.i8; break;
- case nsXPTType::T_I16 : *((int64_t*)l_d) = l_s->val.i16; break;
- case nsXPTType::T_I32 : *((int64_t*)l_d) = l_s->val.i32; break;
- case nsXPTType::T_I64 : *((int64_t*)l_d) = l_s->val.i64; break;
-
- case nsXPTType::T_U8 : *((uint64_t*)l_d) = l_s->val.u8; break;
- case nsXPTType::T_U16 : *((uint64_t*)l_d) = l_s->val.u16; break;
- case nsXPTType::T_U32 : *((uint64_t*)l_d) = l_s->val.u32; break;
- case nsXPTType::T_U64 : *((uint64_t*)l_d) = l_s->val.u64; break;
-
- /* in the case of floats, we want to put the bits in to the
- 64bit space right justified... floats in the parameter array on
- sparcv9 use odd numbered registers.. %f1, %f3, so we have to skip
- the space that would be occupied by %f0, %f2, etc.
- */
- case nsXPTType::T_FLOAT : *(((float*)l_d) + 1) = l_s->val.f; break;
- case nsXPTType::T_DOUBLE: *((double*)l_d) = l_s->val.d; break;
- case nsXPTType::T_BOOL : *((uint64_t*)l_d) = l_s->val.b; break;
- case nsXPTType::T_CHAR : *((uint64_t*)l_d) = l_s->val.c; break;
- case nsXPTType::T_WCHAR : *((int64_t*)l_d) = l_s->val.wc; break;
-
- default:
- // all the others are plain pointer types
- *((void**)l_d) = l_s->val.p;
- break;
- }
- }
-
- return regCount;
-}
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_x86_64_solaris.cpp b/xpcom/reflect/xptcall/md/unix/xptcinvoke_x86_64_solaris.cpp
deleted file mode 100644
index 0d3424366..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_x86_64_solaris.cpp
+++ /dev/null
@@ -1,149 +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"
-#include "alloca.h"
-
-// 6 integral parameters are passed in registers
-const uint32_t GPR_COUNT = 6;
-
-// 8 floating point parameters are passed in SSE registers
-const uint32_t FPR_COUNT = 8;
-
-// Remember that these 'words' are 64-bit long
-static inline void
-invoke_count_words(uint32_t paramCount, nsXPTCVariant * s,
- uint32_t & nr_gpr, uint32_t & nr_fpr, uint32_t & nr_stack)
-{
- nr_gpr = 1; // skip one GP register for 'that'
- nr_fpr = 0;
- nr_stack = 0;
-
- /* Compute number of eightbytes of class MEMORY. */
- for (uint32_t i = 0; i < paramCount; i++, s++) {
- if (!s->IsPtrData()
- && (s->type == nsXPTType::T_FLOAT || s->type == nsXPTType::T_DOUBLE)) {
- if (nr_fpr < FPR_COUNT)
- nr_fpr++;
- else
- nr_stack++;
- }
- else {
- if (nr_gpr < GPR_COUNT)
- nr_gpr++;
- else
- nr_stack++;
- }
- }
-}
-
-static void
-invoke_copy_to_stack(uint64_t * d, uint32_t paramCount, nsXPTCVariant * s,
- uint64_t * gpregs, double * fpregs)
-{
- uint32_t nr_gpr = 1; // skip one GP register for 'that'
- uint32_t nr_fpr = 0;
- uint64_t value;
-
- for (uint32_t i = 0; i < paramCount; i++, s++) {
- if (s->IsPtrData())
- value = (uint64_t) s->ptr;
- else {
- switch (s->type) {
- case nsXPTType::T_FLOAT: break;
- case nsXPTType::T_DOUBLE: break;
- case nsXPTType::T_I8: value = s->val.i8; break;
- case nsXPTType::T_I16: value = s->val.i16; break;
- case nsXPTType::T_I32: value = s->val.i32; break;
- case nsXPTType::T_I64: value = s->val.i64; break;
- case nsXPTType::T_U8: value = s->val.u8; break;
- case nsXPTType::T_U16: value = s->val.u16; break;
- case nsXPTType::T_U32: value = s->val.u32; break;
- case nsXPTType::T_U64: value = s->val.u64; break;
- case nsXPTType::T_BOOL: value = s->val.b; break;
- case nsXPTType::T_CHAR: value = s->val.c; break;
- case nsXPTType::T_WCHAR: value = s->val.wc; break;
- default: value = (uint64_t) s->val.p; break;
- }
- }
-
- if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
- if (nr_fpr < FPR_COUNT)
- fpregs[nr_fpr++] = s->val.d;
- else {
- *((double *)d) = s->val.d;
- d++;
- }
- }
- else if (!s->IsPtrData() && s->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.
- fpregs[nr_fpr++] = s->val.d;
- else {
- *((float *)d) = s->val.f;
- d++;
- }
- }
- else {
- if (nr_gpr < GPR_COUNT)
- gpregs[nr_gpr++] = value;
- else
- *d++ = value;
- }
- }
-}
-
-// Avoid AddressSanitizer instrumentation for the next function because it
-// depends on __builtin_alloca behavior and alignment that cannot be relied on
-// once the function is compiled with a version of ASan that has dynamic-alloca
-// instrumentation enabled.
-
-MOZ_ASAN_BLACKLIST
-EXPORT_XPCOM_API(nsresult)
-NS_InvokeByIndex(nsISupports * that, uint32_t methodIndex,
- uint32_t paramCount, nsXPTCVariant * params)
-{
- uint32_t nr_gpr, nr_fpr, nr_stack;
- invoke_count_words(paramCount, params, nr_gpr, nr_fpr, nr_stack);
-
- // Stack, if used, must be 16-bytes aligned
- if (nr_stack)
- nr_stack = (nr_stack + 1) & ~1;
-
- // Load parameters to stack, if necessary
- uint64_t *stack = (uint64_t *) __builtin_alloca(nr_stack * 8);
- uint64_t gpregs[GPR_COUNT];
- double fpregs[FPR_COUNT];
- invoke_copy_to_stack(stack, paramCount, params, gpregs, fpregs);
-
- switch (nr_fpr) {
- case 8: asm("movupd %0, %xmm7" : : "xmm7" (fpregs[7]));
- case 7: asm("movupd %0, %xmm6" : : "xmm6" (fpregs[6]));
- case 6: asm("movupd %0, %xmm5" : : "xmm5" (fpregs[5]));
- case 5: asm("movupd %0, %xmm4" : : "xmm4" (fpregs[4]));
- case 4: asm("movupd %0, %xmm3" : : "xmm3" (fpregs[3]));
- case 3: asm("movupd %0, %xmm2" : : "xmm2" (fpregs[2]));
- case 2: asm("movupd %0, %xmm1" : : "xmm1" (fpregs[1]));
- case 1: asm("movupd %0, %xmm0" : : "xmm0" (fpregs[0]));
- case 0:;
- }
-
- // Ensure that assignments to SSE registers won't be optimized away
- asm("" ::: "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7");
-
- // Get pointer to method
- uint64_t methodAddress = *((uint64_t *)that);
- methodAddress += 16 + 8 * methodIndex;
- methodAddress = *((uint64_t *)methodAddress);
-
- typedef uint32_t (*Method)(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t);
- uint32_t result = ((Method)methodAddress)((uint64_t)that, gpregs[1], gpregs[2], gpregs[3], gpregs[4], gpregs[5]);
- return result;
-}
diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_x86_solaris.cpp b/xpcom/reflect/xptcall/md/unix/xptcinvoke_x86_solaris.cpp
deleted file mode 100644
index f545fcc99..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_x86_solaris.cpp
+++ /dev/null
@@ -1,67 +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"
-
-extern "C" {
-
-// Remember that these 'words' are 32bit DWORDS
-
-uint32_t
-invoke_count_words(uint32_t paramCount, nsXPTCVariant* s)
-{
- uint32_t result = 0;
- for(uint32_t i = 0; i < paramCount; i++, s++)
- {
- if(s->IsPtrData())
- {
- result++;
- continue;
- }
- result++;
- switch(s->type)
- {
- case nsXPTType::T_I64 :
- case nsXPTType::T_U64 :
- case nsXPTType::T_DOUBLE :
- result++;
- break;
- }
- }
- return result;
-}
-
-void
-invoke_copy_to_stack(uint32_t paramCount, nsXPTCVariant* s, uint32_t* d)
-{
- for(uint32_t i = 0; i < paramCount; i++, d++, s++)
- {
- if(s->IsPtrData())
- {
- *((void**)d) = s->ptr;
- continue;
- }
-
-/* XXX: the following line is here (rather than as the default clause in
- * the following switch statement) so that the Sun native compiler
- * will generate the correct assembly code on the Solaris Intel
- * platform. See the comments in bug #28817 for more details.
- */
-
- *((void**)d) = s->val.p;
-
- switch(s->type)
- {
- case nsXPTType::T_I64 : *((int64_t*) d) = s->val.i64; d++; break;
- case nsXPTType::T_U64 : *((uint64_t*)d) = s->val.u64; d++; break;
- case nsXPTType::T_DOUBLE : *((double*) d) = s->val.d; d++; break;
- }
- }
-}
-
-}
diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_ppc_aix.s.m4 b/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_ppc_aix.s.m4
deleted file mode 100644
index 6dabf334d..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_ppc_aix.s.m4
+++ /dev/null
@@ -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
diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_ppc_aix64.s.m4 b/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_ppc_aix64.s.m4
deleted file mode 100644
index 24d713cc9..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_ppc_aix64.s.m4
+++ /dev/null
@@ -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
diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_sparc_solaris.s b/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_sparc_solaris.s
deleted file mode 100644
index 9b448d7c7..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_sparc_solaris.s
+++ /dev/null
@@ -1,49 +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/. */
-
- .global SharedStub
-
-/*
- in the frame for the function that called SharedStub are the
- rest of the parameters we need
-
-*/
-
-SharedStub:
-! we don't create a new frame yet, but work within the frame of the calling
-! function to give ourselves the other parameters we want
-
- mov %o0, %o1 ! shuffle the index up to 2nd place
- mov %i0, %o0 ! the original 'this'
- add %fp, 72, %o2 ! previous stack top adjusted to the first argument slot (beyond 'this')
-! save off the original incoming parameters that arrived in
-! registers, the ABI guarantees the space for us to do this
- st %i1, [%fp + 72]
- st %i2, [%fp + 76]
- st %i3, [%fp + 80]
- st %i4, [%fp + 84]
- st %i5, [%fp + 88]
-! now we can build our own stack frame
- save %sp,-(64 + 32),%sp ! room for the register window and
- ! struct pointer, rounded up to 0 % 32
-! our function now appears to have been called
-! as SharedStub(nsISupports* that, uint32_t index, uint32_t* args)
-! so we can just copy these through
-
- mov %i0, %o0
- mov %i1, %o1
- mov %i2, %o2
- call PrepareAndDispatch
- nop
- mov %o0,%i0 ! propagate return value
- b .LL1
- nop
-.LL1:
- ret
- restore
-
- .size SharedStub, .-SharedStub
- .type SharedStub, #function
diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_sparcv9_solaris.s b/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_sparcv9_solaris.s
deleted file mode 100644
index ab97a890c..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_sparcv9_solaris.s
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: asm; 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/. */
-
- .global SharedStub
-
-/*
- in the frame for the function that called SharedStub are the
- rest of the parameters we need
-
-*/
-
-SharedStub:
-! we don't create a new frame yet, but work within the frame of the calling
-! function to give ourselves the other parameters we want
-
- mov %o0, %o1 ! shuffle the index up to 2nd place
- mov %i0, %o0 ! the original 'this'
- add %fp, 0x7ff + 136, %o2 ! previous stack top adjusted to the first argument slot (beyond 'this')
-
-! save off the original incoming parameters that arrived in
-! registers, the ABI guarantees the space for us to do this
- stx %i1, [%fp + 0x7ff + 136]
- stx %i2, [%fp + 0x7ff + 144]
- stx %i3, [%fp + 0x7ff + 152]
- stx %i4, [%fp + 0x7ff + 160]
- stx %i5, [%fp + 0x7ff + 168]
-! now we can build our own stack frame
- save %sp,-(128 + 64),%sp ! room for the register window and
- ! struct pointer, rounded up to 0 % 64
-! our function now appears to have been called
-! as SharedStub(nsISupports* that, uint32_t index, uint32_t* args)
-! so we can just copy these through
-
- mov %i0, %o0
- mov %i1, %o1
- mov %i2, %o2
- call PrepareAndDispatch
- nop
- mov %o0,%i0 ! propagate return value
- b .LL1
- nop
-.LL1:
- ret
- restore
-
- .size SharedStub, .-SharedStub
- .type SharedStub, #function
diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_x86_64_solaris_SUNW.s b/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_x86_64_solaris_SUNW.s
deleted file mode 100644
index aa6d84434..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_x86_64_solaris_SUNW.s
+++ /dev/null
@@ -1,63 +0,0 @@
-#define STUB_ENTRY1(nn) \
- .globl __1cOnsXPTCStubBaseFStub/**/nn/**/6M_I_; \
- .hidden __1cOnsXPTCStubBaseFStub/**/nn/**/6M_I_; \
- .type __1cOnsXPTCStubBaseFStub/**/nn/**/6M_I_, @function; \
-__1cOnsXPTCStubBaseFStub/**/nn/**/6M_I_: \
- movl $/**/nn/**/, %eax; \
- jmp SharedStub; \
- .size __1cOnsXPTCStubBaseFStub/**/nn/**/6M_I_, . - __1cOnsXPTCStubBaseFStub/**/nn/**/6M_I_ \
-
-#define STUB_ENTRY2(nn) \
- .globl __1cOnsXPTCStubBaseGStub/**/nn/**/6M_I_; \
- .hidden __1cOnsXPTCStubBaseGStub/**/nn/**/6M_I_; \
- .type __1cOnsXPTCStubBaseGStub/**/nn/**/6M_I_, @function; \
-__1cOnsXPTCStubBaseGStub/**/nn/**/6M_I_: \
- movl $/**/nn/**/, %eax; \
- jmp SharedStub; \
- .size __1cOnsXPTCStubBaseGStub/**/nn/**/6M_I_, . - __1cOnsXPTCStubBaseGStub/**/nn/**/6M_I_ \
-
-#define STUB_ENTRY3(nn) \
- .globl __1cOnsXPTCStubBaseHStub/**/nn/**/6M_I_; \
- .hidden __1cOnsXPTCStubBaseHStub/**/nn/**/6M_I_; \
- .type __1cOnsXPTCStubBaseHStub/**/nn/**/6M_I_, @function; \
-__1cOnsXPTCStubBaseHStub/**/nn/**/6M_I_: \
- movl $/**/nn/**/, %eax; \
- jmp SharedStub; \
- .size __1cOnsXPTCStubBaseHStub/**/nn/**/6M_I_, . - __1cOnsXPTCStubBaseHStub/**/nn/**/6M_I_ \
-
-// static nsresult SharedStub(uint32_t methodIndex)
- .type SharedStub, @function;
- SharedStub:
- // make room for gpregs (48), fpregs (64)
- pushq %rbp;
- movq %rsp,%rbp;
- subq $112,%rsp;
- // save GP registers
- movq %rdi,-112(%rbp);
- movq %rsi,-104(%rbp);
- movq %rdx, -96(%rbp);
- movq %rcx, -88(%rbp);
- movq %r8 , -80(%rbp);
- movq %r9 , -72(%rbp);
- leaq -112(%rbp),%rcx;
- // save FP registers
- movsd %xmm0,-64(%rbp);
- movsd %xmm1,-56(%rbp);
- movsd %xmm2,-48(%rbp);
- movsd %xmm3,-40(%rbp);
- movsd %xmm4,-32(%rbp);
- movsd %xmm5,-24(%rbp);
- movsd %xmm6,-16(%rbp);
- movsd %xmm7, -8(%rbp);
- leaq -64(%rbp),%r8;
- // rdi has the 'self' pointer already
- movl %eax,%esi;
- leaq 16(%rbp),%rdx;
- call PrepareAndDispatch@plt;
- leave;
- ret;
- .size SharedStub, . - SharedStub
-
-#define SENTINEL_ENTRY(nn)
-
-#include "xptcstubsdef_asm.solx86"
diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_x86_solaris_SUNW.s b/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_x86_solaris_SUNW.s
deleted file mode 100644
index 76bdcf925..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_asm_x86_solaris_SUNW.s
+++ /dev/null
@@ -1,78 +0,0 @@
-#define STUB_ENTRY1(nn) \
- .globl __1cOnsXPTCStubBaseFStub/**/nn/**/6M_I_; \
- .type __1cOnsXPTCStubBaseFStub/**/nn/**/6M_I_, @function; \
-__1cOnsXPTCStubBaseFStub/**/nn/**/6M_I_: \
- push %ebp; \
- movl %esp,%ebp; \
- andl $-16,%esp; \
- push %ebx; \
- call .CG4./**/nn/**/; \
-.CG4./**/nn/**/: \
- pop %ebx; \
- addl $_GLOBAL_OFFSET_TABLE_+0x1,%ebx; \
- leal 0xc(%ebp), %ecx; \
- pushl %ecx; \
- pushl $/**/nn/**/; \
- movl 0x8(%ebp), %ecx; \
- pushl %ecx; \
- call __1cSPrepareAndDispatch6FpnOnsXPTCStubBase_IpI_I_; \
- addl $0xc , %esp; \
- pop %ebx; \
- movl %ebp,%esp; \
- pop %ebp; \
- ret ; \
- .size __1cOnsXPTCStubBaseFStub/**/nn/**/6M_I_, . - __1cOnsXPTCStubBaseFStub/**/nn/**/6M_I_ \
-
-#define STUB_ENTRY2(nn) \
- .globl __1cOnsXPTCStubBaseGStub/**/nn/**/6M_I_; \
- .type __1cOnsXPTCStubBaseGStub/**/nn/**/6M_I_, @function; \
-__1cOnsXPTCStubBaseGStub/**/nn/**/6M_I_: \
- push %ebp; \
- movl %esp,%ebp; \
- andl $-16,%esp; \
- push %ebx; \
- call .CG4./**/nn/**/; \
-.CG4./**/nn/**/: \
- pop %ebx; \
- addl $_GLOBAL_OFFSET_TABLE_+0x1,%ebx; \
- leal 0xc(%ebp), %ecx; \
- pushl %ecx; \
- pushl $/**/nn/**/; \
- movl 0x8(%ebp), %ecx; \
- pushl %ecx; \
- call __1cSPrepareAndDispatch6FpnOnsXPTCStubBase_IpI_I_; \
- addl $0xc , %esp; \
- pop %ebx; \
- movl %ebp,%esp; \
- pop %ebp; \
- ret ; \
- .size __1cOnsXPTCStubBaseGStub/**/nn/**/6M_I_, . - __1cOnsXPTCStubBaseGStub/**/nn/**/6M_I_ \
-
-#define STUB_ENTRY3(nn) \
- .globl __1cOnsXPTCStubBaseHStub/**/nn/**/6M_I_; \
- .type __1cOnsXPTCStubBaseHStub/**/nn/**/6M_I_, @function; \
-__1cOnsXPTCStubBaseHStub/**/nn/**/6M_I_: \
- push %ebp; \
- movl %esp,%ebp; \
- andl $-16,%esp; \
- push %ebx; \
- call .CG4./**/nn/**/; \
-.CG4./**/nn/**/: \
- pop %ebx; \
- addl $_GLOBAL_OFFSET_TABLE_+0x1,%ebx; \
- leal 0xc(%ebp), %ecx; \
- pushl %ecx; \
- pushl $/**/nn/**/; \
- movl 0x8(%ebp), %ecx; \
- pushl %ecx; \
- call __1cSPrepareAndDispatch6FpnOnsXPTCStubBase_IpI_I_; \
- addl $0xc , %esp; \
- pop %ebx; \
- movl %ebp,%esp; \
- pop %ebp; \
- ret ; \
- .size __1cOnsXPTCStubBaseHStub/**/nn/**/6M_I_, . - __1cOnsXPTCStubBaseHStub/**/nn/**/6M_I_ \
-
-#define SENTINEL_ENTRY(nn)
-
-#include "xptcstubsdef_asm.solx86"
diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix.cpp b/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix.cpp
deleted file mode 100644
index 0463c21c5..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix.cpp
+++ /dev/null
@@ -1,185 +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"
-#include "xptiprivate.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_BUFFER_COUNT 16
-#define PARAM_GPR_COUNT 7
-
- nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
- nsXPTCMiniVariant* dispatchParams = nullptr;
- const nsXPTMethodInfo* info = nullptr;
- uint8_t paramCount;
- uint8_t i;
- nsresult result = NS_ERROR_FAILURE;
-
- NS_ASSERTION(self,"no self");
-
- self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
- NS_ASSERTION(info,"no method info");
-
- paramCount = info->GetParamCount();
-
- // setup variant array pointer
- if(paramCount > PARAM_BUFFER_COUNT)
- dispatchParams = new nsXPTCMiniVariant[paramCount];
- else
- dispatchParams = paramBuffer;
- NS_ASSERTION(dispatchParams,"no place for params");
-
- uint32_t* ap = args;
- uint32_t iCount = 0;
- uint32_t fpCount = 0;
- for(i = 0; i < paramCount; i++)
- {
- const nsXPTParamInfo& param = info->GetParam(i);
- const nsXPTType& type = param.GetType();
- nsXPTCMiniVariant* dp = &dispatchParams[i];
-
- 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;
- }
- }
-
- result = self->mOuter->CallMethod((uint16_t)methodIndex,info,dispatchParams);
-
- if(dispatchParams != paramBuffer)
- delete [] dispatchParams;
-
- 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 */
diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix64.cpp b/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix64.cpp
deleted file mode 100644
index 08eb557ab..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix64.cpp
+++ /dev/null
@@ -1,172 +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"
-#include "xptiprivate.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_BUFFER_COUNT 16
-#define PARAM_GPR_COUNT 7
-
- nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
- nsXPTCMiniVariant* dispatchParams = nullptr;
- const nsXPTMethodInfo* info = nullptr;
- uint8_t paramCount;
- uint8_t i;
- nsresult result = NS_ERROR_FAILURE;
-
- NS_ASSERTION(self,"no self");
-
- self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
- NS_ASSERTION(info,"no method info");
-
- paramCount = info->GetParamCount();
-
- // setup variant array pointer
- if(paramCount > PARAM_BUFFER_COUNT)
- dispatchParams = new nsXPTCMiniVariant[paramCount];
- else
- dispatchParams = paramBuffer;
- NS_ASSERTION(dispatchParams,"no place for params");
-
- uint64_t* ap = args;
- uint32_t iCount = 0;
- uint32_t fpCount = 0;
- for(i = 0; i < paramCount; i++)
- {
- const nsXPTParamInfo& param = info->GetParam(i);
- const nsXPTType& type = param.GetType();
- nsXPTCMiniVariant* dp = &dispatchParams[i];
-
- 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;
- }
- }
-
- result = self->mOuter->CallMethod((uint16_t)methodIndex,info,dispatchParams);
-
- if(dispatchParams != paramBuffer)
- delete [] dispatchParams;
-
- 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 */
diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_solaris.cpp b/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_solaris.cpp
deleted file mode 100644
index 61f3df4ff..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_solaris.cpp
+++ /dev/null
@@ -1,112 +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/. */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-#include "xptiprivate.h"
-
-#if defined(sparc) || defined(__sparc__)
-
-extern "C" nsresult ATTRIBUTE_USED
-PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
-{
-
- 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
-
-#define PARAM_BUFFER_COUNT 16
-
- nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
- nsXPTCMiniVariant* dispatchParams = nullptr;
- const nsXPTMethodInfo* info;
- uint8_t paramCount;
- uint8_t i;
- nsresult result = NS_ERROR_FAILURE;
-
- NS_ASSERTION(self,"no self");
-
- self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
- NS_ASSERTION(info,"no interface info");
-
- paramCount = info->GetParamCount();
-
- // setup variant array pointer
- if(paramCount > PARAM_BUFFER_COUNT)
- dispatchParams = new nsXPTCMiniVariant[paramCount];
- else
- dispatchParams = paramBuffer;
- NS_ASSERTION(dispatchParams,"no place for params");
-
- uint32_t* ap = args;
- for(i = 0; i < paramCount; i++, ap++)
- {
- const nsXPTParamInfo& param = info->GetParam(i);
- const nsXPTType& type = param.GetType();
- nsXPTCMiniVariant* dp = &dispatchParams[i];
-
- if(param.IsOut() || !type.IsArithmetic())
- {
- if (type == nsXPTType::T_JSVAL)
- dp->val.p = *((void**) *ap);
- else
- dp->val.p = (void*) *ap;
- continue;
- }
- // else
- switch(type)
- {
- case nsXPTType::T_I8 : dp->val.i8 = *((int32_t*) ap); break;
- case nsXPTType::T_I16 : dp->val.i16 = *((int32_t*) ap); break;
- case nsXPTType::T_I32 : dp->val.i32 = *((int32_t*) ap); break;
- case nsXPTType::T_DOUBLE :
- case nsXPTType::T_U64 :
- case nsXPTType::T_I64 : ((DU *)dp)->hi = ((DU *)ap)->hi;
- ((DU *)dp)->lo = ((DU *)ap)->lo;
- ap++;
- break;
- case nsXPTType::T_U8 : dp->val.u8 = *((uint32_t*)ap); break;
- case nsXPTType::T_U16 : dp->val.u16 = *((uint32_t*)ap); break;
- case nsXPTType::T_U32 : dp->val.u32 = *((uint32_t*)ap); break;
- case nsXPTType::T_FLOAT : dp->val.f = *((float*) ap); break;
- case nsXPTType::T_BOOL : dp->val.b = *((uint32_t*)ap); break;
- case nsXPTType::T_CHAR : dp->val.c = *((uint32_t*)ap); break;
- case nsXPTType::T_WCHAR : dp->val.wc = *((int32_t*) ap); break;
- default:
- NS_ERROR("bad type");
- break;
- }
- }
-
- result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
-
- if(dispatchParams != paramBuffer)
- delete [] dispatchParams;
-
- return result;
-}
-
-extern "C" nsresult SharedStub(int, int*);
-
-#define STUB_ENTRY(n) \
-nsresult nsXPTCStubBase::Stub##n() \
-{ \
- int dummy; /* defeat tail-call optimization */ \
- return SharedStub(n, &dummy); \
-}
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
- NS_ERROR("nsXPTCStubBase::Sentinel called"); \
- return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
-#endif /* sparc || __sparc__ */
diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_sparcv9_solaris.cpp b/xpcom/reflect/xptcall/md/unix/xptcstubs_sparcv9_solaris.cpp
deleted file mode 100644
index 583ce9864..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_sparcv9_solaris.cpp
+++ /dev/null
@@ -1,101 +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"
-#include "xptiprivate.h"
-
-#if defined(sparc) || defined(__sparc__)
-
-extern "C" nsresult ATTRIBUTE_USED
-PrepareAndDispatch(nsXPTCStubBase* self, uint64_t methodIndex, uint64_t* args)
-{
-
-#define PARAM_BUFFER_COUNT 16
-
- nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
- nsXPTCMiniVariant* dispatchParams = nullptr;
- const nsXPTMethodInfo* info;
- uint8_t paramCount;
- uint8_t i;
- nsresult result = NS_ERROR_FAILURE;
-
- NS_ASSERTION(self,"no self");
-
- self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
- NS_ASSERTION(info,"no interface info");
-
- paramCount = info->GetParamCount();
-
- // setup variant array pointer
- if(paramCount > PARAM_BUFFER_COUNT)
- dispatchParams = new nsXPTCMiniVariant[paramCount];
- else
- dispatchParams = paramBuffer;
- NS_ASSERTION(dispatchParams,"no place for params");
-
- uint64_t* ap = args;
- for(i = 0; i < paramCount; i++, ap++)
- {
- const nsXPTParamInfo& param = info->GetParam(i);
- const nsXPTType& type = param.GetType();
- nsXPTCMiniVariant* dp = &dispatchParams[i];
-
- if(param.IsOut() || !type.IsArithmetic())
- {
- dp->val.p = (void*) *ap;
- continue;
- }
- // else
- switch(type)
- {
- case nsXPTType::T_I8 : dp->val.i8 = *((int64_t*) ap); break;
- case nsXPTType::T_I16 : dp->val.i16 = *((int64_t*) ap); break;
- case nsXPTType::T_I32 : dp->val.i32 = *((int64_t*) ap); break;
- case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); break;
- case nsXPTType::T_U64 : dp->val.u64 = *((uint64_t*)ap); break;
- case nsXPTType::T_I64 : dp->val.i64 = *((int64_t*) ap); break;
- case nsXPTType::T_U8 : dp->val.u8 = *((uint64_t*)ap); break;
- case nsXPTType::T_U16 : dp->val.u16 = *((uint64_t*)ap); break;
- case nsXPTType::T_U32 : dp->val.u32 = *((uint64_t*)ap); break;
- case nsXPTType::T_FLOAT : dp->val.f = ((float*) ap)[1]; break;
- case nsXPTType::T_BOOL : dp->val.b = *((uint64_t*)ap); break;
- case nsXPTType::T_CHAR : dp->val.c = *((uint64_t*)ap); break;
- case nsXPTType::T_WCHAR : dp->val.wc = *((int64_t*) ap); break;
- default:
- NS_ERROR("bad type");
- break;
- }
- }
-
- result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
-
- if(dispatchParams != paramBuffer)
- delete [] dispatchParams;
-
- return result;
-}
-
-extern "C" nsresult SharedStub(int, int*);
-
-#define STUB_ENTRY(n) \
-nsresult nsXPTCStubBase::Stub##n() \
-{ \
- int dummy; /* defeat tail-call optimization */ \
- return SharedStub(n, &dummy); \
-}
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
- NS_ERROR("nsXPTCStubBase::Sentinel called"); \
- return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
-#endif /* sparc || __sparc__ */
diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_solaris.cpp b/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_solaris.cpp
deleted file mode 100644
index 677fa9960..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_solaris.cpp
+++ /dev/null
@@ -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/. */
-
-// Implement shared vtbl methods.
-
-// Keep this in sync with the darwin version.
-
-#include "xptcprivate.h"
-#include "xptiprivate.h"
-
-// The Linux/x86-64 ABI passes the first 6 integer parameters and the
-// first 8 floating point parameters in registers (rdi, rsi, rdx, rcx,
-// r8, r9 and xmm0-xmm7), no stack space is allocated for these by the
-// caller. The rest of the parameters are passed in the callers stack
-// area.
-
-const uint32_t PARAM_BUFFER_COUNT = 16;
-const uint32_t GPR_COUNT = 6;
-const uint32_t FPR_COUNT = 8;
-
-// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
-//
-// - 'args[]' contains the arguments passed on stack
-// - 'gpregs[]' contains the arguments passed in integer registers
-// - 'fpregs[]' contains the arguments passed in floating point registers
-//
-// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
-// and then the method gets called.
-
-extern "C" nsresult ATTRIBUTE_USED
-PrepareAndDispatch(nsXPTCStubBase * self, uint32_t methodIndex,
- uint64_t * args, uint64_t * gpregs, double *fpregs)
-{
- nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
- nsXPTCMiniVariant* dispatchParams = nullptr;
- const nsXPTMethodInfo* info;
- uint32_t paramCount;
- uint32_t i;
- nsresult result = NS_ERROR_FAILURE;
-
- NS_ASSERTION(self,"no self");
-
- self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
- NS_ASSERTION(info,"no method info");
- if (!info)
- return NS_ERROR_UNEXPECTED;
-
- paramCount = info->GetParamCount();
-
- // setup variant array pointer
- if (paramCount > PARAM_BUFFER_COUNT)
- dispatchParams = new nsXPTCMiniVariant[paramCount];
- else
- dispatchParams = paramBuffer;
-
- NS_ASSERTION(dispatchParams,"no place for params");
- if (!dispatchParams)
- return NS_ERROR_OUT_OF_MEMORY;
-
- uint64_t* ap = args;
- uint32_t nr_gpr = 1; // skip one GPR register for 'that'
- uint32_t nr_fpr = 0;
- uint64_t value;
-
- for (i = 0; i < paramCount; i++) {
- const nsXPTParamInfo& param = info->GetParam(i);
- const nsXPTType& type = param.GetType();
- nsXPTCMiniVariant* dp = &dispatchParams[i];
-
- if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
- if (nr_fpr < FPR_COUNT)
- dp->val.d = fpregs[nr_fpr++];
- else
- 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 = fpregs[nr_fpr++];
- else
- dp->val.f = *(float*) ap++;
- continue;
- }
- else {
- if (nr_gpr < GPR_COUNT)
- value = gpregs[nr_gpr++];
- else
- value = *ap++;
- }
-
- if (param.IsOut() || !type.IsArithmetic()) {
- dp->val.p = (void*) value;
- continue;
- }
-
- switch (type) {
- case nsXPTType::T_I8: dp->val.i8 = (int8_t) value; break;
- case nsXPTType::T_I16: dp->val.i16 = (int16_t) value; break;
- case nsXPTType::T_I32: dp->val.i32 = (int32_t) value; break;
- case nsXPTType::T_I64: dp->val.i64 = (int64_t) value; break;
- case nsXPTType::T_U8: dp->val.u8 = (uint8_t) value; break;
- case nsXPTType::T_U16: dp->val.u16 = (uint16_t) value; break;
- case nsXPTType::T_U32: dp->val.u32 = (uint32_t) value; break;
- case nsXPTType::T_U64: dp->val.u64 = (uint64_t) value; break;
- // Cast to uint8_t first, to remove garbage on upper 56 bits.
- case nsXPTType::T_BOOL: dp->val.b = (bool)(uint8_t) value; break;
- case nsXPTType::T_CHAR: dp->val.c = (char) value; break;
- case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) value; break;
-
- default:
- NS_ERROR("bad type");
- break;
- }
- }
-
- result = self->mOuter->CallMethod((uint16_t) methodIndex, info, dispatchParams);
-
- if (dispatchParams != paramBuffer)
- delete [] dispatchParams;
-
- 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"
diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_solaris.cpp b/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_solaris.cpp
deleted file mode 100644
index 39eec5e54..000000000
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_solaris.cpp
+++ /dev/null
@@ -1,77 +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/. */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-#include "xptiprivate.h"
-
-nsresult ATTRIBUTE_USED
-PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
-{
-#define PARAM_BUFFER_COUNT 16
-
- nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
- nsXPTCMiniVariant* dispatchParams = nullptr;
- const nsXPTMethodInfo* info;
- uint8_t paramCount;
- uint8_t i;
- nsresult result = NS_ERROR_FAILURE;
-
- NS_ASSERTION(self,"no self");
-
- self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
- NS_ASSERTION(info,"no interface info");
-
- paramCount = info->GetParamCount();
-
- // setup variant array pointer
- if(paramCount > PARAM_BUFFER_COUNT)
- dispatchParams = new nsXPTCMiniVariant[paramCount];
- else
- dispatchParams = paramBuffer;
- NS_ASSERTION(dispatchParams,"no place for params");
-
- uint32_t* ap = args;
- for(i = 0; i < paramCount; i++, ap++)
- {
- const nsXPTParamInfo& param = info->GetParam(i);
- const nsXPTType& type = param.GetType();
- nsXPTCMiniVariant* dp = &dispatchParams[i];
-
- if(param.IsOut() || !type.IsArithmetic())
- {
- dp->val.p = (void*) *ap;
- continue;
- }
- // else
- dp->val.p = (void*) *ap;
- switch(type)
- {
- case nsXPTType::T_I64 : dp->val.i64 = *((int64_t*) ap); ap++; break;
- case nsXPTType::T_U64 : dp->val.u64 = *((uint64_t*)ap); ap++; break;
- case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); ap++; break;
- }
- }
-
- result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
-
- if(dispatchParams != paramBuffer)
- delete [] dispatchParams;
-
- 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"
diff --git a/xpcom/reflect/xptcall/status.html b/xpcom/reflect/xptcall/status.html
index 7f8e54a0c..deb4da92e 100644
--- a/xpcom/reflect/xptcall/status.html
+++ b/xpcom/reflect/xptcall/status.html
@@ -241,31 +241,6 @@ a port.
<TR>
<TD bgcolor="green"><font color="white"><b>Done</b></font></TD>
-<TD>SunOS x86</TD>
-<TD>
-<img alt="Contributed code!" title="Contributed code!" src="http://tinderbox.mozilla.org/star.gif">
-<a href="mailto:aljones@lbl.gov">Arthur Jones &lt;aljones@lbl.gov&gt;</a><BR>
-<font color="red"><b>?</b></font>
-<a href="mailto:ppokorny@mindspring.com">Philip Pokorny &lt;ppokorny@mindspring.com&gt;</a><BR>
-</TD>
-<TD>
-The word I hear is that this is working and done
-</TD>
-</TR>
-
-<TR>
-<TD bgcolor="green"><font color="white"><b>Done</b></font></TD>
-<TD>AIX PPC</TD>
-<TD><img alt="Contributed code!" title="Contributed code!" src="http://tinderbox.mozilla.org/star.gif">
-<a href="mailto:jdunn@netscape.com">Jim Dunn &lt;jdunn@netscape.com&gt;</a></TD>
-<TD>Philip K. Warren writes: <BR>
-
-We have gone through several releases of AIX without any problems.
-</TD>
-</TR>
-
-<TR>
-<TD bgcolor="green"><font color="white"><b>Done</b></font></TD>
<TD>Irix</TD>
<TD><img alt="Contributed code!" title="Contributed code!" src="http://tinderbox.mozilla.org/star.gif">
<a href="mailto:jasonh@m7.engr.sgi.com">Jason Heirtzler &lt;jasonh@m7.engr.sgi.com&gt;</a><BR>
diff --git a/xpcom/threads/nsThread.cpp b/xpcom/threads/nsThread.cpp
index 7c1af08f4..19464f2f0 100644
--- a/xpcom/threads/nsThread.cpp
+++ b/xpcom/threads/nsThread.cpp
@@ -203,11 +203,9 @@ public:
}
}
- // This method needs to be public to support older compilers (xlC_r on AIX).
- // It should be called directly as this class type is reference counted.
+private:
virtual ~nsThreadStartupEvent() {}
-private:
NS_IMETHOD Run() override
{
ReentrantMonitorAutoEnter mon(mMon);