Bug 1432125 - Solaris xptcall clean-up - support 64bits gcc/clang only r=glandium
authorPetr Sumbera <petr.sumbera@oracle.com>
Tue, 02 Apr 2019 00:57:29 +0000
changeset 467533 fa186be3ba9f1e012078eaead78305e679d544b8
parent 467532 cf6c7c082dc3a53f2c054567a7089c710982ba02
child 467534 1e17935240c9c36d7ace24b0cb96a69e4a46822d
push id35802
push usercbrindusan@mozilla.com
push dateTue, 02 Apr 2019 15:46:39 +0000
treeherdermozilla-central@2eb225d3082f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1432125
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1432125 - Solaris xptcall clean-up - support 64bits gcc/clang only r=glandium Differential Revision: https://phabricator.services.mozilla.com/D25448
xpcom/reflect/xptcall/md/unix/moz.build
xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparc_solaris_GCC3.s
xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparc_solaris_SUNW.s
xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_sparcv9_solaris_SUNW.s
xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_solaris_SUNW.s
xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc64_openbsd.cpp
xpcom/reflect/xptcall/md/unix/xptcinvoke_sparcv9_solaris.cpp
xpcom/reflect/xptcall/md/unix/xptcinvoke_x86_64_solaris.cpp
xpcom/reflect/xptcall/md/unix/xptcinvoke_x86_solaris.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_asm_sparcv9_solaris.s
xpcom/reflect/xptcall/md/unix/xptcstubs_asm_x86_64_solaris_SUNW.s
xpcom/reflect/xptcall/md/unix/xptcstubs_asm_x86_solaris_SUNW.s
xpcom/reflect/xptcall/md/unix/xptcstubs_sparcv9_solaris.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_solaris.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_x86_solaris.cpp
--- a/xpcom/reflect/xptcall/md/unix/moz.build
+++ b/xpcom/reflect/xptcall/md/unix/moz.build
@@ -21,17 +21,17 @@ if CONFIG['OS_ARCH'] == 'Darwin':
 
 if CONFIG['OS_ARCH'] == 'GNU':
     if CONFIG['CPU_ARCH'] == 'x86':
         SOURCES += [
             'xptcinvoke_gcc_x86_unix.cpp',
             'xptcstubs_gcc_x86_unix.cpp'
         ]
 
-if CONFIG['OS_ARCH'] in ('Linux', 'Bitrig', 'DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD') or \
+if CONFIG['OS_ARCH'] in ('Linux', 'Bitrig', 'DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD', 'SunOS') or \
    CONFIG['OS_ARCH'].startswith('GNU_'):
     if CONFIG['CPU_ARCH'] == 'x86_64':
         SOURCES += [
             'xptcinvoke_asm_x86_64_unix.S',
             'xptcinvoke_x86_64_unix.cpp',
             'xptcstubs_x86_64_linux.cpp',
         ]
     elif CONFIG['CPU_ARCH'] == 'x86':
