diff --git a/Makefile.in b/Makefile.in index 26cd688d4..4adf3ac9a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -290,7 +290,7 @@ MAKE_SYM_STORE_PATH := $(DIST)/bin endif DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms endif -ifeq (,$(filter-out Linux SunOS,$(OS_ARCH))) +ifeq (,$(filter-out Linux,$(OS_ARCH))) MAKE_SYM_STORE_ARGS := -c --vcs-info DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms MAKE_SYM_STORE_PATH := $(DIST)/bin diff --git a/accessible/atk/Platform.cpp b/accessible/atk/Platform.cpp index e64084f5a..0ee3a3d97 100644 --- a/accessible/atk/Platform.cpp +++ b/accessible/atk/Platform.cpp @@ -60,11 +60,7 @@ struct GnomeAccessibilityModule }; static GnomeAccessibilityModule sAtkBridge = { -#ifdef AIX - "libatk-bridge.a(libatk-bridge.so.0)", nullptr, -#else "libatk-bridge.so", nullptr, -#endif "gnome_accessibility_module_init", nullptr, "gnome_accessibility_module_shutdown", nullptr }; diff --git a/accessible/tests/mochitest/common.js b/accessible/tests/mochitest/common.js index 1e48fa067..b3f83ea84 100644 --- a/accessible/tests/mochitest/common.js +++ b/accessible/tests/mochitest/common.js @@ -59,7 +59,6 @@ const nsIPropertyElement = Components.interfaces.nsIPropertyElement; const MAC = (navigator.platform.indexOf("Mac") != -1); const LINUX = (navigator.platform.indexOf("Linux") != -1); -const SOLARIS = (navigator.platform.indexOf("SunOS") != -1); const WIN = (navigator.platform.indexOf("Win") != -1); //////////////////////////////////////////////////////////////////////////////// diff --git a/accessible/tests/mochitest/elm/test_nsApplicationAcc.html b/accessible/tests/mochitest/elm/test_nsApplicationAcc.html index 58763e437..e23eb37bc 100644 --- a/accessible/tests/mochitest/elm/test_nsApplicationAcc.html +++ b/accessible/tests/mochitest/elm/test_nsApplicationAcc.html @@ -32,7 +32,7 @@ // nsIAccessible::name var applicationName = ""; - if (LINUX || SOLARIS) { + if (LINUX) { applicationName = appInfo.name; } else { try { diff --git a/accessible/tests/mochitest/treeupdate/test_contextmenu.xul b/accessible/tests/mochitest/treeupdate/test_contextmenu.xul index 5b31e0136..916b815eb 100644 --- a/accessible/tests/mochitest/treeupdate/test_contextmenu.xul +++ b/accessible/tests/mochitest/treeupdate/test_contextmenu.xul @@ -130,7 +130,7 @@ */ function getMenuTree1() { - if (LINUX || SOLARIS) { + if (LINUX) { var tree = { role: ROLE_MENUPOPUP, children: [ @@ -190,7 +190,7 @@ function getMenuTree2() { var tree = getMenuTree1(); - if (LINUX || SOLARIS) { + if (LINUX) { var submenuTree = { name: "item2.0", @@ -232,7 +232,7 @@ children: [] }; - if (LINUX || SOLARIS) + if (LINUX) tree.children[2].children[0].children.push(subsubmenuTree); else tree.children[2].children[0].children[0].children[0].children.push(subsubmenuTree); diff --git a/accessible/tests/mochitest/treeupdate/test_menu.xul b/accessible/tests/mochitest/treeupdate/test_menu.xul index abdea217e..d62ac8c5d 100644 --- a/accessible/tests/mochitest/treeupdate/test_menu.xul +++ b/accessible/tests/mochitest/treeupdate/test_menu.xul @@ -32,7 +32,7 @@ this.invoke = function openMenu_invoke() { var tree; - if (LINUX || SOLARIS) { + if (LINUX) { tree = { PARENT_MENUITEM: [ ] }; @@ -51,7 +51,7 @@ this.finalCheck = function openMenu_finalCheck() { var tree; - if (LINUX || SOLARIS) { + if (LINUX) { tree = { PARENT_MENUITEM: [ { MENUITEM: [ ] }, diff --git a/application/basilisk/installer/package-manifest.in b/application/basilisk/installer/package-manifest.in index 3174d61f8..f3c7b2bbc 100644 --- a/application/basilisk/installer/package-manifest.in +++ b/application/basilisk/installer/package-manifest.in @@ -722,13 +722,6 @@ @RESPATH@/components/pipnss.xpt @RESPATH@/components/pippki.xpt -; for Solaris SPARC -#ifdef SOLARIS -bin/libfreebl_32fpu_3.so -bin/libfreebl_32int_3.so -bin/libfreebl_32int64_3.so -#endif - ; [Updater] ; #ifdef MOZ_UPDATER diff --git a/application/palemoon/installer/package-manifest.in b/application/palemoon/installer/package-manifest.in index 0653a176f..039ced126 100644 --- a/application/palemoon/installer/package-manifest.in +++ b/application/palemoon/installer/package-manifest.in @@ -322,13 +322,6 @@ @RESPATH@/chrome/pippki@JAREXT@ @RESPATH@/chrome/pippki.manifest -; for Solaris SPARC -#ifdef SOLARIS -bin/libfreebl_32fpu_3.so -bin/libfreebl_32int_3.so -bin/libfreebl_32int64_3.so -#endif - ; [Updater] ; #ifdef MOZ_UPDATER diff --git a/build/gyp.mozbuild b/build/gyp.mozbuild index fd8714ecf..545b888bd 100644 --- a/build/gyp.mozbuild +++ b/build/gyp.mozbuild @@ -89,7 +89,6 @@ flavors = { 'Android': 'android', 'Linux': 'linux', 'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios', - 'SunOS': 'solaris', 'GNU/kFreeBSD': 'freebsd', 'DragonFly': 'dragonfly', 'FreeBSD': 'freebsd', diff --git a/config/external/nss/Makefile.in b/config/external/nss/Makefile.in index 861b7d07d..2c266eb20 100644 --- a/config/external/nss/Makefile.in +++ b/config/external/nss/Makefile.in @@ -43,20 +43,6 @@ endif # Default HAVE_FREEBL_LIBS = 1 -# SunOS SPARC -ifeq ($(OS_ARCH), SunOS) -ifneq (86,$(findstring 86,$(OS_TEST))) -ifdef HAVE_64BIT_BUILD -HAVE_FREEBL_LIBS = -HAVE_FREEBL_LIBS_64 = 1 -else -HAVE_FREEBL_LIBS = -HAVE_FREEBL_LIBS_32FPU = 1 -HAVE_FREEBL_LIBS_32INT64 = 1 -endif -endif -endif - ifeq ($(OS_TARGET),Linux) HAVE_FREEBL_LIBS = HAVE_FREEBL_LIBS_PRIV = 1 @@ -331,11 +317,6 @@ NSS_DIST_DLL_DEST := $(DIST)/bin NSS_DIST_DLL_TARGET := target INSTALL_TARGETS += NSS_DIST_DLL -ifeq ($(OS_ARCH)_$(1), SunOS_softokn3) -# has to use copy mode on Solaris, see #665509 -$(DIST)/bin/$(DLL_PREFIX)softokn3$(DLL_SUFFIX): INSTALL := $(INSTALL) -t -endif - NSS_SDK_LIB_FILES := \ $(addprefix $(DIST)/lib/$(LIB_PREFIX),$(addsuffix .$(LIB_SUFFIX),$(SDK_LIBS))) \ $(addprefix $(DIST)/bin/$(DLL_PREFIX),$(addsuffix $(DLL_SUFFIX),$(NSS_DLLS))) \ diff --git a/config/rules.mk b/config/rules.mk index 9a8f61c2d..567971b19 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -386,15 +386,6 @@ endif endif endif -ifeq ($(OS_ARCH),AIX) -ifdef IS_COMPONENT -ifneq ($(HAS_EXTRAEXPORTS),1) -MKSHLIB += -bE:$(MOZILLA_DIR)/build/unix/aix.exp -bnoexpall -MKCSHLIB += -bE:$(MOZILLA_DIR)/build/unix/aix.exp -bnoexpall -endif # HAS_EXTRAEXPORTS -endif # IS_COMPONENT -endif # AIX - # # Linux: add -Bsymbolic flag for components # diff --git a/dom/base/nsAttrAndChildArray.cpp b/dom/base/nsAttrAndChildArray.cpp index b285ee003..9fd27262b 100644 --- a/dom/base/nsAttrAndChildArray.cpp +++ b/dom/base/nsAttrAndChildArray.cpp @@ -78,15 +78,8 @@ GetIndexFromCache(const nsAttrAndChildArray* aArray) } -/** - * Due to a compiler bug in VisualAge C++ for AIX, we need to return the - * address of the first index into mBuffer here, instead of simply returning - * mBuffer itself. - * - * See Bug 231104 for more information. - */ #define ATTRS(_impl) \ - reinterpret_cast(&((_impl)->mBuffer[0])) + reinterpret_cast((_impl)->mBuffer) #define NS_IMPL_EXTRA_SIZE \ diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index 98df92efb..299a8e859 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -13,10 +13,6 @@ #include #endif -#if defined(SOLARIS) -#include -#endif - #include "js/TypeDecls.h" #include "js/Value.h" #include "js/RootingAPI.h" diff --git a/dom/base/nsMappedAttributes.h b/dom/base/nsMappedAttributes.h index 9fa7572dd..f00b888b9 100644 --- a/dom/base/nsMappedAttributes.h +++ b/dom/base/nsMappedAttributes.h @@ -93,20 +93,13 @@ private: nsAttrValue mValue; }; - /** - * Due to a compiler bug in VisualAge C++ for AIX, we need to return the - * address of the first index into mAttrs here, instead of simply - * returning mAttrs itself. - * - * See Bug 231104 for more information. - */ const InternalAttr* Attrs() const { - return reinterpret_cast(&(mAttrs[0])); + return reinterpret_cast(mAttrs); } InternalAttr* Attrs() { - return reinterpret_cast(&(mAttrs[0])); + return reinterpret_cast(mAttrs); } uint16_t mAttrCount; diff --git a/dom/plugins/base/nptypes.h b/dom/plugins/base/nptypes.h index 12a5fb78e..c36532472 100644 --- a/dom/plugins/base/nptypes.h +++ b/dom/plugins/base/nptypes.h @@ -22,18 +22,6 @@ typedef unsigned int uint32_t; typedef long long int64_t; typedef unsigned long long uint64_t; -#elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(IRIX) || defined(HPUX) - /* - * AIX and SunOS ship a inttypes.h header that defines [u]int32_t, - * but not bool for C. - */ - #include - - #ifndef __cplusplus - typedef int bool; - #define true 1 - #define false 0 - #endif #elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD) /* * BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and diff --git a/dom/plugins/base/nsPluginsDirUnix.cpp b/dom/plugins/base/nsPluginsDirUnix.cpp index 6d112b4fe..e6956c34c 100644 --- a/dom/plugins/base/nsPluginsDirUnix.cpp +++ b/dom/plugins/base/nsPluginsDirUnix.cpp @@ -19,17 +19,7 @@ #include "nsIPrefService.h" #define LOCAL_PLUGIN_DLL_SUFFIX ".so" -#if defined(__hpux) -#define DEFAULT_X11_PATH "/usr/lib/X11R6/" -#undef LOCAL_PLUGIN_DLL_SUFFIX -#define LOCAL_PLUGIN_DLL_SUFFIX ".sl" -#define LOCAL_PLUGIN_DLL_ALT_SUFFIX ".so" -#elif defined(_AIX) -#define DEFAULT_X11_PATH "/usr/lib" -#define LOCAL_PLUGIN_DLL_ALT_SUFFIX ".a" -#elif defined(SOLARIS) -#define DEFAULT_X11_PATH "/usr/openwin/lib/" -#elif defined(LINUX) +#if defined(LINUX) #define DEFAULT_X11_PATH "/usr/X11R6/lib/" #elif defined(__APPLE__) #define DEFAULT_X11_PATH "/usr/X11R6/lib" @@ -102,11 +92,7 @@ static bool LoadExtraSharedLib(const char *name, char **soname, bool tryToGetSon #define PLUGIN_MAX_NUMBER_OF_EXTRA_LIBS 32 #define PREF_PLUGINS_SONAME "plugin.soname.list" -#if defined(SOLARIS) || defined(HPUX) -#define DEFAULT_EXTRA_LIBS_LIST "libXt" LOCAL_PLUGIN_DLL_SUFFIX ":libXext" LOCAL_PLUGIN_DLL_SUFFIX ":libXm" LOCAL_PLUGIN_DLL_SUFFIX -#else #define DEFAULT_EXTRA_LIBS_LIST "libXt" LOCAL_PLUGIN_DLL_SUFFIX ":libXext" LOCAL_PLUGIN_DLL_SUFFIX -#endif /* this function looks for user_pref("plugin.soname.list", "/usr/X11R6/lib/libXt.so.6:libXext.so"); @@ -280,15 +266,9 @@ nsresult nsPluginFile::LoadPlugin(PRLibrary **outLibrary) // work fine. -#if defined(SOLARIS) || defined(HPUX) - // Acrobat/libXm: Lazy resolving might cause crash later (bug 211587) - *outLibrary = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW); - pLibrary = *outLibrary; -#else // Some dlopen() doesn't recover from a failed PR_LD_NOW (bug 223744) *outLibrary = PR_LoadLibraryWithFlags(libSpec, 0); pLibrary = *outLibrary; -#endif if (!pLibrary) { LoadExtraSharedLibs(); // try reload plugin once more diff --git a/dom/xslt/xpath/txUnaryExpr.cpp b/dom/xslt/xpath/txUnaryExpr.cpp index 95682b5b2..ae20fda46 100644 --- a/dom/xslt/xpath/txUnaryExpr.cpp +++ b/dom/xslt/xpath/txUnaryExpr.cpp @@ -23,16 +23,7 @@ UnaryExpr::evaluate(txIEvalContext* aContext, txAExprResult** aResult) NS_ENSURE_SUCCESS(rv, rv); double value = exprRes->numberValue(); -#ifdef HPUX - /* - * Negation of a zero doesn't produce a negative - * zero on HPUX. Perform the operation by multiplying with - * -1. - */ - return aContext->recycler()->getNumberResult(-1 * value, aResult); -#else return aContext->recycler()->getNumberResult(-value, aResult); -#endif } TX_IMPL_EXPR_STUBS_1(UnaryExpr, NODESET_RESULT, expr) diff --git a/editor/libeditor/tests/test_htmleditor_keyevent_handling.html b/editor/libeditor/tests/test_htmleditor_keyevent_handling.html index bfec290a5..414045ac0 100644 --- a/editor/libeditor/tests/test_htmleditor_keyevent_handling.html +++ b/editor/libeditor/tests/test_htmleditor_keyevent_handling.html @@ -27,7 +27,7 @@ var htmlEditor = document.getElementById("htmlEditor"); const kIsMac = navigator.platform.indexOf("Mac") == 0; const kIsWin = navigator.platform.indexOf("Win") == 0; -const kIsLinux = navigator.platform.indexOf("Linux") == 0 || navigator.platform.indexOf("SunOS") == 0 ; +const kIsLinux = navigator.platform.indexOf("Linux") == 0; function runTests() { diff --git a/editor/reftests/xul/platform.js b/editor/reftests/xul/platform.js index f45e6d1f5..a8633fb09 100644 --- a/editor/reftests/xul/platform.js +++ b/editor/reftests/xul/platform.js @@ -13,8 +13,6 @@ if (/Windows/.test(ua)) { } else if (/Linux/.test(ua)) id = "linux"; -else if (/SunOS/.test(ua)) - id = "linux"; else if (/Mac OS X/.test(ua)) id = "mac"; diff --git a/gfx/cairo/libpixman/src/pixman.h b/gfx/cairo/libpixman/src/pixman.h index 1cbf62e21..23408b028 100644 --- a/gfx/cairo/libpixman/src/pixman.h +++ b/gfx/cairo/libpixman/src/pixman.h @@ -104,8 +104,6 @@ typedef __int32 int32_t; typedef unsigned __int32 uint32_t; typedef __int64 int64_t; typedef unsigned __int64 uint64_t; -#elif defined (_AIX) -# include #else # include #endif diff --git a/gfx/qcms/qcmstypes.h b/gfx/qcms/qcmstypes.h index d36779183..d5f843f79 100644 --- a/gfx/qcms/qcmstypes.h +++ b/gfx/qcms/qcmstypes.h @@ -38,8 +38,6 @@ typedef unsigned __int64 uintptr_t; typedef unsigned long uintptr_t; #endif -#elif defined (_AIX) -# include #else # include #endif diff --git a/gfx/thebes/gfxFontconfigFonts.cpp b/gfx/thebes/gfxFontconfigFonts.cpp index bbcbbabf9..9caecc4c0 100644 --- a/gfx/thebes/gfxFontconfigFonts.cpp +++ b/gfx/thebes/gfxFontconfigFonts.cpp @@ -1096,15 +1096,8 @@ gfxFcFontSet::SortPreferredFonts(bool &aWaitForUserFont) FcFontSet *sets[1] = { fontSet }; FcResult result; -#ifdef SOLARIS - // Get around a crash of FcFontSetSort when FcConfig is nullptr - // Solaris's FcFontSetSort needs an FcConfig (bug 474758) - fontSet.own(FcFontSetSort(FcConfigGetCurrent(), sets, 1, mSortPattern, - FcFalse, nullptr, &result)); -#else fontSet.own(FcFontSetSort(nullptr, sets, 1, mSortPattern, FcFalse, nullptr, &result)); -#endif if (truncateMarker != nullptr && fontSet) { nsAutoRef truncatedSet(FcFontSetCreate()); diff --git a/js/public/LegacyIntTypes.h b/js/public/LegacyIntTypes.h index 2c8498c89..cdfd98726 100644 --- a/js/public/LegacyIntTypes.h +++ b/js/public/LegacyIntTypes.h @@ -31,20 +31,10 @@ typedef uint16_t uint16; typedef uint32_t uint32; typedef uint64_t uint64; -/* - * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h, a very - * common header file) defines the types int8, int16, int32, and int64. - * So we don't define these four types here to avoid conflicts in case - * the code also includes sys/types.h. - */ -#if defined(AIX) && defined(HAVE_SYS_INTTYPES_H) -#include -#else typedef int8_t int8; typedef int16_t int16; typedef int32_t int32; typedef int64_t int64; -#endif /* AIX && HAVE_SYS_INTTYPES_H */ typedef uint8_t JSUint8; typedef uint16_t JSUint16; diff --git a/js/src/Makefile.in b/js/src/Makefile.in index b007954b1..20678c68c 100644 --- a/js/src/Makefile.in +++ b/js/src/Makefile.in @@ -138,27 +138,6 @@ distclean:: CFLAGS += $(MOZ_ZLIB_CFLAGS) -# Silence warnings on AIX/HP-UX from non-GNU compilers -ifndef GNU_CC -ifeq ($(OS_ARCH),AIX) -# Suppress warnings from xlC -# 1540-1281: offsetof() on null non-POD types -# 1540-1608: anonymous unions using static data members -CFLAGS += -qsuppress=1540-1281 -qsuppress=1540-1608 -CXXFLAGS += -qsuppress=1540-1281 -qsuppress=1540-1608 -endif -endif -ifeq ($(OS_ARCH),SunOS) -ifeq ($(TARGET_CPU),sparc) - -ifdef GNU_CC -CFLAGS += -mcpu=v9 -CXXFLAGS += -mcpu=v9 -endif # GNU_CC - -endif -endif - $(LIBRARY_NAME).pc: js.pc cp $^ $@ diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index 373b6c9ed..c896ce5d1 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -240,11 +240,7 @@ GetBuildConfiguration(JSContext* cx, unsigned argc, Value* vp) if (!JS_SetProperty(cx, info, "intl-api", value)) return false; -#if defined(SOLARIS) - value = BooleanValue(false); -#else value = BooleanValue(true); -#endif if (!JS_SetProperty(cx, info, "mapped-array-buffer", value)) return false; diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp index 0facd0009..d6adfac2c 100644 --- a/js/src/ctypes/CTypes.cpp +++ b/js/src/ctypes/CTypes.cpp @@ -20,10 +20,6 @@ #include #endif -#if defined(SOLARIS) -#include -#endif - #ifdef HAVE_SSIZE_T #include #endif diff --git a/js/src/ctypes/libffi/testsuite/libffi.call/float2.c b/js/src/ctypes/libffi/testsuite/libffi.call/float2.c index a0b296cf4..dfdef0598 100644 --- a/js/src/ctypes/libffi/testsuite/libffi.call/float2.c +++ b/js/src/ctypes/libffi/testsuite/libffi.call/float2.c @@ -32,21 +32,11 @@ int main (void) f = 3.14159; -#if 1 - /* This is ifdef'd out for now. long double support under SunOS/gcc - is pretty much non-existent. You'll get the odd bus error in library - routines like printf(). */ printf ("%Lf\n", ldblit(f)); -#endif ld = 666; ffi_call(&cif, FFI_FN(ldblit), &ld, values); -#if 1 - /* This is ifdef'd out for now. long double support under SunOS/gcc - is pretty much non-existent. You'll get the odd bus error in library - routines like printf(). */ printf ("%Lf, %Lf, %Lf, %Lf\n", ld, ldblit(f), ld - ldblit(f), LDBL_EPSILON); -#endif /* These are not always the same!! Check for a reasonable delta */ if (ld - ldblit(f) < LDBL_EPSILON) diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp index 26da75469..268e1e489 100644 --- a/js/src/gc/Memory.cpp +++ b/js/src/gc/Memory.cpp @@ -17,11 +17,6 @@ #include "jswin.h" #include -#elif defined(SOLARIS) - -#include -#include - #elif defined(XP_UNIX) #include @@ -408,86 +403,6 @@ DeallocateMappedContent(void* p, size_t length) # endif -#elif defined(SOLARIS) - -#ifndef MAP_NOSYNC -# define MAP_NOSYNC 0 -#endif - -void -InitMemorySubsystem() -{ - if (pageSize == 0) - pageSize = allocGranularity = size_t(sysconf(_SC_PAGESIZE)); -} - -void* -MapAlignedPages(size_t size, size_t alignment) -{ - MOZ_ASSERT(size >= alignment); - MOZ_ASSERT(size >= allocGranularity); - MOZ_ASSERT(size % alignment == 0); - MOZ_ASSERT(size % pageSize == 0); - MOZ_ASSERT_IF(alignment < allocGranularity, allocGranularity % alignment == 0); - MOZ_ASSERT_IF(alignment > allocGranularity, alignment % allocGranularity == 0); - - int prot = PROT_READ | PROT_WRITE; - int flags = MAP_PRIVATE | MAP_ANON | MAP_ALIGN | MAP_NOSYNC; - - void* p = mmap((caddr_t)alignment, size, prot, flags, -1, 0); - if (p == MAP_FAILED) - return nullptr; - return p; -} - -static void* -MapAlignedPagesLastDitch(size_t size, size_t alignment) -{ - return nullptr; -} - -void -UnmapPages(void* p, size_t size) -{ - MOZ_ALWAYS_TRUE(0 == munmap((caddr_t)p, size)); -} - -bool -MarkPagesUnused(void* p, size_t size) -{ - MOZ_ASSERT(OffsetFromAligned(p, pageSize) == 0); - return true; -} - -bool -MarkPagesInUse(void* p, size_t size) -{ - if (!DecommitEnabled()) - return; - - MOZ_ASSERT(OffsetFromAligned(p, pageSize) == 0); -} - -size_t -GetPageFaultCount() -{ - return 0; -} - -void* -AllocateMappedContent(int fd, size_t offset, size_t length, size_t alignment) -{ - // Not implemented. - return nullptr; -} - -// Deallocate mapped memory for object. -void -DeallocateMappedContent(void* p, size_t length) -{ - // Not implemented. -} - #elif defined(XP_UNIX) void diff --git a/js/src/jsapi-tests/testGCAllocator.cpp b/js/src/jsapi-tests/testGCAllocator.cpp index 2c5c58a29..d203019ec 100644 --- a/js/src/jsapi-tests/testGCAllocator.cpp +++ b/js/src/jsapi-tests/testGCAllocator.cpp @@ -14,8 +14,6 @@ #if defined(XP_WIN) #include "jswin.h" #include -#elif defined(SOLARIS) -// This test doesn't apply to Solaris. #elif defined(XP_UNIX) #include #include @@ -39,8 +37,6 @@ BEGIN_TEST(testGCAllocator) # else // Various APIs are unavailable. This test is disabled. return true; # endif -#elif defined(SOLARIS) - return true; #elif defined(XP_UNIX) PageSize = size_t(sysconf(_SC_PAGESIZE)); #else @@ -301,12 +297,6 @@ void* mapMemory(size_t length) { return nullptr; } void unmapPages(void* p, size_t size) { } # endif -#elif defined(SOLARIS) // This test doesn't apply to Solaris. - -void* mapMemoryAt(void* desired, size_t length) { return nullptr; } -void* mapMemory(size_t length) { return nullptr; } -void unmapPages(void* p, size_t size) { } - #elif defined(XP_UNIX) void* @@ -377,7 +367,7 @@ unmapPages(void* p, size_t size) MOZ_RELEASE_ASSERT(errno == ENOMEM); } -#else // !defined(XP_WIN) && !defined(SOLARIS) && !defined(XP_UNIX) +#else // !defined(XP_WIN) && !defined(XP_UNIX) #error "Memory mapping functions are not defined for your OS." #endif END_TEST(testGCAllocator) diff --git a/js/src/jsnativestack.cpp b/js/src/jsnativestack.cpp index 166a5a4f7..98f8fc741 100644 --- a/js/src/jsnativestack.cpp +++ b/js/src/jsnativestack.cpp @@ -71,35 +71,6 @@ js::GetNativeStackBaseImpl() # endif } -#elif defined(SOLARIS) - -#include - -JS_STATIC_ASSERT(JS_STACK_GROWTH_DIRECTION < 0); - -void* -js::GetNativeStackBaseImpl() -{ - stack_t st; - stack_getbounds(&st); - return static_cast(st.ss_sp) + st.ss_size; -} - -#elif defined(AIX) - -#include - -JS_STATIC_ASSERT(JS_STACK_GROWTH_DIRECTION < 0); - -void* -js::GetNativeStackBaseImpl() -{ - ucontext_t context; - getcontext(&context); - return static_cast(context.uc_stack.ss_sp) + - context.uc_stack.ss_size; -} - #elif defined(XP_LINUX) && !defined(ANDROID) && defined(__GLIBC__) void* js::GetNativeStackBaseImpl() diff --git a/js/src/jstypes.h b/js/src/jstypes.h index 75774e5b8..6cfb3d4ad 100644 --- a/js/src/jstypes.h +++ b/js/src/jstypes.h @@ -147,13 +147,7 @@ # define JS_64BIT # endif #elif defined(__GNUC__) -/* Additional GCC defines are when running on Solaris, AIX, and HPUX */ -# if defined(__x86_64__) || defined(__sparcv9) || \ - defined(__64BIT__) || defined(__LP64__) -# define JS_64BIT -# endif -#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* Sun Studio C/C++ */ -# if defined(__x86_64) || defined(__sparcv9) +# if defined(__x86_64__) || defined(__64BIT__) # define JS_64BIT # endif #elif defined(__xlc__) || defined(__xlC__) /* IBM XL C/C++ */ diff --git a/js/src/moz.build b/js/src/moz.build index a3283b5d6..888741138 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -722,14 +722,6 @@ if CONFIG['OS_ARCH'] == 'Linux': 'dl', ] -if CONFIG['OS_ARCH'] == 'SunOS': - OS_LIBS += [ - 'posix4', - 'dl', - 'nsl', - 'socket', - ] - OS_LIBS += CONFIG['REALTIME_LIBS'] CFLAGS += CONFIG['MOZ_ICU_CFLAGS'] diff --git a/js/src/vm/Time.cpp b/js/src/vm/Time.cpp index 69e2cc41d..87531c148 100644 --- a/js/src/vm/Time.cpp +++ b/js/src/vm/Time.cpp @@ -11,9 +11,6 @@ #include "mozilla/DebugOnly.h" #include "mozilla/MathAlgorithms.h" -#ifdef SOLARIS -#define _REENTRANT 1 -#endif #include #include @@ -33,10 +30,6 @@ #ifdef XP_UNIX -#ifdef _SVID_GETTOD /* Defined only on Solaris, see Solaris */ -extern int gettimeofday(struct timeval* tv); -#endif - #include #endif /* XP_UNIX */ @@ -49,11 +42,7 @@ PRMJ_Now() { struct timeval tv; -#ifdef _SVID_GETTOD /* Defined only on Solaris, see Solaris */ - gettimeofday(&tv); -#else gettimeofday(&tv, 0); -#endif /* _SVID_GETTOD */ return int64_t(tv.tv_sec) * PRMJ_USEC_PER_SEC + int64_t(tv.tv_usec); } diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp index 78d21369d..c4733cc96 100644 --- a/js/src/wasm/WasmSignalHandlers.cpp +++ b/js/src/wasm/WasmSignalHandlers.cpp @@ -130,7 +130,7 @@ class AutoSetHandlingSegFault # define EPC_sig(p) ((p)->sc_pc) # define RFP_sig(p) ((p)->sc_regs[30]) # endif -#elif defined(__linux__) || defined(SOLARIS) +#elif defined(__linux__) # if defined(__linux__) # define XMM_sig(p,i) ((p)->uc_mcontext.fpregs->_xmm[i]) # define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_EIP]) diff --git a/js/xpconnect/src/XPCShellImpl.cpp b/js/xpconnect/src/XPCShellImpl.cpp index a6432856d..4ddc8deb3 100644 --- a/js/xpconnect/src/XPCShellImpl.cpp +++ b/js/xpconnect/src/XPCShellImpl.cpp @@ -644,7 +644,6 @@ env_setProperty(JSContext* cx, HandleObject obj, HandleId id, MutableHandleValue ObjectOpResult& result) { /* XXX porting may be easy, but these don't seem to supply setenv by default */ -#if !defined SOLARIS RootedString valstr(cx); RootedString idstr(cx); int rv; @@ -663,7 +662,7 @@ env_setProperty(JSContext* cx, HandleObject obj, HandleId id, MutableHandleValue JSAutoByteString value(cx, valstr); if (!value) return false; -#if defined XP_WIN || defined HPUX || defined OSF1 || defined SCO +#if defined XP_WIN || defined SCO { char* waste = JS_smprintf("%s=%s", name.ptr(), value.ptr()); if (!waste) { @@ -671,16 +670,7 @@ env_setProperty(JSContext* cx, HandleObject obj, HandleId id, MutableHandleValue return false; } rv = putenv(waste); -#ifdef XP_WIN - /* - * HPUX9 at least still has the bad old non-copying putenv. - * - * Per mail from , OSF1 also has a putenv - * that will crash if you pass it an auto char array (so it must place - * its argument directly in the char* environ[] array). - */ free(waste); -#endif } #else rv = setenv(name.ptr(), value.ptr(), 1); @@ -696,7 +686,6 @@ env_setProperty(JSContext* cx, HandleObject obj, HandleId id, MutableHandleValue return false; } vp.setString(valstr); -#endif /* !defined SOLARIS */ return result.succeed(); } diff --git a/layout/generic/nsLineBox.h b/layout/generic/nsLineBox.h index 8f42b9e93..962279df6 100644 --- a/layout/generic/nsLineBox.h +++ b/layout/generic/nsLineBox.h @@ -857,29 +857,47 @@ class nsLineList_iterator { return --copy; } - // Passing by value rather than by reference and reference to const - // to keep AIX happy. - bool operator==(const iterator_self_type aOther) const + bool operator==(const iterator_self_type& aOther) const { MOZ_ASSERT(mListLink == aOther.mListLink, "comparing iterators over different lists"); return mCurrent == aOther.mCurrent; } - bool operator!=(const iterator_self_type aOther) const + bool operator!=(const iterator_self_type& aOther) const { MOZ_ASSERT(mListLink == aOther.mListLink, "comparing iterators over different lists"); return mCurrent != aOther.mCurrent; } - bool operator==(const iterator_self_type aOther) + bool operator==(const iterator_self_type& aOther) { MOZ_ASSERT(mListLink == aOther.mListLink, "comparing iterators over different lists"); return mCurrent == aOther.mCurrent; } - bool operator!=(const iterator_self_type aOther) + bool operator!=(const iterator_self_type& aOther) { MOZ_ASSERT(mListLink == aOther.mListLink, "comparing iterators over different lists"); return mCurrent != aOther.mCurrent; } - + bool operator==(iterator_self_type& aOther) const + { + MOZ_ASSERT(mListLink == aOther.mListLink, "comparing iterators over different lists"); + return mCurrent == aOther.mCurrent; + } + bool operator!=(iterator_self_type& aOther) const + { + MOZ_ASSERT(mListLink == aOther.mListLink, "comparing iterators over different lists"); + return mCurrent != aOther.mCurrent; + } + bool operator==(iterator_self_type& aOther) + { + MOZ_ASSERT(mListLink == aOther.mListLink, "comparing iterators over different lists"); + return mCurrent == aOther.mCurrent; + } + bool operator!=(iterator_self_type& aOther) + { + MOZ_ASSERT(mListLink == aOther.mListLink, "comparing iterators over different lists"); + return mCurrent != aOther.mCurrent; + } + private: link_type *mCurrent; #ifdef DEBUG @@ -992,24 +1010,42 @@ class nsLineList_reverse_iterator { } #endif /* !__MWERKS__ */ - // Passing by value rather than by reference and reference to const - // to keep AIX happy. - bool operator==(const iterator_self_type aOther) const + bool operator==(const iterator_self_type& aOther) const { NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); return mCurrent == aOther.mCurrent; } - bool operator!=(const iterator_self_type aOther) const + bool operator!=(const iterator_self_type& aOther) const { NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); return mCurrent != aOther.mCurrent; } - bool operator==(const iterator_self_type aOther) + bool operator==(const iterator_self_type& aOther) { NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); return mCurrent == aOther.mCurrent; } - bool operator!=(const iterator_self_type aOther) + bool operator!=(const iterator_self_type& aOther) + { + NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); + return mCurrent != aOther.mCurrent; + } + bool operator==(iterator_self_type& aOther) const + { + NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); + return mCurrent == aOther.mCurrent; + } + bool operator!=(iterator_self_type& aOther) const + { + NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); + return mCurrent != aOther.mCurrent; + } + bool operator==(iterator_self_type& aOther) + { + NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); + return mCurrent == aOther.mCurrent; + } + bool operator!=(iterator_self_type& aOther) { NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); return mCurrent != aOther.mCurrent; @@ -1126,24 +1162,42 @@ class nsLineList_const_iterator { return --copy; } - // Passing by value rather than by reference and reference to const - // to keep AIX happy. - bool operator==(const iterator_self_type aOther) const + bool operator==(const iterator_self_type& aOther) const { NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); return mCurrent == aOther.mCurrent; } - bool operator!=(const iterator_self_type aOther) const + bool operator!=(const iterator_self_type& aOther) const { NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); return mCurrent != aOther.mCurrent; } - bool operator==(const iterator_self_type aOther) + bool operator==(const iterator_self_type& aOther) { NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); return mCurrent == aOther.mCurrent; } - bool operator!=(const iterator_self_type aOther) + bool operator!=(const iterator_self_type& aOther) + { + NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); + return mCurrent != aOther.mCurrent; + } + bool operator==(iterator_self_type& aOther) const + { + NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); + return mCurrent == aOther.mCurrent; + } + bool operator!=(iterator_self_type& aOther) const + { + NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); + return mCurrent != aOther.mCurrent; + } + bool operator==(iterator_self_type& aOther) + { + NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); + return mCurrent == aOther.mCurrent; + } + bool operator!=(iterator_self_type& aOther) { NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists"); return mCurrent != aOther.mCurrent; diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 6bcef02a0..08400635b 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -67,9 +67,6 @@ #define alloca _alloca #endif #endif -#ifdef SOLARIS -#include -#endif using std::max; using std::min; diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c index c842f2383..e737e519f 100644 --- a/memory/mozjemalloc/jemalloc.c +++ b/memory/mozjemalloc/jemalloc.c @@ -283,9 +283,7 @@ typedef long ssize_t; #define JEMALLOC_RECYCLE #ifndef MOZ_MEMORY_WINDOWS -#ifndef MOZ_MEMORY_SOLARIS #include -#endif #ifndef __DECONST # define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var)) #endif @@ -311,7 +309,7 @@ __FBSDID("$FreeBSD: head/lib/libc/stdlib/malloc.c 180599 2008-07-18 19:35:44Z ja #endif #include #include -#if !defined(MOZ_MEMORY_SOLARIS) && !defined(MOZ_MEMORY_ANDROID) +#if !defined(MOZ_MEMORY_ANDROID) #include #endif #include @@ -413,10 +411,6 @@ void *_mmap(void *addr, size_t length, int prot, int flags, #endif #endif -#if defined(MOZ_MEMORY_SOLARIS) && defined(MAP_ALIGN) && !defined(JEMALLOC_NEVER_USES_MAP_ALIGN) -#define JEMALLOC_USES_MAP_ALIGN /* Required on Solaris 10. Might improve performance elsewhere. */ -#endif - #ifndef __DECONST #define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var)) #endif @@ -1043,7 +1037,7 @@ static const bool config_recycle = false; * will abort. * Platform specific page size conditions copied from js/public/HeapAPI.h */ -#if (defined(SOLARIS) || defined(__FreeBSD__)) && \ +#if (defined(__FreeBSD__)) && \ (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) #define pagesize_2pow ((size_t) 13) #elif defined(__powerpc64__) @@ -5131,13 +5125,6 @@ malloc_ncpus(void) else return (n); } -#elif (defined(MOZ_MEMORY_SOLARIS)) - -static inline unsigned -malloc_ncpus(void) -{ - return sysconf(_SC_NPROCESSORS_ONLN); -} #elif (defined(MOZ_MEMORY_WINDOWS)) static inline unsigned malloc_ncpus(void) @@ -5934,19 +5921,9 @@ RETURN: #define MOZ_MEMORY_ELF #endif -#ifdef MOZ_MEMORY_SOLARIS -# ifdef __SUNPRO_C -void * -memalign_impl(size_t alignment, size_t size); -#pragma no_inline(memalign_impl) -# elif (defined(__GNUC__)) -__attribute__((noinline)) -# endif -#else #if (defined(MOZ_MEMORY_ELF)) __attribute__((visibility ("hidden"))) #endif -#endif #endif /* MOZ_REPLACE_MALLOC */ #ifdef MOZ_MEMORY_ELF diff --git a/memory/mozjemalloc/moz.build b/memory/mozjemalloc/moz.build index a7c1e5f2a..6408aac8c 100644 --- a/memory/mozjemalloc/moz.build +++ b/memory/mozjemalloc/moz.build @@ -13,11 +13,6 @@ SOURCES += [ ] FINAL_LIBRARY = 'memory' -# See bug 422055. -if CONFIG['OS_ARCH'] == 'SunOS' and not CONFIG['GNU_CC'] \ - and CONFIG['MOZ_OPTIMIZE']: - CFLAGS += ['-xO5'] - # For non release/esr builds, enable (some) fatal jemalloc assertions. This # helps us catch memory errors. if CONFIG['MOZ_UPDATE_CHANNEL'] not in ('release', 'esr'): diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp index 31867ca0a..19487704f 100644 --- a/modules/libpref/Preferences.cpp +++ b/modules/libpref/Preferences.cpp @@ -1306,11 +1306,6 @@ static nsresult pref_InitInitialObjects() "winpref.js" #elif defined(XP_UNIX) "unix.js" -#if defined(_AIX) - , "aix.js" -#endif -#elif defined(XP_BEOS) - "beos.js" #endif }; diff --git a/netwerk/base/nsFileStreams.cpp b/netwerk/base/nsFileStreams.cpp index 6508b33b9..5a82dea1b 100644 --- a/netwerk/base/nsFileStreams.cpp +++ b/netwerk/base/nsFileStreams.cpp @@ -5,7 +5,7 @@ #include "ipc/IPCMessageUtils.h" -#if defined(XP_UNIX) || defined(XP_BEOS) +#if defined(XP_UNIX) #include #elif defined(XP_WIN) #include @@ -97,14 +97,14 @@ nsFileStreamBase::SetEOF() if (mFD == nullptr) return NS_BASE_STREAM_CLOSED; -#if defined(XP_UNIX) || defined(XP_BEOS) +#if defined(XP_UNIX) // Some system calls require an EOF offset. int64_t offset; rv = Tell(&offset); if (NS_FAILED(rv)) return rv; #endif -#if defined(XP_UNIX) || defined(XP_BEOS) +#if defined(XP_UNIX) if (ftruncate(PR_FileDesc2NativeHandle(mFD), offset) != 0) { NS_ERROR("ftruncate failed"); return NS_ERROR_FAILURE; diff --git a/netwerk/base/nsStandardURL.h b/netwerk/base/nsStandardURL.h index 0ca345572..eba85528c 100644 --- a/netwerk/base/nsStandardURL.h +++ b/netwerk/base/nsStandardURL.h @@ -72,7 +72,6 @@ public: static void InitGlobalObjects(); static void ShutdownGlobalObjects(); -public: /* internal -- HPUX compiler can't handle this being private */ // // location and length of an url segment relative to mSpec // diff --git a/toolkit/components/osfile/modules/osfile_unix_back.jsm b/toolkit/components/osfile/modules/osfile_unix_back.jsm index a028dda7d..bf5c66b8d 100644 --- a/toolkit/components/osfile/modules/osfile_unix_back.jsm +++ b/toolkit/components/osfile/modules/osfile_unix_back.jsm @@ -585,17 +585,10 @@ } else if (Const._STAT_VER != undefined) { const ver = Const._STAT_VER; let xstat_name, lxstat_name, fxstat_name; - if (OS.Constants.Sys.Name == "SunOS") { - // Solaris - xstat_name = "_xstat"; - lxstat_name = "_lxstat"; - fxstat_name = "_fxstat"; - } else { - // Linux, all widths - xstat_name = "__xstat"; - lxstat_name = "__lxstat"; - fxstat_name = "__fxstat"; - } + // Linux, all widths + xstat_name = "__xstat"; + lxstat_name = "__lxstat"; + fxstat_name = "__fxstat"; let Stat = {}; libc.declareLazyFFI(Stat, "xstat", diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build index 5191b5a21..ba7fb5032 100644 --- a/toolkit/library/moz.build +++ b/toolkit/library/moz.build @@ -270,15 +270,6 @@ if CONFIG['MOZ_ENABLE_STARTUP_NOTIFICATION']: if CONFIG['MOZ_ENABLE_LIBPROXY']: OS_LIBS += CONFIG['MOZ_LIBPROXY_LIBS'] -if CONFIG['OS_ARCH'] == 'SunOS': - OS_LIBS += [ - 'elf', - ] - if CONFIG['GNU_CC']: - OS_LIBS += [ - 'demangle', - ] - if CONFIG['OS_ARCH'] == 'FreeBSD': OS_LIBS += [ 'util', diff --git a/toolkit/mozapps/update/common/updatedefines.h b/toolkit/mozapps/update/common/updatedefines.h index 760d2c4c4..5790cf996 100644 --- a/toolkit/mozapps/update/common/updatedefines.h +++ b/toolkit/mozapps/update/common/updatedefines.h @@ -96,11 +96,7 @@ static inline int mywcsprintf(WCHAR* dest, size_t count, const WCHAR* fmt, ...) # include # include -#ifdef SOLARIS -# include -#else # include -#endif # include #ifdef XP_MACOSX diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp index c0b01bfbc..8025deaaf 100644 --- a/toolkit/mozapps/update/updater/updater.cpp +++ b/toolkit/mozapps/update/updater/updater.cpp @@ -3648,88 +3648,6 @@ int add_dir_entries(const NS_tchar *dirpath, ActionList *list) return rv; } -#elif defined(SOLARIS) -int add_dir_entries(const NS_tchar *dirpath, ActionList *list) -{ - int rv = OK; - NS_tchar foundpath[MAXPATHLEN]; - struct { - dirent dent_buffer; - char chars[MAXNAMLEN]; - } ent_buf; - struct dirent* ent; - mozilla::UniquePtr searchpath(get_full_path(dirpath)); - - DIR* dir = opendir(searchpath.get()); - if (!dir) { - LOG(("add_dir_entries error on opendir: " LOG_S ", err: %d", searchpath.get(), - errno)); - return UNEXPECTED_FILE_OPERATION_ERROR; - } - - while (readdir_r(dir, (dirent *)&ent_buf, &ent) == 0 && ent) { - if ((strcmp(ent->d_name, ".") == 0) || - (strcmp(ent->d_name, "..") == 0)) - continue; - - NS_tsnprintf(foundpath, sizeof(foundpath)/sizeof(foundpath[0]), - NS_T("%s%s"), searchpath.get(), ent->d_name); - struct stat64 st_buf; - int test = stat64(foundpath, &st_buf); - if (test) { - closedir(dir); - return UNEXPECTED_FILE_OPERATION_ERROR; - } - if (S_ISDIR(st_buf.st_mode)) { - NS_tsnprintf(foundpath, sizeof(foundpath)/sizeof(foundpath[0]), - NS_T("%s/"), foundpath); - // Recurse into the directory. - rv = add_dir_entries(foundpath, list); - if (rv) { - LOG(("add_dir_entries error: " LOG_S ", err: %d", foundpath, rv)); - closedir(dir); - return rv; - } - } else { - // Add the file to be removed to the ActionList. - NS_tchar *quotedpath = get_quoted_path(get_relative_path(foundpath)); - if (!quotedpath) { - closedir(dir); - return PARSE_ERROR; - } - - Action *action = new RemoveFile(); - rv = action->Parse(quotedpath); - if (rv) { - LOG(("add_dir_entries Parse error on recurse: " LOG_S ", err: %d", - quotedpath, rv)); - closedir(dir); - return rv; - } - - list->Append(action); - } - } - closedir(dir); - - // Add the directory to be removed to the ActionList. - NS_tchar *quotedpath = get_quoted_path(get_relative_path(dirpath)); - if (!quotedpath) - return PARSE_ERROR; - - Action *action = new RemoveDir(); - rv = action->Parse(quotedpath); - if (rv) { - LOG(("add_dir_entries Parse error on close: " LOG_S ", err: %d", - quotedpath, rv)); - } - else { - list->Append(action); - } - - return rv; -} - #else int add_dir_entries(const NS_tchar *dirpath, ActionList *list) diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 61c05ae2a..420a5ab13 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -2496,7 +2496,7 @@ RemoveComponentRegistries(nsIFile* aProfileDir, nsIFile* aLocalProfileDir, if (!file) return false; -#if defined(XP_UNIX) || defined(XP_BEOS) +#if defined(XP_UNIX) #define PLATFORM_FASL_SUFFIX ".mfasl" #elif defined(XP_WIN) #define PLATFORM_FASL_SUFFIX ".mfl" diff --git a/toolkit/xre/nsSigHandlers.cpp b/toolkit/xre/nsSigHandlers.cpp index 098d9ae7e..454882c1b 100644 --- a/toolkit/xre/nsSigHandlers.cpp +++ b/toolkit/xre/nsSigHandlers.cpp @@ -32,11 +32,6 @@ #endif #endif -#if defined(SOLARIS) -#include -#include -#endif - static const char* gProgname = "huh?"; // Note: some tests manipulate this value. @@ -198,32 +193,6 @@ static void fpehandler(int signum, siginfo_t *si, void *context) *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */ #endif #endif -#ifdef SOLARIS - ucontext_t *uc = (ucontext_t *)context; - -#if defined(__i386) - uint32_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[0]; - *cw |= FPU_EXCEPTION_MASK; - - uint32_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[1]; - *sw &= ~FPU_STATUS_FLAGS; - - /* address of the instruction that caused the exception */ - uint32_t *ip = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[3]; - uc->uc_mcontext.gregs[REG_PC] = *ip; -#endif -#if defined(__amd64__) - uint16_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.cw; - *cw |= FPU_EXCEPTION_MASK; - - uint16_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.sw; - *sw &= ~FPU_STATUS_FLAGS; - - uint32_t *mxcsr = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.mxcsr; - *mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */ - *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */ -#endif -#endif } #endif @@ -286,30 +255,6 @@ void InstallSignalHandlers(const char *aProgname) } #endif -#if defined(SOLARIS) -#define NOFILES 512 - - // Boost Solaris file descriptors - { - struct rlimit rl; - - if (getrlimit(RLIMIT_NOFILE, &rl) == 0) - - if (rl.rlim_cur < NOFILES) { - rl.rlim_cur = NOFILES; - - if (setrlimit(RLIMIT_NOFILE, &rl) < 0) { - perror("setrlimit(RLIMIT_NOFILE)"); - fprintf(stderr, "Cannot exceed hard limit for open files"); - } -#if defined(DEBUG) - if (getrlimit(RLIMIT_NOFILE, &rl) == 0) - printf("File descriptors set to %d\n", rl.rlim_cur); -#endif //DEBUG - } - } -#endif //SOLARIS - #if defined(MOZ_WIDGET_GTK) && (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 6)) const char *assertString = PR_GetEnv("XPCOM_DEBUG_BREAK"); if (assertString && 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 -#include -#include - -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//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 @@ -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/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 -#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 #include -#ifdef SOLARIS -#include -#endif - /* * round */ 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 @@ -239,31 +239,6 @@ a port. - -Done -SunOS x86 - -Contributed code! -Arthur Jones <aljones@lbl.gov>
-? -Philip Pokorny <ppokorny@mindspring.com>
- - -The word I hear is that this is working and done - - - - -Done -AIX PPC -Contributed code! -Jim Dunn <jdunn@netscape.com> -Philip K. Warren writes:
- -We have gone through several releases of AIX without any problems. - - - Done Irix 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);