@@ -44,51 +44,16 @@ if CONFIG['OS_ARCH'] in ('Linux', 'FreeB
     if CONFIG['CPU_ARCH'] == 'ia64':
         SOURCES += [
             'xptcinvoke_asm_ipf64.s',
             'xptcinvoke_ipf64.cpp',
             'xptcstubs_asm_ipf64.s',
             'xptcstubs_ipf64.cpp'
         ]
 
-if CONFIG['OS_ARCH'] == 'SunOS' and CONFIG['INTEL_ARCHITECTURE']:
-    if CONFIG['CPU_ARCH'] == 'x86_64':
-        if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
-            SOURCES += [
-                'xptcinvoke_asm_x86_64_unix.S',
-                'xptcinvoke_x86_64_unix.cpp',
-                'xptcstubs_x86_64_linux.cpp'
-            ]
-        else:
-            GENERATED_FILES = [
-                'xptcstubsdef_asm.solx86',
-            ]
-            ASFLAGS += ['-xarch=amd64']
-            SOURCES += [
-                'xptcinvoke_x86_64_solaris.cpp',
-                'xptcstubs_asm_x86_64_solaris_SUNW.s',
-                'xptcstubs_x86_64_solaris.cpp',
-            ]
-    else:
-        if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
-            SOURCES += [
-                'xptcinvoke_gcc_x86_unix.cpp',
-                'xptcstubs_gcc_x86_unix.cpp'
-            ]
-        else:
-            GENERATED_FILES = [
-                'xptcstubsdef_asm.solx86',
-            ]
-            SOURCES += [
-                'xptcinvoke_asm_x86_solaris_SUNW.s',
-                'xptcinvoke_x86_solaris.cpp',
-                'xptcstubs_asm_x86_solaris_SUNW.s',
-                'xptcstubs_x86_solaris.cpp'
-            ]
-
 if CONFIG['CPU_ARCH'] == 'Alpha':
     if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD'):
         SOURCES += [
             'xptcinvoke_linux_alpha.cpp',
             'xptcstubs_linux_alpha.cpp',
         ]
     elif CONFIG['OS_ARCH'] == 'OpenBSD':
         SOURCES += [
@@ -235,53 +200,24 @@ if CONFIG['OS_ARCH'] == 'NetBSD' and CON
 if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['CPU_ARCH'] == 'sparc':
     SOURCES += [
         'xptcinvoke_asm_sparc_openbsd.s',
         'xptcinvoke_sparc_openbsd.cpp',
         'xptcstubs_asm_sparc_openbsd.s',
         'xptcstubs_sparc_openbsd.cpp',
     ]
 
-if CONFIG['OS_ARCH'] in ('OpenBSD', 'FreeBSD', 'Linux') and CONFIG['CPU_ARCH'] == 'sparc64':
+if CONFIG['OS_ARCH'] in ('OpenBSD', 'FreeBSD', 'Linux', 'SunOS') and CONFIG['CPU_ARCH'] == 'sparc64':
     SOURCES += [
         'xptcinvoke_asm_sparc64_openbsd.s',
         'xptcinvoke_sparc64_openbsd.cpp',
         'xptcstubs_asm_sparc64_openbsd.s',
         'xptcstubs_sparc64_openbsd.cpp',
     ]
 
-if CONFIG['OS_ARCH'] == 'SunOS' and not CONFIG['INTEL_ARCHITECTURE']:
-    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['CC_TYPE'] in ('clang', 'gcc'):
-        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['CPU_ARCH'] == 's390':
         SOURCES += [
             'xptcinvoke_linux_s390.cpp',
             'xptcstubs_linux_s390.cpp',
         ]
         CXXFLAGS += [
             '-fno-strict-aliasing',
deleted file mode 100644
--- 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
deleted file mode 100644
--- 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
deleted file mode 100644
--- 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
deleted file mode 100644
--- 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
-
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc64_openbsd.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcinvoke_sparc64_openbsd.cpp
@@ -25,19 +25,19 @@ invoke_copy_to_stack(uint64_t* d, uint32
   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())
+    if (l_s->IsIndirect())
     {
-      *l_d = (uint64_t)l_s->ptr;
+      *l_d = (uint64_t) &l_s->val;
       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;
deleted file mode 100644
--- 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;
-}
deleted file mode 100644
--- 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;
-}
deleted file mode 100644
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_x86_solaris.cpp
+++ /dev/null
@@ -1,70 +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;
-        default:
-            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;
-        default                  : break;
-        }
-    }
-}
-
-}
deleted file mode 100644
--- 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
deleted file mode 100644
--- 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"
deleted file mode 100644
--- 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"
deleted file mode 100644
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_sparcv9_solaris.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-#if defined(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;
-
-    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");
-
-    const uint8_t indexOfJSContext = info->IndexOfJSContext();
-
-    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 (i == indexOfJSContext)
-            ap++;
-
-        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;
-        }
-    }
-
-    nsresult 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__ */
deleted file mode 100644
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_solaris.cpp
+++ /dev/null
@@ -1,147 +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"
-
-// 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;
-
-    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;
-
-    const uint8_t indexOfJSContext = info->IndexOfJSContext();
-
-    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 (i == indexOfJSContext) {
-            if (nr_gpr < GPR_COUNT)
-                nr_gpr++;
-            else
-                ap++;
-        }
-
-        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;
-        }
-    }
-
-    nsresult 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"
deleted file mode 100644
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_solaris.cpp
+++ /dev/null
@@ -1,82 +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"
-
-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;
-
-    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");
-
-    const uint8_t indexOfJSContext = info->IndexOfJSContext();
-
-    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 (i == indexOfJSContext)
-            ap++;
-
-        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;
-        default                  : break;
-        }
-    }
-
-    nsresult 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"