Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/vtable_layout_x86.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/vtable_layout_x86.cpp	(revision 101813)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/* this code contributed by Bert Driehuis <bert_driehuis@nl.compuware.com> */
-
-#include <stdio.h>
-
-// Try to determine the vtable layout generated by G++
-// Produces the offset at which the first vtable entry can be
-// found, and the factor to apply for subsequent entries on stdout.
-// Example output:
-//    #define GCC_VTABLE_START        0xc
-//    #define GCC_VTABLE_FACTOR       0x8
-
-class test {
-public:
-      virtual int     t1(void);
-      virtual int     t2(void);
-      int             x;
-};
-
-test::test() { this->x = 0x12121212; };
-
-int test::t1(void) { return 1; }
-int test::t2(void) { return 2; }
-
-void die(char *x) {
-      fprintf(stderr, "%s\n", x);
-      exit(1);
-}
-
-int 
-main()
-{
-      int             i;
-      test           *t = new test();
-      int            *tp = (int *) t;
-      int             off1 = -1;
-      int             off2 = -1;
-      int             factor;
-      int             factorshift;
-
-      if (*tp++ != 0x12121212)
-              die("Integer element test::x not found!");
-      tp = (int *) *tp;
-      for (i = 0; i < 10; i++) {
-              if (tp[i] == (int) t->t1)
-                      off1 = i;
-              if (tp[i] == (int) t->t2)
-                      off2 = i;
-      }
-      if (off1 == -1 || off2 == -1)
-              die("Could not determine offset into vtable!");
-      factor = (off2 - off1) * 4;
-      factorshift = -1;
-      while (factor) {
-              factorshift++;
-              factor >>= 1;
-      }
-      printf("/* Automatically generated by vtable_layout_x86.cpp */\n");
-      printf("#define GCC_VTABLE_START\t0x%x\n", off1 * 4);
-      printf("#define GCC_VTABLE_FACTOR\t0x%x\n", (off2 - off1) * 4);
-      printf("#define GCC_VTABLE_SHIFT\t0x%x\n", factorshift);
-      exit(0);
-}
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp	(revision 101813)
+++ 	(revision )
@@ -1,220 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-#if !defined(LINUX) || !defined(__arm__)
-#error "This code is for Linux ARM only. Check that it works on your system, too.\nBeware that this code is highly compiler dependent."
-#endif
-
-// Remember that these 'words' are 32bit DWORDS
-
-static PRUint32
-invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-{
-    PRUint32 result = 0;
-    for(PRUint32 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;
-        }
-    }
-    return result;
-}
-
-static void
-invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s)
-{
-    for(PRUint32 i = 0; i < paramCount; i++, d++, s++)
-    {
-        if(s->IsPtrData())
-        {
-            *((void**)d) = s->ptr;
-            continue;
-        }
-        switch(s->type)
-        {
-        case nsXPTType::T_I8     : *((PRInt8*)  d) = s->val.i8;          break;
-        case nsXPTType::T_I16    : *((PRInt16*) d) = s->val.i16;         break;
-        case nsXPTType::T_I32    : *((PRInt32*) d) = s->val.i32;         break;
-        case nsXPTType::T_I64    : *((PRInt64*) d) = s->val.i64; d++;    break;
-        case nsXPTType::T_U8     : *((PRUint8*) d) = s->val.u8;          break;
-        case nsXPTType::T_U16    : *((PRUint16*)d) = s->val.u16;         break;
-        case nsXPTType::T_U32    : *((PRUint32*)d) = s->val.u32;         break;
-        case nsXPTType::T_U64    : *((PRUint64*)d) = s->val.u64; d++;    break;
-        case nsXPTType::T_FLOAT  : *((float*)   d) = s->val.f;           break;
-        case nsXPTType::T_DOUBLE : *((double*)  d) = s->val.d;   d++;    break;
-        case nsXPTType::T_BOOL   : *((PRBool*)  d) = s->val.b;           break;
-        case nsXPTType::T_CHAR   : *((char*)    d) = s->val.c;           break;
-        case nsXPTType::T_WCHAR  : *((wchar_t*) d) = s->val.wc;          break;
-        default:
-            // all the others are plain pointer types
-            *((void**)d) = s->val.p;
-            break;
-        }
-    }
-}
-
-extern "C" {
-    struct my_params_struct {
-        nsISupports* that;      
-        PRUint32 Index;         
-        PRUint32 Count;         
-        nsXPTCVariant* params;  
-        PRUint32 fn_count;     
-        PRUint32 fn_copy;      
-    };
-};
-
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params)
-{
-    PRUint32 result;
-    struct my_params_struct my_params;
-    my_params.that = that;
-    my_params.Index = methodIndex;
-    my_params.Count = paramCount;
-    my_params.params = params;
-    my_params.fn_copy = (PRUint32) &invoke_copy_to_stack;
-    my_params.fn_count = (PRUint32) &invoke_count_words;
-
-/* This is to call a given method of class that.
- * The parameters are in params, the number is in paramCount.
- * The routine will issue calls to count the number of words
- * required for argument passing and to copy the arguments to
- * the stack.
- * Since APCS passes the first 3 params in r1-r3, we need to
- * load the first three words from the stack and correct the stack
- * pointer (sp) in the appropriate way. This means:
- *
- * 1.) more than 3 arguments: load r1-r3, correct sp and remember No.
- *			      of bytes left on the stack in r4
- *
- * 2.) <= 2 args: load r1-r3 (we won't be causing a stack overflow I hope),
- *		  restore sp as if nothing had happened and set the marker r4 to zero.
- *
- * Afterwards sp will be restored using the value in r4 (which is not a temporary register
- * and will be preserved by the function/method called according to APCS [ARM Procedure
- * Calling Standard]).
- *
- * !!! IMPORTANT !!!
- * This routine makes assumptions about the vtable layout of the c++ compiler. It's implemented
- * for arm-linux GNU g++ >= 2.8.1 (including egcs and gcc-2.95.[1-3])!
- *
- */
- 
-  __asm__ __volatile__(
-    "ldr	r1, [%1, #12]	\n\t"	/* prepare to call invoke_count_words	*/
-    "ldr	ip, [%1, #16]	\n\t"	/* r0=paramCount, r1=params		*/
-    "ldr	r0, [%1,  #8]	\n\t"
-    "mov	lr, pc		\n\t"	/* call it...				*/
-    "mov	pc, ip		\n\t"
-    "mov	r4, r0, lsl #2	\n\t"	/* This is the amount of bytes needed.	*/
-    "sub	sp, sp, r4	\n\t"	/* use stack space for the args...	*/
-    "mov	r0, sp		\n\t"	/* prepare a pointer an the stack	*/
-    "ldr	r1, [%1,  #8]	\n\t"	/* =paramCount				*/
-    "ldr	r2, [%1, #12]	\n\t"	/* =params				*/
-    "ldr	ip, [%1, #20]	\n\t"	/* =invoke_copy_to_stack		*/
-    "mov	lr, pc		\n\t"	/* copy args to the stack like the	*/
-    "mov	pc, ip		\n\t"	/* compiler would.			*/
-    "ldr	r0, [%1]	\n\t"	/* =that				*/
-    "ldr	r1, [r0, #0]	\n\t"	/* get that->vtable offset		*/
-    "ldr	r2, [%1, #4]	\n\t"
-    "mov	r2, r2, lsl #2	\n\t"	/* a vtable_entry(x)=8 + (4 bytes * x)	*/
-#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
-    "ldr        ip, [r1, r2]    \n\t"   /* get method adress from vtable        */
-#else /* non G++ V3 ABI */
-    "add	r2, r2, #8	\n\t"	/* with this compilers			*/
-    "ldr	ip, [r1, r2]	\n\t"	/* get method adress from vtable	*/
-#endif
-    "cmp	r4, #12		\n\t"	/* more than 3 arguments???		*/
-    "ldmgtia	sp!, {r1, r2, r3}\n\t"	/* yes: load arguments for r1-r3	*/
-    "subgt	r4, r4, #12	\n\t"	/*      and correct the stack pointer	*/
-    "ldmleia	sp, {r1, r2, r3}\n\t"	/* no:  load r1-r3 from stack		*/ 
-    "addle	sp, sp, r4	\n\t"	/*      and restore stack pointer	*/
-    "movle	r4, #0		\n\t"	/*	a mark for restoring sp		*/
-    "ldr	r0, [%1, #0]	\n\t"	/* get (self)				*/
-    "mov	lr, pc		\n\t"	/* call mathod				*/
-    "mov	pc, ip		\n\t"
-    "add	sp, sp, r4	\n\t"	/* restore stack pointer		*/
-    "mov	%0, r0		\n\t"	/* the result...			*/
-    : "=r" (result)
-    : "r" (&my_params)
-    : "r0", "r1", "r2", "r3", "r4", "ip", "lr", "sp"
-    );
-    
-  return result;
-}    
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm_netbsd.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm_netbsd.cpp	(revision 101813)
+++ 	(revision )
@@ -1,213 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-// Remember that these 'words' are 32bit DWORDS
-
-static PRUint32
-invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-{
-    PRUint32 result = 0;
-    for(PRUint32 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;
-        }
-    }
-    return result;
-}
-
-static void
-invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s)
-{
-    for(PRUint32 i = 0; i < paramCount; i++, d++, s++)
-    {
-        if(s->IsPtrData())
-        {
-            *((void**)d) = s->ptr;
-            continue;
-        }
-        switch(s->type)
-        {
-        case nsXPTType::T_I8     : *((PRInt8*)  d) = s->val.i8;          break;
-        case nsXPTType::T_I16    : *((PRInt16*) d) = s->val.i16;         break;
-        case nsXPTType::T_I32    : *((PRInt32*) d) = s->val.i32;         break;
-        case nsXPTType::T_I64    : *((PRInt64*) d) = s->val.i64; d++;    break;
-        case nsXPTType::T_U8     : *((PRUint8*) d) = s->val.u8;          break;
-        case nsXPTType::T_U16    : *((PRUint16*)d) = s->val.u16;         break;
-        case nsXPTType::T_U32    : *((PRUint32*)d) = s->val.u32;         break;
-        case nsXPTType::T_U64    : *((PRUint64*)d) = s->val.u64; d++;    break;
-        case nsXPTType::T_FLOAT  : *((float*)   d) = s->val.f;           break;
-        case nsXPTType::T_DOUBLE : *((double*)  d) = s->val.d;   d++;    break;
-        case nsXPTType::T_BOOL   : *((PRBool*)  d) = s->val.b;           break;
-        case nsXPTType::T_CHAR   : *((char*)    d) = s->val.c;           break;
-        case nsXPTType::T_WCHAR  : *((wchar_t*) d) = s->val.wc;          break;
-        default:
-            // all the others are plain pointer types
-            *((void**)d) = s->val.p;
-            break;
-        }
-    }
-}
-
-extern "C" 
-struct my_params_struct {
-    nsISupports* that;      
-    PRUint32 Index;         
-    PRUint32 Count;         
-    nsXPTCVariant* params;  
-    PRUint32 fn_count;     
-    PRUint32 fn_copy;      
-};
-
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params)
-{
-    PRUint32 result;
-    struct my_params_struct my_params;
-    my_params.that = that;
-    my_params.Index = methodIndex;
-    my_params.Count = paramCount;
-    my_params.params = params;
-    my_params.fn_copy = (PRUint32) &invoke_copy_to_stack;
-    my_params.fn_count = (PRUint32) &invoke_count_words;
-
-/* This is to call a given method of class that.
- * The parameters are in params, the number is in paramCount.
- * The routine will issue calls to count the number of words
- * required for argument passing and to copy the arguments to
- * the stack.
- * Since APCS passes the first 3 params in r1-r3, we need to
- * load the first three words from the stack and correct the stack
- * pointer (sp) in the appropriate way. This means:
- *
- * 1.) more than 3 arguments: load r1-r3, correct sp and remember No.
- *			      of bytes left on the stack in r4
- *
- * 2.) <= 2 args: load r1-r3 (we won't be causing a stack overflow I hope),
- *		  restore sp as if nothing had happened and set the marker r4 to zero.
- *
- * Afterwards sp will be restored using the value in r4 (which is not a temporary register
- * and will be preserved by the function/method called according to APCS [ARM Procedure
- * Calling Standard]).
- *
- * !!! IMPORTANT !!!
- * This routine makes assumptions about the vtable layout of the c++ compiler. It's implemented
- * for arm-linux GNU g++ >= 2.8.1 (including egcs and gcc-2.95.[1-3])!
- *
- */
- 
-  __asm__ __volatile__(
-    "ldr	r1, [%1, #12]	\n\t"	/* prepare to call invoke_count_words	*/
-    "ldr	ip, [%1, #16]	\n\t"	/* r0=paramCount, r1=params		*/
-    "ldr	r0, [%1,  #8]	\n\t"
-    "mov	lr, pc		\n\t"	/* call it...				*/
-    "mov	pc, ip		\n\t"
-    "mov	r4, r0, lsl #2	\n\t"	/* This is the amount of bytes needed.	*/
-    "sub	sp, sp, r4	\n\t"	/* use stack space for the args...	*/
-    "mov	r0, sp		\n\t"	/* prepare a pointer an the stack	*/
-    "ldr	r1, [%1,  #8]	\n\t"	/* =paramCount				*/
-    "ldr	r2, [%1, #12]	\n\t"	/* =params				*/
-    "ldr	ip, [%1, #20]	\n\t"	/* =invoke_copy_to_stack		*/
-    "mov	lr, pc		\n\t"	/* copy args to the stack like the	*/
-    "mov	pc, ip		\n\t"	/* compiler would.			*/
-    "ldr	r0, [%1]	\n\t"	/* =that				*/
-    "ldr	r1, [r0, #0]	\n\t"	/* get that->vtable offset		*/
-    "ldr	r2, [%1, #4]	\n\t"
-    "add	r2, r1, r2, lsl #3\n\t"	/* a vtable_entry(x)=8 + (8 bytes * x)	*/
-    "add	r2, r2, #8	\n\t"	/* with this compilers			*/
-    "ldr	r3, [r2]	\n\t"	/* get virtual offset from vtable	*/
-    "mov	r3, r3, lsl #16	\n\t"
-    "add	r0, r0, r3, asr #16\n\t"
-    "ldr	ip, [r2, #4]	\n\t"	/* get method address from vtable	*/
-    "cmp	r4, #12		\n\t"	/* more than 3 arguments???		*/
-    "ldmgtia	sp!, {r1, r2, r3}\n\t"	/* yes: load arguments for r1-r3	*/
-    "subgt	r4, r4, #12	\n\t"	/*      and correct the stack pointer	*/
-    "ldmleia	sp, {r1, r2, r3}\n\t"	/* no:  load r1-r3 from stack		*/ 
-    "addle	sp, sp, r4	\n\t"	/*      and restore stack pointer	*/
-    "movle	r4, #0		\n\t"	/*	a mark for restoring sp		*/
-    "mov	lr, pc		\n\t"	/* call mathod				*/
-    "mov	pc, ip		\n\t"
-    "add	sp, sp, r4	\n\t"	/* restore stack pointer		*/
-    "mov	%0, r0		\n\t"	/* the result...			*/
-    : "=r" (result)
-    : "r" (&my_params)
-    : "r0", "r1", "r2", "r3", "r4", "ip", "lr"
-    );
-    
-  return result;
-}    
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ipf32.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ipf32.s	(revision 101813)
+++ 	(revision )
@@ -1,145 +1,0 @@
-
-// Select C numeric constant
-        .radix  C
-// for 64 bit mode, use .psr abi64
-        .psr    abi32
-// big endian
-        .psr    msb
-// Section has executable code
-        .section .text, "ax","progbits"
-// procedure named 'XPTC_InvokeByIndex'
-        .proc   XPTC_InvokeByIndex
-// manual bundling
-        .explicit
-
-// extern "C" PRUint32
-// invoke_copy_to_stack(uint64_t* d,
-//   const PRUint32 paramCount, nsXPTCVariant* s)
-        .global invoke_copy_to_stack
-//      .exclass  invoke_copy_to_stack, @fullyvisible
-        .type   invoke_copy_to_stack,@function
-
-//      .exclass  XPTC_InvokeByIndex, @fullyvisible
-        .type   XPTC_InvokeByIndex,@function
-
-// XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-//   PRUint32 paramCount, nsXPTCVariant* params);
-XPTC_InvokeByIndex::
-        .prologue
-        .save ar.pfs, r37
-// allocate 4 input args, 6 local args, and 8 output args
-        alloc           r37 = ar.pfs, 4, 6, 8, 0   // M
-        nop.i           0                       ;; // I
-
-// unwind table already knows gp, no need to specify anything
-        add             r39 = 0, gp                // A
-        .save rp, r36
-        mov             r36 = rp                   // I
-        .vframe r38
-        add             r38 = 0, sp             ;; // A
-
-// We first calculate the amount of extra memory stack space required
-// for the arguments, and register storage.
-// We then call invoke_copy_to_stack() to write the argument contents
-// to the specified memory regions.
-// We then copy the integer arguments to integer registers, and floating
-// arguments to float registers.
-// Lastly we load the virtual table jump pointer, and call the target
-// subroutine.
-
-// in0 : that
-// in1 : methodIndex
-// in2 : paramCount
-// in3 : params
-
-// stack frame size is 16 + (8 * even(paramCount)) + 64 + 64
-// 16 byte frame header
-// 8 * even(paramCount) memory argument area
-// 64 bytes integer register area
-// 64 bytes float register area
-// This scheme makes sure stack fram size is a multiple of 16
-
-        .body
-        add             r10 = 8, r0          // A
-// r41 points to float register area
-        add             r41 = -64, sp        // A
-// r40 points to int register area
-        add             r40 = -128, sp    ;; // A
-
-        add             out1 = 0, r40        // A
-        add             out2 = 0, r41        // A
-        tbit.z          p14,p15 = in2,0   ;; // I
-
-// compute 8 * even(paramCount)
-(p14)   shladd          r11 = in2, 3, r0  ;; // A
-(p15)   shladd          r11 = in2, 3, r10 ;; // A
-        sub             out0 = r40, r11   ;; // A
-
-// advance the stack frame
-        add             sp = -16, out0       // A
-        add             out3 = 0, in2        // A
-        add             out4 = 0, in3        // A
-
-// branch to invoke_copy_to_stack
-        br.call.sptk.few rp = invoke_copy_to_stack ;; // B
-
-// restore gp
-        add             gp = 0, r39          // A
-        add             out0 = 0, in0        // A
-
-// load the integer and float registers
-        ld8             out1 = [r40], 8      // M
-        ldfd            f8 = [r41], 8       ;; // M
-
-        ld8             out2 = [r40], 8      // M
-        ldfd            f9 = [r41], 8       ;; // M
-
-        ld8             out3 = [r40], 8      // M
-        ldfd            f10 = [r41], 8      ;; // M
-
-        ld8             out4 = [r40], 8      // M
-        ldfd            f11 = [r41], 8      ;; // M
-
-        ld8             out5 = [r40], 8      // M
-        ldfd            f12 = [r41], 8      ;; // M
-// 16 * methodIndex
-        shladd          r11 = in1, 4, r0     // A
-
-        ld8             out6 = [r40], 8      // M
-        ldfd            f13 = [r41], 8      ;; // M
-
-        ld8             out7 = [r40], 8      // M
-        ldfd            f14 = [r41], 8       // M
-        addp4           r8 = 0, in0       ;; // A
-
-// look up virtual base table and dispatch to target subroutine
-// This section assumes 32 bit pointer mode, and virtual base table
-// layout from the ABI http://www.codesourcery.com/cxx-abi/abi.html
-
-// load base table
-        ld4             r8 = [r8]         ;; // M
-        addp4           r8 = r11, r8      ;; // A
-
- // first entry is jump pointer, second entry is gp
-        addp4           r9 = 8, r8       ;; // A
-// load jump pointer
-        ld8             r8 = [r8]
-
-// load gp
-        ld8             gp = [r9]        ;; // M
-        mov             b6 = r8          ;; // I
-
-// branch to target virtual function
-        br.call.sptk.few rp = b6          ;; // B
-
-// epilog
-        mov             ar.pfs = r37         // I
-        mov             rp = r36          ;; // I
-
-        add             sp = 0, r38          // A
-        add             gp = 0, r39          // A
-        br.ret.sptk.few rp                ;; // B
-
-        .endp
-
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ipf64.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ipf64.s	(revision 101813)
+++ 	(revision )
@@ -1,145 +1,0 @@
-
-// Select C numeric constant
-        .radix  C
-// for 64 bit mode, use .psr abi64
-        .psr    abi64
-// little endian
-        .psr    lsb
-// Section has executable code
-        .section .text, "ax","progbits"
-// procedure named 'XPTC_InvokeByIndex'
-        .proc   XPTC_InvokeByIndex
-// manual bundling
-        .explicit
-
-// extern "C" PRUint32
-// invoke_copy_to_stack(uint64_t* d,
-//   const PRUint32 paramCount, nsXPTCVariant* s)
-        .global invoke_copy_to_stack
-//      .exclass  invoke_copy_to_stack, @fullyvisible
-        .type   invoke_copy_to_stack,@function
-
-//      .exclass  XPTC_InvokeByIndex, @fullyvisible
-        .type   XPTC_InvokeByIndex,@function
-
-// XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-//   PRUint32 paramCount, nsXPTCVariant* params);
-XPTC_InvokeByIndex::
-        .prologue
-        .save ar.pfs, r37
-// allocate 4 input args, 6 local args, and 8 output args
-        alloc           r37 = ar.pfs, 4, 6, 8, 0   // M
-        nop.i           0                       ;; // I
-
-// unwind table already knows gp, no need to specify anything
-        add             r39 = 0, gp                // A
-        .save rp, r36
-        mov             r36 = rp                   // I
-        .vframe r38
-        add             r38 = 0, sp             ;; // A
-
-// We first calculate the amount of extra memory stack space required
-// for the arguments, and register storage.
-// We then call invoke_copy_to_stack() to write the argument contents
-// to the specified memory regions.
-// We then copy the integer arguments to integer registers, and floating
-// arguments to float registers.
-// Lastly we load the virtual table jump pointer, and call the target
-// subroutine.
-
-// in0 : that
-// in1 : methodIndex
-// in2 : paramCount
-// in3 : params
-
-// stack frame size is 16 + (8 * even(paramCount)) + 64 + 64
-// 16 byte frame header
-// 8 * even(paramCount) memory argument area
-// 64 bytes integer register area
-// 64 bytes float register area
-// This scheme makes sure stack fram size is a multiple of 16
-
-        .body
-        add             r10 = 8, r0          // A
-// r41 points to float register area
-        add             r41 = -64, sp        // A
-// r40 points to int register area
-        add             r40 = -128, sp    ;; // A
-
-        add             out1 = 0, r40        // A
-        add             out2 = 0, r41        // A
-        tbit.z          p14,p15 = in2,0   ;; // I
-
-// compute 8 * even(paramCount)
-(p14)   shladd          r11 = in2, 3, r0  ;; // A
-(p15)   shladd          r11 = in2, 3, r10 ;; // A
-        sub             out0 = r40, r11   ;; // A
-
-// advance the stack frame
-        add             sp = -16, out0       // A
-        add             out3 = 0, in2        // A
-        add             out4 = 0, in3        // A
-
-// branch to invoke_copy_to_stack
-        br.call.sptk.few rp = invoke_copy_to_stack ;; // B
-
-// restore gp
-        add             gp = 0, r39          // A
-        add             out0 = 0, in0        // A
-
-// load the integer and float registers
-        ld8             out1 = [r40], 8      // M
-        ldfd            f8 = [r41], 8       ;; // M
-
-        ld8             out2 = [r40], 8      // M
-        ldfd            f9 = [r41], 8       ;; // M
-
-        ld8             out3 = [r40], 8      // M
-        ldfd            f10 = [r41], 8      ;; // M
-
-        ld8             out4 = [r40], 8      // M
-        ldfd            f11 = [r41], 8      ;; // M
-
-        ld8             out5 = [r40], 8      // M
-        ldfd            f12 = [r41], 8      ;; // M
-// 16 * methodIndex
-        shladd          r11 = in1, 4, r0     // A
-
-        ld8             out6 = [r40], 8      // M
-        ldfd            f13 = [r41], 8      ;; // M
-
-        ld8             out7 = [r40], 8      // M
-        ldfd            f14 = [r41], 8       // M
-        add             r8 = 0, in0       ;; // A
-
-// look up virtual base table and dispatch to target subroutine
-// This section assumes 64 bit pointer mode, and virtual base table
-// layout from the ABI http://www.codesourcery.com/cxx-abi/abi.html
-
-// load base table
-        ld8             r8 = [r8]         ;; // M
-        add             r8 = r11, r8      ;; // A
-
- // first entry is jump pointer, second entry is gp
-        add             r9 = 8, r8       ;; // A
-// load jump pointer
-        ld8             r8 = [r8]
-
-// load gp
-        ld8             gp = [r9]        ;; // M
-        mov             b6 = r8          ;; // I
-
-// branch to target virtual function
-        br.call.sptk.few rp = b6          ;; // B
-
-// epilog
-        mov             ar.pfs = r37         // I
-        mov             rp = r36          ;; // I
-
-        add             sp = 0, r38          // A
-        add             gp = 0, r39          // A
-        br.ret.sptk.few rp                ;; // B
-
-        .endp
-
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_irix.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_irix.s	(revision 101813)
+++ 	(revision )
@@ -1,149 +1,0 @@
-
-#include <sys/regdef.h>
-#include <sys/asm.h>
-
-.text
-.globl  invoke_count_words
-.globl	invoke_copy_to_stack 
-
-LOCALSZ=7		# a0, a1, a2, a3, s0, ra, gp
-FRAMESZ=(((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
-
-RAOFF=FRAMESZ-(1*SZREG)
-A0OFF=FRAMESZ-(2*SZREG)
-A1OFF=FRAMESZ-(3*SZREG)
-A2OFF=FRAMESZ-(4*SZREG)
-A3OFF=FRAMESZ-(5*SZREG)
-S0OFF=FRAMESZ-(6*SZREG)
-GPOFF=FRAMESZ-(7*SZREG)
-
-	#	
-	# _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
-	#                      a0       a1          a2         a3
-
-NESTED(_XPTC_InvokeByIndex, FRAMESZ, ra)
-	SETUP_GP
-	PTR_SUBU sp, FRAMESZ
-	SETUP_GP64(GPOFF, _XPTC_InvokeByIndex)
-	SAVE_GP(GPOFF)
-
-	REG_S	ra, RAOFF(sp)
-	REG_S	a0, A0OFF(sp)
-	REG_S	a1, A1OFF(sp)
-	REG_S	a2, A2OFF(sp)
-	REG_S	a3, A3OFF(sp)
-	REG_S	s0, S0OFF(sp)
-	REG_S	gp, GPOFF(sp)
-
-	# invoke_count_words(paramCount, params)
-        move    a0, a2
-	move    a1, a3	
-        jal     invoke_count_words
-
-	# invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
-	#                      nsXPTCVariant* s, PRUint32 *reg)
-
-	REG_L   a1, A2OFF(sp)   # a1 - paramCount
-	REG_L	a2, A3OFF(sp)	# a2 - params
-
-	# save sp before we copy the params to the stack
-	move	t0, sp
-
-	# assume full size of 8 bytes per param to be safe
-	sll	v0, 4		# 8 bytes * num params
-	subu	sp, sp, v0	# make room
-	move	a0, sp		# a0 - param stack address
-
-	# create temporary stack space to write int and fp regs
-        subu    sp, 64          # 64 = 8 regs of 8 bytes
-
-	move    a3, sp
-
-	# save the old sp and save the arg stack
-	subu	sp, sp, 16
-	REG_S	t0, 0(sp)
-	REG_S	a0, 8(sp)
-
-	# copy the param into the stack areas
-	jal	invoke_copy_to_stack
-
-	REG_L	t3, 8(sp)	# get previous a0
-	REG_L	sp, 0(sp)	# get orig sp back
-
-	REG_L	a0, A0OFF(sp)	# a0 - that
-	REG_L	a1, A1OFF(sp)	# a1 - methodIndex
-
-#ifdef __GNUC__
-	# t1 = methodIndex * 8
-	# (use shift instead of mult)
-	sll	t1, a1, 3
-#else
-	# t1 = methodIndex * 12
-	# (use shift and subtract trick instead of mult)
- 	sll	t1, a1, 2
-	subu	t1, t1, a1
-	sll	t1, t1, 2
-#endif
-
-	# calculate the function we need to jump to,
-	# which must then be saved in t9
-	lw	t9, 0(a0)
-	addu	t9, t9, t1
-#ifdef __GNUC__
-	lw      t9, 12(t9)      # t9 = *(that+t1+12)
-#else
-	li	t2, 20
-	addu	t9, t9, t2
-	lw	t9, 0(t9)	# t9 = *(that+t1+20)	
-#endif
-
-	# calculate the proper "this" pointer for the
-	# function that they asked for
-	lw	t0, 0(a0)
-	addu	t0, t1
-#ifdef __GNUC__
-	lh      t0, 8(t0)
-#else
-	lw	t0, 12(t0)
-#endif
-	
-	addu	a0, a0, t0
-
-	# get register save area from invoke_copy_to_stack
-	subu	t1, t3, 64
-
-	# a1..a7 and f13..f19 should now be set to what
-	# invoke_copy_to_stack told us. skip a0 and f12
-	# because that's the "this" pointer
-
-	REG_L	a1,  0(t1)
-	REG_L	a2,  8(t1)
-	REG_L	a3, 16(t1)
-	REG_L	a4, 24(t1)
-	REG_L	a5, 32(t1)
-	REG_L	a6, 40(t1)
-	REG_L	a7, 48(t1)
-
-	l.d	$f13,  0(t1)
-	l.d	$f14,  8(t1)
-	l.d	$f15, 16(t1)
-	l.d	$f16, 24(t1)
-	l.d	$f17, 32(t1)
-	l.d	$f18, 40(t1)
-	l.d	$f19, 48(t1)
-
-	# save away our stack pointer and create
-	# the stack pointer for the function
-	move	s0, sp
-	move	sp, t3
-
-	jalr	ra, t9
-
-	move	sp, s0
-
-	RESTORE_GP64
-	REG_L	ra, RAOFF(sp)
-	REG_L	s0, S0OFF(sp)
-	PTR_ADDU	sp, FRAMESZ
-	j	ra
-.end _XPTC_InvokeByIndex
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s	(revision 101813)
+++ 	(revision )
@@ -1,166 +1,0 @@
-/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corp, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2001
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Brendan Eich     <brendan@mozilla.org>
- *   Stuart Parmenter <pavlov@netscape.com>
- */
-
-/* This code is for MIPS using the O32 ABI. */
-
-#include <sys/regdef.h>
-#include <sys/asm.h>
-
-.text
-.globl  invoke_count_words
-.globl	invoke_copy_to_stack 
-
-# We need a variable number of words allocated from the stack for copies of
-# the params, and this space must come between the high frame (where ra, gp,
-# and s0 are saved) and the low frame (where a0-a3 are saved by the callee
-# functions we invoke). 
-
-LOCALSZ=4		# s0, s1, ra, gp
-NARGSAVE=4		# a0, a1, a2, a3
-HIFRAMESZ=(LOCALSZ*SZREG)
-LOFRAMESZ=(NARGSAVE*SZREG)
-FRAMESZ=(HIFRAMESZ+LOFRAMESZ+ALSZ)&ALMASK
-
-# XXX these 2*SZREG, etc. are very magic -- we *know* that ALSZ&ALMASK cause
-# FRAMESZ to be 0 mod 8, in this case to be 16 and not 12.
-RAOFF=FRAMESZ - (2*SZREG)
-GPOFF=FRAMESZ - (3*SZREG)
-S0OFF=FRAMESZ - (4*SZREG)
-S1OFF=FRAMESZ - (5*SZREG)
-
-# These are not magic -- they are just our argsave slots in the caller frame.
-A0OFF=FRAMESZ
-A1OFF=FRAMESZ + (1*SZREG)
-A2OFF=FRAMESZ + (2*SZREG)
-A3OFF=FRAMESZ + (3*SZREG)
-
-	#	
-	# _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
-	#                      a0       a1          a2         a3
-
-NESTED(_XPTC_InvokeByIndex, FRAMESZ, ra)
-
-	.set	noreorder
-	.cpload	t9
-	.set	reorder
-
-	subu	sp, FRAMESZ
-
-	# specify the save register mask -- XXX do we want the a0-a3 here, given
-	# our "split" frame where the args are saved below a dynamicly allocated
-	# region under the high frame?
-	#
-	# 10010000000000010000000011110000
-	.mask 0x900100F0, -((NARGSAVE+LOCALSZ)*SZREG)
-
-	# thou shalt not use .cprestore if yer frame has variable size...
-	# .cprestore GPOFF
-
-	REG_S	ra, RAOFF(sp)
-
-	# this happens automatically with .cprestore, but we cannot use that op...
-	REG_S	gp, GPOFF(sp)
-	REG_S	s0, S0OFF(sp)
-	REG_S	s1, S1OFF(sp)
-
-	REG_S	a0, A0OFF(sp)
-	REG_S	a1, A1OFF(sp)
-	REG_S	a2, A2OFF(sp)
-	REG_S	a3, A3OFF(sp)
-
-	# invoke_count_words(paramCount, params)
-	move	a0, a2
-	move	a1, a3
-
-	jal	invoke_count_words
-	lw	gp, GPOFF(sp)
-
-	# save the old sp so we can pop the param area and any "low frame"
-	# needed as an argsave area below the param block for callees that
-	# we invoke.
-	move	s0, sp
-
-	REG_L	a1, A2OFF(sp)	# a1 = paramCount
-	REG_L	a2, A3OFF(sp)	# a2 = params
-
-	# we define a word as 4 bytes, period end of story!
-	sll	v0, 2		# 4 bytes * result of invoke_copy_words
-	subu	v0, LOFRAMESZ	# but we take back the argsave area built into
-				# our stack frame -- SWEET!
-	subu	sp, sp, v0	# make room
-	move	a0, sp		# a0 = param stack address
-	move	s1, a0		# save it for later -- it should be safe here
-
-	# the old sp is still saved in s0, but we now need another argsave
-	# area ("low frame") for the invoke_copy_to_stack call.
-	subu	sp, sp, LOFRAMESZ
-
-	# copy the param into the stack areas
-	# invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
-	#                      nsXPTCVariant* s)
-	jal     invoke_copy_to_stack
-	lw  	gp, GPOFF(s0)
-
-	move	sp, s0		# get orig sp back, popping params and argsave
-
-	REG_L	a0, A0OFF(sp)	# a0 = set "that" to be "this"
-	REG_L	a1, A1OFF(sp)	# a1 = methodIndex
-
-	# t1 = methodIndex * 4
-	# (use shift instead of mult)
-	sll	t1, a1, 2
-
-	# calculate the function we need to jump to,
-	# which must then be saved in t9
-	lw	t9, 0(a0)
-	addu	t9, t9, t1
-	lw	t9, 8(t9)
-
-	# a1..a3 and f13..f14 should now be set to what
-	# invoke_copy_to_stack told us. skip a0 and f12
-	# because that is the "this" pointer
-
-	REG_L	a1, 1*SZREG(s1)
-	REG_L	a2, 2*SZREG(s1)
-	REG_L	a3, 3*SZREG(s1)
-
-	l.d	$f13, 8(s1)
-	l.d	$f14, 16(s1)
-
-	# Create the stack pointer for the function, which must have 4 words
-	# of space for callee-saved args.  invoke_count_words allocated space
-        # for a0 starting at s1, so we just move s1 into sp.
-	move	sp, s1
-
-	jalr	ra, t9
-	lw	gp, GPOFF(s0)
-
-	move	sp, s0
-
-	REG_L	ra, RAOFF(sp)
-	REG_L	s0, S0OFF(sp)
-	addu	sp, FRAMESZ
-	j	ra
-.end _XPTC_InvokeByIndex
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_openvms_alpha.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_openvms_alpha.s	(revision 101813)
+++ 	(revision )
@@ -1,99 +1,0 @@
-;* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-;*
-;* The contents of this file are subject to the Netscape Public
-;* License Version 1.1 (the "License"); you may not use this file
-;* except in compliance with the License. You may obtain a copy of
-;* the License at http://www.mozilla.org/NPL/
-;*
-;* Software distributed under the License is distributed on an "AS
-;* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-;* implied. See the License for the specific language governing
-;* rights and limitations under the License.
-;*
-;* The Original Code is mozilla.org code.
-;*
-;* The Initial Developer of the Original Code is Netscape
-;* Communications Corporation.  Portions created by Netscape are
-;* Copyright (C) 1998 Netscape Communications Corporation. All
-;* Rights Reserved.
-;*
-;* Contributor(s): 
-;*/
-
-;
-; XPTC_PUBLIC_API(nsresult)
-; XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-;                    PRUint32 paramCount, nsXPTCVariant* params)
-;
-
-	.title "INVOKE" "Invoke By Index"
-
-	$routine XPTC_InvokeByIndex, kind=stack, saved_regs=<R2,R3,R4>
-
-	mov r27,r2              ; Need to set up a base register...
-	.base r2,$LS            ; ...for the LINKAGE_PAIR call
-
-	mov r17,r3              ; save methodIndex in r3
-	mov r18,r4              ; save paramCount in r4
-
-;
-; Allocate enough stack space to hold the greater of 6 or "paramCount"+1
-; parameters. (+1 for "this" pointer)  Room for at least 6 parameters
-; is required for storage of those passed via registers.
-;
-
-	cmplt R18,5,R1          ; paramCount = MAX(5, "paramCount")
-	cmovne R1,5,R18
-	s8addq R18,16,R1        ; room for "paramCount"+1 params (8 bytes each)
-	bic R1,15,R1            ; stack space is rounded up to 0 % 16
-	subq SP,R1,SP
-
-	stq R16,0(SP)           ; save "that" (as "this" pointer)
-	addq SP,8,R16           ; pass stack pointer
-	mov R4,R17              ; pass original "paramCount
-	mov R19,R18             ; pass "params"
-	mov 4,r25               ; argument count
-
-	$LINKAGE_PAIR invoke_copy_to_stack
-	ldq r26,$LP             ; get entry point address from linkage pair
-	ldq r27,$LP+8           ; get procedure descriptor address from lp
-	jsr r26,r26             ; and call the routine
-
-;
-; Copy the first 6 parameters to registers and remove from stack frame.
-; Both the integer and floating point registers are set for each parameter
-; except the first which is the "this" pointer.  (integer only)
-; The floating point registers are all set as doubles since the
-; invoke_copy_to_stack function should have converted the floats.
-;
-	ldq R16,0(SP)           ; integer registers
-	ldq R17,8(SP)
-	ldq R18,16(SP)
-	ldq R19,24(SP)
-	ldq R20,32(SP)
-	ldq R21,40(SP)
-	ldt F17,8(SP)           ; floating point registers
-	ldt F18,16(SP)
-	ldt F19,24(SP)
-	ldt F20,32(SP)
-	ldt F21,40(SP)
-
-	addq SP,48,SP           ; remove params from stack
-
-;
-; Call the virtual function with the constructed stack frame.
-; First three methods are always QueryInterface, AddRef and Release.
-;
-	addq r4,1,r25           ; argument count now includes "this"
-	mov R16,R1              ; load "this"
-	ldl R1,0(R1)            ; load vtable
-	s4addq r3,0,r28         ; vtable index = "methodIndex" * 4
-	addq r1,r28,r1
-	ldl r27,0(r1)           ; load procedure value
-	ldq r26,8(r27)          ; load entry point address
-	jsr r26,r26             ; call virtual function
-
-	$return
-
-	$end_routine XPTC_InvokeByIndex
-	.end
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_osf1_alpha.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_osf1_alpha.s	(revision 101813)
+++ 	(revision )
@@ -1,83 +1,0 @@
-/*
- * XPTC_PUBLIC_API(nsresult)
- * XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
- *                    PRUint32 paramCount, nsXPTCVariant* params)
- */
-.text
-.align 4
-.globl XPTC_InvokeByIndex
-.ent XPTC_InvokeByIndex
-XPTC_InvokeByIndex:
-.frame $15,32,$26,0
-.mask 0x4008000,-32
-ldgp $29,0($27)
-XPTC_InvokeByIndexXv:
-subq $30,32,$30
-stq $26,0($30)
-stq $15,8($30)
-bis $30,$30,$15
-.prologue 1
-
-/*
- * Allocate enough stack space to hold the greater of 6 or "paramCount"+1
- * parameters. (+1 for "this" pointer)  Room for at least 6 parameters
- * is required for storage of those passed via registers.
- */
-
-bis $31,5,$2      /* count = MAX(5, "paramCount") */
-cmplt $2,$18,$1
-cmovne $1,$18,$2
-s8addq $2,16,$1   /* room for count+1 params (8 bytes each) */
-bic $1,15,$1      /* stack space is rounded up to 0 % 16 */
-subq $30,$1,$30
-
-stq $16,0($30)    /* save "that" (as "this" pointer) */
-stq $17,16($15)   /* save "methodIndex" */
-
-addq $30,8,$16    /* pass stack pointer */
-bis $18,$18,$17   /* pass "paramCount" */
-bis $19,$19,$18   /* pass "params" */
-jsr $26,invoke_copy_to_stack     /* call invoke_copy_to_stack */
-ldgp $29,0($26)
-
-/*
- * Copy the first 6 parameters to registers and remove from stack frame.
- * Both the integer and floating point registers are set for each parameter
- * except the first which is the "this" pointer.  (integer only)
- * The floating point registers are all set as doubles since the
- * invoke_copy_to_stack function should have converted the floats.
- */
-ldq $16,0($30)    /* integer registers */
-ldq $17,8($30)
-ldq $18,16($30)
-ldq $19,24($30)
-ldq $20,32($30)
-ldq $21,40($30)
-ldt $f17,8($30)   /* floating point registers */
-ldt $f18,16($30)
-ldt $f19,24($30)
-ldt $f20,32($30)
-ldt $f21,40($30)
-
-addq $30,48,$30   /* remove params from stack */
-
-/*
- * Call the virtual function with the constructed stack frame.
- */
-bis $16,$16,$1    /* load "this" */
-ldq $2,16($15)    /* load "methodIndex" */
-ldq $1,0($1)      /* load vtable */
-s8addq $2,0,$2   /* vtable index = "methodIndex" * 8 + 16 */
-addq $1,$2,$1
-ldq $27,0($1)     /* load address of function */
-jsr $26,($27),0   /* call virtual function */
-ldgp $29,0($26)
-
-bis $15,$15,$30
-ldq $26,0($30)
-ldq $15,8($30)
-addq $30,32,$30
-ret $31,($26),1
-.end XPTC_InvokeByIndex
-
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_pa32.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_pa32.s	(revision 101813)
+++ 	(revision )
@@ -1,131 +1,0 @@
-  .LEVEL  1.1
-framesz .EQU 128
-
-; XPTC_InvokeByIndex(nsISuppots* that, PRUint32 methodIndex,
-;   PRUint32 paramCount, nsXPTCVariant* params);
-
-; g++ need to compile everything with -fvtable-thunks !
-
-  .SPACE  $TEXT$,SORT=8
-  .SUBSPA $CODE$,QUAD=0,ALIGN=4,ACCESS=0x2c,CODE_ONLY,SORT=24
-XPTC_InvokeByIndex
-  .PROC
-  .CALLINFO CALLER,FRAME=72,ENTRY_GR=%r3,SAVE_RP,SAVE_SP,ARGS_SAVED,ALLOCA_FRAME
-
- ; frame marker takes 48 bytes,
- ; register spill area takes 8 bytes,
- ; local stack area takes 72 bytes result in 128 bytes total
-
-  .ENTRY
-        STW          %rp,-20(%sp)
-        STW,MA       %r3,128(%sp)
-
-        LDO     -framesz(%r30),%r28
-        STW     %r28,-4(%r30)       ; save previous sp
-        STW     %r19,-32(%r30)
-
-        STW     %r26,-36-framesz(%r30)  ; save argument registers in
-        STW     %r25,-40-framesz(%r30)  ; in PREVIOUS frame
-        STW     %r24,-44-framesz(%r30)  ;
-        STW     %r23,-48-framesz(%r30)  ;
-
-        B,L     .+8,%r2
-        ADDIL   L'invoke_count_bytes-$PIC_pcrel$1+4,%r2,%r1
-        LDO     R'invoke_count_bytes-$PIC_pcrel$2+8(%r1),%r1
-$PIC_pcrel$1
-        LDSID   (%r1),%r31
-$PIC_pcrel$2
-        MTSP    %r31,%sr0
-        .CALL   ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26;out=28
-        BE,L    0(%sr0,%r1),%r31
-        COPY    %r31,%r2
-
-        CMPIB,>=        0,%r28, .+76
-        COPY    %r30,%r3            ; copy stack ptr to saved stack ptr
-        ADD     %r30,%r28,%r30      ; extend stack frame
-        LDW     -4(%r3),%r28        ; move frame
-        STW     %r28,-4(%r30)
-        LDW     -8(%r3),%r28
-        STW     %r28,-8(%r30)
-        LDW     -12(%r3),%r28
-        STW     %r28,-12(%r30)
-        LDW     -16(%r3),%r28
-        STW     %r28,-16(%r30)
-        LDW     -20(%r3),%r28
-        STW     %r28,-20(%r30)
-        LDW     -24(%r3),%r28
-        STW     %r28,-24(%r30)
-        LDW     -28(%r3),%r28
-        STW     %r28,-28(%r30)
-        LDW     -32(%r3),%r28
-        STW     %r28,-32(%r30)
-
-        LDO     -40(%r30),%r26         ; load copy address
-        LDW     -44-framesz(%r3),%r25  ; load rest of 2 arguments
-        LDW     -48-framesz(%r3),%r24  ;
-
-        LDW     -32(%r30),%r19 ; shared lib call destroys r19; reload
-        B,L     .+8,%r2
-        ADDIL   L'invoke_copy_to_stack-$PIC_pcrel$3+4,%r2,%r1
-        LDO     R'invoke_copy_to_stack-$PIC_pcrel$4+8(%r1),%r1
-$PIC_pcrel$3
-        LDSID   (%r1),%r31
-$PIC_pcrel$4
-        MTSP    %r31,%sr0
-        .CALL   ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26
-        BE,L    0(%sr0,%r1),%r31
-        COPY    %r31,%r2
-
-        LDO     -48(%r30),%r20
-        EXTRW,U,= %r28,31,1,%r22
-        FLDD    0(%r20),%fr7  ; load double arg 1
-        EXTRW,U,= %r28,30,1,%r22
-        FLDW    8(%r20),%fr5L ; load float arg 1
-        EXTRW,U,= %r28,29,1,%r22
-        FLDW    4(%r20),%fr6L ; load float arg 2
-        EXTRW,U,= %r28,28,1,%r22
-        FLDW    0(%r20),%fr7L ; load float arg 3
-
-        LDW     -36-framesz(%r3),%r26  ; load ptr to 'that'
-        LDW     -40(%r30),%r25  ; load the rest of dispatch argument registers
-        LDW     -44(%r30),%r24
-        LDW     -48(%r30),%r23
-
-        LDW     -36-framesz(%r3),%r20  ; load vtable addr
-        LDW     -40-framesz(%r3),%r28  ; load index
-        LDW     0(%r20),%r20    ; follow vtable
-        LDO     16(%r20),%r20   ; offset vtable by 16 bytes (g++: 8, aCC: 16)
-        SH2ADDL %r28,%r20,%r28  ; add 4*index to vtable entry
-        LDW     0(%r28),%r22    ; load vtable entry
-
-        B,L     .+8,%r2
-        ADDIL   L'$$dyncall_external-$PIC_pcrel$5+4,%r2,%r1
-        LDO     R'$$dyncall_external-$PIC_pcrel$6+8(%r1),%r1
-$PIC_pcrel$5
-        LDSID   (%r1),%r31
-$PIC_pcrel$6
-        MTSP    %r31,%sr0
-        .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR
-;in=22-26;out=28;
-        BE,L    0(%sr0,%r1),%r31
-        COPY    %r31,%r2
-
-        LDW     -32(%r30),%r19
-        COPY    %r3,%r30              ; restore saved stack ptr
-
-        LDW          -148(%sp),%rp
-        BVE             (%rp)
-  .EXIT
-        LDW,MB       -128(%sp),%r3
-
-  .PROCEND  ;in=23,24,25,26;
-
-  .ALIGN  8
-  .SPACE  $TEXT$
-  .SUBSPA $CODE$
-  .IMPORT $$dyncall_external,MILLICODE
-  .IMPORT invoke_count_bytes,CODE
-  .IMPORT invoke_copy_to_stack,CODE
-  .EXPORT XPTC_InvokeByIndex,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR,LONG_RETURN
-  .END
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_aix.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_aix.s	(revision 101813)
+++ 	(revision )
@@ -1,146 +1,0 @@
- #
- # -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- #
- # The contents of this file are subject to the Netscape Public
- # License Version 1.1 (the "License"); you may not use this file
- # except in compliance with the License. You may obtain a copy of
- # the License at http://www.mozilla.org/NPL/
- #
- # Software distributed under the License is distributed on an "AS
- # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- # implied. See the License for the specific language governing
- # rights and limitations under the License.
- #
- # The Original Code is mozilla.org code.
- #
- # The Initial Developer of the Original Code is Netscape
- # Communications Corporation.  Portions created by Netscape are
- # Copyright (C) 1999 Netscape Communications Corporation. All
- # Rights Reserved.
- #
- # Contributor(s): 
- #   IBM Corporation
- #
-
-.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.XPTC_InvokeByIndex{TC},"XPTC_InvokeByIndex"
-
-
-# .text section
-
-        .csect  H.10.NO_SYMBOL{PR}
-        .globl  .XPTC_InvokeByIndex
-        .globl  XPTC_InvokeByIndex{DS}
-        .extern .invoke_copy_to_stack
-        .extern ._ptrgl{PR}
-
-
-#
-#   XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-#                   PRUint32 paramCount, nsXPTCVariant* params)
-#
-
-.XPTC_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.XPTC_InvokeByIndex:
-        .tc     H.18.XPTC_InvokeByIndex{TC},XPTC_InvokeByIndex{DS}
-
-        .csect  XPTC_InvokeByIndex{DS}
-        .long   .XPTC_InvokeByIndex     # "\0\0\0\0"
-        .long   TOC{TC0}                # "\0\0\0008"
-        .long   0x00000000              # "\0\0\0\0"
-# End   csect   XPTC_InvokeByIndex{DS}
-
-# .bss section	
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_aix64.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_aix64.s	(revision 101813)
+++ 	(revision )
@@ -1,161 +1,0 @@
-#  ***** BEGIN LICENSE BLOCK *****
-#
-# Version: MPL 1.1/LGPL 2.1/GPL 2.0
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is IBM Corporation.
-# Portions created by IBM are
-#   Copyright (C) 2002, International Business Machines Corporation.
-#   All Rights Reserved.
-#
-# Contributor(s):
-#
-#  Alternatively, the contents of this file may be used under the terms of
-#  either of the GNU General Public License Version 2 or later (the "GPL"),
-#  or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-#  in which case the provisions of the GPL or the LGPL are applicable instead
-#  of those above. If you wish to allow use of your version of this file only
-#  under the terms of either the GPL or the LGPL, and not to allow others to
-#  use your version of this file under the terms of the MPL, indicate your
-#  decision by deleting the provisions above and replace them with the notice
-#  and other provisions required by the LGPL or the GPL. If you do not delete
-#  the provisions above, a recipient may use your version of this file under
-#  the terms of any one of the MPL, the GPL or the LGPL.
-#
-#  ***** END LICENSE BLOCK *****
-
-.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.XPTC_InvokeByIndex{TC},"XPTC_InvokeByIndex"
-
-
-# .text section
-
-        .csect  H.10.NO_SYMBOL{PR}
-        .globl  .XPTC_InvokeByIndex
-        .globl  XPTC_InvokeByIndex{DS}
-        .extern .invoke_copy_to_stack
-        .extern ._ptrgl{PR}
-
-#
-#   XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-#                      PRUint32 paramCount, nsXPTCVariant* params)
-#
-
-.XPTC_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.XPTC_InvokeByIndex:
-        .tc     H.18.XPTC_InvokeByIndex{TC},XPTC_InvokeByIndex{DS}
-
-        .csect  XPTC_InvokeByIndex{DS}
-        .llong  .XPTC_InvokeByIndex     # "\0\0\0\0"
-        .llong  TOC{TC0}                # "\0\0\0008"
-        .llong  0x00000000              # "\0\0\0\0"
-# End   csect   XPTC_InvokeByIndex{DS}
-
-# .bss section
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_ibmobj_aix.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_ibmobj_aix.s	(revision 101813)
+++ 	(revision )
@@ -1,140 +1,0 @@
- #
- # -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- #
- # The contents of this file are subject to the Netscape Public
- # License Version 1.1 (the "License"); you may not use this file
- # except in compliance with the License. You may obtain a copy of
- # the License at http://www.mozilla.org/NPL/
- #
- # Software distributed under the License is distributed on an "AS
- # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- # implied. See the License for the specific language governing
- # rights and limitations under the License.
- #
- # The Original Code is mozilla.org code.
- #
- # The Initial Developer of the Original Code is IBM Corporation.
- # Portions created by IBM are
- #   Copyright (C) 2004, International Business Machines Corporation.
- #   All Rights Reserved.
- #
- # Contributor(s):
- #
-
-.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.XPTC_InvokeByIndex{TC},"XPTC_InvokeByIndex"
-
-
-# .text section
-
-        .csect  H.10.NO_SYMBOL{PR}
-        .globl  .XPTC_InvokeByIndex
-        .globl  XPTC_InvokeByIndex{DS}
-        .extern .invoke_copy_to_stack
-        .extern ._ptrgl{PR}
-
-
-#
-#   XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-#                   PRUint32 paramCount, nsXPTCVariant* params)
-#
-
-.XPTC_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.XPTC_InvokeByIndex:
-        .tc     H.18.XPTC_InvokeByIndex{TC},XPTC_InvokeByIndex{DS}
-
-        .csect  XPTC_InvokeByIndex{DS}
-        .long   .XPTC_InvokeByIndex     # "\0\0\0\0"
-        .long   TOC{TC0}                # "\0\0\0008"
-        .long   0x00000000              # "\0\0\0\0"
-# End   csect   XPTC_InvokeByIndex{DS}
-
-# .bss section	
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_linux.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_linux.s	(revision 101813)
+++ 	(revision )
@@ -1,113 +1,0 @@
-// -*- Mode: Asm -*-
-//
-// The contents of this file are subject to the Netscape Public
-// License Version 1.1 (the "License"); you may not use this file
-// except in compliance with the License. You may obtain a copy of
-// the License at http://www.mozilla.org/NPL/
-//
-// Software distributed under the License is distributed on an "AS
-// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-// implied. See the License for the specific language governing
-// rights and limitations under the License.
-//
-// The Original Code is mozilla.org code.
-//
-// The Initial Developer of the Original Code is Netscape
-// Communications Corporation.  Portions created by Netscape are
-// Copyright (C) 1999 Netscape Communications Corporation. All
-// Rights Reserved.
-//
-// Contributor(s):
-//   Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-//   beard@netscape.com (Patrick Beard)
-//   waterson@netscape.com (Chris Waterson)
-//
-
-.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
-		      
-        .section ".text"
-	.align 2
-	.globl XPTC_InvokeByIndex
-	.type  XPTC_InvokeByIndex,@function
-
-//
-// XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-//                    PRUint32 paramCount, nsXPTCVariant* params)
-//
-
-XPTC_InvokeByIndex:
-	stwu    sp,-32(sp)			// setup standard stack frame
-	mflr    r0				// save LR
-	stw     r3,8(sp)			// r3 <= that
-	stw     r4,12(sp)			// r4 <= methodIndex
-	stw     r30,16(sp)
-	stw     r31,20(sp)
-
-	stw     r0,36(sp)			// store LR backchain
-	mr      r31,sp
-
-	rlwinm  r10,r5,3,0,27			// r10 = (ParamCount * 2 * 4) & ~0x0f
-	addi    r0,r10,96			// reserve stack for GPR and FPR register save area r0 = r10 + 96
-	lwz     r9,0(sp)			// r9 = backchain
-	neg     r0,r0
-	stwux   r9,sp,r0			// reserve stack space and save SP backchain
-
-	addi    r3,sp,8				// r3 <= args
-	mr      r4,r5				// r4 <= paramCount
-	mr      r5,r6				// r5 <= params
-	add     r6,r3,r10			// r6 <= gpregs ( == args + r10 )
-	mr      r30,r6				// store in r30 for use later...
-	addi    r7,r6,32			// r7 <= fpregs ( == gpregs + 32 )
-
-	bl      invoke_copy_to_stack@local	// (args, paramCount, params, gpregs, fpregs)
-
-	lfd     f1,32(r30)			// load FP registers with method parameters
-	lfd     f2,40(r30)   
-	lfd     f3,48(r30)  
-	lfd     f4,56(r30)  
-	lfd     f5,64(r30)  
-	lfd     f6,72(r30)  
-	lfd     f7,80(r30)  
-	lfd     f8,88(r30)
-
-	lwz     r3,8(r31)			// r3 <= that
-	lwz     r4,12(r31)			// r4 <= methodIndex
-	lwz     r5,0(r3)			// r5 <= vtable ( == *that )
-#if !((__GNUC__ == 3 && __GNUC_MINOR__ < 2) || __GXX_ABI_VERSION  >= 100) // G++ pre-V3 ABI
-	addi	r4,r4,2				// skip first two vtable entries
-#endif
-	slwi    r4,r4,2				// convert to offset ( *= 4 )
-	lwzx    r0,r5,r4			// r0 <= methodpointer ( == vtable + offset )
-
-        lwz     r4,4(r30)			// load GP regs with method parameters
-	lwz     r5,8(r30)   
-	lwz     r6,12(r30)  
-	lwz     r7,16(r30)  
-	lwz     r8,20(r30)  
-	lwz     r9,24(r30)  
-	lwz     r10,28(r30)
-
-	mtlr    r0				// copy methodpointer to LR    
-	blrl					// call method
-	
-	lwz     r30,16(r31)			// restore r30 & r31
-	lwz     r31,20(r31)
-	
-	lwz     r11,0(sp)			// clean up the stack
-	lwz     r0,4(r11)
-	mtlr    r0
-	mr      sp,r11
-	blr
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s	(revision 101813)
+++ 	(revision )
@@ -1,114 +1,0 @@
-# -*- Mode: Asm -*-
-#
-# The contents of this file are subject to the Netscape Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/NPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1999 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s):
-#   Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-#   beard@netscape.com (Patrick Beard)
-#   waterson@netscape.com (Chris Waterson)
-#
-.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
-		      
-        .section ".text"
-	.align 2
-	.globl XPTC_InvokeByIndex
-	.type  XPTC_InvokeByIndex,@function
-
-#
-# XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-#                    PRUint32 paramCount, nsXPTCVariant* params)
-#
-
-XPTC_InvokeByIndex:
-	stwu    sp,-32(sp)			# setup standard stack frame
-	mflr    r0				# save LR
-	stw     r3,8(sp)			# r3 <= that
-	stw     r4,12(sp)			# r4 <= methodIndex
-	stw     r30,16(sp)
-	stw     r31,20(sp)
-
-	stw     r0,36(sp)			# store LR backchain
-	mr      r31,sp
-
-	rlwinm  r10,r5,3,0,27			# r10 = (ParamCount * 2 * 4) & ~0x0f
-	addi    r0,r10,96			# reserve stack for GPR and FPR register save area r0 = r10 + 96
-	lwz     r9,0(sp)			# r9 = backchain
-	neg     r0,r0
-	stwux   r9,sp,r0			# reserve stack sapce and save SP backchain
-	
-	addi    r3,sp,8				# r3 <= args
-	mr      r4,r5				# r4 <= paramCount
-	mr      r5,r6				# r5 <= params
-	add     r6,r3,r10			# r6 <= gpregs ( == args + r10 )
-	mr      r30,r6				# store in r30 for use later...
-	addi    r7,r6,32			# r7 <= fpregs ( == gpregs + 32 )
-
-	bl      invoke_copy_to_stack@local	# (args, paramCount, params, gpregs, fpregs)
-
-	lfd     f1,32(r30)			# load FP registers with method parameters
-	lfd     f2,40(r30)   
-	lfd     f3,48(r30)  
-	lfd     f4,56(r30)  
-	lfd     f5,64(r30)  
-	lfd     f6,72(r30)  
-	lfd     f7,80(r30)  
-	lfd     f8,88(r30)
-
-	lwz     r3,8(r31)			# r3 <= that
-	lwz     r4,12(r31)			# r4 <= methodIndex
-	lwz     r5,0(r3)			# r5 <= vtable ( == *that )
-	slwi    r4,r4,3				# convert to offset ( *= 8 )
-	addi	r4,r4,8				# skip first two vtable entries
-	add	r4,r4,r5
-	lhz	r0,0(r4)			# virtual base offset
-	extsh	r0,r0
-	add	r3,r3,r0
-	lwz     r0,4(r4)			# r0 <= methodpointer ( == vtable + offset )
-
-        lwz     r4,4(r30)			# load GP regs with method parameters
-	lwz     r5,8(r30)   
-	lwz     r6,12(r30)  
-	lwz     r7,16(r30)  
-	lwz     r8,20(r30)  
-	lwz     r9,24(r30)  
-	lwz     r10,28(r30)
-
-	mtlr    r0				# copy methodpointer to LR    
-	blrl					# call method
-	
-	lwz     r30,16(r31)			# restore r30 & r31
-	lwz     r31,20(r31)
-	
-	lwz     r11,0(sp)			# clean up the stack
-	lwz     r0,4(r11)
-	mtlr    r0
-	mr      sp,r11
-	blr
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_rhapsody.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_rhapsody.s	(revision 101813)
+++ 	(revision )
@@ -1,162 +1,0 @@
-#
-# -*- Mode: Asm -*-
-#
-# The contents of this file are subject to the Netscape Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/NPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1999 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s):
-#  Patrick C. Beard <beard@netscape.com>
-#
-
-# 
-# ** Assumed vtable layout (obtained by disassembling with gdb):
-# ** 4 bytes per vtable entry, skip 0th and 1st entries, so the mapping
-# ** from index to entry is (4 * index) + 8.
-#
-
-.text
-	.align 2
-#
-#   XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-#                   PRUint32 paramCount, nsXPTCVariant* params)
-#
-
-.globl __XPTC_InvokeByIndex	
-__XPTC_InvokeByIndex:
-	mflr	r0
-	stw	r31,-4(r1)
-#
-# save off the incoming values in the callers parameter area
-#		
-	stw	r3,24(r1)               ; that
-	stw	r4,28(r1)               ; methodIndex
-	stw	r5,32(r1)               ; paramCount
-	stw	r6,36(r1)               ; params
-	stw	r0,8(r1)
-	stwu	r1,-144(r1)             ; 24 for linkage area, 
-                                        ; 8*13 for fprData area,
-                                        ; 8 for saved registers,
-                                        ; 8 to keep stack 16-byte aligned
-
-# set up for and call 'invoke_count_words' to get new stack size
-#	
-	mr	r3,r5
-	mr	r4,r6
-
-	stwu	r1,-24(r1)	
-	bl	L_invoke_count_words$stub
-	lwz	r1,0(r1)
-
-# prepare args for 'invoke_copy_to_stack' call
-#		
-	lwz	r4,176(r1)              ; paramCount
-	lwz	r5,180(r1)              ; params
-	mr	r6,r1                   ; fprData
-	slwi	r3,r3,2                 ; number of stack bytes required
-	addi	r3,r3,28                ; linkage area
-	mr	r31,r1                  ; save original stack top
-	sub	r1,r1,r3                ; bump the stack
-	clrrwi	r1,r1,4                 ; keep the stack 16-byte aligned
-	addi	r3,r31,144              ; act like real alloca, so 0(sp) always
-	stw	r3,0(r1)                ;  points back to previous stack frame
-	addi	r3,r1,28                ; parameter pointer excludes linkage area size + 'this'
-	
-# create "temporary" stack frame for _invoke_copy_to_stack to operate in.
-	stwu	r1,-40(r1)
-	bl	L_invoke_copy_to_stack$stub
-# remove temporary stack frame.
-	lwz	r1,0(r1)
-
-	lfd	f1,0(r31)				
-	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,168(r31)             ; that
-	lwz	r4,0(r3)                ; get vTable from 'that'
-	lwz	r5,172(r31)             ; methodIndex
-	slwi	r5,r5,2                 ; methodIndex * 4
-#ifndef HAVE_GCC3_ABI
-	addi	r5,r5,8                 ; (methodIndex * 4) + 8
-#endif
-	lwzx	r12,r5,r4               ; get function pointer
-
-	lwz	r4,28(r1)
-	lwz	r5,32(r1)
-	lwz	r6,36(r1)
-	lwz	r7,40(r1)
-	lwz	r8,44(r1)
-	lwz	r9,48(r1)
-	lwz	r10,52(r1)
-	
-	mtlr	r12
-	blrl
-	
-	mr      r1,r31
-	lwz	r0,152(r1)
-	addi    r1,r1,144
-	mtlr    r0
-	lwz     r31,-4(r1)
-
-	blr
-
-.picsymbol_stub
-L_invoke_count_words$stub:
-        .indirect_symbol _invoke_count_words
-        mflr r0
-        bcl 20,31,L1$pb
-L1$pb:
-        mflr r11
-        addis r11,r11,ha16(L1$lz-L1$pb)
-        mtlr r0
-        lwz r12,lo16(L1$lz-L1$pb)(r11)
-        mtctr r12
-        addi r11,r11,lo16(L1$lz-L1$pb)
-        bctr
-.lazy_symbol_pointer
-L1$lz:
-        .indirect_symbol _invoke_count_words
-        .long dyld_stub_binding_helper
-
-
-.picsymbol_stub
-L_invoke_copy_to_stack$stub:
-        .indirect_symbol _invoke_copy_to_stack
-        mflr r0
-        bcl 20,31,L2$pb
-L2$pb:
-        mflr r11
-        addis r11,r11,ha16(L2$lz-L2$pb)
-        mtlr r0
-        lwz r12,lo16(L2$lz-L2$pb)(r11)
-        mtctr r12
-        addi r11,r11,lo16(L2$lz-L2$pb)
-        bctr
-.lazy_symbol_pointer
-L2$lz:
-        .indirect_symbol _invoke_copy_to_stack
-        .long dyld_stub_binding_helper
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_bsdos.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_bsdos.s	(revision 101813)
+++ 	(revision )
@@ -1,121 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s): Chris Torek (torek@bsdi.com), Kurt Lidl (lidl@pix.net)
- */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-        .global XPTC_InvokeByIndex
-/*
-    XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params);
-    
-*/
-XPTC_InvokeByIndex:
-	/* regular C/C++ stack frame -- see <machine/frame.h> */
-	save	%sp, -96, %sp
-
-	/*
-	 * invoke_count_words(paramCount, params) apparently tells us
-	 * how many "32-bit words" are involved in passing the given
-	 * parameters to the target function.
-	 */
-	mov	%i2, %o0
-	call	invoke_count_words	! invoke_count_words(paramCount, params)
-	 mov	%i3, %o1
-
-	/*
-	 * ??? Torek wonders: does invoke_count_words always force its
-	 * return value to be even?  If not, we would have to adjust
-	 * the return value ... should make it a multiple of 8 anyway,
-	 * for efficiency (32 byte cache lines); will do that here thus:
-	 *
-	 * We already have room (in our callee's "argument dump" area,
-	 * sp->fr_argd) for six parameters, and we are going to use
-	 * five of those (fr_argd[1] through fr_argd[5]) in a moment.
-	 * This space is followed by fr_argx[1], room for a seventh.
-	 * Thus, if invoke_count_words returns a value between 0 and 6
-	 * inclusive, we do not need any stack adjustment.  For values
-	 * from 7 through (7+8) we want to make room for another 8
-	 * parameters, and so on.  Thus, we want to calculate:
-	 *
-	 *	n_extra_words = (wordcount + 1) & ~7
-	 *
-	 * and then make room for that many more 32-bit words.  (Normally
-	 * it would be ((w+7)&~7; we just subtract off the room-for-6 we
-	 * already have.)
-	 */
-	inc	%o0
-	andn	%o0, 7, %o0
-	sll	%o0, 2, %o0		! convert to bytes
-	sub	%sp, %o0, %sp		! and make room for arguments
-
-	/*
-	 * Copy all the arguments to the stack, starting at the argument
-	 * dump area at [%sp + 68], even though the first six arguments
-	 * go in the six %o registers.  We will just load up those
-	 * arguments after the copy is done.  The first argument to
-	 * any C++ member function is always the "this" parameter so
-	 * we actually start with what will go in %o1, at [%sp + 72].
-	 */
-	add	%sp, 72, %o0		! invoke_copy_to_stack(addr,
-	mov	%i2, %o1		!	paramCount,
-	call	invoke_copy_to_stack
-	 mov	%i3, %o2		!	params);
-
-	/*
-	 * This is the only really tricky (compiler-dependent) part
-	 * (everything else here relies only on the V8 SPARC calling
-	 * conventions).  "methodIndex" (%i1) is an index into a C++
-	 * vtable.  The word at "*that" points to the vtable, but for
-	 * some reason, the first function (index=0) is at vtable[2*4],
-	 * the second (index 1) at vtable[3*4], the third at vtable[4*4],
-	 * and so on.  Thus, we want, in effect:
-	 *
-	 *	that->vTable[index + 2]
-	 */
-	ld	[%i0], %l0		! vTable = *that
-	add	%i1, 2, %l1
-	sll	%l1, 2, %l1
-	ld	[%l0 + %l1], %l0	! fn = vTable[index + 2]
-
-	/*
-	 * Now load up the various function parameters.  We do not know,
-	 * nor really care, how many there are -- we just load five words
-	 * from the stack (there are always at least five such words to
-	 * load, even if some of them are junk) into %o1 through %o5,
-	 * and set %o0 = %i0, to pass "that" to the target member function
-	 * as its C++ "this" parameter.
-	 *
-	 * If there are more than five parameters, any extras go on our
-	 * stack starting at sp->fr_argx ([%sp + 92]), which is of course
-	 * where we have just copied them.
-	 */
-	ld	[%sp + 72], %o1
-	ld	[%sp + 76], %o2
-	ld	[%sp + 80], %o3
-	ld	[%sp + 84], %o4
-	ld	[%sp + 88], %o5
-	call	%l0			! fn(that, %o1, %o2, %o3, %o4, %o5)
-	 mov	%i0, %o0
-
-	! return whatever fn() returned
-	ret
-	 restore %o0, 0, %o0
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_linux.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_linux.s	(revision 101813)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s): 
- */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-        .global XPTC_InvokeByIndex
-/*
-    XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params);
-    
-*/
-XPTC_InvokeByIndex:
-        save    %sp,-(64 + 16),%sp   ! room for the register window and
-                                    ! struct pointer, rounded up to 0 % 16
-        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
-!
-	add	%i1,1,%i1	    ! vTable is zero-based, index is 1 based (?)	
-	ld	[%i0],%l1	    ! *that --> vTable
-	sll	%i1,2,%i1	    ! 32 bit pointer
-	add	%i1,%l1,%l1	    ! vTable[index * 4], l1 now points to vTable entry
-        ld      [%l1 + 4],%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
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_linux_GCC3.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_linux_GCC3.s	(revision 101813)
+++ 	(revision )
@@ -1,84 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  David S. Miller <davem@redhat.com> (ported to gcc3)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- */
-
-/*
- * Platform specific code to invoke XPCOM methods on native objects for
- * Linux/Sparc with gcc 3 ABI.
- */
-        .global XPTC_InvokeByIndex
-/*
- *  XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
- *                 PRUint32 paramCount, nsXPTCVariant* params);
- *   
- */
-XPTC_InvokeByIndex:
-        save    %sp,-(64 + 16),%sp   ! room for the register window and
-                                    ! struct pointer, rounded up to 0 % 16
-        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
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_netbsd.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_netbsd.s	(revision 101813)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s): 
- */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-        .global XPTC_InvokeByIndex
-/*
-    XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params);
-    
-*/
-XPTC_InvokeByIndex:
-        save    %sp,-(64 + 16),%sp   ! room for the register window and
-                                    ! struct pointer, rounded up to 0 % 16
-        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
-!
-	add	%i1,1,%i1	    ! vTable is zero-based, index is 1 based (?)	
-	ld	[%i0],%l1	    ! *that --> vTable
-	sll	%i1,3,%i1
-	add	%i1,%l1,%l1	    ! vTable[index * 8], l1 now points to vTable entry
-	lduh	[%l1],%l0	    ! this adjustor
-	sll	%l0,16,%l0          ! sign extend to 32 bits
-	sra     %l0,16,%l0
-	add     %l0,%i0,%i0         ! adjust this
-        ld      [%l1 + 4],%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
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_solaris.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_solaris.s	(revision 101813)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s): 
- */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-        .global XPTC_InvokeByIndex
-/*
-    XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params);
-    
-*/
-XPTC_InvokeByIndex:
-        save    %sp,-(64 + 16),%sp   ! room for the register window and
-                                    ! struct pointer, rounded up to 0 % 16
-        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
-!
-	add	%i1,1,%i1	    ! vTable is zero-based, index is 1 based (?)	
-	ld	[%i0],%l1	    ! *that --> vTable
-	sll	%i1,3,%i1
-	add	%i1,%l1,%l1	    ! vTable[index * 8], l1 now points to vTable entry
-	lduh	[%l1],%l0	    ! this adjustor
-	sll	%l0,16,%l0          ! sign extend to 32 bits
-	sra     %l0,16,%l0
-	add     %l0,%i0,%i0         ! adjust this
-        ld      [%l1 + 4],%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
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_solaris_GCC.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_solaris_GCC.s	(revision 101813)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s): 
- */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-        .global XPTC_InvokeByIndex
-/*
-    XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params);
-    
-*/
-XPTC_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
-!
-	add	%i1,1,%i1	    ! vTable is zero-based, index is 1 based (?)	
-	ld	[%i0],%l1	    ! *that --> vTable
-	sll	%i1,3,%i1
-	add	%i1,%l1,%l1	    ! vTable[index * 8], l1 now points to vTable entry
-	lduh	[%l1],%l0	    ! this adjustor
-	sll	%l0,16,%l0          ! sign extend to 32 bits
-	sra     %l0,16,%l0
-	add     %l0,%i0,%i0         ! adjust this
-        ld      [%l1 + 4],%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
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_solaris_GCC3.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_solaris_GCC3.s	(revision 101813)
+++ 	(revision )
@@ -1,70 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s): 
- *  David Baron <dbaron@dbaron.org> (ported to
- *     gcc 3/sparc-sun-solaris from gcc 2.x/sparc-sun-solaris)
- */
-
-/*
- * Platform specific code to invoke XPCOM methods on native objects for
- * solaris/sparc with gcc 3 ABI.
- */
-        .global XPTC_InvokeByIndex
-/*
- *  XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
- *                     PRUint32 paramCount, nsXPTCVariant* params);
- */
-XPTC_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
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_solaris_SUNW.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc_solaris_SUNW.s	(revision 101813)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s): 
- */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-        .global XPTC_InvokeByIndex
-        .type   XPTC_InvokeByIndex, #function
-/*
-    XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params);
-    
-*/
-XPTC_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    XPTC_InvokeByIndex, .-XPTC_InvokeByIndex
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparcv9_solaris_SUNW.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparcv9_solaris_SUNW.s	(revision 101813)
+++ 	(revision )
@@ -1,103 +1,0 @@
-/* -*- Mode: asm; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- * 
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- * 
- * The Original Code is mozilla.org code.
- * 
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
- * Copyright (C) 2001 Netscape Communications Corporation. All
- * Rights Reserved.
- * 
- * Contributor(s): 
- *   Stuart Parmenter <pavlov@netscape.com>
- *   Chris Seawood <cls@seawood.org>
- */
-
-/*
-    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 XPTC_InvokeByIndex
-        .type   XPTC_InvokeByIndex, #function
-
-/*
-    XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params);
-    
-*/
-XPTC_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    XPTC_InvokeByIndex, .-XPTC_InvokeByIndex
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ipf32.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ipf32.cpp	(revision 101813)
+++ 	(revision )
@@ -1,164 +1,0 @@
-
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xptcprivate.h"
-
-#include <iostream.h>
-
-// "This code is for IA64 only"
-
-
-/* invoke_copy_to_stack() will copy from variant array 's' to
- * the stack argument area 'mloc', the integer register area 'iloc', and
- * the float register area 'floc'.
- *
- */
-extern "C" void
-invoke_copy_to_stack(uint64_t* mloc, uint64_t* iloc, uint64_t* floc,
-  const PRUint32 paramCount, nsXPTCVariant* s)
-{
-  uint64_t* dest = mloc;
-  PRUint32 len = paramCount;
-  nsXPTCVariant* source = s;
-
-  PRUint32 indx;
-  PRUint32 endlen;
-  endlen = (len > 7) ? 7 : len;
-  /* handle the memory arguments */
-  for (indx = 7; indx < len; ++indx)
-  {
-    if (source[indx].IsPtrData())
-    {
-#ifdef __LP64__
-      /* 64 bit pointer mode */
-      *((void**) dest) = source[indx].ptr;
-#else
-      /* 32 bit pointer mode */
-      uint32_t* adr = (uint32_t*) dest;
-      *(adr) = 0;
-      *(adr+1) = (uint32_t) source[indx].ptr;
-#endif
-    }
-    else
-    switch (source[indx].type)
-    {
-    case nsXPTType::T_I8    : *(dest) = source[indx].val.i8;  break;
-    case nsXPTType::T_I16   : *(dest) = source[indx].val.i16; break;
-    case nsXPTType::T_I32   : *(dest) = source[indx].val.i32; break;
-    case nsXPTType::T_I64   : *(dest) = source[indx].val.i64; break;
-    case nsXPTType::T_U8    : *(dest) = source[indx].val.u8;  break;
-    case nsXPTType::T_U16   : *(dest) = source[indx].val.u16; break;
-    case nsXPTType::T_U32   : *(dest) = source[indx].val.u32; break;
-    case nsXPTType::T_U64   : *(dest) = source[indx].val.u64; break;
-    case nsXPTType::T_FLOAT : *(dest) = source[indx].val.u32; break;
-    case nsXPTType::T_DOUBLE: *(dest) = source[indx].val.u64; break;
-    case nsXPTType::T_BOOL  : *(dest) = source[indx].val.b; break;
-    case nsXPTType::T_CHAR  : *(dest) = source[indx].val.c; break;
-    case nsXPTType::T_WCHAR : *(dest) = source[indx].val.wc; break;
-    default:
-    // all the others are plain pointer types
-#ifdef __LP64__
-      /* 64 bit pointer mode */
-      *((void**) dest) = source[indx].val.p;
-#else
-      {
-      /* 32 bit pointer mode */
-      uint32_t* adr = (uint32_t*) dest;
-      *(adr) = 0;
-      *(adr+1) = (uint32_t) source[indx].val.p;
-      }
-#endif
-    }
-    ++dest;
-  }
-  /* process register arguments */
-  dest = iloc;
-  for (indx = 0; indx < endlen; ++indx)
-  {
-    if (source[indx].IsPtrData())
-    {
-#ifdef __LP64__
-      /* 64 bit pointer mode */
-      *((void**) dest) = source[indx].ptr;
-#else
-      /* 32 bit pointer mode */
-      uint32_t* adr = (uint32_t*) dest;
-      *(adr) = 0;
-      *(adr+1) = (uint32_t) source[indx].ptr;
-#endif
-    }
-    else
-    switch (source[indx].type)
-    {
-    case nsXPTType::T_I8    : *(dest) = source[indx].val.i8; break;
-    case nsXPTType::T_I16   : *(dest) = source[indx].val.i16; break;
-    case nsXPTType::T_I32   : *(dest) = source[indx].val.i32; break;
-    case nsXPTType::T_I64   : *(dest) = source[indx].val.i64; break;
-    case nsXPTType::T_U8    : *(dest) = source[indx].val.u8; break;
-    case nsXPTType::T_U16   : *(dest) = source[indx].val.u16; break;
-    case nsXPTType::T_U32   : *(dest) = source[indx].val.u32; break;
-    case nsXPTType::T_U64   : *(dest) = source[indx].val.u64; break;
-    case nsXPTType::T_FLOAT :
-      *((double*) (floc++)) = (double) source[indx].val.f;
-      break;
-    case nsXPTType::T_DOUBLE:
-      *((double*) (floc++)) = source[indx].val.d;
-      break;
-    case nsXPTType::T_BOOL  : *(dest) = source[indx].val.b; break;
-    case nsXPTType::T_CHAR  : *(dest) = source[indx].val.c; break;
-    case nsXPTType::T_WCHAR : *(dest) = source[indx].val.wc; break;
-    default:
-    // all the others are plain pointer types
-#ifdef __LP64__
-      /* 64 bit pointer mode */
-      *((void**) dest) = source[indx].val.p;
-#else
-      {
-      /* 32 bit pointer mode */
-      uint32_t* adr = (uint32_t*) dest;
-      *(adr) = 0;
-      *(adr+1) = (uint32_t) source[indx].val.p;
-      }
-#endif
-    }
-    ++dest;
-  }
-
-}
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ipf64.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ipf64.cpp	(revision 101813)
+++ 	(revision )
@@ -1,133 +1,0 @@
-
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xptcprivate.h"
-
-#include <stdint.h>
-#include <iostream.h>
-
-// "This code is for IA64 only"
-
-
-/* invoke_copy_to_stack() will copy from variant array 's' to
- * the stack argument area 'mloc', the integer register area 'iloc', and
- * the float register area 'floc'.
- *
- */
-extern "C" void
-invoke_copy_to_stack(uint64_t* mloc, uint64_t* iloc, uint64_t* floc,
-  const PRUint32 paramCount, nsXPTCVariant* s)
-{
-  uint64_t* dest = mloc;
-  PRUint32 len = paramCount;
-  nsXPTCVariant* source = s;
-
-  PRUint32 indx;
-  PRUint32 endlen;
-  endlen = (len > 7) ? 7 : len;
-  /* handle the memory arguments */
-  for (indx = 7; indx < len; ++indx)
-  {
-    if (source[indx].IsPtrData())
-    {
-      /* 64 bit pointer mode */
-      *((void**) dest) = source[indx].ptr;
-    }
-    else
-    switch (source[indx].type)
-    {
-    case nsXPTType::T_I8    : *(dest) = source[indx].val.i8;  break;
-    case nsXPTType::T_I16   : *(dest) = source[indx].val.i16; break;
-    case nsXPTType::T_I32   : *(dest) = source[indx].val.i32; break;
-    case nsXPTType::T_I64   : *(dest) = source[indx].val.i64; break;
-    case nsXPTType::T_U8    : *(dest) = source[indx].val.u8;  break;
-    case nsXPTType::T_U16   : *(dest) = source[indx].val.u16; break;
-    case nsXPTType::T_U32   : *(dest) = source[indx].val.u32; break;
-    case nsXPTType::T_U64   : *(dest) = source[indx].val.u64; break;
-    case nsXPTType::T_FLOAT : *(dest) = source[indx].val.u32; break;
-    case nsXPTType::T_DOUBLE: *(dest) = source[indx].val.u64; break;
-    case nsXPTType::T_BOOL  : *(dest) = source[indx].val.b; break;
-    case nsXPTType::T_CHAR  : *(dest) = source[indx].val.c; break;
-    case nsXPTType::T_WCHAR : *(dest) = source[indx].val.wc; break;
-    default:
-    // all the others are plain pointer types
-      /* 64 bit pointer mode */
-      *((void**) dest) = source[indx].val.p;
-    }
-    ++dest;
-  }
-  /* process register arguments */
-  dest = iloc;
-  for (indx = 0; indx < endlen; ++indx)
-  {
-    if (source[indx].IsPtrData())
-    {
-      /* 64 bit pointer mode */
-      *((void**) dest) = source[indx].ptr;
-    }
-    else
-    switch (source[indx].type)
-    {
-    case nsXPTType::T_I8    : *(dest) = source[indx].val.i8; break;
-    case nsXPTType::T_I16   : *(dest) = source[indx].val.i16; break;
-    case nsXPTType::T_I32   : *(dest) = source[indx].val.i32; break;
-    case nsXPTType::T_I64   : *(dest) = source[indx].val.i64; break;
-    case nsXPTType::T_U8    : *(dest) = source[indx].val.u8; break;
-    case nsXPTType::T_U16   : *(dest) = source[indx].val.u16; break;
-    case nsXPTType::T_U32   : *(dest) = source[indx].val.u32; break;
-    case nsXPTType::T_U64   : *(dest) = source[indx].val.u64; break;
-    case nsXPTType::T_FLOAT :
-      *((double*) (floc++)) = (double) source[indx].val.f;
-      break;
-    case nsXPTType::T_DOUBLE:
-      *((double*) (floc++)) = source[indx].val.d;
-      break;
-    case nsXPTType::T_BOOL  : *(dest) = source[indx].val.b; break;
-    case nsXPTType::T_CHAR  : *(dest) = source[indx].val.c; break;
-    case nsXPTType::T_WCHAR : *(dest) = source[indx].val.wc; break;
-    default:
-    // all the others are plain pointer types
-      /* 64 bit pointer mode */
-      *((void**) dest) = source[indx].val.p;
-    }
-    ++dest;
-  }
-
-}
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_irix.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_irix.cpp	(revision 101813)
+++ 	(revision )
@@ -1,173 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-#if (_MIPS_SIM != _ABIN32)
-#error "This code is for IRIX N32 only"
-#endif
-
-extern "C" uint32
-invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-{
-    return(paramCount*2);
-}
-
-extern "C" void
-invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount,
-                     nsXPTCVariant* s, PRUint64 *regs)
-{
-#define N_ARG_REGS       7       /* 8 regs minus 1 for "this" ptr */
-
-    for (PRUint32 i = 0; i < paramCount; i++, s++)
-    {
-        if (s->IsPtrData()) {
-            if (i < N_ARG_REGS)
-               regs[i] = (PRUint64)s->ptr;
-            else
-               *d++ = (PRUint64)s->ptr; 
-            continue;
-        }
-        switch (s->type) {
-        //
-        // signed types first
-        //
-        case nsXPTType::T_I8:
-           if (i < N_ARG_REGS)
-              ((PRInt64*)regs)[i] = s->val.i8;
-           else
-              *d++ = s->val.i8;
-           break;
-        case nsXPTType::T_I16:
-           if (i < N_ARG_REGS)
-              ((PRInt64*)regs)[i] = s->val.i16;
-           else
-              *d++ = s->val.i16;
-           break;
-        case nsXPTType::T_I32:
-           if (i < N_ARG_REGS)
-              ((PRInt64*)regs)[i] = s->val.i32;
-           else
-              *d++ = s->val.i32;
-           break;
-        case nsXPTType::T_I64:
-           if (i < N_ARG_REGS)
-              ((PRInt64*)regs)[i] = s->val.i64;
-           else
-              *d++ = s->val.i64;
-           break;
-        //
-        // unsigned types next
-        //
-        case nsXPTType::T_U8:
-           if (i < N_ARG_REGS)
-              regs[i] = s->val.u8;
-           else
-              *d++ = s->val.u8;
-           break;
-        case nsXPTType::T_U16:
-           if (i < N_ARG_REGS)
-              regs[i] = s->val.u16;
-           else
-              *d++ = s->val.u16;
-           break;
-        case nsXPTType::T_U32:
-           if (i < N_ARG_REGS)
-              regs[i] = s->val.u32;
-           else
-              *d++ = s->val.u32;
-           break;
-        case nsXPTType::T_U64:
-           if (i < N_ARG_REGS)
-              regs[i] = s->val.u64;
-           else
-              *d++ = s->val.u64;
-           break;
-        case nsXPTType::T_FLOAT:
-           if (i < N_ARG_REGS)
-              // Place a float in least significant bytes.
-              *(float*)(((char*)&regs[i+1]) - sizeof(float)) = s->val.f;
-           else
-              *(float*)d++ = s->val.f;
-           break;
-        case nsXPTType::T_DOUBLE:
-           if (i < N_ARG_REGS)
-              *(double*)&regs[i] = s->val.d;
-           else
-              *(double*)d++ = s->val.d;
-           break;
-        case nsXPTType::T_BOOL:
-           if (i < N_ARG_REGS)
-              regs[i] = s->val.b;
-           else
-              *d++ = s->val.b;
-           break;
-        case nsXPTType::T_CHAR:
-           if (i < N_ARG_REGS)
-              regs[i] = s->val.c;
-           else
-              *d++ = s->val.c;
-           break;
-        case nsXPTType::T_WCHAR:
-           if (i < N_ARG_REGS)
-              regs[i] = s->val.wc;
-           else
-              *d++ = s->val.wc;
-           break;
-        default:
-           // all the others are plain pointer types
-           if (i < N_ARG_REGS)
-              regs[i] = (PRUint64)s->val.p;
-           else
-              *d++ = (PRUint64)s->val.p;
-           break;
-        }
-    }
-}
-
-extern "C" nsresult _XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params);
-
-extern "C"
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params)
-{
-    return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params);
-}    
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_alpha.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_alpha.cpp	(revision 101813)
+++ 	(revision )
@@ -1,181 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Glen Nakamura <glen@imodulo.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-/* Prototype specifies unmangled function name and disables unused warning */
-static void
-invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
-__asm__("invoke_copy_to_stack") __attribute__((unused));
-
-static void
-invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
-{
-    const PRUint8 NUM_ARG_REGS = 6-1;        // -1 for "this" pointer
-
-    for(PRUint32 i = 0; i < paramCount; i++, d++, s++)
-    {
-        if(s->IsPtrData())
-        {
-            *d = (PRUint64)s->ptr;
-            continue;
-        }
-        switch(s->type)
-        {
-        case nsXPTType::T_I8     : *d = (PRUint64)s->val.i8;     break;
-        case nsXPTType::T_I16    : *d = (PRUint64)s->val.i16;    break;
-        case nsXPTType::T_I32    : *d = (PRUint64)s->val.i32;    break;
-        case nsXPTType::T_I64    : *d = (PRUint64)s->val.i64;    break;
-        case nsXPTType::T_U8     : *d = (PRUint64)s->val.u8;     break;
-        case nsXPTType::T_U16    : *d = (PRUint64)s->val.u16;    break;
-        case nsXPTType::T_U32    : *d = (PRUint64)s->val.u32;    break;
-        case nsXPTType::T_U64    : *d = (PRUint64)s->val.u64;    break;
-        case nsXPTType::T_FLOAT  :
-            if(i < NUM_ARG_REGS)
-            {
-                // convert floats to doubles if they are to be passed
-                // via registers so we can just deal with doubles later
-                union { PRUint64 u64; double d; } t;
-                t.d = (double)s->val.f;
-                *d = t.u64;
-            }
-            else
-                // otherwise copy to stack normally
-                *d = (PRUint64)s->val.u32;
-            break;
-        case nsXPTType::T_DOUBLE : *d = (PRUint64)s->val.u64;    break;
-        case nsXPTType::T_BOOL   : *d = (PRUint64)s->val.b;      break;
-        case nsXPTType::T_CHAR   : *d = (PRUint64)s->val.c;      break;
-        case nsXPTType::T_WCHAR  : *d = (PRUint64)s->val.wc;     break;
-        default:
-            // all the others are plain pointer types
-            *d = (PRUint64)s->val.p;
-            break;
-        }
-    }
-}
-
-/*
- * XPTC_PUBLIC_API(nsresult)
- * XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
- *                    PRUint32 paramCount, nsXPTCVariant* params)
- */
-__asm__(
-    "#### XPTC_InvokeByIndex ####\n"
-".text\n\t"
-    ".align 5\n\t"
-    ".globl XPTC_InvokeByIndex\n\t"
-    ".ent XPTC_InvokeByIndex\n"
-"XPTC_InvokeByIndex:\n\t"
-    ".frame $15,32,$26,0\n\t"
-    ".mask 0x4008000,-32\n\t"
-    "ldgp $29,0($27)\n"
-"$XPTC_InvokeByIndex..ng:\n\t"
-    "subq $30,32,$30\n\t"
-    "stq $26,0($30)\n\t"
-    "stq $15,8($30)\n\t"
-    "bis $30,$30,$15\n\t"
-    ".prologue 1\n\t"
-
-    /*
-     * Allocate enough stack space to hold the greater of 6 or "paramCount"+1
-     * parameters. (+1 for "this" pointer)  Room for at least 6 parameters
-     * is required for storage of those passed via registers.
-     */
-
-    "bis $31,5,$2\n\t"      /* count = MAX(5, "paramCount") */
-    "cmplt $2,$18,$1\n\t"
-    "cmovne $1,$18,$2\n\t"
-    "s8addq $2,16,$1\n\t"   /* room for count+1 params (8 bytes each) */
-    "bic $1,15,$1\n\t"      /* stack space is rounded up to 0 % 16 */
-    "subq $30,$1,$30\n\t"
-
-    "stq $16,0($30)\n\t"    /* save "that" (as "this" pointer) */
-    "stq $17,16($15)\n\t"   /* save "methodIndex" */
-
-    "addq $30,8,$16\n\t"    /* pass stack pointer */
-    "bis $18,$18,$17\n\t"   /* pass "paramCount" */
-    "bis $19,$19,$18\n\t"   /* pass "params" */
-    "bsr $26,$invoke_copy_to_stack..ng\n\t"     /* call invoke_copy_to_stack */
-
-    /*
-     * Copy the first 6 parameters to registers and remove from stack frame.
-     * Both the integer and floating point registers are set for each parameter
-     * except the first which is the "this" pointer.  (integer only)
-     * The floating point registers are all set as doubles since the
-     * invoke_copy_to_stack function should have converted the floats.
-     */
-    "ldq $16,0($30)\n\t"    /* integer registers */
-    "ldq $17,8($30)\n\t"
-    "ldq $18,16($30)\n\t"
-    "ldq $19,24($30)\n\t"
-    "ldq $20,32($30)\n\t"
-    "ldq $21,40($30)\n\t"
-    "ldt $f17,8($30)\n\t"   /* floating point registers */
-    "ldt $f18,16($30)\n\t"
-    "ldt $f19,24($30)\n\t"
-    "ldt $f20,32($30)\n\t"
-    "ldt $f21,40($30)\n\t"
-
-    "addq $30,48,$30\n\t"   /* remove params from stack */
-
-    /*
-     * Call the virtual function with the constructed stack frame.
-     */
-    "bis $16,$16,$1\n\t"    /* load "this" */
-    "ldq $2,16($15)\n\t"    /* load "methodIndex" */
-    "ldq $1,0($1)\n\t"      /* load vtable */
-#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
-    "s8addq $2,$31,$2\n\t"  /* vtable index = "methodIndex" * 8 */
-#else /* not G++ V3 ABI */
-    "s8addq $2,16,$2\n\t"   /* vtable index = "methodIndex" * 8 + 16 */
-#endif /* G++ V3 ABI */
-    "addq $1,$2,$1\n\t"
-    "ldq $27,0($1)\n\t"     /* load address of function */
-    "jsr $26,($27),0\n\t"   /* call virtual function */
-    "ldgp $29,0($26)\n\t"
-
-    "bis $15,$15,$30\n\t"
-    "ldq $26,0($30)\n\t"
-    "ldq $15,8($30)\n\t"
-    "addq $30,32,$30\n\t"
-    "ret $31,($26),1\n\t"
-    ".end XPTC_InvokeByIndex"
-    );
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_m68k.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_m68k.cpp	(revision 101813)
+++ 	(revision )
@@ -1,170 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-// Remember that these 'words' are 32bit DWORDS
-
-extern "C" {
-    static PRUint32
-    invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-    {
-        PRUint32 result = 0;
-        for(PRUint32 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;
-            }
-        }
-        return result;
-    }
-
-    void
-    invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s)
-    {
-        for(PRUint32 i = 0; i < paramCount; i++, d++, s++)
-        {
-            if(s->IsPtrData())
-            {
-                *((void**)d) = s->ptr;
-                continue;
-            }
-            switch(s->type)
-            {
-            // 8 and 16 bit types should be promoted to 32 bits when copying
-            // onto the stack.
-            case nsXPTType::T_I8     : *((PRUint32*)d) = s->val.i8;          break;
-            case nsXPTType::T_I16    : *((PRUint32*)d) = s->val.i16;         break;
-            case nsXPTType::T_I32    : *((PRInt32*) d) = s->val.i32;         break;
-            case nsXPTType::T_I64    : *((PRInt64*) d) = s->val.i64; d++;    break;
-            case nsXPTType::T_U8     : *((PRUint32*)d) = s->val.u8;          break;
-            case nsXPTType::T_U16    : *((PRUint32*)d) = s->val.u16;         break;
-            case nsXPTType::T_U32    : *((PRUint32*)d) = s->val.u32;         break;
-            case nsXPTType::T_U64    : *((PRUint64*)d) = s->val.u64; d++;    break;
-            case nsXPTType::T_FLOAT  : *((float*)   d) = s->val.f;           break;
-            case nsXPTType::T_DOUBLE : *((double*)  d) = s->val.d;   d++;    break;
-            case nsXPTType::T_BOOL   : *((PRBool*)  d) = s->val.b;           break;
-            case nsXPTType::T_CHAR   : *((PRUint32*)d) = s->val.c;           break;
-            case nsXPTType::T_WCHAR  : *((wchar_t*) d) = s->val.wc;          break;
-
-            default:
-                // all the others are plain pointer types
-                *((void**)d) = s->val.p;
-                break;
-            }
-        }
-    }
-}
-
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params)
-{
-    PRUint32 result, n;
-
-    n = invoke_count_words(paramCount, params) * 4;
-
- __asm__ __volatile__(
-    "subl  %5, %/sp\n\t"      /* make room for params */
-    "movl  %/sp, %/a0\n\t"
-    "movl  %4, %/sp@-\n\t"
-    "movl  %3, %/sp@-\n\t"
-    "movl  %/a0, %/sp@-\n\t"
-    "jbsr  invoke_copy_to_stack\n\t"   /* copy params */
-    "addl  #12, %/sp\n\t"
-    "movl  %1, %/a0\n\t"
-    "movl  %/a0, %/sp@-\n\t"
-    "movl  %/a0@, %/a0\n\t"
-    "movl  %2, %/d0\n\t"      /* function index */
-#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
-    "movl  %/a0@(%/d0:l:4), %/a0\n\t"
-#else /* not V3 */
-    "movl  %/a0@(8,%/d0:l:4), %/a0\n\t"		      
-#endif
-    "jbsr  %/a0@\n\t"         /* safe to not cleanup sp */
-    "movl  %/d0, %0\n\t"
-    "addql #4, %/sp\n\t"
-    "addl  %5, %/sp"
-    : "=g" (result)         /* %0 */
-    : "g" (that),           /* %1 */
-      "g" (methodIndex),    /* %2 */
-      "g" (paramCount),     /* %3 */
-      "g" (params),         /* %4 */
-      "g" (n)               /* %5 */
-    : "a0", "a1", "d0", "d1", "memory"
-    );
-  
-  return result;
-}
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp	(revision 101813)
+++ 	(revision )
@@ -1,254 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-
-static PRUint32
-invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-{
-    PRUint32 overflow = 0, gpr = 1 /*this*/, fpr = 0;
-    for(PRUint32 i = 0; i < paramCount; i++, s++)
-    {
-        if(s->IsPtrData())
-        {
-            if (gpr < 5) gpr++; else overflow++;
-            continue;
-        }
-        switch(s->type)
-        {
-        case nsXPTType::T_I8     :
-        case nsXPTType::T_I16    :
-        case nsXPTType::T_I32    :
-            if (gpr < 5) gpr++; else overflow++;
-            break;
-        case nsXPTType::T_I64    :
-            if (gpr < 4) gpr+=2; else gpr=5, overflow+=2;
-            break;
-        case nsXPTType::T_U8     :
-        case nsXPTType::T_U16    :
-        case nsXPTType::T_U32    :
-            if (gpr < 5) gpr++; else overflow++;
-            break;
-        case nsXPTType::T_U64    :
-            if (gpr < 4) gpr+=2; else gpr=5, overflow+=2;
-            break;
-        case nsXPTType::T_FLOAT  :
-            if (fpr < 2) fpr++; else overflow++;
-            break;
-        case nsXPTType::T_DOUBLE :
-            if (fpr < 2) fpr++; else overflow+=2;
-            break;
-        case nsXPTType::T_BOOL   :
-        case nsXPTType::T_CHAR   :
-        case nsXPTType::T_WCHAR  :
-            if (gpr < 5) gpr++; else overflow++;
-            break;
-        default:
-            // all the others are plain pointer types
-            if (gpr < 5) gpr++; else overflow++;
-            break;
-        }
-    }
-    /* Round up number of overflow words to ensure stack
-       stays aligned to 8 bytes.  */
-    return (overflow + 1) & ~1;
-}
-
-static void
-invoke_copy_to_stack(PRUint32 paramCount, nsXPTCVariant* s, PRUint32* d_ov, PRUint32 overflow)
-{
-    PRUint32 *d_gpr = d_ov + overflow; 
-    PRUint64 *d_fpr = (PRUint64 *)(d_gpr + 4);
-    PRUint32 gpr = 1 /*this*/, fpr = 0;
-
-    for(PRUint32 i = 0; i < paramCount; i++, s++)
-    {
-        if(s->IsPtrData())
-        {
-            if (gpr < 5) 
-                *((void**)d_gpr) = s->ptr, d_gpr++, gpr++;
-            else
-                *((void**)d_ov ) = s->ptr, d_ov++;
-            continue;
-        }
-        switch(s->type)
-        {
-        case nsXPTType::T_I8     : 
-            if (gpr < 5)
-                *((PRInt32*) d_gpr) = s->val.i8, d_gpr++, gpr++;
-            else
-                *((PRInt32*) d_ov ) = s->val.i8, d_ov++;
-            break;
-        case nsXPTType::T_I16    : 
-            if (gpr < 5)
-                *((PRInt32*) d_gpr) = s->val.i16, d_gpr++, gpr++;
-            else
-                *((PRInt32*) d_ov ) = s->val.i16, d_ov++;
-            break;
-        case nsXPTType::T_I32    : 
-            if (gpr < 5)
-                *((PRInt32*) d_gpr) = s->val.i32, d_gpr++, gpr++;
-            else
-                *((PRInt32*) d_ov ) = s->val.i32, d_ov++;
-            break;
-        case nsXPTType::T_I64    : 
-            if (gpr < 4)
-                *((PRInt64*) d_gpr) = s->val.i64, d_gpr+=2, gpr+=2;
-            else
-                *((PRInt64*) d_ov ) = s->val.i64, d_ov+=2, gpr=5;
-            break;
-        case nsXPTType::T_U8     : 
-            if (gpr < 5)
-                *((PRUint32*) d_gpr) = s->val.u8, d_gpr++, gpr++;
-            else
-                *((PRUint32*) d_ov ) = s->val.u8, d_ov++;
-            break;
-        case nsXPTType::T_U16    : 
-            if (gpr < 5)
-                *((PRUint32*)d_gpr) = s->val.u16, d_gpr++, gpr++;
-            else
-                *((PRUint32*)d_ov ) = s->val.u16, d_ov++;
-            break;
-        case nsXPTType::T_U32    : 
-            if (gpr < 5)
-                *((PRUint32*)d_gpr) = s->val.u32, d_gpr++, gpr++;
-            else
-                *((PRUint32*)d_ov ) = s->val.u32, d_ov++;
-            break;
-        case nsXPTType::T_U64    : 
-            if (gpr < 4)
-                *((PRUint64*)d_gpr) = s->val.u64, d_gpr+=2, gpr+=2;
-            else
-                *((PRUint64*)d_ov ) = s->val.u64, d_ov+=2, gpr=5;
-            break;
-        case nsXPTType::T_FLOAT  : 
-            if (fpr < 2)
-                *((float*)   d_fpr) = s->val.f, d_fpr++, fpr++;
-            else
-                *((float*)   d_ov ) = s->val.f, d_ov++;
-            break;
-        case nsXPTType::T_DOUBLE : 
-            if (fpr < 2)
-                *((double*)  d_fpr) = s->val.d, d_fpr++, fpr++;
-            else
-                *((double*)  d_ov ) = s->val.d, d_ov+=2;
-            break;
-        case nsXPTType::T_BOOL   : 
-            if (gpr < 5)
-                *((PRUint32*)d_gpr) = s->val.b, d_gpr++, gpr++;
-            else
-                *((PRUint32*)d_ov ) = s->val.b, d_ov++;
-            break;
-        case nsXPTType::T_CHAR   : 
-            if (gpr < 5)
-                *((PRUint32*)d_gpr) = s->val.c, d_gpr++, gpr++;
-            else
-                *((PRUint32*)d_ov ) = s->val.c, d_ov++;
-            break;
-        case nsXPTType::T_WCHAR  : 
-            if (gpr < 5)
-                *((PRUint32*)d_gpr) = s->val.wc, d_gpr++, gpr++;
-            else
-                *((PRUint32*)d_ov ) = s->val.wc, d_ov++;
-            break;
-        default:
-            // all the others are plain pointer types
-            if (gpr < 5) 
-                *((void**)   d_gpr) = s->val.p, d_gpr++, gpr++;
-            else
-                *((void**)   d_ov ) = s->val.p, d_ov++;
-            break;
-        }
-    }
-}
-
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params)
-{
-    PRUint32 *vtable = *(PRUint32 **)that;
-#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
-    PRUint32 method = vtable[methodIndex];
-#else /* not G++ V3 ABI  */
-    PRUint32 method = vtable[methodIndex + 2];
-#endif /* G++ V3 ABI */ 
-    PRUint32 overflow = invoke_count_words (paramCount, params);
-    PRUint32 result;
-
-    __asm__ __volatile__
-    (
-        "lr    7,15\n\t"
-        "ahi   7,-32\n\t"
-
-        "lr    3,%3\n\t"
-        "sll   3,2\n\t"
-        "lcr   3,3\n\t"
-        "l     2,0(15)\n\t"
-        "la    15,0(3,7)\n\t"
-        "st    2,0(15)\n\t"
-
-        "lr    2,%1\n\t"
-        "lr    3,%2\n\t"
-        "la    4,96(15)\n\t"
-        "lr    5,%3\n\t"
-        "basr  14,%4\n\t"
-
-        "lr    2,%5\n\t"
-        "ld    0,112(7)\n\t"
-        "ld    2,120(7)\n\t"
-        "lm    3,6,96(7)\n\t"
-        "basr  14,%6\n\t"
-
-        "la    15,32(7)\n\t"
-
-        "lr    %0,2\n\t"
-        : "=r" (result)
-        : "r" (paramCount),
-          "r" (params),
-          "r" (overflow),
-          "a" (invoke_copy_to_stack),
-          "a" (that),
-          "a" (method)
-        : "2", "3", "4", "5", "6", "7", "memory"
-    );
-  
-    return result;
-}    
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp	(revision 101813)
+++ 	(revision )
@@ -1,250 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-
-static PRUint32
-invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-{
-    PRUint32 overflow = 0, gpr = 1 /*this*/, fpr = 0;
-    for(PRUint32 i = 0; i < paramCount; i++, s++)
-    {
-        if(s->IsPtrData())
-        {
-            if (gpr < 5) gpr++; else overflow++;
-            continue;
-        }
-        switch(s->type)
-        {
-        case nsXPTType::T_I8     :
-        case nsXPTType::T_I16    :
-        case nsXPTType::T_I32    :
-        case nsXPTType::T_I64    :
-            if (gpr < 5) gpr++; else overflow++;
-            break;
-        case nsXPTType::T_U8     :
-        case nsXPTType::T_U16    :
-        case nsXPTType::T_U32    :
-        case nsXPTType::T_U64    :
-            if (gpr < 5) gpr++; else overflow++;
-            break;
-        case nsXPTType::T_FLOAT  :
-        case nsXPTType::T_DOUBLE :
-            if (fpr < 4) fpr++; else overflow++;
-            break;
-        case nsXPTType::T_BOOL   :
-        case nsXPTType::T_CHAR   :
-        case nsXPTType::T_WCHAR  :
-            if (gpr < 5) gpr++; else overflow++;
-            break;
-        default:
-            // all the others are plain pointer types
-            if (gpr < 5) gpr++; else overflow++;
-            break;
-        }
-    }
-    /* Round up number of overflow words to ensure stack
-       stays aligned to 8 bytes.  */
-    return (overflow + 1) & ~1;
-}
-
-static void
-invoke_copy_to_stack(PRUint32 paramCount, nsXPTCVariant* s, PRUint64* d_ov, PRUint32 overflow)
-{
-    PRUint64 *d_gpr = d_ov + overflow; 
-    PRUint64 *d_fpr = (PRUint64 *)(d_gpr + 4);
-    PRUint32 gpr = 1 /*this*/, fpr = 0;
-
-    for(PRUint32 i = 0; i < paramCount; i++, s++)
-    {
-        if(s->IsPtrData())
-        {
-            if (gpr < 5) 
-                *((void**)d_gpr) = s->ptr, d_gpr++, gpr++;
-            else
-                *((void**)d_ov ) = s->ptr, d_ov++;
-            continue;
-        }
-        switch(s->type)
-        {
-        case nsXPTType::T_I8     : 
-            if (gpr < 5)
-                *((PRInt64*) d_gpr) = s->val.i8, d_gpr++, gpr++;
-            else
-                *((PRInt64*) d_ov ) = s->val.i8, d_ov++;
-            break;
-        case nsXPTType::T_I16    : 
-            if (gpr < 5)
-                *((PRInt64*) d_gpr) = s->val.i16, d_gpr++, gpr++;
-            else
-                *((PRInt64*) d_ov ) = s->val.i16, d_ov++;
-            break;
-        case nsXPTType::T_I32    : 
-            if (gpr < 5)
-                *((PRInt64*) d_gpr) = s->val.i32, d_gpr++, gpr++;
-            else
-                *((PRInt64*) d_ov ) = s->val.i32, d_ov++;
-            break;
-        case nsXPTType::T_I64    : 
-            if (gpr < 5)
-                *((PRInt64*) d_gpr) = s->val.i64, d_gpr++, gpr++;
-            else
-                *((PRInt64*) d_ov ) = s->val.i64, d_ov++;
-            break;
-        case nsXPTType::T_U8     : 
-            if (gpr < 5)
-                *((PRUint64*) d_gpr) = s->val.u8, d_gpr++, gpr++;
-            else
-                *((PRUint64*) d_ov ) = s->val.u8, d_ov++;
-            break;
-        case nsXPTType::T_U16    : 
-            if (gpr < 5)
-                *((PRUint64*)d_gpr) = s->val.u16, d_gpr++, gpr++;
-            else
-                *((PRUint64*)d_ov ) = s->val.u16, d_ov++;
-            break;
-        case nsXPTType::T_U32    : 
-            if (gpr < 5)
-                *((PRUint64*)d_gpr) = s->val.u32, d_gpr++, gpr++;
-            else
-                *((PRUint64*)d_ov ) = s->val.u32, d_ov++;
-            break;
-        case nsXPTType::T_U64    : 
-            if (gpr < 5)
-                *((PRUint64*)d_gpr) = s->val.u64, d_gpr++, gpr++;
-            else
-                *((PRUint64*)d_ov ) = s->val.u64, d_ov++;
-            break;
-        case nsXPTType::T_FLOAT  : 
-            if (fpr < 4)
-                *((float*)   d_fpr)    = s->val.f, d_fpr++, fpr++;
-            else
-                *(((float*)  d_ov )+1) = s->val.f, d_ov++;
-            break;
-        case nsXPTType::T_DOUBLE : 
-            if (fpr < 4)
-                *((double*)  d_fpr) = s->val.d, d_fpr++, fpr++;
-            else
-                *((double*)  d_ov ) = s->val.d, d_ov++;
-            break;
-        case nsXPTType::T_BOOL   : 
-            if (gpr < 5)
-                *((PRUint64*)d_gpr) = s->val.b, d_gpr++, gpr++;
-            else
-                *((PRUint64*)d_ov ) = s->val.b, d_ov++;
-            break;
-        case nsXPTType::T_CHAR   : 
-            if (gpr < 5)
-                *((PRUint64*)d_gpr) = s->val.c, d_gpr++, gpr++;
-            else
-                *((PRUint64*)d_ov ) = s->val.c, d_ov++;
-            break;
-        case nsXPTType::T_WCHAR  : 
-            if (gpr < 5)
-                *((PRUint64*)d_gpr) = s->val.wc, d_gpr++, gpr++;
-            else
-                *((PRUint64*)d_ov ) = s->val.wc, d_ov++;
-            break;
-        default:
-            // all the others are plain pointer types
-            if (gpr < 5) 
-                *((void**)   d_gpr) = s->val.p, d_gpr++, gpr++;
-            else
-                *((void**)   d_ov ) = s->val.p, d_ov++;
-            break;
-        }
-    }
-}
-
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params)
-{
-    PRUint64 *vtable = *(PRUint64 **)that;
-#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
-    PRUint64 method = vtable[methodIndex];
-#else /* not G++ V3 ABI  */
-    PRUint64 method = vtable[methodIndex + 2];
-#endif /* G++ V3 ABI */
-    PRUint64 overflow = invoke_count_words (paramCount, params);
-    PRUint64 result;
-
-    __asm__ __volatile__
-    (
-        "lgr    7,15\n\t"
-        "aghi   7,-64\n\t"
-
-        "lgr    3,%3\n\t"
-        "sllg   3,3,3\n\t"
-        "lcgr   3,3\n\t"
-        "lg     2,0(15)\n\t"
-        "la     15,0(3,7)\n\t"
-        "stg    2,0(15)\n\t"
-
-        "lgr    2,%1\n\t"
-        "lgr    3,%2\n\t"
-        "la     4,160(15)\n\t"
-        "lgr    5,%3\n\t"
-        "basr   14,%4\n\t"
-
-        "lgr    2,%5\n\t"
-        "ld     0,192(7)\n\t"
-        "ld     2,200(7)\n\t"
-        "ld     4,208(7)\n\t"
-        "ld     6,216(7)\n\t"
-        "lmg    3,6,160(7)\n\t"
-        "basr   14,%6\n\t"
-
-        "la     15,64(7)\n\t"
-
-        "lgr    %0,2\n\t"
-        : "=r" (result)
-        : "r" ((PRUint64)paramCount),
-          "r" (params),
-          "r" (overflow),
-          "a" (invoke_copy_to_stack),
-          "a" (that),
-          "a" (method)
-        : "2", "3", "4", "5", "6", "7", "memory"
-    );
-  
-    return result;
-}    
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp	(revision 101813)
+++ 	(revision )
@@ -1,122 +1,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * Version: MPL 1.1
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corp, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2001
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Stuart Parmenter <pavlov@netscape.com>
- *   Brendan Eich     <brendan@mozilla.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* This code is for MIPS using the O32 ABI. */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-
-extern "C" uint32
-invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-{
-    // Count a word for a0 even though it's never stored or loaded
-    // We do this only for alignment of register pairs.
-    PRUint32 result = 1;
-    for (PRUint32 i = 0; i < paramCount; i++, s++)
-    {
-        result++;
-
-        if (s->IsPtrData())
-            continue;
-
-        switch(s->type)
-        {
-        case nsXPTType::T_I64    :
-        case nsXPTType::T_U64    :
-        case nsXPTType::T_DOUBLE :
-	    if (result & 1)
-		result++;
-	    result++;
-	    break;
-        }
-    }
-    return (result + 1) & ~(PRUint32)1;
-}
-
-extern "C" void
-invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
-                     nsXPTCVariant* s)
-{
-    // Skip the unused a0 slot, which we keep only for register pair alignment.
-    d++;
-
-    for (PRUint32 i = 0; i < paramCount; i++, d++, s++)
-    {
-        if (s->IsPtrData())
-        {
-            *((void**)d) = s->ptr;
-            continue;
-        }
-
-        *((void**)d) = s->val.p;
-
-        switch(s->type)
-        {
-        case nsXPTType::T_I64    :
-            if ((PRWord)d & 4) d++;
-            *((PRInt64*) d)  = s->val.i64;    d++;
-            break;
-        case nsXPTType::T_U64    :
-            if ((PRWord)d & 4) d++;
-            *((PRUint64*) d) = s->val.u64;    d++;
-            break;
-        case nsXPTType::T_DOUBLE :
-            if ((PRWord)d & 4) d++;
-            *((double*)   d) = s->val.d;      d++;
-            break;
-        }
-    }
-}
-
-extern "C" nsresult _XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                                        PRUint32 paramCount,
-                                        nsXPTCVariant* params);
-
-extern "C"
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params)
-{
-    return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params);
-}    
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp	(revision 101813)
+++ 	(revision )
@@ -1,175 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-// Remember that these 'words' are 32bit DWORDS
-
-#if !defined(__NetBSD__) || !defined(__m68k__)
-#error This code is for NetBSD/m68k only
-#endif
-
-extern "C" {
-    static PRUint32
-    invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-    {
-        PRUint32 result = 0;
-        for(PRUint32 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;
-            }
-        }
-        return result;
-    }
-
-    static void
-    invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s)
-    {
-        for(PRUint32 i = 0; i < paramCount; i++, d++, s++)
-        {
-            if(s->IsPtrData())
-            {
-                *((void**)d) = s->ptr;
-                continue;
-            }
-            switch(s->type)
-            {
-            // 8 and 16 bit types should be promoted to 32 bits when copying
-            // onto the stack.
-            case nsXPTType::T_I8     : *((PRUint32*)d) = s->val.i8;          break;
-            case nsXPTType::T_I16    : *((PRUint32*)d) = s->val.i16;         break;
-            case nsXPTType::T_I32    : *((PRInt32*) d) = s->val.i32;         break;
-            case nsXPTType::T_I64    : *((PRInt64*) d) = s->val.i64; d++;    break;
-            case nsXPTType::T_U8     : *((PRUint32*)d) = s->val.u8;          break;
-            case nsXPTType::T_U16    : *((PRUint32*)d) = s->val.u16;         break;
-            case nsXPTType::T_U32    : *((PRUint32*)d) = s->val.u32;         break;
-            case nsXPTType::T_U64    : *((PRUint64*)d) = s->val.u64; d++;    break;
-            case nsXPTType::T_FLOAT  : *((float*)   d) = s->val.f;           break;
-            case nsXPTType::T_DOUBLE : *((double*)  d) = s->val.d;   d++;    break;
-            case nsXPTType::T_BOOL   : *((PRBool*)  d) = s->val.b;           break;
-            case nsXPTType::T_CHAR   : *((PRUint32*)d) = s->val.c;           break;
-            // wchar_t is an int (32 bits) on NetBSD
-            case nsXPTType::T_WCHAR  : *((wchar_t*) d) = s->val.wc;          break;
-            default:
-                // all the others are plain pointer types
-                *((void**)d) = s->val.p;
-                break;
-            }
-        }
-    }
-}
-
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params)
-{
-    PRUint32 result;
-
- __asm__ __volatile__(
-    "movl  %4, sp@-\n\t"
-    "movl  %3, sp@-\n\t"
-    "jbsr  _invoke_count_words\n\t"     /* count words */
-    "addql #8, sp\n\t"
-    "lsll  #2, d0\n\t"      /* *= 4 */
-    "movl  sp, a2\n\t"	    /* save original sp */
-    "subl  d0, sp\n\t"      /* make room for params */
-    "movl  sp, a0\n\t"
-    "movl  %4, sp@-\n\t"
-    "movl  %3, sp@-\n\t"
-    "movl  a0, sp@-\n\t"
-    "jbsr  _invoke_copy_to_stack\n\t"   /* copy params */
-    "addl  #12, sp\n\t"
-    "movl  %1, a0\n\t"
-    "movl  a0@, a1\n\t"
-    "movl  %2, d0\n\t"      /* function index */
-    "movl  a0, d1\n\t"
-    "movw  a1@(8,d0:l:8), a0\n\t"
-    "addl  a0, d1\n\t"
-    "movl  a1@(12,d0:l:8), a1\n\t"
-    "movl  d1, sp@-\n\t"
-    "jbsr  a1@\n\t"
-    "movl  a2, sp\n\t"	    /* restore original sp */
-    "movl  d0, %0\n\t"
-    : "=g" (result)         /* %0 */
-    : "g" (that),           /* %1 */
-      "g" (methodIndex),    /* %2 */
-      "g" (paramCount),     /* %3 */
-      "g" (params)          /* %4 */
-    : "a0", "a1", "a2", "d0", "d1", "memory"
-    );
-  
-  return result;
-}
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_openvms_alpha.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_openvms_alpha.cpp	(revision 101813)
+++ 	(revision )
@@ -1,107 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-extern "C" {
-
-/* This is in the ASM file */
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params);
-
-
-void
-invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
-{
-    const PRUint8 NUM_ARG_REGS = 6-1;        // -1 for "this" pointer
-
-    for(PRUint32 i = 0; i < paramCount; i++, d++, s++)
-    {
-        if(s->IsPtrData())
-        {
-            *d = (PRUint64)s->ptr;
-            continue;
-        }
-        switch(s->type)
-        {
-	/*
-	** The line for T_U32 may look wrong (we use signed value for an
-	** unsigned data type), but it is right. Why? The Alpha calling 
-	** standard is defined to sign extend all 32-bit values, regardless
-	** of whether they are int, unsigned int, or 32-bit pointer. The 
-	** caller must "sign-extend" it by replicating bit 31 in bits 32
-	** thru 63 (yes, even for unsigned). This is the format that results
-	** naturally from the LDL instruction, the ADDL instruction, etc.
-	*/
-        case nsXPTType::T_I8     : *d = (PRUint64)s->val.i8;     break;
-        case nsXPTType::T_I16    : *d = (PRUint64)s->val.i16;    break;
-        case nsXPTType::T_I32    : *d = (PRUint64)s->val.i32;    break;
-        case nsXPTType::T_I64    : *d = (PRUint64)s->val.i64;    break;
-        case nsXPTType::T_U8     : *d = (PRUint64)s->val.u8;     break;
-        case nsXPTType::T_U16    : *d = (PRUint64)s->val.u16;    break;
-        case nsXPTType::T_U32    : *d = (PRUint64)s->val.i32;    break;
-        case nsXPTType::T_U64    : *d = (PRUint64)s->val.u64;    break;
-        case nsXPTType::T_FLOAT  :
-            if(i < NUM_ARG_REGS)
-            {
-                // convert floats to doubles if they are to be passed
-                // via registers so we can just deal with doubles later
-                union { PRUint64 u64; double d; } t;
-                t.d = (double)s->val.f;
-                *d = t.u64;
-            }
-            else
-                // otherwise copy to stack normally
-                *d = (PRUint64)s->val.u32;
-            break;
-        case nsXPTType::T_DOUBLE : *d = (PRUint64)s->val.u64;    break;
-        case nsXPTType::T_BOOL   : *d = (PRUint64)s->val.b;      break;
-        case nsXPTType::T_CHAR   : *d = (PRUint64)s->val.c;      break;
-        case nsXPTType::T_WCHAR  : *d = (PRUint64)s->val.wc;     break;
-        default:
-            // all the others are plain pointer types
-            *d = (PRUint64)s->val.p;
-            break;
-        }
-    }
-}
-
-}
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_osf1_alpha.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_osf1_alpha.cpp	(revision 101813)
+++ 	(revision )
@@ -1,93 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-/* contributed by Steve Streeter <Stephen.Streeter@Compaq.com> */
-
-#include "xptcprivate.h"
-
-/* Prototype specifies unmangled function name */
-extern "C" void
-invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s);
-
-extern "C" void
-invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
-{
-    const PRUint8 NUM_ARG_REGS = 6-1;        // -1 for "this" pointer
-
-    for(PRUint32 i = 0; i < paramCount; i++, d++, s++)
-    {
-        if(s->IsPtrData())
-        {
-            *d = (PRUint64)s->ptr;
-            continue;
-        }
-        switch(s->type)
-        {
-        case nsXPTType::T_I8     : *d = (PRUint64)s->val.i8;     break;
-        case nsXPTType::T_I16    : *d = (PRUint64)s->val.i16;    break;
-        case nsXPTType::T_I32    : *d = (PRUint64)s->val.i32;    break;
-        case nsXPTType::T_I64    : *d = (PRUint64)s->val.i64;    break;
-        case nsXPTType::T_U8     : *d = (PRUint64)s->val.u8;     break;
-        case nsXPTType::T_U16    : *d = (PRUint64)s->val.u16;    break;
-        case nsXPTType::T_U32    : *d = (PRUint64)s->val.u32;    break;
-        case nsXPTType::T_U64    : *d = (PRUint64)s->val.u64;    break;
-        case nsXPTType::T_FLOAT  :
-            if(i < NUM_ARG_REGS)
-            {
-                // convert floats to doubles if they are to be passed
-                // via registers so we can just deal with doubles later
-                union { PRUint64 u64; double d; } t;
-                t.d = (double)s->val.f;
-                *d = t.u64;
-            }
-            else
-                // otherwise copy to stack normally
-                *d = (PRUint64)s->val.u32;
-            break;
-        case nsXPTType::T_DOUBLE : *d = (PRUint64)s->val.u64;    break;
-        case nsXPTType::T_BOOL   : *d = (PRUint64)s->val.b;      break;
-        case nsXPTType::T_CHAR   : *d = (PRUint64)s->val.c;      break;
-        case nsXPTType::T_WCHAR  : *d = (PRUint64)s->val.wc;     break;
-        default:
-            // all the others are plain pointer types
-            *d = (PRUint64)s->val.p;
-            break;
-        }
-    }
-}
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_pa32.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_pa32.cpp	(revision 101813)
+++ 	(revision )
@@ -1,181 +1,0 @@
-
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xptcprivate.h"
-
-#if _HPUX
-#error "This code is for HP-PA RISC 32 bit mode only"
-#endif
-
-#include <alloca.h>
-
-typedef unsigned nsXPCVariant;
-
-extern "C" PRInt32
-invoke_count_bytes(nsISupports* that, const PRUint32 methodIndex,
-  const PRUint32 paramCount, const nsXPTCVariant* s)
-{
-  PRInt32 result = 4; /* variant records do not include self pointer */
-
-  /* counts the number of bytes required by the argument stack,
-     64 bit integer, and double requires 8 bytes.  All else requires
-     4 bytes.
-   */
-
-  {
-    PRUint32 indx;
-    for (indx = paramCount; indx > 0; --indx, ++s)
-    {
-      if (! s->IsPtrData())
-      {
-        if (s->type == nsXPTType::T_I64 || s->type == nsXPTType::T_U64 ||
-            s->type == nsXPTType::T_DOUBLE)
-        {
-          /* 64 bit integer and double aligned on 8 byte boundaries */
-          result += (result & 4) + 8;
-          continue;
-        }
-      }
-      result += 4; /* all other cases use 4 bytes */
-    }
-  }
-  result -= 72; /* existing stack buffer is 72 bytes */
-  if (result < 0)
-    return 0;
-  {
-    /* round up to 64 bytes boundary */
-    PRInt32 remainder = result & 63;
-    return (remainder == 0) ? result : (result + 64 - remainder);
-  }
-}
-
-extern "C" PRUint32
-invoke_copy_to_stack(PRUint32* d,
-  const PRUint32 paramCount, nsXPTCVariant* s)
-{
-
-  typedef struct
-  {
-    PRUint32 hi;
-    PRUint32 lo;
-  } DU;
-
-  PRUint32* dest = d;
-  nsXPTCVariant* source = s;
-  /* we clobber param vars by copying stuff on stack, have to use local var */
-
-  PRUint32 floatflags = 0;
-  /* flag indicating which floating point registers to load */
-
-  PRUint32 regwords = 1; /* register 26 is reserved for ptr to 'that' */
-  PRUint32 indx;
-
-  for (indx = paramCount; indx > 0; --indx, --dest, ++source)
-  {
-    if (source->IsPtrData())
-    {
-      *((void**) dest) = source->ptr;
-      ++regwords;
-      continue;
-    }
-    switch (source->type)
-    {
-    case nsXPTType::T_I8    : *((PRInt32*) dest) = source->val.i8;  break;
-    case nsXPTType::T_I16   : *((PRInt32*) dest) = source->val.i16; break;
-    case nsXPTType::T_I32   : *((PRInt32*) dest) = source->val.i32; break;
-    case nsXPTType::T_I64   :
-    case nsXPTType::T_U64   :
-      if (regwords & 1)
-      {
-        /* align on double word boundary */
-        --dest;
-        ++regwords;
-      }
-      *((uint32*) dest) = ((DU *) source)->lo;
-      *((uint32*) --dest) = ((DU *) source)->hi;
-      /* big endian - hi word in low addr */
-      regwords += 2;
-      continue;
-    case nsXPTType::T_DOUBLE :
-      if (regwords & 1)
-      {
-        /* align on double word boundary */
-        --dest;
-        ++regwords;
-      }
-      switch (regwords) /* load double precision float register */
-      {
-      case 2:
-        floatflags |= 1;
-      }
-      *((uint32*) dest) = ((DU *) source)->lo;
-      *((uint32*) --dest) = ((DU *) source)->hi;
-      /* big endian - hi word in low addr */
-      regwords += 2;
-      continue;
-    case nsXPTType::T_FLOAT :
-      switch (regwords) /* load single precision float register */
-      {
-      case 1:
-        floatflags |= 2;
-        break;
-      case 2:
-        floatflags |= 4;
-        break;
-      case 3:
-        floatflags |= 8;
-      }
-      *((float*) dest) = source->val.f;
-      break;
-    case nsXPTType::T_U8    : *((PRUint32*) (dest)) = source->val.u8; break;
-    case nsXPTType::T_U16   : *((PRUint32*) (dest)) = source->val.u16; break;
-    case nsXPTType::T_U32   : *((PRUint32*) (dest)) = source->val.u32; break;
-    case nsXPTType::T_BOOL  : *((PRBool*)   (dest)) = source->val.b; break;
-    case nsXPTType::T_CHAR  : *((PRUint32*) (dest)) = source->val.c; break;
-    case nsXPTType::T_WCHAR : *((PRInt32*)  (dest)) = source->val.wc; break;
-
-    default:
-      // all the others are plain pointer types
-      *((void**) dest) = source->val.p;
-    }
-    ++regwords;
-  }
-  return floatflags;
-}
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_aix.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_aix.cpp	(revision 101813)
+++ 	(revision )
@@ -1,106 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* 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(PRUint32* d, PRUint32 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.
-*/
-    PRUint32 *l_d = d;
-    nsXPTCVariant *l_s = s;
-    PRUint32 l_paramCount = paramCount, fpCount = 0;
-    double *l_fprData = fprData;
-
-    typedef struct {
-        uint32 hi;
-        uint32 lo;
-    } DU;               // have to move 64 bit entities as 32 bit halves since
-                        // stack slots are not guaranteed 16 byte aligned
-
-    for(uint32 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*)  l_d) = l_s->val.i8;          break;
-        case nsXPTType::T_I16    : *((int32*)  l_d) = l_s->val.i16;         break;
-        case nsXPTType::T_I32    : *((int32*)  l_d) = l_s->val.i32;         break;
-        case nsXPTType::T_I64    : 
-        case nsXPTType::T_U64    :
-            *((uint32*) l_d++) = ((DU *)l_s)->hi;
-            *((uint32*) l_d) = ((DU *)l_s)->lo;
-            break;
-        case nsXPTType::T_DOUBLE :
-            *((uint32*) l_d++) = ((DU *)l_s)->hi;
-            *((uint32*) l_d) = ((DU *)l_s)->lo;
-            if(fpCount < 13)
-                l_fprData[fpCount++] = l_s->val.d;
-            break;
-        case nsXPTType::T_U8     : *((uint32*) l_d) = l_s->val.u8;          break;
-        case nsXPTType::T_U16    : *((uint32*) l_d) = l_s->val.u16;         break;
-        case nsXPTType::T_U32    : *((uint32*) 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   : *((PRBool*) l_d) = l_s->val.b;           break;
-        case nsXPTType::T_CHAR   : *((uint32*) l_d) = l_s->val.c;           break;
-        case nsXPTType::T_WCHAR  : *((int32*)  l_d) = l_s->val.wc;          break;
-        default:
-            // all the others are plain pointer types
-            *((void**)l_d) = l_s->val.p;
-            break;
-        }
-    }
-}
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_aix64.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_aix64.cpp	(revision 101813)
+++ 	(revision )
@@ -1,95 +1,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/LGPL 2.1/GPL 2.0
- *
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is IBM Corporation.
- * Portions created by IBM are
- *   Copyright (C) 2002, International Business Machines Corporation.
- *   All Rights Reserved.
- *
- * Contributor(s):
- *
- *  Alternatively, the contents of this file may be used under the terms of
- *  either of the GNU General Public License Version 2 or later (the "GPL"),
- *  or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- *  in which case the provisions of the GPL or the LGPL are applicable instead
- *  of those above. If you wish to allow use of your version of this file only
- *  under the terms of either the GPL or the LGPL, and not to allow others to
- *  use your version of this file under the terms of the MPL, indicate your
- *  decision by deleting the provisions above and replace them with the notice
- *  and other provisions required by the LGPL or the GPL. If you do not delete
- *  the provisions above, a recipient may use your version of this file under
- *  the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-#ifdef _AIX
-
-extern "C" void
-invoke_copy_to_stack(PRUint64* d, PRUint32 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.
-*/
-    PRUint64 *l_d = d;
-    nsXPTCVariant *l_s = s;
-    PRUint32 l_paramCount = paramCount, fpCount = 0;
-    double *l_fprData = fprData;
-
-    for(PRUint32 i = 0; i < l_paramCount; i++, l_d++, l_s++)
-    {
-        if(l_s->IsPtrData())
-        {
-            *l_d = (PRUint64)l_s->ptr;
-            continue;
-        }
-        switch(l_s->type)
-        {
-        case nsXPTType::T_I8:    *l_d = (PRUint64)l_s->val.i8;   break;
-        case nsXPTType::T_I16:   *l_d = (PRUint64)l_s->val.i16;  break;
-        case nsXPTType::T_I32:   *l_d = (PRUint64)l_s->val.i32;  break;
-        case nsXPTType::T_I64:   *l_d = (PRUint64)l_s->val.i64;  break;
-        case nsXPTType::T_U8:    *l_d = (PRUint64)l_s->val.u8;   break;
-        case nsXPTType::T_U16:   *l_d = (PRUint64)l_s->val.u16;  break;
-        case nsXPTType::T_U32:   *l_d = (PRUint64)l_s->val.u32;  break;
-        case nsXPTType::T_U64:   *l_d = (PRUint64)l_s->val.u64;  break;
-        case nsXPTType::T_BOOL:  *l_d = (PRUint64)l_s->val.b;    break;
-        case nsXPTType::T_CHAR:  *l_d = (PRUint64)l_s->val.c;    break;
-        case nsXPTType::T_WCHAR: *l_d = (PRUint64)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 = (PRUint64)l_s->val.p;
-            break;
-        }
-    }
-}
-#endif
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_linux.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_linux.cpp	(revision 101813)
+++ 	(revision )
@@ -1,141 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
- *   beard@netscape.com (Patrick Beard)
- *   waterson@netscape.com (Chris Waterson)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-// Platform specific code to invoke XPCOM methods on native objects
-
-// The purpose of XPTC_InvokeByIndex() is to map a platform
-// indepenpent call to the platform ABI. To do that,
-// XPTC_InvokeByIndex() has to determine the method to call via vtable
-// access. The parameters for the method are read from the
-// nsXPTCVariant* and prepared for th native ABI.  For the Linux/PPC
-// ABI this means that the first 8 integral and floating point
-// parameters are passed in registers.
-
-#include "xptcprivate.h"
-
-// 8 integral parameters are passed in registers
-#define GPR_COUNT     8
-
-// 8 floating point parameters are passed in registers, floats are
-// promoted to doubles when passed in registers
-#define FPR_COUNT     8
-
-extern "C" PRUint32
-invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-{
-  return PRUint32(((paramCount * 2) + 3) & ~3);
-}
-
-extern "C" void
-invoke_copy_to_stack(PRUint32* d,
-                     PRUint32 paramCount,
-                     nsXPTCVariant* s, 
-                     PRUint32* gpregs,
-                     double* fpregs)
-{
-    PRUint32 gpr = 1; // skip one GP reg for 'that'
-    PRUint32 fpr = 0;
-    PRUint32 tempu32;
-    PRUint64 tempu64;
-    
-    for(uint32 i = 0; i < paramCount; i++, s++) {
-        if(s->IsPtrData())
-            tempu32 = (PRUint32) s->ptr;
-        else {
-            switch(s->type) {
-            case nsXPTType::T_FLOAT:                                  break;
-            case nsXPTType::T_DOUBLE:                                 break;
-            case nsXPTType::T_I8:     tempu32 = s->val.i8;            break;
-            case nsXPTType::T_I16:    tempu32 = s->val.i16;           break;
-            case nsXPTType::T_I32:    tempu32 = s->val.i32;           break;
-            case nsXPTType::T_I64:    tempu64 = s->val.i64;           break;
-            case nsXPTType::T_U8:     tempu32 = s->val.u8;            break;
-            case nsXPTType::T_U16:    tempu32 = s->val.u16;           break;
-            case nsXPTType::T_U32:    tempu32 = s->val.u32;           break;
-            case nsXPTType::T_U64:    tempu64 = s->val.u64;           break;
-            case nsXPTType::T_BOOL:   tempu32 = s->val.b;             break;
-            case nsXPTType::T_CHAR:   tempu32 = s->val.c;             break;
-            case nsXPTType::T_WCHAR:  tempu32 = s->val.wc;            break;
-            default:                  tempu32 = (PRUint32) s->val.p;  break;
-            }
-        }
-
-        if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
-            if (fpr < FPR_COUNT)
-                fpregs[fpr++]    = s->val.d;
-            else {
-                if ((PRUint32) d & 4) d++; // doubles are 8-byte aligned on stack
-                *((double*) d) = s->val.d;
-                d += 2;
-            }
-        }
-        else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
-            if (fpr < FPR_COUNT)
-                fpregs[fpr++]   = s->val.f; // if passed in registers, floats are promoted to doubles
-            else
-                *((float*) d++) = s->val.f;
-        }
-        else if (!s->IsPtrData() && (s->type == nsXPTType::T_I64
-                                     || s->type == nsXPTType::T_U64)) {
-            if ((gpr + 1) < GPR_COUNT) {
-                if (gpr & 1) gpr++; // longlongs are aligned in odd/even register pairs, eg. r5/r6
-                *((PRUint64*) &gpregs[gpr]) = tempu64;
-                gpr += 2;
-            }
-            else {
-                if ((PRUint32) d & 4) d++; // longlongs are 8-byte aligned on stack
-                *((PRUint64*) d)            = tempu64;
-                d += 2;
-            }
-        }
-        else {
-            if (gpr < GPR_COUNT)
-                gpregs[gpr++] = tempu32;
-            else
-                *d++          = tempu32;
-        }
-        
-    }
-}
-
-extern "C"
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params);
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp	(revision 101813)
+++ 	(revision )
@@ -1,147 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
- *   beard@netscape.com (Patrick Beard)
- *   waterson@netscape.com (Chris Waterson)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-// Platform specific code to invoke XPCOM methods on native objects
-
-// The purpose of XPTC_InvokeByIndex() is to map a platform
-// indepenpent call to the platform ABI. To do that,
-// XPTC_InvokeByIndex() has to determine the method to call via vtable
-// access. The parameters for the method are read from the
-// nsXPTCVariant* and prepared for th native ABI.  For the Linux/PPC
-// ABI this means that the first 8 integral and floating point
-// parameters are passed in registers.
-
-#include "xptcprivate.h"
-
-// 8 integral parameters are passed in registers
-#define GPR_COUNT     8
-
-// 8 floating point parameters are passed in registers, floats are
-// promoted to doubles when passed in registers
-#define FPR_COUNT     8
-
-extern "C" PRUint32
-invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-{
-  return PRUint32(((paramCount * 2) + 3) & ~3);
-}
-
-extern "C" void
-invoke_copy_to_stack(PRUint32* d,
-                     PRUint32 paramCount,
-                     nsXPTCVariant* s, 
-                     PRUint32* gpregs,
-                     double* fpregs)
-{
-    PRUint32 gpr = 1; // skip one GP reg for 'that'
-    PRUint32 fpr = 0;
-    PRUint32 tempu32;
-    PRUint64 tempu64;
-    
-    for(uint32 i = 0; i < paramCount; i++, s++) {
-        if(s->IsPtrData())
-            tempu32 = (PRUint32) s->ptr;
-        else {
-            switch(s->type) {
-            case nsXPTType::T_FLOAT:                                  break;
-            case nsXPTType::T_DOUBLE:                                 break;
-            case nsXPTType::T_I8:     tempu32 = s->val.i8;            break;
-            case nsXPTType::T_I16:    tempu32 = s->val.i16;           break;
-            case nsXPTType::T_I32:    tempu32 = s->val.i32;           break;
-            case nsXPTType::T_I64:    tempu64 = s->val.i64;           break;
-            case nsXPTType::T_U8:     tempu32 = s->val.u8;            break;
-            case nsXPTType::T_U16:    tempu32 = s->val.u16;           break;
-            case nsXPTType::T_U32:    tempu32 = s->val.u32;           break;
-            case nsXPTType::T_U64:    tempu64 = s->val.u64;           break;
-            case nsXPTType::T_BOOL:   tempu32 = s->val.b;             break;
-            case nsXPTType::T_CHAR:   tempu32 = s->val.c;             break;
-            case nsXPTType::T_WCHAR:  tempu32 = s->val.wc;            break;
-            default:                  tempu32 = (PRUint32) s->val.p;  break;
-            }
-        }
-
-        if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
-            if (fpr < FPR_COUNT)
-                fpregs[fpr++]    = s->val.d;
-            else {
-                if ((PRUint32) d & 4) d++; // doubles are 8-byte aligned on stack
-                *((double*) d) = s->val.d;
-                d += 2;
-		if (gpr < GPR_COUNT)
-		    gpr += 2;
-            }
-        }
-        else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
-            if (fpr < FPR_COUNT)
-                fpregs[fpr++]   = s->val.f; // if passed in registers, floats are promoted to doubles
-            else {
-                *((float*) d) = s->val.f;
-		d += 1;
-		if (gpr < GPR_COUNT)
-		    gpr += 1;
-	    }
-        }
-        else if (!s->IsPtrData() && (s->type == nsXPTType::T_I64
-                                     || s->type == nsXPTType::T_U64)) {
-            if ((gpr + 1) < GPR_COUNT) {
-                if (gpr & 1) gpr++; // longlongs are aligned in odd/even register pairs, eg. r5/r6
-                *((PRUint64*) &gpregs[gpr]) = tempu64;
-                gpr += 2;
-            }
-            else {
-                if ((PRUint32) d & 4) d++; // longlongs are 8-byte aligned on stack
-                *((PRUint64*) d)            = tempu64;
-                d += 2;
-            }
-        }
-        else {
-            if (gpr < GPR_COUNT)
-                gpregs[gpr++] = tempu32;
-            else
-                *d++          = tempu32;
-        }
-        
-    }
-}
-
-extern "C"
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params);
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_rhapsody.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_rhapsody.cpp	(revision 101813)
+++ 	(revision )
@@ -1,145 +1,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-extern "C" uint32
-invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-{
-    PRUint32 result = 0;
-    /*    fprintf(stderr,"invoke_count_words(%d,%p)\n",paramCount, s);*/
-
-    for(PRUint32 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;
-        }
-    }
-    return result;
-}
-
-extern "C" void
-invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s, double *fprData)
-{
-	PRUint32 fpCount = 0;
-
-    /*    fprintf(stderr,"invoke_copy_to_stack(%p, %d, %p, %p)\n", d, paramCount, s, fprData);*/
-
-    for(PRUint32 i = 0; i < paramCount; i++, d++, s++)
-    {
-        if(s->IsPtrData())
-        {
-            *((void**)d) = s->ptr;
-            continue;
-        }
-        switch(s->type)
-        {
-        case nsXPTType::T_I8     : *((PRInt32*) d) = s->val.i8;          break;
-        case nsXPTType::T_I16    : *((PRInt32*) d) = s->val.i16;         break;
-        case nsXPTType::T_I32    : *((PRInt32*) d) = s->val.i32;         break;
-        case nsXPTType::T_I64    : *((PRInt64*) d) = s->val.i64; d++;    break;
-        case nsXPTType::T_U8     : *((PRUint32*) d) = s->val.u8;          break;
-        case nsXPTType::T_U16    : *((PRUint32*)d) = s->val.u16;         break;
-        case nsXPTType::T_U32    : *((PRUint32*)d) = s->val.u32;         break;
-        case nsXPTType::T_U64    : *((PRUint64*)d) = s->val.u64; d++;    break;
-        case nsXPTType::T_FLOAT  : *((float*)   d) = s->val.f;
-        			   if (fpCount < 13)
-        		               fprData[fpCount++] = s->val.f;
-        			   break;
-        case nsXPTType::T_DOUBLE : *((double*)  d) = s->val.d;   d++;
-        			   if (fpCount < 13)
-        			       fprData[fpCount++] = s->val.d;
-        			   break;
-        case nsXPTType::T_BOOL   : *((PRBool*)  d) = s->val.b;           break;
-        case nsXPTType::T_CHAR   : *((PRInt32*)    d) = s->val.c;        break;
-        case nsXPTType::T_WCHAR  : *((PRUint32*) d) = s->val.wc;         break;
-        default:
-            // all the others are plain pointer types
-            *((void**)d) = s->val.p;
-            break;
-        }
-    }
-}
-
-extern "C" nsresult _XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params);
-
-extern "C"
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params)
-{
-    return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params);
-}    
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc_netbsd.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc_netbsd.cpp	(revision 101813)
+++ 	(revision )
@@ -1,156 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* 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" PRUint32
-invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-{
-    PRUint32 result = 0;
-    for(PRUint32 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" PRUint32
-invoke_copy_to_stack(PRUint32* d, PRUint32 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 *l_d = d;
-    nsXPTCVariant *l_s = s;
-    uint32 l_paramCount = paramCount;
-    uint32 regCount = 0;	// return the number of registers to load from the stack
-
-    typedef struct {
-        uint32 hi;
-        uint32 lo;
-    } DU;               // have to move 64 bit entities as 32 bit halves since
-                        // stack slots are not guaranteed 16 byte aligned
-
-    for(uint32 i = 0; i < l_paramCount; i++, l_d++, l_s++)
-    {
-	if (regCount < 5) regCount++;
-        if(l_s->IsPtrData())
-        {
-            *((void**)l_d) = l_s->ptr;
-            continue;
-        }
-        switch(l_s->type)
-        {
-        case nsXPTType::T_I8     : *((int32*)   l_d) = l_s->val.i8;          break;
-        case nsXPTType::T_I16    : *((int32*)  l_d) = l_s->val.i16;         break;
-        case nsXPTType::T_I32    : *((int32*)  l_d) = l_s->val.i32;         break;
-        case nsXPTType::T_I64    : 
-        case nsXPTType::T_U64    : 
-        case nsXPTType::T_DOUBLE : *((uint32*) l_d++) = ((DU *)l_s)->hi;
-				   if (regCount < 5) regCount++;
-                                   *((uint32*) l_d) = ((DU *)l_s)->lo;
-                                   break;
-        case nsXPTType::T_U8     : *((uint32*)  l_d) = l_s->val.u8;          break;
-        case nsXPTType::T_U16    : *((uint32*) l_d) = l_s->val.u16;         break;
-        case nsXPTType::T_U32    : *((uint32*) l_d) = l_s->val.u32;         break;
-        case nsXPTType::T_FLOAT  : *((float*)  l_d) = l_s->val.f;           break;
-        case nsXPTType::T_BOOL   : *((PRBool*) l_d) = l_s->val.b;           break;
-        case nsXPTType::T_CHAR   : *((uint32*)   l_d) = l_s->val.c;           break;
-        case nsXPTType::T_WCHAR  : *((int32*)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;
-}
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc_solaris.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc_solaris.cpp	(revision 101813)
+++ 	(revision )
@@ -1,156 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* 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" PRUint32
-invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
-{
-    PRUint32 result = 0;
-    for(PRUint32 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" PRUint32
-invoke_copy_to_stack(PRUint32* d, PRUint32 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 *l_d = d;
-    nsXPTCVariant *l_s = s;
-    uint32 l_paramCount = paramCount;
-    uint32 regCount = 0;	// return the number of registers to load from the stack
-
-    typedef struct {
-        uint32 hi;
-        uint32 lo;
-    } DU;               // have to move 64 bit entities as 32 bit halves since
-                        // stack slots are not guaranteed 16 byte aligned
-
-    for(uint32 i = 0; i < l_paramCount; i++, l_d++, l_s++)
-    {
-	if (regCount < 5) regCount++;
-        if(l_s->IsPtrData())
-        {
-            *((void**)l_d) = l_s->ptr;
-            continue;
-        }
-        switch(l_s->type)
-        {
-        case nsXPTType::T_I8     : *((int32*)   l_d) = l_s->val.i8;          break;
-        case nsXPTType::T_I16    : *((int32*)  l_d) = l_s->val.i16;         break;
-        case nsXPTType::T_I32    : *((int32*)  l_d) = l_s->val.i32;         break;
-        case nsXPTType::T_I64    : 
-        case nsXPTType::T_U64    : 
-        case nsXPTType::T_DOUBLE : *((uint32*) l_d++) = ((DU *)l_s)->hi;
-				   if (regCount < 5) regCount++;
-                                   *((uint32*) l_d) = ((DU *)l_s)->lo;
-                                   break;
-        case nsXPTType::T_U8     : *((uint32*)  l_d) = l_s->val.u8;          break;
-        case nsXPTType::T_U16    : *((uint32*) l_d) = l_s->val.u16;         break;
-        case nsXPTType::T_U32    : *((uint32*) l_d) = l_s->val.u32;         break;
-        case nsXPTType::T_FLOAT  : *((float*)  l_d) = l_s->val.f;           break;
-        case nsXPTType::T_BOOL   : *((PRBool*) l_d) = l_s->val.b;           break;
-        case nsXPTType::T_CHAR   : *((uint32*)   l_d) = l_s->val.c;           break;
-        case nsXPTType::T_WCHAR  : *((int32*)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;
-}
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparcv9_solaris.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparcv9_solaris.cpp	(revision 101813)
+++ 	(revision )
@@ -1,107 +1,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2001
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Stuart Parmenter <pavlov@netscape.com>
- *   Chris Seawood <cls@seawood.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-/* 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" PRUint64
-invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s);
-
-extern "C" PRUint64
-invoke_copy_to_stack(PRUint64* d, PRUint32 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.
-  */
-  PRUint64 *l_d = d;
-  nsXPTCVariant *l_s = s;
-  PRUint64 l_paramCount = paramCount;
-  PRUint64 regCount = 0;  // return the number of registers to load from the stack
-
-  for(PRUint64 i = 0; i < l_paramCount; i++, l_d++, l_s++)
-  {
-    if (regCount < 5) regCount++;
-
-    if (l_s->IsPtrData())
-    {
-      *l_d = (PRUint64)l_s->ptr;
-      continue;
-    }
-    switch (l_s->type)
-    {
-      case nsXPTType::T_I8    : *((PRInt64*)l_d)     = l_s->val.i8;    break;
-      case nsXPTType::T_I16   : *((PRInt64*)l_d)     = l_s->val.i16;   break;
-      case nsXPTType::T_I32   : *((PRInt64*)l_d)     = l_s->val.i32;   break;
-      case nsXPTType::T_I64   : *((PRInt64*)l_d)     = l_s->val.i64;   break;
-      
-      case nsXPTType::T_U8    : *((PRUint64*)l_d)    = l_s->val.u8;    break;
-      case nsXPTType::T_U16   : *((PRUint64*)l_d)    = l_s->val.u16;   break;
-      case nsXPTType::T_U32   : *((PRUint64*)l_d)    = l_s->val.u32;   break;
-      case nsXPTType::T_U64   : *((PRUint64*)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 paramter 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  : *((PRBool*)l_d)      = l_s->val.b;     break;
-      case nsXPTType::T_CHAR  : *((PRUint64*)l_d)    = l_s->val.c;     break;
-      case nsXPTType::T_WCHAR : *((PRInt64*)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;
-}
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_x86.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_x86.cpp	(revision 101813)
+++ 	(revision )
@@ -1,187 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Mark Mentovai <mark@moxienet.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-#include "xptc_platforms_unixish_x86.h"
-
-extern "C" {
-
-static void
-invoke_copy_to_stack(PRUint32 paramCount, nsXPTCVariant* s, PRUint32* d)
-{
-    for(PRUint32 i = paramCount; i >0; 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    : *((PRInt64*) d) = s->val.i64; d++;    break;
-        case nsXPTType::T_U64    : *((PRUint64*)d) = s->val.u64; d++;    break;
-        case nsXPTType::T_DOUBLE : *((double*)  d) = s->val.d;   d++;    break;
-        }
-    }
-}
-
-}
-
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params)
-{
-#ifdef __GNUC__            /* Gnu compiler. */
-  PRUint32 result;
-  /* Each param takes at most 2, 4-byte words
-     It doesn't matter if we push too many words, and calculating the exact
-     amount takes time. */
-  PRUint32 n = paramCount << 3;
-  void (*fn_copy) (unsigned int, nsXPTCVariant *, PRUint32 *) = invoke_copy_to_stack;
-  int temp1, temp2;
-
-  /* These are only significant when KEEP_STACK_16_BYTE_ALIGNED is
-     defined.  Otherwise, they're just placeholders to keep the parameter
-     indices the same for aligned and unaligned users in the inline asm
-     block. */
-  unsigned int saved_esp;
-
- __asm__ __volatile__(
-#ifdef KEEP_STACK_16_BYTE_ALIGNED
-    "movl  %%esp, %3\n\t"
-#endif
-    "subl  %8, %%esp\n\t" /* make room for params */
-#ifdef KEEP_STACK_16_BYTE_ALIGNED
-    /* For the second CALL, there will be one parameter before the ones
-       copied by invoke_copy_to_stack.  Make sure that the stack will be
-       aligned for that CALL. */
-    "subl  $4, %%esp\n\t"
-    "andl  $0xfffffff0, %%esp\n\t"
-    /* For the first CALL, there are three parameters.  Leave padding to
-       ensure alignment. */
-    "subl  $4, %%esp\n\t"
-    /* The third parameter to invoke_copy_to_stack is the destination pointer.
-       It needs to point into the parameter area prepared for the second CALL,
-       leaving room for the |that| parameter.  This reuses |n|, which was
-       the stack space to reserve, but that's OK because it's no longer needed
-       if the stack is being kept aligned. */
-    "leal  8(%%esp), %8\n\t"
-    "pushl %8\n\t"
-#else
-    "pushl %%esp\n\t"
-#endif
-    "pushl %7\n\t"
-    "pushl %6\n\t"
-    "call  *%9\n\t"       /* copy params */
-#ifdef KEEP_STACK_16_BYTE_ALIGNED
-    /* The stack is still aligned from the first CALL.  Keep it aligned for
-       the next one by popping past the parameters from the first CALL and
-       leaving space for the first (|that|) parameter for the second CALL. */
-    "addl  $0x14, %%esp\n\t"
-#else
-    "addl  $0xc, %%esp\n\t"
-#endif
-    "movl  %4, %%ecx\n\t"
-#ifdef CFRONT_STYLE_THIS_ADJUST
-    "movl  (%%ecx), %%edx\n\t"
-    "movl  %5, %%eax\n\t"   /* function index */
-    "shl   $3, %%eax\n\t"   /* *= 8 */
-    "addl  $8, %%eax\n\t"   /* += 8 skip first entry */
-    "addl  %%eax, %%edx\n\t"
-    "movswl (%%edx), %%eax\n\t" /* 'this' offset */
-    "addl  %%eax, %%ecx\n\t"
-    "pushl %%ecx\n\t"
-    "addl  $4, %%edx\n\t"   /* += 4, method pointer */
-#else /* THUNK_BASED_THIS_ADJUST */
-    "pushl %%ecx\n\t"
-    "movl  (%%ecx), %%edx\n\t"
-    "movl  %5, %%eax\n\t"   /* function index */
-#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
-    "leal  (%%edx,%%eax,4), %%edx\n\t"
-#else /* not G++ V3 ABI  */
-    "leal  8(%%edx,%%eax,4), %%edx\n\t"
-#endif /* G++ V3 ABI */
-#endif
-    "call  *(%%edx)\n\t"    /* safe to not cleanup esp */
-#ifdef KEEP_STACK_16_BYTE_ALIGNED
-    "movl  %3, %%esp\n\t"
-#else
-    "addl  $4, %%esp\n\t"
-    "addl  %8, %%esp"
-#endif
-    : "=a" (result),        /* %0 */
-      "=c" (temp1),         /* %1 */
-      "=d" (temp2),         /* %2 */
-#ifdef KEEP_STACK_16_BYTE_ALIGNED
-      "=&g" (saved_esp)     /* %3 */
-#else
-      /* Don't waste a register, this isn't used if alignment is unimportant */
-      "=m" (saved_esp)      /* %3 */
-#endif
-    : "g" (that),           /* %4 */
-      "g" (methodIndex),    /* %5 */
-      "1" (paramCount),     /* %6 */
-      "2" (params),         /* %7 */
-#ifdef KEEP_STACK_16_BYTE_ALIGNED
-      /* Must be in a register, it's the target of an LEA instruction */
-      "r" (n),              /* %8 */
-#else
-      "g" (n),              /* %8 */
-#endif
-      "0" (fn_copy)         /* %9 */
-    : "memory"
-    );
-
-  return result;
-
-#else
-#error "can't find a compiler to use"
-#endif /* __GNUC__ */
-
-}
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unsupported.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unsupported.cpp	(revision 101813)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Platform specific code to invoke XPCOM methods on native objects */
-
-#include "xptcprivate.h"
-
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params)
-{
-    NS_ASSERTION(0,"XPTC_InvokeByIndex called on unsupported platform");
-    return NS_ERROR_NOT_IMPLEMENTED;
-}    
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp	(revision 101813)
+++ 	(revision )
@@ -1,244 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Russell King  <rmk@arm.linux.org.uk>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-#if !defined(LINUX) || !defined(__arm__)
-#error "This code is for Linux ARM only. Please check if it works for you, too.\nDepends strongly on gcc behaviour."
-#endif
-
-/* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol.  */
-static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch");
-
-static nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
-{
-#define PARAM_BUFFER_COUNT     16
-
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    PRUint32* 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  = *((PRInt8*)  ap);       break;
-        case nsXPTType::T_I16    : dp->val.i16 = *((PRInt16*) ap);       break;
-        case nsXPTType::T_I32    : dp->val.i32 = *((PRInt32*) ap);       break;
-        case nsXPTType::T_I64    : dp->val.i64 = *((PRInt64*) ap); ap++; break;
-        case nsXPTType::T_U8     : dp->val.u8  = *((PRUint8*) ap);       break;
-        case nsXPTType::T_U16    : dp->val.u16 = *((PRUint16*)ap);       break;
-        case nsXPTType::T_U32    : dp->val.u32 = *((PRUint32*)ap);       break;
-        case nsXPTType::T_U64    : dp->val.u64 = *((PRUint64*)ap); ap++; break;
-        case nsXPTType::T_FLOAT  : dp->val.f   = *((float*)   ap);       break;
-        case nsXPTType::T_DOUBLE : dp->val.d   = *((double*)  ap); ap++; break;
-        case nsXPTType::T_BOOL   : dp->val.b   = *((PRBool*)  ap);       break;
-        case nsXPTType::T_CHAR   : dp->val.c   = *((char*)    ap);       break;
-        case nsXPTType::T_WCHAR  : dp->val.wc  = *((wchar_t*) ap);       break;
-        default:
-            NS_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-/*
- * This is our shared stub.
- *
- * r0 = Self.
- *
- * The Rules:
- *   We pass an (undefined) number of arguments into this function.
- *   The first 3 C++ arguments are in r1 - r3, the rest are built
- *   by the calling function on the stack.
- *
- *   We are allowed to corrupt r0 - r3, ip, and lr.
- *
- * Other Info:
- *   We pass the stub number in using `ip'.
- *
- * Implementation:
- * - We save r1 to r3 inclusive onto the stack, which will be
- *   immediately below the caller saved arguments.
- * - setup r2 (PrepareAndDispatch's args pointer) to point at
- *   the base of all these arguments
- * - Save LR (for the return address)
- * - Set r1 (PrepareAndDispatch's methodindex argument) from ip
- * - r0 is passed through (self)
- * - Call PrepareAndDispatch
- * - When the call returns, we return by loading the PC off the
- *   stack, and undoing the stack (one instruction)!
- *
- */
-__asm__ ("\n\
-SharedStub:							\n\
-	stmfd	sp!, {r1, r2, r3}				\n\
-	mov	r2, sp						\n\
-	str	lr, [sp, #-4]!					\n\
-	mov	r1, ip						\n\
-	bl	_PrepareAndDispatch	                        \n\
-	ldr	pc, [sp], #16");
-
-/*
- * Create sets of stubs to call the SharedStub.
- * We don't touch the stack here, nor any registers, other than IP.
- * IP is defined to be corruptable by a called function, so we are
- * safe to use it.
- *
- * This will work with or without optimisation.
- */
-#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
-/*
- * Note : As G++3 ABI contains the length of the functionname in the
- *  mangled name, it is difficult to get a generic assembler mechanism like
- *  in the G++ 2.95 case.
- *  Create names would be like :
- *    _ZN14nsXPTCStubBase5Stub9Ev
- *    _ZN14nsXPTCStubBase6Stub13Ev
- *    _ZN14nsXPTCStubBase7Stub144Ev
- *  Use the assembler directives to get the names right...
- */
-
-#define STUB_ENTRY(n)						\
-  __asm__(							\
-	".section \".text\"\n"					\
-"	.align 2\n"						\
-"	.iflt ("#n" - 10)\n"                                    \
-"	.globl	_ZN14nsXPTCStubBase5Stub"#n"Ev\n"		\
-"	.type	_ZN14nsXPTCStubBase5Stub"#n"Ev,#function\n"	\
-"_ZN14nsXPTCStubBase5Stub"#n"Ev:\n"				\
-"	.else\n"                                                \
-"	.iflt  ("#n" - 100)\n"                                  \
-"	.globl	_ZN14nsXPTCStubBase6Stub"#n"Ev\n"		\
-"	.type	_ZN14nsXPTCStubBase6Stub"#n"Ev,#function\n"	\
-"_ZN14nsXPTCStubBase6Stub"#n"Ev:\n"				\
-"	.else\n"                                                \
-"	.iflt ("#n" - 1000)\n"                                  \
-"	.globl	_ZN14nsXPTCStubBase7Stub"#n"Ev\n"		\
-"	.type	_ZN14nsXPTCStubBase7Stub"#n"Ev,#function\n"	\
-"_ZN14nsXPTCStubBase7Stub"#n"Ev:\n"				\
-"	.else\n"                                                \
-"	.err \"stub number "#n"> 1000 not yet supported\"\n"    \
-"	.endif\n"                                               \
-"	.endif\n"                                               \
-"	.endif\n"                                               \
-"	mov	ip, #"#n"\n"					\
-"	b	SharedStub\n\t");
-
-#if 0
-/*
- * This part is left in as comment : this is how the method definition
- * should look like.
- */
-
-#define STUB_ENTRY(n)  \
-nsresult nsXPTCStubBase::Stub##n ()  \
-{ \
-  __asm__ (	  		        \
-"	mov	ip, #"#n"\n"					\
-"	b	SharedStub\n\t");                               \
-  return 0; /* avoid warnings */                                \
-}
-#endif
-
-#else /* G++2.95 ABI */
-
-#define STUB_ENTRY(n)						\
-  __asm__(							\
-	".section \".text\"\n"					\
-"	.align\n"						\
-"	.globl	Stub"#n"__14nsXPTCStubBase\n"			\
-"	.type	Stub"#n"__14nsXPTCStubBase,#function\n\n"	\
-"Stub"#n"__14nsXPTCStubBase:\n"					\
-"	mov	ip, #"#n"\n"					\
-"	b	SharedStub\n\t");
-
-#endif
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp	(revision 101813)
+++ 	(revision )
@@ -1,145 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
-{
-#define PARAM_BUFFER_COUNT     16
-
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    PRUint32* 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  = *((PRInt8*)  ap);       break;
-        case nsXPTType::T_I16    : dp->val.i16 = *((PRInt16*) ap);       break;
-        case nsXPTType::T_I32    : dp->val.i32 = *((PRInt32*) ap);       break;
-        case nsXPTType::T_I64    : dp->val.i64 = *((PRInt64*) ap); ap++; break;
-        case nsXPTType::T_U8     : dp->val.u8  = *((PRUint8*) ap);       break;
-        case nsXPTType::T_U16    : dp->val.u16 = *((PRUint16*)ap);       break;
-        case nsXPTType::T_U32    : dp->val.u32 = *((PRUint32*)ap);       break;
-        case nsXPTType::T_U64    : dp->val.u64 = *((PRUint64*)ap); ap++; break;
-        case nsXPTType::T_FLOAT  : dp->val.f   = *((float*)   ap);       break;
-        case nsXPTType::T_DOUBLE : dp->val.d   = *((double*)  ap); ap++; break;
-        case nsXPTType::T_BOOL   : dp->val.b   = *((PRBool*)  ap);       break;
-        case nsXPTType::T_CHAR   : dp->val.c   = *((char*)    ap);       break;
-        case nsXPTType::T_WCHAR  : dp->val.wc  = *((wchar_t*) ap);       break;
-        default:
-            NS_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-/*
- * These stubs move just move the values passed in registers onto the stack,
- * so they are contiguous with values passed on the stack, and then calls
- * PrepareAndDispatch() to do the dirty work.
- */
-
-#define STUB_ENTRY(n)							\
-__asm__(								\
-    ".global	_Stub"#n"__14nsXPTCStubBase\n\t"			\
-"_Stub"#n"__14nsXPTCStubBase:\n\t"					\
-    "stmfd	sp!, {r1, r2, r3}	\n\t"				\
-    "mov	ip, sp			\n\t"				\
-    "stmfd	sp!, {fp, ip, lr, pc}	\n\t"				\
-    "sub	fp, ip, #4		\n\t"				\
-    "mov	r1, #"#n"		\n\t"    /* = methodIndex 	*/ \
-    "add	r2, sp, #16		\n\t"				\
-    "bl		_PrepareAndDispatch__FP14nsXPTCStubBaseUiPUi   \n\t"	\
-    "ldmea	fp, {fp, sp, lr}	\n\t"				\
-    "add	sp, sp, #12		\n\t"				\
-    "mov	pc, lr			\n\t"				\
-);
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf32.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf32.s	(revision 101813)
+++ 	(revision )
@@ -1,124 +1,0 @@
-
-// Select C numeric constant
-        .radix  C
-        .psr    abi32
-        .psr    msb
-// Section has executable code
-        .section .text, "ax","progbits"
-// procedure named 'SharedStub'
-        .proc   SharedStub
-// manual bundling
-        .explicit
-
-        .global PrepareAndDispatch
-//      .exclass  PrepareAndDispatch, @fullyvisible
-        .type   PrepareAndDispatch,@function
-
-SharedStub::
-// 9 arguments, first 8 are the input arguments of previous
-// function call.  The last one is methodIndex, and is passed in memory
-        .prologue
-        .save ar.pfs , r41
-// allocate 8 input args, 4 local args, and 5 output args
-        alloc           r41 = ar.pfs, 8, 4, 5, 0   // M
-        .save rp, r40
-        mov             r40 = rp                   // I
-        nop.i           0                       ;; // I
-
-        .save ar.unat, r42
-        mov             r42 = ar.unat              // M
-        .fframe 144
-        add             sp = -144, sp              // A
-// unwind table already knows gp, don't need to specify anything
-        add             r43 = 0, gp             ;; // A
-
-// We have possible 8 integer registers and 8 float registers that could
-// be arguments.  We also have a stack region from the previous
-// stack frame that may hold some stack arguments.
-// We need to write the integer registers to a memory region, write
-// the float registers to a memory region (making sure we don't step
-// on NAT while touching the registers).  We also mark the memory
-// address of the stack arguments.
-// We then call PrepareAndDispatch() specifying the three memory
-// region pointers.
-
-
-        .body
-        add             out0 = 0, in0        // A  move self ptr
-// 144 bytes = 16 byte stack header + 64 byte int space + 64 byte float space
-// current frame is 144 bytes, previous frame is 112 bytes
-// restarg is at 144 + 112 + 16 bytes away from current sp
-// (current frame + previous frame + previous previous frame header)
-// methodIndex is at 144 + 16 bytes away from current sp
-// (current frame + previous frame header)
-        add             out4 = 192, sp       // A  restarg address
-        add             r11  = 160, sp    ;; // A  address of methodIndex
-
-        ld8             out1 = [r11]         // M  load methodIndex
-// sp + 16 is the start of intargs
-        add             out2 = 16, sp        // A  address of intargs
-// the intargs take up 64 bytes, so sp + 16 + 64 is the start of floatargs
-        add             out3 = 80, sp     ;; // A  address of floatargs
-
-        add             r11 = 0, out2     ;; // A
-        st8.spill       [r11] = in1, 8       // M
-        add             r10 = 0, out3     ;; // A
-
-        st8.spill       [r11] = in2, 8    ;; // M
-        st8.spill       [r11] = in3, 8       // M
-        nop.i           0                 ;; // I
-
-        st8.spill       [r11] = in4, 8    ;; // M
-        st8.spill       [r11] = in5, 8       // M
-        nop.i           0                 ;; // I
-
-        st8.spill       [r11] = in6, 8    ;; // M
-        st8.spill       [r11] = in7          // M
-        fclass.nm       p14,p15 = f8,@nat ;; // F
-
-(p14)   stfd            [r10] = f8, 8        // M
-(p15)   add             r10 = 8, r10         // A
-        fclass.nm       p12,p13 = f9,@nat ;; // F
-
-(p12)   stfd            [r10] = f9, 8        // M
-(p13)   add             r10 = 8, r10         // A
-        fclass.nm       p14,p15 =f10,@nat ;; // F
-
-(p14)   stfd            [r10] = f10, 8       // M
-(p15)   add             r10 = 8, r10         // A
-        fclass.nm       p12,p13 =f11,@nat ;; // F
-
-(p12)   stfd            [r10] = f11, 8       // M
-(p13)   add             r10 = 8, r10         // A
-        fclass.nm       p14,p15 =f12,@nat ;; // F
-
-(p14)   stfd            [r10] = f12, 8       // M
-(p15)   add             r10 = 8, r10         // A
-        fclass.nm       p12,p13 =f13,@nat ;; // F
-
-(p12)   stfd            [r10] = f13, 8       // M
-(p13)   add             r10 = 8, r10         // A
-        fclass.nm       p14,p15 =f14,@nat ;; // F
-
-(p14)   stfd            [r10] = f14, 8       // M
-(p15)   add             r10 = 8, r10         // A
-        fclass.nm       p12,p13 =f15,@nat ;; // F
-
-(p12)   stfd            [r10] = f15, 8       // M
-(p13)   add             r10 = 8, r10         // A
-
-// branch to PrepareAndDispatch
-        br.call.dptk.few rp = PrepareAndDispatch ;; // B
-
-// epilog
-        mov             ar.unat = r42        // M
-        mov             ar.pfs = r41         // I
-        mov             rp = r40          ;; // I
-
-        add             gp = 0, r43          // A
-        add             sp = 144, sp         // A
-        br.ret.dptk.few rp                ;; // B
-
-        .endp
-
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf64.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf64.s	(revision 101813)
+++ 	(revision )
@@ -1,124 +1,0 @@
-
-// Select C numeric constant
-        .radix  C
-        .psr    abi64
-        .psr    lsb
-// Section has executable code
-        .section .text, "ax","progbits"
-// procedure named 'SharedStub'
-        .proc   SharedStub
-// manual bundling
-        .explicit
-
-        .global PrepareAndDispatch
-//      .exclass  PrepareAndDispatch, @fullyvisible
-        .type   PrepareAndDispatch,@function
-
-SharedStub::
-// 9 arguments, first 8 are the input arguments of previous
-// function call.  The last one is methodIndex, and is passed in memory
-        .prologue
-        .save ar.pfs , r41
-// allocate 8 input args, 4 local args, and 5 output args
-        alloc           r41 = ar.pfs, 8, 4, 5, 0   // M
-        .save rp, r40
-        mov             r40 = rp                   // I
-        nop.i           0                       ;; // I
-
-        .save ar.unat, r42
-        mov             r42 = ar.unat              // M
-        .fframe 144
-        add             sp = -144, sp              // A
-// unwind table already knows gp, don't need to specify anything
-        add             r43 = 0, gp             ;; // A
-
-// We have possible 8 integer registers and 8 float registers that could
-// be arguments.  We also have a stack region from the previous
-// stack frame that may hold some stack arguments.
-// We need to write the integer registers to a memory region, write
-// the float registers to a memory region (making sure we don't step
-// on NAT while touching the registers).  We also mark the memory
-// address of the stack arguments.
-// We then call PrepareAndDispatch() specifying the three memory
-// region pointers.
-
-
-        .body
-        add             out0 = 0, in0        // A  move self ptr
-// 144 bytes = 16 byte stack header + 64 byte int space + 64 byte float space
-// current frame is 144 bytes, previous frame is 112 bytes
-// restarg is at 144 + 112 + 16 bytes away from current sp
-// (current frame + previous frame + previous previous frame header)
-// methodIndex is at 144 + 16 bytes away from current sp
-// (current frame + previous frame header)
-        add             out4 = 192, sp       // A  restarg address
-        add             r11  = 160, sp    ;; // A  address of methodIndex
-
-        ld8             out1 = [r11]         // M  load methodIndex
-// sp + 16 is the start of intargs
-        add             out2 = 16, sp        // A  address of intargs
-// the intargs take up 64 bytes, so sp + 16 + 64 is the start of floatargs
-        add             out3 = 80, sp     ;; // A  address of floatargs
-
-        add             r11 = 0, out2     ;; // A
-        st8.spill       [r11] = in1, 8       // M
-        add             r10 = 0, out3     ;; // A
-
-        st8.spill       [r11] = in2, 8    ;; // M
-        st8.spill       [r11] = in3, 8       // M
-        nop.i           0                 ;; // I
-
-        st8.spill       [r11] = in4, 8    ;; // M
-        st8.spill       [r11] = in5, 8       // M
-        nop.i           0                 ;; // I
-
-        st8.spill       [r11] = in6, 8    ;; // M
-        st8.spill       [r11] = in7          // M
-        fclass.nm       p14,p15 = f8,@nat ;; // F
-
-(p14)   stfd            [r10] = f8, 8        // M
-(p15)   add             r10 = 8, r10         // A
-        fclass.nm       p12,p13 = f9,@nat ;; // F
-
-(p12)   stfd            [r10] = f9, 8        // M
-(p13)   add             r10 = 8, r10         // A
-        fclass.nm       p14,p15 =f10,@nat ;; // F
-
-(p14)   stfd            [r10] = f10, 8       // M
-(p15)   add             r10 = 8, r10         // A
-        fclass.nm       p12,p13 =f11,@nat ;; // F
-
-(p12)   stfd            [r10] = f11, 8       // M
-(p13)   add             r10 = 8, r10         // A
-        fclass.nm       p14,p15 =f12,@nat ;; // F
-
-(p14)   stfd            [r10] = f12, 8       // M
-(p15)   add             r10 = 8, r10         // A
-        fclass.nm       p12,p13 =f13,@nat ;; // F
-
-(p12)   stfd            [r10] = f13, 8       // M
-(p13)   add             r10 = 8, r10         // A
-        fclass.nm       p14,p15 =f14,@nat ;; // F
-
-(p14)   stfd            [r10] = f14, 8       // M
-(p15)   add             r10 = 8, r10         // A
-        fclass.nm       p12,p13 =f15,@nat ;; // F
-
-(p12)   stfd            [r10] = f15, 8       // M
-(p13)   add             r10 = 8, r10         // A
-
-// branch to PrepareAndDispatch
-        br.call.dptk.few rp = PrepareAndDispatch ;; // B
-
-// epilog
-        mov             ar.unat = r42        // M
-        mov             ar.pfs = r41         // I
-        mov             rp = r40          ;; // I
-
-        add             gp = 0, r43          // A
-        add             sp = 144, sp         // A
-        br.ret.dptk.few rp                ;; // B
-
-        .endp
-
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_irix.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_irix.s	(revision 101813)
+++ 	(revision )
@@ -1,97 +1,0 @@
-
-#include <sys/regdef.h>
-#include <sys/asm.h>
-
-	.text
-	.globl PrepareAndDispatch
-
-LOCALSZ=16
-FRAMESZ=(((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
-
-A1OFF=FRAMESZ-(9*SZREG)
-A2OFF=FRAMESZ-(8*SZREG)
-A3OFF=FRAMESZ-(7*SZREG)
-A4OFF=FRAMESZ-(6*SZREG)
-A5OFF=FRAMESZ-(5*SZREG)
-A6OFF=FRAMESZ-(4*SZREG)
-A7OFF=FRAMESZ-(3*SZREG)
-GPOFF=FRAMESZ-(2*SZREG)
-RAOFF=FRAMESZ-(1*SZREG)
-
-F13OFF=FRAMESZ-(16*SZREG)
-F14OFF=FRAMESZ-(15*SZREG)
-F15OFF=FRAMESZ-(14*SZREG)
-F16OFF=FRAMESZ-(13*SZREG)
-F17OFF=FRAMESZ-(12*SZREG)
-F18OFF=FRAMESZ-(11*SZREG)
-F19OFF=FRAMESZ-(10*SZREG)
-
-#define SENTINEL_ENTRY(nn)         /* defined in cpp file, not here */
-
-#ifdef __GNUC__
-#define STUB_ENTRY(nn)    MAKE_STUB(nn, Stub/**/nn/**/__14nsXPTCStubBase)
-#else
-#define STUB_ENTRY(nn)    MAKE_STUB(nn, Stub/**/nn/**/__14nsXPTCStubBaseGv)
-#endif
-
-#define MAKE_STUB(nn, name)					\
-NESTED(name, FRAMESZ, ra);					\
-	SETUP_GP;						\
-	PTR_SUBU sp, FRAMESZ;					\
-	SETUP_GP64(GPOFF, name);				\
-	SAVE_GP(GPOFF);						\
-	li           t0, nn;					\
-	b            sharedstub;				\
-.end name;							\
-
-#include "xptcstubsdef.inc"
-
-	.globl sharedstub
-	.ent   sharedstub
-sharedstub:
-
-	REG_S	a1, A1OFF(sp)
-	REG_S	a2, A2OFF(sp)
-	REG_S	a3, A3OFF(sp)
-	REG_S	a4, A4OFF(sp)
-	REG_S	a5, A5OFF(sp)
-	REG_S	a6, A6OFF(sp)
-	REG_S	a7, A7OFF(sp)
-	REG_S	ra, RAOFF(sp)
-
-	s.d	$f13, F13OFF(sp)
-	s.d	$f14, F14OFF(sp)
-	s.d	$f15, F15OFF(sp)
-	s.d	$f16, F16OFF(sp)
-	s.d	$f17, F17OFF(sp)
-	s.d	$f18, F18OFF(sp)
-	s.d	$f19, F19OFF(sp)
-
-	# t0 is methodIndex
-	move	a1, t0
-
-	# a2 is stack address where extra function params
-	# are stored that do not fit in registers
-	move	a2, sp
-	addi	a2, FRAMESZ
-
-	# a3 is stack address of a1..a7
-	move	a3, sp
-	addi	a3, A1OFF
-
-	# a4 is stack address of f13..f19
-	move	a4, sp
-	addi	a4, F13OFF
-
-	# PrepareAndDispatch(that, methodIndex, args, gprArgs, fpArgs)
-	#                     a0       a1        a2     a3       a4
-	#
-	jal	PrepareAndDispatch
-
-	REG_L	ra, RAOFF(sp)
-	REG_L	gp, GPOFF(sp)
-
-	PTR_ADDU sp, FRAMESZ
-	j	ra
-
-.end sharedstub
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s.m4
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s.m4	(revision 101813)
+++ 	(revision )
@@ -1,109 +1,0 @@
-/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * Version: MPL 1.1
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corp, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2001
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Stuart Parmenter <pavlov@netscape.com>
- *   Chris Waterson   <waterson@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* This code is for MIPS using the O32 ABI. */
-
-#include <sys/regdef.h>
-#include <sys/asm.h>
-
-	.text
-	.globl PrepareAndDispatch
-
-NARGSAVE=4  # extra space for the callee to use.  gccism
-            # we can put our a0-a3 in our callers space.
-LOCALSZ=2   # gp, ra
-FRAMESZ=(((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
-
-define(STUB_NAME, `Stub'$1`__14nsXPTCStubBase')
-
-define(STUB_ENTRY,
-`	.globl		'STUB_NAME($1)`
-	.align		2
-	.type		'STUB_NAME($1)`,@function
-	.ent		'STUB_NAME($1)`, 0
-'STUB_NAME($1)`:
-	.frame		sp, FRAMESZ, ra 
-	.set		noreorder
-	.cpload		t9
-	.set		reorder
-	subu		sp, FRAMESZ
-	.cprestore	16	
-	li		t0, '$1`
-	b		sharedstub
-.end			'STUB_NAME($1)`
-
-')
-
-define(SENTINEL_ENTRY, `')
-
-include(xptcstubsdef.inc)
-
-	.globl	sharedstub
-	.ent	sharedstub
-sharedstub:
-
-	REG_S	ra, 20(sp)
-
-	REG_S	a0, 24(sp)
-	REG_S	a1, 28(sp)
-	REG_S	a2, 32(sp)
-	REG_S	a3, 36(sp)
-
-	# t0 is methodIndex
-	move	a1, t0
-
-	# put the start of a1, a2, a3, and stack
-	move	a2, sp
-	addi	a2, 24  # have a2 point to sp + 24 (where a0 is)
-
-	# PrepareAndDispatch(that, methodIndex, args)
-	#                     a0       a1        a2
-	#
-	jal	PrepareAndDispatch
-
-	REG_L	ra, 20(sp)
-	REG_L	a1, 28(sp)
-	REG_L	a2, 32(sp)
-
-	addu	sp, FRAMESZ
-	j	ra
-
-.end sharedstub
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_openvms_alpha.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_openvms_alpha.s	(revision 101813)
+++ 	(revision )
@@ -1,115 +1,0 @@
-;* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-;*
-;* The contents of this file are subject to the Netscape Public
-;* License Version 1.1 (the "License"); you may not use this file
-;* except in compliance with the License. You may obtain a copy of
-;* the License at http://www.mozilla.org/NPL/
-;*
-;* Software distributed under the License is distributed on an "AS
-;* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-;* implied. See the License for the specific language governing
-;* rights and limitations under the License.
-;*
-;* The Original Code is mozilla.org code.
-;*
-;* The Initial Developer of the Original Code is Netscape
-;* Communications Corporation.  Portions created by Netscape are
-;* Copyright (C) 1999 Netscape Communications Corporation. All
-;* Rights Reserved.
-;*
-;* Contributor(s): 
-;*/
-
-; Implement shared vtbl methods.
-
-	.title "STUBS" "Stub Code"
-
-	MBIT = "__14nsXPTCStubBasexv"   ; this is the mangled part of the name
-
-; The layout of the linkage section is important. First comes
-; PrepareAndDispatch, and then the Procedure Descriptors for the stubs. Each
-; is known to be 16 bytes long, and we use this fact to be able to locate the
-; PrepareAndDispatch linkage pair from any of the stubs.
-
-	.PSECT  $LINK$, OCTA, NOPIC, CON, REL, LCL, NOSHR, NOEXE, RD, NOWRT
-	.LINKAGE_PAIR   PrepareAndDispatch
-	LINKOFF = 16    ; first stub lp will be 16 bytes away
-
-; STUB_ENTRY createa a routine nsXPTCStubBase::Stub<n>() where n is the
-; argument passed in to STUB_ENTRY. It puts its stub number into R1 and then
-; jumps into SharedStub. It does it this way because we don't want to mess
-; up the arguments that may be on the stack. In order that we can find
-; our way around the linkage section, we subtract our offset from the
-; start of the linkage section (LINKOFF) from our own PV, thus giving
-; us the PV os the first entry in the linkage section (this should be
-; PrepareAndDispatch);
-
-	.macro STUB_ENTRY n
-	$routine        Stub'n%MBIT%, kind=null
-	mov     LINKOFF, r1     ; distance from lp for PrepareAndDispatch
-	subq    r27,r1,r27      ; subtract it from address of our proc desc
-	mov     n,r1            ; stub number is passed in r1
-	br      SharedStub      ; off to common code
-	$end_routine
-	LINKOFF = LINKOFF + 16  ; we just put 16 bytes into linkage section
-	.endm STUB_ENTRY
-
-; SENTINEL_ENTRY is in the C++ module. We need to define a empty macro
-; here to keep the assembler happy.
-	.macro SENTINEL_ENTRY n
-	.endm SENTINEL_ENTRY
-
-	.PSECT  $CODE$, OCTA, PIC, CON, REL, LCL, SHR, EXE, NORD, NOWRT
-
-;
-; SharedStub()
-; Collects arguments and calls PrepareAndDispatch.
-;
-;  r1  - The "methodIndex"
-;  r27 - points to the first entry in the linkage section, which by design
-;        is the linkage pair for PrepareAndDispatch.
-;
-; Arguments are passed in a non-standard way so that we don't disturb the
-; original arguments that were passed in to the stub. Since some args (if
-; there were more than 6) will already be on the stack, the stub had to not
-; only preserve R16-R21, but also preserve the stack too.
-;
-
-SharedStub::
-	subq    sp,96,sp        ; get some stack space for the args and saves
-	stq     r26,0(sp)       ; save r26 (the return address)
-
-	;
-	; Store arguments passed via registers to the stack.
-	; Floating point registers are stored as doubles and converted
-	; to floats in PrepareAndDispatch if necessary.
-	;
-	stt f17,16(sp)          ; floating point registers
-	stt f18,24(sp)
-	stt f19,32(sp)
-	stt f20,40(sp)
-	stt f21,48(sp)
-	stq r17,56(sp)          ; integer registers
-	stq r18,64(sp)
-	stq r19,72(sp)
-	stq r20,80(sp)
-	stq r21,88(sp)
-
-	;
-	; Call PrepareAndDispatch function.
-	;
-	mov     r1,r17          ; pass "methodIndex"
-	addq    sp,16,r18       ; pass "args"
-	mov     3,r25           ; number of args into AI
-
-	LDQ     R26, 0(R27)     ; get entry point address from linkage pair
-	LDQ     R27, 8(R27)     ; get procedure descriptor address from lp
-	JSR     R26, R26
-
-	ldq     r26, 0(sp)      ; restore return address
-	addq    sp,96,sp        ; return stack space
-	ret     r26             ; and we're outta here
-
- .include "xptcstubsdef_asm.vms"
-
-	.end
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_osf1_alpha.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_osf1_alpha.s	(revision 101813)
+++ 	(revision )
@@ -1,75 +1,0 @@
-        .text
-        .align 5
-        .globl SharedStub
-	.ent SharedStub
-SharedStub:
-	.frame  $30, 96, $26, 0
-        .mask 0x4000000,-96
-        ldgp $29,0($27)
-SharedStubXv:
-        subq $30,96,$30
-        stq $26,0($30)
-	.prologue 1
-        stt $f17,16($30)
-        stt $f18,24($30)
-        stt $f19,32($30)
-        stt $f20,40($30)
-        stt $f21,48($30)
-        stq $17,56($30)
-        stq $18,64($30)
-        stq $19,72($30)
-        stq $20,80($30)
-        stq $21,88($30)
-        bis $1,$1,$17
-        addq $30,16,$18
-        bsr $26,PrepareAndDispatch
-        ldq $26,0($30)
-        addq $30,96,$30
-        ret $31,($26),1
-        .end SharedStub
-
-/*
-   The C preprocessor doesn't handle # and ## if run with -std or -std0.
-
-   If -std  then __STDC__ is 0 [default] (K&R behavior)
-   If -std0 then __STDC__ is undefined (K&R behavior)
-   If -std1 then __STDC__ is 1 (ANSI preprocessor)
-*/
-
-#if __STDC__
-#define STUB_ENTRY(n) ;\
-        .text ;\
-        .align 5 ;\
-        .globl Stub##n##__14nsXPTCStubBase ;\
-        .globl Stub##n##__14nsXPTCStubBaseXv ;\
-        .ent Stub##n##__14nsXPTCStubBase ;\
-Stub##n##__14nsXPTCStubBase: ;\
-        .frame $30,0,$26,0 ;\
-        ldgp $29,0($27) ;\
-        .prologue 1 ;\
-Stub##n##__14nsXPTCStubBaseXv: ;\
-        lda $1,n ;\
-        br $31,SharedStubXv ;\
-        .end Stub##n##__14nsXPTCStubBase \
-
-#else
-#define STUB_ENTRY(n) ;\
-        .text ;\
-        .align 5 ;\
-        .globl Stub/**/n/**/__14nsXPTCStubBase ;\
-        .globl Stub/**/n/**/__14nsXPTCStubBaseXv ;\
-        .ent Stub/**/n/**/__14nsXPTCStubBase ;\
-Stub/**/n/**/__14nsXPTCStubBase: ;\
-        .frame $30,0,$26,0 ;\
-        ldgp $29,0($27) ;\
-        .prologue 1 ;\
-Stub/**/n/**/__14nsXPTCStubBaseXv: ;\
-        lda $1,n ;\
-        br $31,SharedStubXv ;\
-        .end Stub/**/n/**/__14nsXPTCStubBase \
-
-#endif
-
-#define SENTINEL_ENTRY(n) \
-
-#include "xptcstubsdef.inc"
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_pa32.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_pa32.s	(revision 101813)
+++ 	(revision )
@@ -1,68 +1,0 @@
-        .LEVEL  1.1
-
-curframesz  .EQU 128
-; SharedStub has stack size of 128 bytes
-
-lastframesz .EQU 64
-; the StubN C++ function has a small stack size of 64 bytes
-
-        .SPACE  $TEXT$,SORT=8
-        .SUBSPA $CODE$,QUAD=0,ALIGN=4,ACCESS=0x2c,CODE_ONLY,SORT=24
-SharedStub
-        .PROC
-        .CALLINFO CALLER,FRAME=80,SAVE_RP,ARGS_SAVED
-
-  .ENTRY
-        STW     %rp,-20(%sp)
-        LDO     128(%sp),%sp
-
-        STW     %r19,-32(%r30)
-        STW     %r26,-36-curframesz(%r30) ; save arg0 in previous frame
-
-        LDO     -80(%r30),%r28
-        FSTD,MA %fr5,8(%r28)   ; save darg0
-        FSTD,MA %fr7,8(%r28)   ; save darg1
-        FSTW,MA %fr4L,4(%r28)  ; save farg0
-        FSTW,MA %fr5L,4(%r28)  ; save farg1
-        FSTW,MA %fr6L,4(%r28)  ; save farg2
-        FSTW,MA %fr7L,4(%r28)  ; save farg3
-
-        ; Former value of register 26 is already properly saved by StubN,
-        ; but register 25-23 are not because of the arguments mismatch
-        STW     %r25,-40-curframesz-lastframesz(%r30) ; save r25
-        STW     %r24,-44-curframesz-lastframesz(%r30) ; save r24
-        STW     %r23,-48-curframesz-lastframesz(%r30) ; save r23
-        COPY    %r26,%r25                             ; method index is arg1
-        LDW     -36-curframesz-lastframesz(%r30),%r26 ; self is arg0
-        LDO     -40-curframesz-lastframesz(%r30),%r24 ; normal args is arg2
-        LDO     -80(%r30),%r23                        ; floating args is arg3
-
-        BL      .+8,%r2
-        ADDIL   L'PrepareAndDispatch-$PIC_pcrel$0+4,%r2
-        LDO     R'PrepareAndDispatch-$PIC_pcrel$1+8(%r1),%r1
-$PIC_pcrel$0
-        LDSID   (%r1),%r31
-$PIC_pcrel$1
-        MTSP    %r31,%sr0
-        .CALL   ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR
-;in=23-26;out=28;
-        BLE     0(%sr0,%r1)
-        COPY    %r31,%r2
-
-        LDW     -32(%r30),%r19
-
-        LDW     -148(%sp),%rp
-        BVE     (%rp)
-  .EXIT
-        LDO     -128(%sp),%sp
-
-
-        .PROCEND        ;in=26;out=28;
-
-  .ALIGN  8
-        .SPACE  $TEXT$
-        .SUBSPA $CODE$
-        .IMPORT PrepareAndDispatch,CODE
-        .EXPORT SharedStub,ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR,LONG_RETURN
-        .END
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_aix.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_aix.s	(revision 101813)
+++ 	(revision )
@@ -1,117 +1,0 @@
- #
- # -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- #
- # The contents of this file are subject to the Netscape Public
- # License Version 1.1 (the "License"); you may not use this file
- # except in compliance with the License. You may obtain a copy of
- # the License at http://www.mozilla.org/NPL/
- #
- # Software distributed under the License is distributed on an "AS
- # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- # implied. See the License for the specific language governing
- # rights and limitations under the License.
- #
- # The Original Code is mozilla.org code.
- #
- # The Initial Developer of the Original Code is Netscape
- # Communications Corporation.  Portions created by Netscape are
- # Copyright (C) 1999 Netscape Communications Corporation. All
- # Rights Reserved.
- #
- # Contributor(s): 
- #
-
-.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
-
-
-
-        .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
-
-
-#jimbo        csect   CODE{PR}
-#
-# on entry SharedStub has the method selector in r12, the rest of the original
-# parameters are in r3 thru r10 and f1 thru f13
-#
-#jimbo	import	.PrepareAndDispatch
-
-.SharedStub:
-	mflr	r0
-	stw	r0,8(sp)
-
- 	mr	r12,r3		    # Move methodIndex into r12 for LATER
- 	lwz	r3,104(sp)	    # Get the 'original' r3
-
-        stwu	sp,-176(sp)	    # room for linkage (24), fprData (104), gprData(28)
-				    # outgoing params to PrepareAndDispatch (20)
-
-	stw	r4,44(sp)
-	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,312	# 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
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_aix64.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_aix64.s	(revision 101813)
+++ 	(revision )
@@ -1,137 +1,0 @@
-#  ***** BEGIN LICENSE BLOCK *****
-#
-# Version: MPL 1.1/LGPL 2.1/GPL 2.0
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is IBM Corporation.
-# Portions created by IBM are
-#   Copyright (C) 2002, International Business Machines Corporation.
-#   All Rights Reserved.
-#
-# Contributor(s):
-#
-#  Alternatively, the contents of this file may be used under the terms of
-#  either of the GNU General Public License Version 2 or later (the "GPL"),
-#  or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-#  in which case the provisions of the GPL or the LGPL are applicable instead
-#  of those above. If you wish to allow use of your version of this file only
-#  under the terms of either the GPL or the LGPL, and not to allow others to
-#  use your version of this file under the terms of the MPL, indicate your
-#  decision by deleting the provisions above and replace them with the notice
-#  and other provisions required by the LGPL or the GPL. If you do not delete
-#  the provisions above, a recipient may use your version of this file under
-#  the terms of any one of the MPL, the GPL or the LGPL.
-#
-#  ***** END LICENSE BLOCK *****
-
-.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
-
-
-        .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
-
-
-#jimbo        csect   CODE{PR}
-#
-# on entry SharedStub has the method selector in r12, the rest of the original
-# parameters are in r3 thru r10 and f1 thru f13
-#
-#jimbo	import	.PrepareAndDispatch
-
-.SharedStub:
-        mflr    r0
-        std     r0,16(sp)
-
-        mr      r12,r3      # Move methodIndex into r12 for LATER
-        ld      r3,176(sp)  # Get the 'original' r3 (load 'this' into r3)
-
-        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 parms (40)
-        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,488   # pointer to callers args area, beyond r3-r10
-                            # mapped range
-        # 32bit:    176 (stack-distance)    64bit:  248 (stack-distance)
-        #           104 (this ptr offset)           176
-        #            32 (8*4 for r3-r10)             64 (8*8)
-        #           ---                             ---
-        #           312                             488
-
-        bl      .PrepareAndDispatch
-        nop
-
-        ld      r0,264(sp)  # 248+16
-        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
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_darwin.s.m4
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_darwin.s.m4	(revision 101813)
+++ 	(revision )
@@ -1,126 +1,0 @@
-/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License")  ;  you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999-2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-        .text
-        .globl _SharedStub
-
-define(STUB_MANGLED_ENTRY,
-`        .globl		'$2`
-        .align		2
-'$2`:
-        addi    r12, 0, '$1`
-        b       _SharedStub
-')
-
-define(STUB_ENTRY,
-`#ifdef HAVE_GCC3_ABI
-        .if '$1` < 10
-STUB_MANGLED_ENTRY('$1`, `__ZN14nsXPTCStubBase5Stub'$1`Ev')
-        .elseif '$1` < 100
-STUB_MANGLED_ENTRY('$1`, `__ZN14nsXPTCStubBase6Stub'$1`Ev')
-        .elseif '$1` < 1000
-STUB_MANGLED_ENTRY('$1`, `__ZN14nsXPTCStubBase7Stub'$1`Ev')
-        .else
-        .err "Stub'$1` >= 1000 not yet supported."
-        .endif
-#else /* !defined(HAVE_GCC3_ABI) */
-STUB_MANGLED_ENTRY('$1`, `_Stub'$1`__14nsXPTCStubBase')
-#endif /* !defined(HAVE_GCC3_ABI) */
-')
-
-define(SENTINEL_ENTRY, `')
-
-include(xptcstubsdef.inc)
-
-_SharedStub:
-        mflr    r0
-        stw     r0,8(r1)
-        
-        stwu    r1,-176(r1)
-        
-        stw     r4,44(r1)
-        stw     r5,48(r1)
-        stw     r6,52(r1)
-        stw     r7,56(r1)
-        stw     r8,60(r1)
-        stw     r9,64(r1)
-        stw     r10,68(r1)
-        stfd    f1,72(r1)
-        stfd    f2,80(r1)
-        stfd    f3,88(r1)
-        stfd    f4,96(r1)
-        stfd    f5,104(r1)
-        stfd    f6,112(r1)
-        stfd    f7,120(r1)
-        stfd    f8,128(r1)
-        stfd    f9,136(r1)
-        stfd    f10,144(r1)
-        stfd    f11,152(r1)
-        stfd    f12,156(r1)
-        stfd    f13,164(r1)
-        
-        addi    r6,r1,44
-        addi    r7,r1,72
-        
-        mr      r4,r12
-        addi    r5,r1,232
-        
-        bl      L_PrepareAndDispatch$stub
-        nop
-        
-        lwz     r0,184(r1)
-        addi    r1,r1,176
-        mtlr    r0
-        blr
-
-.picsymbol_stub
-L_PrepareAndDispatch$stub:
-        .indirect_symbol _PrepareAndDispatch
-        mflr r0
-        bcl 20,31,L1$pb
-L1$pb:
-        mflr r11
-        addis r11,r11,ha16(L1$lz-L1$pb)
-        mtlr r0
-        lwz r12,lo16(L1$lz-L1$pb)(r11)
-        mtctr r12
-        addi r11,r11,lo16(L1$lz-L1$pb)
-        bctr
-.lazy_symbol_pointer
-L1$lz:
-        .indirect_symbol _PrepareAndDispatch
-        .long dyld_stub_binding_helper
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_linux.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_linux.s	(revision 101813)
+++ 	(revision )
@@ -1,89 +1,0 @@
-// -*- Mode: Asm -*-
-//
-// The contents of this file are subject to the Netscape Public
-// License Version 1.1 (the "License"); you may not use this file
-// except in compliance with the License. You may obtain a copy of
-// the License at http://www.mozilla.org/NPL/
-//
-// Software distributed under the License is distributed on an "AS
-// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-// implied. See the License for the specific language governing
-// rights and limitations under the License.
-//
-// The Original Code is mozilla.org code.
-//
-// The Initial Developer of the Original Code is Netscape
-// Communications Corporation.  Portions created by Netscape are
-// Copyright (C) 1999 Netscape Communications Corporation. All
-// Rights Reserved.
-//
-// Contributor(s): 
-//   Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-//   beard@netscape.com (Patrick Beard)
-//   waterson@netscape.com (Chris Waterson)
-//
-
-.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
-
-        .section ".text"
-        .align 2
-	.globl SharedStub
-	.type  SharedStub,@function
-
-SharedStub:
-        stwu	sp,-112(sp)			// room for 
-						// linkage (8),
-						// gprData (32),
-						// fprData (64), 
-						// stack alignment(8)
-        mflr	r0
-	stw	r0,116(sp)			// save LR backchain
-
-	stw	r4,12(sp)			// save GP registers
-	stw	r5,16(sp)			// (n.b. that we don't save r3
-	stw	r6,20(sp)			// because PrepareAndDispatch() is savvy)
-	stw	r7,24(sp)
-	stw	r8,28(sp)
-	stw	r9,32(sp)
-	stw	r10,36(sp)
-
-	stfd	f1,40(sp)			// save FP registers
-	stfd	f2,48(sp)
-	stfd	f3,56(sp)
-	stfd	f4,64(sp)
-	stfd	f5,72(sp)
-	stfd	f6,80(sp)
-	stfd	f7,88(sp)
-	stfd	f8,96(sp)
-
-						// r3 has the 'self' pointer already
-	
-	mr      r4,r11				// r4 <= methodIndex selector, passed
-						// via r11 in the nsXPTCStubBase::StubXX() call
-	
-	addi	r5,sp,120			// r5 <= pointer to callers args area,
-						// beyond r3-r10/f1-f8 mapped range
-	
-	addi	r6,sp,8				// r6 <= gprData
-	addi	r7,sp,40			// r7 <= fprData
-      
-	bl	PrepareAndDispatch@local	// Go!
-    
-	lwz	r0,116(sp)			// restore LR
-	mtlr	r0
-	la	sp,112(sp)			// clean up the stack
-	blr
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s	(revision 101813)
+++ 	(revision )
@@ -1,89 +1,0 @@
-# -*- Mode: Asm -*-
-#
-# The contents of this file are subject to the Netscape Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/NPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1999 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s): 
-#   Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-#   beard@netscape.com (Patrick Beard)
-#   waterson@netscape.com (Chris Waterson)
-#
-
-.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
-
-        .section ".text"
-        .align 2
-	.globl SharedStub
-	.type  SharedStub,@function
-
-SharedStub:
-        stwu	sp,-112(sp)			# room for 
-						# linkage (8),
-						# gprData (32),
-						# fprData (64), 
-						# stack alignment(8)
-        mflr	r0
-	stw	r0,116(sp)			# save LR backchain
-
-	stw	r4,12(sp)			# save GP registers
-	stw	r5,16(sp)			# (n.b. that we don't save r3
-	stw	r6,20(sp)			# because PrepareAndDispatch() is savvy)
-	stw	r7,24(sp)
-	stw	r8,28(sp)
-	stw	r9,32(sp)
-	stw	r10,36(sp)
-
-	stfd	f1,40(sp)			# save FP registers
-	stfd	f2,48(sp)
-	stfd	f3,56(sp)
-	stfd	f4,64(sp)
-	stfd	f5,72(sp)
-	stfd	f6,80(sp)
-	stfd	f7,88(sp)
-	stfd	f8,96(sp)
-
-						# r3 has the 'self' pointer already
-	
-	mr      r4,r11				# r4 <= methodIndex selector, passed
-						# via r11 in the nsXPTCStubBase::StubXX() call
-	
-	addi	r5,sp,120			# r5 <= pointer to callers args area,
-						# beyond r3-r10/f1-f8 mapped range
-	
-	addi	r6,sp,8				# r6 <= gprData
-	addi	r7,sp,40			# r7 <= fprData
-      
-	bl	PrepareAndDispatch@local	# Go!
-    
-	lwz	r0,116(sp)			# restore LR
-	mtlr	r0
-	la	sp,112(sp)			# clean up the stack
-	blr
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_sparc_netbsd.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_sparc_netbsd.s	(revision 101813)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1999 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s): 
- */
-
-        .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, PRUint32 index, PRUint32* 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
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_sparc_solaris.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_sparc_solaris.s	(revision 101813)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1999 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s): 
- */
-
-        .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, PRUint32 index, PRUint32* 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
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_sparcv9_solaris.s
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_sparcv9_solaris.s	(revision 101813)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/* -*- Mode: asm; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- * 
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- * 
- * The Original Code is mozilla.org code.
- * 
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
- * Copyright (C) 2001 Netscape Communications Corporation. All
- * Rights Reserved.
- * 
- * Contributor(s): 
- *   Stuart Parmenter <pavlov@netscape.com>
- */
-
-        .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, PRUint32 index, PRUint32* 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
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp	(revision 101813)
+++ 	(revision )
@@ -1,185 +1,0 @@
-
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-#include "xptcprivate.h"
-
-#include <stddef.h>
-#include <stdlib.h>
-
-// "This code is for IA64 only"
-
-/* Implement shared vtbl methods. */
-
-extern "C" nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex,
-  uint64_t* intargs, uint64_t* floatargs, uint64_t* restargs)
-{
-
-#define PARAM_BUFFER_COUNT     16
-
-  nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-  nsXPTCMiniVariant* dispatchParams = NULL;
-  nsIInterfaceInfo* iface_info = NULL;
-  const nsXPTMethodInfo* info;
-  nsresult result = NS_ERROR_FAILURE;
-  uint64_t* iargs = intargs;
-  uint64_t* fargs = floatargs;
-  PRUint8 paramCount;
-  PRUint8 i;
-
-  NS_ASSERTION(self,"no self");
-
-  self->GetInterfaceInfo(&iface_info);
-  NS_ASSERTION(iface_info,"no interface info");
-
-  iface_info->GetMethodInfo(PRUint16(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");
-
-  for(i = 0; i < paramCount; ++i)
-  {
-    int isfloat = 0;
-    const nsXPTParamInfo& param = info->GetParam(i);
-    const nsXPTType& type = param.GetType();
-    nsXPTCMiniVariant* dp = &dispatchParams[i];
-
-    if(param.IsOut() || !type.IsArithmetic())
-    {
-#ifdef __LP64__
-        /* 64 bit pointer mode */
-        dp->val.p = (void*) *iargs;
-#else
-        /* 32 bit pointer mode */
-        uint32_t* adr = (uint32_t*) iargs;
-        dp->val.p = (void*) (*(adr+1));
-#endif
-    }
-    else
-    switch(type)
-    {
-    case nsXPTType::T_I8     : dp->val.i8  = *(iargs); break;
-    case nsXPTType::T_I16    : dp->val.i16 = *(iargs); break;
-    case nsXPTType::T_I32    : dp->val.i32 = *(iargs); break;
-    case nsXPTType::T_I64    : dp->val.i64 = *(iargs); break;
-    case nsXPTType::T_U8     : dp->val.u8  = *(iargs); break;
-    case nsXPTType::T_U16    : dp->val.u16 = *(iargs); break;
-    case nsXPTType::T_U32    : dp->val.u32 = *(iargs); break;
-    case nsXPTType::T_U64    : dp->val.u64 = *(iargs); break;
-    case nsXPTType::T_FLOAT  :
-      isfloat = 1;
-      if (i < 7)
-        dp->val.f = (float) *((double*) fargs); /* register */
-      else
-        dp->val.u32 = *(fargs); /* memory */
-      break;
-    case nsXPTType::T_DOUBLE :
-      isfloat = 1;
-      dp->val.u64 = *(fargs);
-      break;
-    case nsXPTType::T_BOOL   : dp->val.b   = *(iargs); break;
-    case nsXPTType::T_CHAR   : dp->val.c   = *(iargs); break;
-    case nsXPTType::T_WCHAR  : dp->val.wc  = *(iargs); break;
-    default:
-      NS_ASSERTION(0, "bad type");
-      break;
-    }
-    if (i < 7)
-    {
-      /* we are parsing register arguments */
-      if (i == 6)
-      {
-        // run out of register arguments, move on to memory arguments
-        iargs = restargs;
-        fargs = restargs;
-      }
-      else
-      {
-        ++iargs; // advance one integer register slot
-        if (isfloat) ++fargs; // advance float register slot if isfloat
-      }
-    }
-    else
-    {
-      /* we are parsing memory arguments */
-      ++iargs;
-      ++fargs;
-    }
-  }
-
-  result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
-
-  NS_RELEASE(iface_info);
-
-  if(dispatchParams != paramBuffer)
-    delete [] dispatchParams;
-
-  return result;
-}
-
-extern "C" int SharedStub(PRUint64,PRUint64,PRUint64,PRUint64,
- PRUint64,PRUint64,PRUint64,PRUint64,PRUint64);
-
-/* Variable a0-a7 were put there so we can have access to the 8 input
-   registers on Stubxyz entry */
-
-#define STUB_ENTRY(n) \
-nsresult nsXPTCStubBase::Stub##n(PRUint64 a1, \
-PRUint64 a2,PRUint64 a3,PRUint64 a4,PRUint64 a5,PRUint64 a6,PRUint64 a7) \
-{ uint64_t a0 = (uint64_t) this; \
- return SharedStub(a0,a1,a2,a3,a4,a5,a6,a7,(PRUint64) n); \
-}
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf64.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf64.cpp	(revision 101813)
+++ 	(revision )
@@ -1,186 +1,0 @@
-
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-#include "xptcprivate.h"
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-// "This code is for IA64 only"
-
-/* Implement shared vtbl methods. */
-
-extern "C" nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex,
-  uint64_t* intargs, uint64_t* floatargs, uint64_t* restargs)
-{
-
-#define PARAM_BUFFER_COUNT     16
-
-  nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-  nsXPTCMiniVariant* dispatchParams = NULL;
-  nsIInterfaceInfo* iface_info = NULL;
-  const nsXPTMethodInfo* info;
-  nsresult result = NS_ERROR_FAILURE;
-  uint64_t* iargs = intargs;
-  uint64_t* fargs = floatargs;
-  PRUint8 paramCount;
-  PRUint8 i;
-
-  NS_ASSERTION(self,"no self");
-
-  self->GetInterfaceInfo(&iface_info);
-  NS_ASSERTION(iface_info,"no interface info");
-
-  iface_info->GetMethodInfo(PRUint16(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");
-
-  for(i = 0; i < paramCount; ++i)
-  {
-    int isfloat = 0;
-    const nsXPTParamInfo& param = info->GetParam(i);
-    const nsXPTType& type = param.GetType();
-    nsXPTCMiniVariant* dp = &dispatchParams[i];
-
-    if(param.IsOut() || !type.IsArithmetic())
-    {
-#ifdef __LP64__
-        /* 64 bit pointer mode */
-        dp->val.p = (void*) *iargs;
-#else
-        /* 32 bit pointer mode */
-        uint32_t* adr = (uint32_t*) iargs;
-        dp->val.p = (void*) (*(adr+1));
-#endif
-    }
-    else
-    switch(type)
-    {
-    case nsXPTType::T_I8     : dp->val.i8  = *(iargs); break;
-    case nsXPTType::T_I16    : dp->val.i16 = *(iargs); break;
-    case nsXPTType::T_I32    : dp->val.i32 = *(iargs); break;
-    case nsXPTType::T_I64    : dp->val.i64 = *(iargs); break;
-    case nsXPTType::T_U8     : dp->val.u8  = *(iargs); break;
-    case nsXPTType::T_U16    : dp->val.u16 = *(iargs); break;
-    case nsXPTType::T_U32    : dp->val.u32 = *(iargs); break;
-    case nsXPTType::T_U64    : dp->val.u64 = *(iargs); break;
-    case nsXPTType::T_FLOAT  :
-      isfloat = 1;
-      if (i < 7)
-        dp->val.f = (float) *((double*) fargs); /* register */
-      else
-        dp->val.u32 = *(fargs); /* memory */
-      break;
-    case nsXPTType::T_DOUBLE :
-      isfloat = 1;
-      dp->val.u64 = *(fargs);
-      break;
-    case nsXPTType::T_BOOL   : dp->val.b   = *(iargs); break;
-    case nsXPTType::T_CHAR   : dp->val.c   = *(iargs); break;
-    case nsXPTType::T_WCHAR  : dp->val.wc  = *(iargs); break;
-    default:
-      NS_ASSERTION(0, "bad type");
-      break;
-    }
-    if (i < 7)
-    {
-      /* we are parsing register arguments */
-      if (i == 6)
-      {
-        // run out of register arguments, move on to memory arguments
-        iargs = restargs;
-        fargs = restargs;
-      }
-      else
-      {
-        ++iargs; // advance one integer register slot
-        if (isfloat) ++fargs; // advance float register slot if isfloat
-      }
-    }
-    else
-    {
-      /* we are parsing memory arguments */
-      ++iargs;
-      ++fargs;
-    }
-  }
-
-  result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
-
-  NS_RELEASE(iface_info);
-
-  if(dispatchParams != paramBuffer)
-    delete [] dispatchParams;
-
-  return result;
-}
-
-extern "C" int SharedStub(PRUint64,PRUint64,PRUint64,PRUint64,
- PRUint64,PRUint64,PRUint64,PRUint64,PRUint64);
-
-/* Variable a0-a7 were put there so we can have access to the 8 input
-   registers on Stubxyz entry */
-
-#define STUB_ENTRY(n) \
-nsresult nsXPTCStubBase::Stub##n(PRUint64 a1, \
-PRUint64 a2,PRUint64 a3,PRUint64 a4,PRUint64 a5,PRUint64 a6,PRUint64 a7) \
-{ uint64_t a0 = (uint64_t) this; \
- return SharedStub(a0,a1,a2,a3,a4,a5,a6,a7,(PRUint64) n); \
-}
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_irix.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_irix.cpp	(revision 101813)
+++ 	(revision )
@@ -1,226 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xptcprivate.h"
-
-#if defined(IRIX)
-
-#if (_MIPS_SIM != _ABIN32)
-#error "This code is for IRIX N32 only"
-#endif
-
-/*
- * This is for IRIX N32 ABI
- *
- * When we're called, the "gp" registers are stored in gprData and
- * the "fp" registers are stored in fprData.  There are 8 regs
- * available which coorespond to the first 7 parameters of the
- * function and the "this" pointer.  If there are additional parms,
- * they are stored on the stack at address "args".
- *
- */
-extern "C" nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint64* args,
-                   PRUint64 *gprData, double *fprData)
-{
-#define PARAM_BUFFER_COUNT		16
-#define PARAM_GPR_COUNT			7
-#define PARAM_FPR_COUNT			7
-
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    PRUint64* ap = args;
-    PRUint32 iCount = 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  = (PRInt8)gprData[iCount++];
-           else
-              dp->val.i8  = (PRInt8)*ap++;
-           break;
-
-        case nsXPTType::T_I16:
-            if (iCount < PARAM_GPR_COUNT)
-               dp->val.i16  = (PRInt16)gprData[iCount++];
-            else
-               dp->val.i16  = (PRInt16)*ap++;
-            break;
-
-        case nsXPTType::T_I32:
-            if (iCount < PARAM_GPR_COUNT)
-               dp->val.i32  = (PRInt32)gprData[iCount++];
-            else
-               dp->val.i32  = (PRInt32)*ap++;
-            break;
-
-        case nsXPTType::T_I64:
-            if (iCount < PARAM_GPR_COUNT)
-               dp->val.i64  = (PRInt64)gprData[iCount++];
-            else
-               dp->val.i64  = (PRInt64)*ap++;
-            break;
-
-        case nsXPTType::T_U8:
-            if (iCount < PARAM_GPR_COUNT)
-               dp->val.u8  = (PRUint8)gprData[iCount++];
-            else
-               dp->val.u8  = (PRUint8)*ap++;
-            break;
-
-        case nsXPTType::T_U16:
-            if (iCount < PARAM_GPR_COUNT)
-               dp->val.u16  = (PRUint16)gprData[iCount++];
-            else
-                dp->val.u16  = (PRUint16)*ap++;
-            break;
-
-        case nsXPTType::T_U32:
-            if (iCount < PARAM_GPR_COUNT)
-               dp->val.u32  = (PRUint32)gprData[iCount++];
-            else
-               dp->val.u32  = (PRUint32)*ap++;
-            break;
-
-        case nsXPTType::T_U64:
-            if (iCount < PARAM_GPR_COUNT)
-               dp->val.u64  = (PRUint64)gprData[iCount++];
-            else
-               dp->val.u64  = (PRUint64)*ap++;
-            break;
-
-        case nsXPTType::T_FLOAT:
-             if (iCount < PARAM_FPR_COUNT)
-                dp->val.f  = (double)fprData[iCount++];
-             else
-                dp->val.f  = *((double*)ap++);
-             break;
-
-        case nsXPTType::T_DOUBLE:
-              if (iCount < PARAM_FPR_COUNT)
-                 dp->val.d  = (double)fprData[iCount++];
-              else
-                 dp->val.d  = *((double*)ap++);
-              break;
-
-        case nsXPTType::T_BOOL:
-           if (iCount < PARAM_GPR_COUNT)
-              dp->val.b  = (PRBool)gprData[iCount++];
-           else
-              dp->val.b  = (PRBool)*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_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-#define STUB_ENTRY(n)		/* defined in the assembly file */
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
-#endif
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp	(revision 101813)
+++ 	(revision )
@@ -1,236 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Glen Nakamura <glen@imodulo.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-/* Prototype specifies unmangled function name and disables unused warning */
-static nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
-__asm__("PrepareAndDispatch") __attribute__((unused));
-
-static nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
-{
-    const PRUint8 PARAM_BUFFER_COUNT = 16;
-    const PRUint8 NUM_ARG_REGS = 6-1;        // -1 for "this" pointer
-
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    // args[0] to args[NUM_ARG_REGS] hold floating point register values
-    PRUint64* ap = args + NUM_ARG_REGS;
-    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  = (PRInt8)    *ap;    break;
-        case nsXPTType::T_I16    : dp->val.i16 = (PRInt16)   *ap;    break;
-        case nsXPTType::T_I32    : dp->val.i32 = (PRInt32)   *ap;    break;
-        case nsXPTType::T_I64    : dp->val.i64 = (PRInt64)   *ap;    break;
-        case nsXPTType::T_U8     : dp->val.u8  = (PRUint8)   *ap;    break;
-        case nsXPTType::T_U16    : dp->val.u16 = (PRUint16)  *ap;    break;
-        case nsXPTType::T_U32    : dp->val.u32 = (PRUint32)  *ap;    break;
-        case nsXPTType::T_U64    : dp->val.u64 = (PRUint64)  *ap;    break;
-        case nsXPTType::T_FLOAT  :
-            if(i < NUM_ARG_REGS)
-            {
-                // floats passed via registers are stored as doubles
-                // in the first NUM_ARG_REGS entries in args
-                dp->val.u64 = (PRUint64) args[i];
-                dp->val.f = (float) dp->val.d;    // convert double to float
-            }
-            else
-                dp->val.u32 = (PRUint32) *ap;
-            break;
-        case nsXPTType::T_DOUBLE :
-            // doubles passed via registers are also stored
-            // in the first NUM_ARG_REGS entries in args
-            dp->val.u64 = (i < NUM_ARG_REGS) ? args[i] : *ap;
-            break;
-        case nsXPTType::T_BOOL   : dp->val.b   = (PRBool)    *ap;    break;
-        case nsXPTType::T_CHAR   : dp->val.c   = (char)      *ap;    break;
-        case nsXPTType::T_WCHAR  : dp->val.wc  = (PRUnichar) *ap;    break;
-        default:
-            NS_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-/*
- * SharedStub()
- *  Collects arguments and calls PrepareAndDispatch.  The "methodIndex" is
- *  passed to this function via $1 to preserve the argument registers.
- */
-__asm__(
-    "#### SharedStub ####\n"
-".text\n\t"
-    ".align 5\n\t"
-    ".ent SharedStub\n"
-"SharedStub:\n\t"
-    ".frame $30,96,$26,0\n\t"
-    ".mask 0x4000000,-96\n\t"
-    "ldgp $29,0($27)\n"
-"$SharedStub..ng:\n\t"
-    "subq $30,96,$30\n\t"
-    "stq $26,0($30)\n\t"
-    ".prologue 1\n\t"
-
-    /*
-     * Store arguments passed via registers to the stack.
-     * Floating point registers are stored as doubles and converted
-     * to floats in PrepareAndDispatch if necessary.
-     */
-    "stt $f17,16($30)\n\t"   /* floating point registers */
-    "stt $f18,24($30)\n\t"
-    "stt $f19,32($30)\n\t"
-    "stt $f20,40($30)\n\t"
-    "stt $f21,48($30)\n\t"
-    "stq $17,56($30)\n\t"    /* integer registers */
-    "stq $18,64($30)\n\t"
-    "stq $19,72($30)\n\t"
-    "stq $20,80($30)\n\t"
-    "stq $21,88($30)\n\t"
-
-    /*
-     * Call PrepareAndDispatch function.
-     */
-    "bis $1,$1,$17\n\t"      /* pass "methodIndex" */
-    "addq $30,16,$18\n\t"    /* pass "args" */
-    "bsr $26,$PrepareAndDispatch..ng\n\t"
-
-    "ldq $26,0($30)\n\t"
-    "addq $30,96,$30\n\t"
-    "ret $31,($26),1\n\t"
-    ".end SharedStub"
-    );
-
-/*
- * nsresult nsXPTCStubBase::Stub##n()
- *  Sets register $1 to "methodIndex" and jumps to SharedStub.
- */
-#define STUB_MANGLED_ENTRY(n, symbol) \
-    "#### Stub"#n" ####"      "\n\t" \
-    ".text"                   "\n\t" \
-    ".align 5"                "\n\t" \
-    ".globl " symbol          "\n\t" \
-    ".ent " symbol            "\n"   \
-symbol ":"                    "\n\t" \
-    ".frame $30,0,$26,0"      "\n\t" \
-    "ldgp $29,0($27)"         "\n"   \
-"$" symbol "..ng:"            "\n\t" \
-    ".prologue 1"             "\n\t" \
-    "lda $1,"#n               "\n\t" \
-    "br $31,$SharedStub..ng"  "\n\t" \
-    ".end " symbol
-
-#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
-
-#define STUB_ENTRY(n) \
-__asm__( \
-    ".if "#n" < 10"                                              "\n\t" \
-        STUB_MANGLED_ENTRY(n, "_ZN14nsXPTCStubBase5Stub"#n"Ev")  "\n\t" \
-    ".elseif "#n" < 100"                                         "\n\t" \
-        STUB_MANGLED_ENTRY(n, "_ZN14nsXPTCStubBase6Stub"#n"Ev")  "\n\t" \
-    ".elseif "#n" < 1000"                                        "\n\t" \
-        STUB_MANGLED_ENTRY(n, "_ZN14nsXPTCStubBase7Stub"#n"Ev")  "\n\t" \
-    ".else"                                                      "\n\t" \
-    ".err \"Stub"#n" >= 1000 not yet supported.\""               "\n\t" \
-    ".endif" \
-    );
-
-#else /* not G++ V3 ABI */
-
-#define STUB_ENTRY(n) \
-__asm__( \
-    STUB_MANGLED_ENTRY(n, "Stub"#n"__14nsXPTCStubBase") \
-    );
-
-#endif /* G++ V3 ABI */
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_m68k.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_m68k.cpp	(revision 101813)
+++ 	(revision )
@@ -1,146 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-extern "C" {
-    nsresult
-    PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args)
-    {
-#define PARAM_BUFFER_COUNT     16
-
-        nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-        nsXPTCMiniVariant* dispatchParams = NULL;
-        nsIInterfaceInfo* iface_info = NULL;
-        const nsXPTMethodInfo* info;
-        PRUint8 paramCount;
-        PRUint8 i;
-        nsresult result = NS_ERROR_FAILURE;
-
-        NS_ASSERTION(self,"no self");
-
-        self->GetInterfaceInfo(&iface_info);
-        NS_ASSERTION(iface_info,"no interface info");
-
-        iface_info->GetMethodInfo(PRUint16(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");
-
-        PRUint32* 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;
-            }
-
-            switch(type)
-            {
-            // the 8 and 16 bit types will have been promoted to 32 bits before
-            // being pushed onto the stack. Since the 68k is big endian, we
-            // need to skip over the leading high order bytes.
-            case nsXPTType::T_I8     : dp->val.i8  = *(((PRInt8*) ap) + 3);  break;
-            case nsXPTType::T_I16    : dp->val.i16 = *(((PRInt16*) ap) + 1); break;
-            case nsXPTType::T_I32    : dp->val.i32 = *((PRInt32*) ap);       break;
-            case nsXPTType::T_I64    : dp->val.i64 = *((PRInt64*) ap); ap++; break;
-            case nsXPTType::T_U8     : dp->val.u8  = *(((PRUint8*) ap) + 3); break;
-            case nsXPTType::T_U16    : dp->val.u16 = *(((PRUint16*)ap) + 1); break;
-            case nsXPTType::T_U32    : dp->val.u32 = *((PRUint32*)ap);       break;
-            case nsXPTType::T_U64    : dp->val.u64 = *((PRUint64*)ap); ap++; break;
-            case nsXPTType::T_FLOAT  : dp->val.f   = *((float*)   ap);       break;
-            case nsXPTType::T_DOUBLE : dp->val.d   = *((double*)  ap); ap++; break;
-            case nsXPTType::T_BOOL   : dp->val.b   = *((PRBool*)  ap);       break;
-            case nsXPTType::T_CHAR   : dp->val.c   = *(((char*)   ap) + 3);  break;
-            case nsXPTType::T_WCHAR  : dp->val.wc  = *((wchar_t*) ap);       break;
-            default:
-                NS_ASSERTION(0, "bad type");
-                break;
-            }
-        }
-
-        result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-        NS_RELEASE(iface_info);
-
-        if(dispatchParams != paramBuffer)
-            delete [] dispatchParams;
-
-        return result;
-    }
-}
-
-#define STUB_ENTRY(n) \
-nsresult nsXPTCStubBase::Stub##n() \
-{ \
-  register nsresult result; \
-  __asm__ __volatile__( \
-    "lea   %/a6@(12), %/a0\n\t"       /* args */ \
-    "movl  %/a0, %/sp@-\n\t" \
-    "movl  #"#n", %/sp@-\n\t"       /* method index */ \
-    "movl  %/a6@(8), %/sp@-\n\t"      /* this */ \
-    "jbsr  PrepareAndDispatch\n\t" \
-    "movl  %/d0, %0\n\t" \
-    "addl  #12, %/sp" \
-    : "=d" (result)     /* %0 */ \
-    : \
-    : "a0", "a1", "d0", "d1", "memory" ); \
-    return result; \
-}
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp	(revision 101813)
+++ 	(revision )
@@ -1,220 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-static nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, 
-                   PRUint32* a_gpr, PRUint64 *a_fpr, PRUint32 *a_ov)
-{
-#define PARAM_BUFFER_COUNT     16
-
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    PRUint32 gpr = 1, fpr = 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 (gpr < 5)
-                dp->val.p = (void*) *a_gpr++, gpr++;
-            else
-                dp->val.p = (void*) *a_ov++;
-            continue;
-        }
-        // else
-        switch(type)
-        {
-        case nsXPTType::T_I8     : 
-            if (gpr < 5)
-                dp->val.i8  = *((PRInt32*) a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.i8  = *((PRInt32*) a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_I16    : 
-            if (gpr < 5)
-                dp->val.i16 = *((PRInt32*) a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.i16 = *((PRInt32*) a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_I32    : 
-            if (gpr < 5)
-                dp->val.i32 = *((PRInt32*) a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.i32 = *((PRInt32*) a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_I64    : 
-            if (gpr < 4)
-                dp->val.i64 = *((PRInt64*) a_gpr), a_gpr+=2, gpr+=2;
-            else
-                dp->val.i64 = *((PRInt64*) a_ov ), a_ov+=2, gpr=5;
-            break;
-        case nsXPTType::T_U8     : 
-            if (gpr < 5)
-                dp->val.u8  = *((PRUint32*)a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.u8  = *((PRUint32*)a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_U16    : 
-            if (gpr < 5)
-                dp->val.u16 = *((PRUint32*)a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.u16 = *((PRUint32*)a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_U32    : 
-            if (gpr < 5)
-                dp->val.u32 = *((PRUint32*)a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.u32 = *((PRUint32*)a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_U64    : 
-            if (gpr < 4)
-                dp->val.u64 = *((PRUint64*)a_gpr), a_gpr+=2, gpr+=2;
-            else
-                dp->val.u64 = *((PRUint64*)a_ov ), a_ov+=2, gpr=5;
-            break;
-        case nsXPTType::T_FLOAT  : 
-            if (fpr < 2)
-                dp->val.f   = *((float*)   a_fpr), a_fpr++, fpr++;
-            else
-                dp->val.f   = *((float*)   a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_DOUBLE : 
-            if (fpr < 2)
-                dp->val.d   = *((double*)  a_fpr), a_fpr++, fpr++;
-            else
-                dp->val.d   = *((double*)  a_ov ), a_ov+=2;
-            break;
-        case nsXPTType::T_BOOL   : 
-            if (gpr < 5)
-                dp->val.b   = *((PRUint32*)a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.b   = *((PRUint32*)a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_CHAR   : 
-            if (gpr < 5)
-                dp->val.c   = *((PRUint32*)a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.c   = *((PRUint32*)a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_WCHAR  : 
-            if (gpr < 5)
-                dp->val.wc  = *((PRUint32*)a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.wc  = *((PRUint32*)a_ov ), a_ov++;
-            break;
-        default:
-            NS_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-#define STUB_ENTRY(n) \
-nsresult nsXPTCStubBase::Stub##n() \
-{                             \
-    PRUint32 a_gpr[4];        \
-    PRUint64 a_fpr[2];        \
-    PRUint32 *a_ov;           \
-                              \
-    __asm__ __volatile__      \
-    (                         \
-        "l     %0,0(15)\n\t"  \
-        "ahi   %0,96\n\t"     \
-        "stm   3,6,0(%3)\n\t" \
-        "std   0,%1\n\t"      \
-        "std   2,%2\n\t"      \
-        : "=&a" (a_ov),       \
-          "=m" (a_fpr[0]),    \
-          "=m" (a_fpr[1])     \
-        : "a" (a_gpr)         \
-       : "memory", "cc",      \
-         "3", "4", "5", "6"   \
-    );                        \
-                              \
-    return PrepareAndDispatch(this, n, a_gpr, a_fpr, a_ov); \
-}
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp	(revision 101813)
+++ 	(revision )
@@ -1,224 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-static nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, 
-                   PRUint64* a_gpr, PRUint64 *a_fpr, PRUint64 *a_ov)
-{
-#define PARAM_BUFFER_COUNT     16
-
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    PRUint32 gpr = 1, fpr = 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 (gpr < 5)
-                dp->val.p = (void*) *a_gpr++, gpr++;
-            else
-                dp->val.p = (void*) *a_ov++;
-            continue;
-        }
-        // else
-        switch(type)
-        {
-        case nsXPTType::T_I8     : 
-            if (gpr < 5)
-                dp->val.i8  = *((PRInt64*) a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.i8  = *((PRInt64*) a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_I16    : 
-            if (gpr < 5)
-                dp->val.i16 = *((PRInt64*) a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.i16 = *((PRInt64*) a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_I32    : 
-            if (gpr < 5)
-                dp->val.i32 = *((PRInt64*) a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.i32 = *((PRInt64*) a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_I64    : 
-            if (gpr < 5)
-                dp->val.i64 = *((PRInt64*) a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.i64 = *((PRInt64*) a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_U8     : 
-            if (gpr < 5)
-                dp->val.u8  = *((PRUint64*)a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.u8  = *((PRUint64*)a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_U16    : 
-            if (gpr < 5)
-                dp->val.u16 = *((PRUint64*)a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.u16 = *((PRUint64*)a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_U32    : 
-            if (gpr < 5)
-                dp->val.u32 = *((PRUint64*)a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.u32 = *((PRUint64*)a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_U64    : 
-            if (gpr < 5)
-                dp->val.u64 = *((PRUint64*)a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.u64 = *((PRUint64*)a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_FLOAT  : 
-            if (fpr < 4)
-                dp->val.f   = *((float*)   a_fpr), a_fpr++, fpr++;
-            else
-                dp->val.f   = *(((float*)  a_ov )+1), a_ov++;
-            break;
-        case nsXPTType::T_DOUBLE : 
-            if (fpr < 4)
-                dp->val.d   = *((double*)  a_fpr), a_fpr++, fpr++;
-            else
-                dp->val.d   = *((double*)  a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_BOOL   : 
-            if (gpr < 5)
-                dp->val.b   = *((PRUint64*)a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.b   = *((PRUint64*)a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_CHAR   : 
-            if (gpr < 5)
-                dp->val.c   = *((PRUint64*)a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.c   = *((PRUint64*)a_ov ), a_ov++;
-            break;
-        case nsXPTType::T_WCHAR  : 
-            if (gpr < 5)
-                dp->val.wc  = *((PRUint64*)a_gpr), a_gpr++, gpr++;
-            else
-                dp->val.wc  = *((PRUint64*)a_ov ), a_ov++;
-            break;
-        default:
-            NS_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-#define STUB_ENTRY(n) \
-nsresult nsXPTCStubBase::Stub##n() \
-{                             \
-    PRUint64 a_gpr[4];        \
-    PRUint64 a_fpr[4];        \
-    PRUint64 *a_ov;           \
-                              \
-    __asm__ __volatile__      \
-    (                         \
-        "lg     %0,0(15)\n\t" \
-        "aghi   %0,160\n\t"   \
-        "stmg   3,6,0(%5)\n\t"\
-        "std    0,%1\n\t"     \
-        "std    2,%2\n\t"     \
-        "std    4,%3\n\t"     \
-        "std    6,%4\n\t"     \
-        : "=&a" (a_ov),       \
-          "=m" (a_fpr[0]),    \
-          "=m" (a_fpr[1]),    \
-          "=m" (a_fpr[2]),    \
-          "=m" (a_fpr[3])     \
-        : "a" (a_gpr)         \
-       : "memory", "cc",      \
-         "3", "4", "5", "6"   \
-    );                        \
-                              \
-    return PrepareAndDispatch(this, n, a_gpr, a_fpr, a_ov); \
-}
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp	(revision 101813)
+++ 	(revision )
@@ -1,131 +1,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * Version: MPL 1.1
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corp, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2001
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Stuart Parmenter <pavlov@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xptcprivate.h"
-
-/*
- * This is for MIPS O32 ABI
- * Args contains a0-3 and then the stack.
- * Because a0 is 'this', we want to skip it
- */
-extern "C" nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args)
-{
-    args++; // always skip over a0
-
-#define PARAM_BUFFER_COUNT		16
-
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    PRUint32* 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;
-        }
-
-        dp->val.p = (void*) *ap;
-
-        switch(type)
-        {
-        case nsXPTType::T_I64   :
-            if ((PRWord)ap & 4) ap++;
-            dp->val.i64 = *((PRInt64*) ap); ap++;
-            break;
-        case nsXPTType::T_U64   :
-            if ((PRWord)ap & 4) ap++;
-            dp->val.u64 = *((PRInt64*) ap); ap++;
-            break;
-        case nsXPTType::T_DOUBLE:
-            if ((PRWord)ap & 4) ap++;
-            dp->val.d   = *((double*) ap);  ap++;
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-#define STUB_ENTRY(n) // done in the .s file
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp	(revision 101813)
+++ 	(revision )
@@ -1,147 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-#if !defined(__NetBSD__) || !defined(__m68k__)
-#error This code is for NetBSD/m68k only
-#endif
-
-extern "C" {
-    static nsresult
-    PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args)
-    {
-#define PARAM_BUFFER_COUNT     16
-
-        nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-        nsXPTCMiniVariant* dispatchParams = NULL;
-        nsIInterfaceInfo* iface_info = NULL;
-        const nsXPTMethodInfo* info;
-        PRUint8 paramCount;
-        PRUint8 i;
-        nsresult result = NS_ERROR_FAILURE;
-
-        NS_ASSERTION(self,"no self");
-
-        self->GetInterfaceInfo(&iface_info);
-        NS_ASSERTION(iface_info,"no interface info");
-
-        iface_info->GetMethodInfo(PRUint16(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");
-
-        PRUint32* 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;
-            }
-
-            switch(type)
-            {
-            // the 8 and 16 bit types will have been promoted to 32 bits before
-            // being pushed onto the stack. Since the 68k is big endian, we
-            // need to skip over the leading high order bytes.
-            case nsXPTType::T_I8     : dp->val.i8  = *(((PRInt8*) ap) + 3);  break;
-            case nsXPTType::T_I16    : dp->val.i16 = *(((PRInt16*) ap) + 1); break;
-            case nsXPTType::T_I32    : dp->val.i32 = *((PRInt32*) ap);       break;
-            case nsXPTType::T_I64    : dp->val.i64 = *((PRInt64*) ap); ap++; break;
-            case nsXPTType::T_U8     : dp->val.u8  = *(((PRUint8*) ap) + 3); break;
-            case nsXPTType::T_U16    : dp->val.u16 = *(((PRUint16*)ap) + 1); break;
-            case nsXPTType::T_U32    : dp->val.u32 = *((PRUint32*)ap);       break;
-            case nsXPTType::T_U64    : dp->val.u64 = *((PRUint64*)ap); ap++; break;
-            case nsXPTType::T_FLOAT  : dp->val.f   = *((float*)   ap);       break;
-            case nsXPTType::T_DOUBLE : dp->val.d   = *((double*)  ap); ap++; break;
-            case nsXPTType::T_BOOL   : dp->val.b   = *((PRBool*)  ap);       break;
-            case nsXPTType::T_CHAR   : dp->val.c   = *(((char*)   ap) + 3);  break;
-            // wchar_t is an int (32 bits) on NetBSD
-            case nsXPTType::T_WCHAR  : dp->val.wc  = *((wchar_t*) ap);       break;
-            default:
-                NS_ASSERTION(0, "bad type");
-                break;
-            }
-        }
-
-        result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-        NS_RELEASE(iface_info);
-
-        if(dispatchParams != paramBuffer)
-            delete [] dispatchParams;
-
-        return result;
-    }
-}
-
-#define STUB_ENTRY(n)							\
-__asm__(								\
-    ".global	_Stub"#n"__14nsXPTCStubBase\n\t"			\
-"_Stub"#n"__14nsXPTCStubBase:\n\t"					\
-    "link  a6,#0			\n\t"				\
-    "lea   a6@(12), a0			\n\t"	/* pointer to args */	\
-    "movl  a0, sp@-			\n\t"				\
-    "movl  #"#n", sp@-			\n\t"	/* method index */	\
-    "movl  a6@(8), sp@-			\n\t"	/* this */		\
-    "jbsr  _PrepareAndDispatch		\n\t"				\
-    "unlk  a6				\n\t"				\
-    "rts				\n\t"				\
-);
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_openvms_alpha.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_openvms_alpha.cpp	(revision 101813)
+++ 	(revision )
@@ -1,147 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-extern "C" {
-
-nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
-{
-    const PRUint8 PARAM_BUFFER_COUNT = 16;
-    const PRUint8 NUM_ARG_REGS = 6-1;        // -1 for "this" pointer
-
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    // args[0] to args[NUM_ARG_REGS] hold floating point register values
-    PRUint64* ap = args + NUM_ARG_REGS;
-    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  = (PRInt8)    *ap; break;
-        case nsXPTType::T_I16    : dp->val.i16 = (PRInt16)   *ap; break;
-        case nsXPTType::T_I32    : dp->val.i32 = (PRInt32)   *ap; break;
-        case nsXPTType::T_I64    : dp->val.i64 = (PRInt64)   *ap; break;
-        case nsXPTType::T_U8     : dp->val.u8  = (PRUint8)   *ap; break;
-        case nsXPTType::T_U16    : dp->val.u16 = (PRUint16)  *ap; break;
-        case nsXPTType::T_U32    : dp->val.u32 = (PRUint32)  *ap; break;
-        case nsXPTType::T_U64    : dp->val.u64 = (PRUint64)  *ap; break;
-        case nsXPTType::T_FLOAT  :
-            if(i < NUM_ARG_REGS)
-            {
-                // floats passed via registers are stored as doubles
-                // in the first NUM_ARG_REGS entries in args
-                dp->val.u64 = (PRUint64) args[i];
-                dp->val.f = (float) dp->val.d;    // convert double to float
-            }
-            else
-                dp->val.u32 = (PRUint32) *ap;
-            break;
-        case nsXPTType::T_DOUBLE :
-            // doubles passed via registers are also stored
-            // in the first NUM_ARG_REGS entries in args
-            dp->val.u64 = (i < NUM_ARG_REGS) ? args[i] : *ap;
-            break;
-        case nsXPTType::T_BOOL   : dp->val.b   = (PRBool)    *ap; break;
-        case nsXPTType::T_CHAR   : dp->val.c   = (char)      *ap; break;
-        case nsXPTType::T_WCHAR  : dp->val.wc  = (PRUnichar) *ap; break;
-        default:
-            NS_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-}
-
-#define STUB_ENTRY(n)  /* This is in the ASM file */
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_osf1_alpha.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_osf1_alpha.cpp	(revision 101813)
+++ 	(revision )
@@ -1,149 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-/* contributed by Glen Nakamura <glen.nakamura@usa.net> */
-
-#include "xptcprivate.h"
-
-extern "C" nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
-{
-    const PRUint8 PARAM_BUFFER_COUNT = 16;
-    const PRUint8 NUM_ARG_REGS = 6-1;        // -1 for "this" pointer
-
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    // args[0] to args[NUM_ARG_REGS] hold floating point register values
-    PRUint64* ap = args + NUM_ARG_REGS;
-    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  = (PRInt8)    *ap;    break;
-        case nsXPTType::T_I16    : dp->val.i16 = (PRInt16)   *ap;    break;
-        case nsXPTType::T_I32    : dp->val.i32 = (PRInt32)   *ap;    break;
-        case nsXPTType::T_I64    : dp->val.i64 = (PRInt64)   *ap;    break;
-        case nsXPTType::T_U8     : dp->val.u8  = (PRUint8)   *ap;    break;
-        case nsXPTType::T_U16    : dp->val.u16 = (PRUint16)  *ap;    break;
-        case nsXPTType::T_U32    : dp->val.u32 = (PRUint32)  *ap;    break;
-        case nsXPTType::T_U64    : dp->val.u64 = (PRUint64)  *ap;    break;
-        case nsXPTType::T_FLOAT  :
-            if(i < NUM_ARG_REGS)
-            {
-                // floats passed via registers are stored as doubles
-                // in the first NUM_ARG_REGS entries in args
-                dp->val.u64 = (PRUint64) args[i];
-                dp->val.f = (float) dp->val.d;    // convert double to float
-            }
-            else
-                dp->val.u32 = (PRUint32) *ap;
-            break;
-        case nsXPTType::T_DOUBLE :
-            // doubles passed via registers are also stored
-            // in the first NUM_ARG_REGS entries in args
-            dp->val.u64 = (i < NUM_ARG_REGS) ? args[i] : *ap;
-            break;
-        case nsXPTType::T_BOOL   : dp->val.b   = (PRBool)    *ap;    break;
-        case nsXPTType::T_CHAR   : dp->val.c   = (char)      *ap;    break;
-        case nsXPTType::T_WCHAR  : dp->val.wc  = (PRUnichar) *ap;    break;
-        default:
-            NS_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-/*
- * nsresult nsXPTCStubBase::Stub##n() ;\
- *  Sets arguments to registers and calls PrepareAndDispatch.
- *  This is defined in the ASM file.
- */
-#define STUB_ENTRY(n) \
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_pa32.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_pa32.cpp	(revision 101813)
+++ 	(revision )
@@ -1,176 +1,0 @@
-
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-#if _HPUX
-#error "This code is for HP-PA RISC 32 bit mode only"
-#endif
-
-extern "C" nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex,
-  PRUint32* args, PRUint32* floatargs)
-{
-
-  typedef struct {
-    uint32 hi;
-    uint32 lo;
-  } DU;
-
-#define PARAM_BUFFER_COUNT     16
-
-  nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-  nsXPTCMiniVariant* dispatchParams = NULL;
-  nsIInterfaceInfo* iface_info = NULL;
-  const nsXPTMethodInfo* info;
-  PRInt32 regwords = 1; /* self pointer is not in the variant records */
-  nsresult result = NS_ERROR_FAILURE;
-  PRUint8 paramCount;
-  PRUint8 i;
-
-  NS_ASSERTION(self,"no self");
-
-  self->GetInterfaceInfo(&iface_info);
-  NS_ASSERTION(iface_info,"no interface info");
-
-  iface_info->GetMethodInfo(PRUint16(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");
-
-  for(i = 0; i < paramCount; ++i, --args)
-  {
-    const nsXPTParamInfo& param = info->GetParam(i);
-    const nsXPTType& type = param.GetType();
-    nsXPTCMiniVariant* dp = &dispatchParams[i];
-
-    if(param.IsOut() || !type.IsArithmetic())
-    {
-      dp->val.p = (void*) *args;
-      ++regwords;
-      continue;
-    }
-    switch(type)
-    {
-    case nsXPTType::T_I8     : dp->val.i8  = *((PRInt32*) args); break;
-    case nsXPTType::T_I16    : dp->val.i16 = *((PRInt32*) args); break;
-    case nsXPTType::T_I32    : dp->val.i32 = *((PRInt32*) args); break;
-    case nsXPTType::T_DOUBLE :
-                               if (regwords & 1)
-                               {
-                                 ++regwords; /* align on double word */
-                                 --args;
-                               }
-                               if (regwords == 0 || regwords == 2)
-                               {
-                                 dp->val.d=*((double*) (floatargs + regwords));
-                                 --args;
-                               }
-                               else
-                               {
-                                 dp->val.d = *((double*) --args);
-                               }
-                               regwords += 2;
-                               continue;
-    case nsXPTType::T_U64    :
-    case nsXPTType::T_I64    :
-                               if (regwords & 1)
-                               {
-                                 ++regwords; /* align on double word */
-                                 --args;
-                               }
-                               ((DU *)dp)->lo = *((PRUint32*) args);
-                               ((DU *)dp)->hi = *((PRUint32*) --args);
-                               regwords += 2;
-                               continue;
-    case nsXPTType::T_FLOAT  :
-                               if (regwords >= 4)
-                                 dp->val.f = *((float*) args);
-                               else
-                                 dp->val.f = *((float*) floatargs+4+regwords);
-                               break;
-    case nsXPTType::T_U8     : dp->val.u8  = *((PRUint32*) args); break;
-    case nsXPTType::T_U16    : dp->val.u16 = *((PRUint32*) args); break;
-    case nsXPTType::T_U32    : dp->val.u32 = *((PRUint32*) args); break;
-    case nsXPTType::T_BOOL   : dp->val.b   = *((PRBool*)   args); break;
-    case nsXPTType::T_CHAR   : dp->val.c   = *((PRUint32*) args); break;
-    case nsXPTType::T_WCHAR  : dp->val.wc  = *((PRInt32*)  args); break;
-    default:
-      NS_ASSERTION(0, "bad type");
-      break;
-    }
-    ++regwords;
-  }
-
-  result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
-
-  NS_RELEASE(iface_info);
-
-  if(dispatchParams != paramBuffer)
-    delete [] dispatchParams;
-
-  return result;
-}
-
-extern "C" int SharedStub(int);
-
-#define STUB_ENTRY(n)       \
-nsresult nsXPTCStubBase::Stub##n()  \
-{                           \
-    return SharedStub(n);   \
-}
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix.cpp	(revision 101813)
+++ 	(revision )
@@ -1,228 +1,0 @@
-/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-#if defined(AIX)
-
-/*
-        For PPC (AIX & MAC), the first 8 integral and the first 13 f.p. parameters 
-        arrive in a separate chunk of data that has been loaded from the registers. 
-        The args pointer has been set to the start of the parameters BEYOND the ones
-        arriving in registers
-*/
-extern "C" nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args, PRUint32 *gprData, double *fprData)
-{
-    typedef struct {
-        uint32 hi;
-        uint32 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 = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    PRUint32* ap = args;
-    PRUint32 iCount = 0;
-    PRUint32 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  = (PRInt8) gprData[iCount++];
-                                     else
-                                         dp->val.i8  = (PRInt8)  *ap++;
-                                     break;
-        case nsXPTType::T_I16     :  if (iCount < PARAM_GPR_COUNT)
-                                         dp->val.i16  = (PRInt16) gprData[iCount++];
-                                     else
-                                         dp->val.i16  = (PRInt16)  *ap++;
-                                     break;
-        case nsXPTType::T_I32     :  if (iCount < PARAM_GPR_COUNT)
-                                         dp->val.i32  = (PRInt32) gprData[iCount++];
-                                     else
-                                         dp->val.i32  = (PRInt32)  *ap++;
-                                     break;
-        case nsXPTType::T_I64     :  if (iCount < PARAM_GPR_COUNT)
-                                         ((DU *)dp)->hi  = (PRInt32) gprData[iCount++];
-                                     else
-                                         ((DU *)dp)->hi  = (PRInt32)  *ap++;
-                                     if (iCount < PARAM_GPR_COUNT)
-                                         ((DU *)dp)->lo  = (PRUint32) gprData[iCount++];
-                                     else
-                                         ((DU *)dp)->lo  = (PRUint32)  *ap++;
-                                     break;
-        case nsXPTType::T_U8      :  if (iCount < PARAM_GPR_COUNT)
-                                         dp->val.u8  = (PRUint8) gprData[iCount++];
-                                     else
-                                         dp->val.u8  = (PRUint8)  *ap++;
-                                     break;
-        case nsXPTType::T_U16     :  if (iCount < PARAM_GPR_COUNT)
-                                         dp->val.u16  = (PRUint16) gprData[iCount++];
-                                     else
-                                         dp->val.u16  = (PRUint16)  *ap++;
-                                     break;
-        case nsXPTType::T_U32     :  if (iCount < PARAM_GPR_COUNT)
-                                         dp->val.u32  = (PRUint32) gprData[iCount++];
-                                     else
-                                         dp->val.u32  = (PRUint32)  *ap++;
-                                     break;
-        case nsXPTType::T_U64     :  if (iCount < PARAM_GPR_COUNT)
-                                         ((DU *)dp)->hi  = (PRUint32) gprData[iCount++];
-                                     else
-                                         ((DU *)dp)->hi  = (PRUint32)  *ap++;
-                                     if (iCount < PARAM_GPR_COUNT)
-                                         ((DU *)dp)->lo  = (PRUint32) gprData[iCount++];
-                                     else
-                                         ((DU *)dp)->lo  = (PRUint32)  *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  = (PRBool) gprData[iCount++];
-                                     else
-                                         dp->val.b  = (PRBool)  *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_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-extern "C" int SharedStub(int);
-
-#define STUB_ENTRY(n)                \
-nsresult nsXPTCStubBase::Stub##n()   \
-{                                    \
-    return SharedStub(n);	     \
-}                                    \
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
-#endif /* AIX */
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix64.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix64.cpp	(revision 101813)
+++ 	(revision )
@@ -1,215 +1,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/LGPL 2.1/GPL 2.0
- *
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is IBM Corporation.
- * Portions created by IBM are
- *   Copyright (C) 2002, International Business Machines Corporation.
- *   All Rights Reserved.
- *
- * Contributor(s):
- *
- *  Alternatively, the contents of this file may be used under the terms of
- *  either of the GNU General Public License Version 2 or later (the "GPL"),
- *  or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- *  in which case the provisions of the GPL or the LGPL are applicable instead
- *  of those above. If you wish to allow use of your version of this file only
- *  under the terms of either the GPL or the LGPL, and not to allow others to
- *  use your version of this file under the terms of the MPL, indicate your
- *  decision by deleting the provisions above and replace them with the notice
- *  and other provisions required by the LGPL or the GPL. If you do not delete
- *  the provisions above, a recipient may use your version of this file under
- *  the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-#if defined(AIX)
-
-/*
-        For PPC (AIX & MAC), the first 8 integral and the first 13 f.p. parameters 
-        arrive in a separate chunk of data that has been loaded from the registers. 
-        The args pointer has been set to the start of the parameters BEYOND the ones
-        arriving in registers
-*/
-extern "C" nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args, PRUint64 *gprData, double *fprData)
-{
-
-#define PARAM_BUFFER_COUNT     16
-#define PARAM_GPR_COUNT         7  
-
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    PRUint64* ap = args;
-    PRUint32 iCount = 0;
-    PRUint32 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  = (PRInt8) gprData[iCount++];
-                                     else
-                                         dp->val.i8  = (PRInt8)  *ap++;
-                                     break;
-        case nsXPTType::T_I16     :  if (iCount < PARAM_GPR_COUNT)
-                                         dp->val.i16  = (PRInt16) gprData[iCount++];
-                                     else
-                                         dp->val.i16  = (PRInt16)  *ap++;
-                                     break;
-        case nsXPTType::T_I32     :  if (iCount < PARAM_GPR_COUNT)
-                                         dp->val.i32  = (PRInt32) gprData[iCount++];
-                                     else
-                                         dp->val.i32  = (PRInt32)  *ap++;
-                                     break;
-        case nsXPTType::T_I64     :  if (iCount < PARAM_GPR_COUNT)
-                                         dp->val.i64  = (PRInt64) gprData[iCount++];
-                                     else
-                                         dp->val.i64  = (PRInt64) *ap++;
-                                     break;
-        case nsXPTType::T_U8      :  if (iCount < PARAM_GPR_COUNT)
-                                         dp->val.u8  = (PRUint8) gprData[iCount++];
-                                     else
-                                         dp->val.u8  = (PRUint8)  *ap++;
-                                     break;
-        case nsXPTType::T_U16     :  if (iCount < PARAM_GPR_COUNT)
-                                         dp->val.u16  = (PRUint16) gprData[iCount++];
-                                     else
-                                         dp->val.u16  = (PRUint16)  *ap++;
-                                     break;
-        case nsXPTType::T_U32     :  if (iCount < PARAM_GPR_COUNT)
-                                         dp->val.u32  = (PRUint32) gprData[iCount++];
-                                     else
-                                         dp->val.u32  = (PRUint32)  *ap++;
-                                     break;
-        case nsXPTType::T_U64     :  if (iCount < PARAM_GPR_COUNT)
-                                         dp->val.u64  = (PRUint64) gprData[iCount++];
-                                     else
-                                         dp->val.u64  = (PRUint64)  *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  = (PRBool) gprData[iCount++];
-                                     else
-                                         dp->val.b  = (PRBool)  *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_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-extern "C" int SharedStub(int);
-
-#define STUB_ENTRY(n)                \
-nsresult nsXPTCStubBase::Stub##n()   \
-{                                    \
-    return SharedStub(n);	     \
-}                                    \
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
-#endif /* AIX */
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_linux.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_linux.cpp	(revision 101813)
+++ 	(revision )
@@ -1,253 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
- *   beard@netscape.com (Patrick Beard)
- *   waterson@netscape.com (Chris Waterson)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-// Implement shared vtbl methods.
-
-#include "xptcprivate.h"
-
-// The Linux/PPC ABI (aka PPC/SYSV ABI) passes the first 8 integral
-// parameters and the first 8 floating point parameters in registers
-// (r3-r10 and f1-f8), no stack space is allocated for these by the
-// caller.  The rest of the parameters are passed in the callers stack
-// area. The stack pointer has to retain 16-byte alignment, longlongs
-// and doubles are aligned on 8-byte boundaries.
-
-#define PARAM_BUFFER_COUNT     16
-#define GPR_COUNT               8
-#define FPR_COUNT               8
-
-// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
-//
-// - 'args[]' contains the arguments passed on stack
-// - 'gprData[]' contains the arguments passed in integer registers
-// - 'fprData[]' 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
-PrepareAndDispatch(nsXPTCStubBase* self,
-                   PRUint32 methodIndex,
-                   PRUint32* args,
-                   PRUint32 *gprData,
-                   double *fprData)
-{
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint32 paramCount;
-    PRUint32 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-    if (! iface_info)
-        return NS_ERROR_UNEXPECTED;
-
-    iface_info->GetMethodInfo(PRUint16(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;
-
-    PRUint32* ap = args;
-    PRUint32 gpr = 1;    // skip one GPR register
-    PRUint32 fpr = 0;
-    PRUint32 tempu32;
-    PRUint64 tempu64;
-
-    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 (fpr < FPR_COUNT)
-                dp->val.d = fprData[fpr++];
-            else {
-                if ((PRUint32) ap & 4) ap++; // doubles are 8-byte aligned on stack
-                dp->val.d = *(double*) ap;
-                ap += 2;
-            }
-            continue;
-        }
-        else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
-            if (fpr < FPR_COUNT)
-                dp->val.f = (float) fprData[fpr++]; // in registers floats are passed as doubles
-            else
-                dp->val.f = *(float*) ap++;
-            continue;
-        }
-        else if (!param.IsOut() && (type == nsXPTType::T_I64
-                                    || type == nsXPTType::T_U64)) {
-            if (gpr & 1) gpr++; // longlongs are aligned in odd/even register pairs, eg. r5/r6
-            if ((gpr + 1) < GPR_COUNT) {
-                tempu64 = *(PRUint64*) &gprData[gpr];
-                gpr += 2;
-            }
-            else {
-                if ((PRUint32) ap & 4) ap++; // longlongs are 8-byte aligned on stack
-                tempu64 = *(PRUint64*) ap;
-                ap += 2;
-            }
-        }
-        else {
-            if (gpr < GPR_COUNT)
-                tempu32 = gprData[gpr++];
-            else
-                tempu32 = *ap++;
-        }
-
-        if(param.IsOut() || !type.IsArithmetic()) {
-            dp->val.p = (void*) tempu32;
-            continue;
-        }
-
-        switch(type) {
-        case nsXPTType::T_I8:      dp->val.i8  = (PRInt8)   tempu32; break;
-        case nsXPTType::T_I16:     dp->val.i16 = (PRInt16)  tempu32; break;
-        case nsXPTType::T_I32:     dp->val.i32 = (PRInt32)  tempu32; break;
-        case nsXPTType::T_I64:     dp->val.i64 = (PRInt64)  tempu64; break;
-        case nsXPTType::T_U8:      dp->val.u8  = (PRUint8)  tempu32; break;
-        case nsXPTType::T_U16:     dp->val.u16 = (PRUint16) tempu32; break;
-        case nsXPTType::T_U32:     dp->val.u32 = (PRUint32) tempu32; break;
-        case nsXPTType::T_U64:     dp->val.u64 = (PRUint64) tempu64; break;
-        case nsXPTType::T_BOOL:    dp->val.b   = (PRBool)   tempu32; break;
-        case nsXPTType::T_CHAR:    dp->val.c   = (char)     tempu32; break;
-        case nsXPTType::T_WCHAR:   dp->val.wc  = (wchar_t)  tempu32; break;
-
-        default:
-            NS_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if (dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-// Load r11 with the constant 'n' and branch to SharedStub().
-//
-// XXX Yes, it's ugly that we're relying on gcc's name-mangling here;
-// however, it's quick, dirty, and'll break when the ABI changes on
-// us, which is what we want ;-).
-
-#if __GXX_ABI_VERSION < 100
-// gcc-2 version
-# define STUB_ENTRY(n)                                       \
-__asm__ (                                                   \
-        ".section \".text\" \n\t"                           \
-        ".align 2 \n\t"                                     \
-	".globl  Stub"#n"__14nsXPTCStubBase \n\t"           \
-	".type   Stub"#n"__14nsXPTCStubBase,@function \n\n" \
-                                                            \
-"Stub"#n"__14nsXPTCStubBase: \n\t"                          \
-	"li     11,"#n" \n\t"                               \
-	"b      SharedStub@local \n"                        \
-);
-#else
-// gcc-3 version
-//
-// As G++3 ABI contains the length of the functionname in the mangled
-// name, it is difficult to get a generic assembler mechanism like
-// in the G++ 2.95 case.
-// Create names would be like:
-// _ZN14nsXPTCStubBase5Stub1Ev
-// _ZN14nsXPTCStubBase6Stub12Ev
-// _ZN14nsXPTCStubBase7Stub123Ev
-// _ZN14nsXPTCStubBase8Stub1234Ev
-// etc.
-// Use assembler directives to get the names right...
-
-# define STUB_ENTRY(n)							\
-__asm__ (								\
-	".align	2 \n\t"							\
-	".if	"#n" < 10 \n\t"						\
-	".globl	_ZN14nsXPTCStubBase5Stub"#n"Ev \n\t"			\
-	".type	_ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n"		\
-"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t"					\
-									\
-	".elseif "#n" < 100 \n\t"					\
-	".globl	_ZN14nsXPTCStubBase6Stub"#n"Ev \n\t"			\
-	".type	_ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n"		\
-"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t"					\
-									\
-	".elseif "#n" < 1000 \n\t"					\
-	".globl	_ZN14nsXPTCStubBase7Stub"#n"Ev \n\t"			\
-	".type	_ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n"		\
-"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t"					\
-									\
-	".else \n\t"							\
-	".err	\"stub number "#n" >= 1000 not yet supported\"\n"	\
-	".endif \n\t"							\
-									\
-	"li	11,"#n" \n\t"						\
-	"b	SharedStub@local \n"					\
-);
-#endif
-
-#define SENTINEL_ENTRY(n)                            \
-nsresult nsXPTCStubBase::Sentinel##n()               \
-{                                                    \
-  NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-  return NS_ERROR_NOT_IMPLEMENTED;                   \
-}
-
-#include "xptcstubsdef.inc"
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp	(revision 101813)
+++ 	(revision )
@@ -1,217 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
- *   beard@netscape.com (Patrick Beard)
- *   waterson@netscape.com (Chris Waterson)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-// Implement shared vtbl methods.
-
-#include "xptcprivate.h"
-
-// The Linux/PPC ABI (aka PPC/SYSV ABI) passes the first 8 integral
-// parameters and the first 8 floating point parameters in registers
-// (r3-r10 and f1-f8), no stack space is allocated for these by the
-// caller.  The rest of the parameters are passed in the callers stack
-// area. The stack pointer has to retain 16-byte alignment, longlongs
-// and doubles are aligned on 8-byte boundaries.
-
-#define PARAM_BUFFER_COUNT     16
-#define GPR_COUNT               8
-#define FPR_COUNT               8
-
-// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
-//
-// - 'args[]' contains the arguments passed on stack
-// - 'gprData[]' contains the arguments passed in integer registers
-// - 'fprData[]' 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
-PrepareAndDispatch(nsXPTCStubBase* self,
-                   PRUint32 methodIndex,
-                   PRUint32* args,
-                   PRUint32 *gprData,
-                   double *fprData)
-{
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint32 paramCount;
-    PRUint32 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-    if (! iface_info)
-        return NS_ERROR_UNEXPECTED;
-
-    iface_info->GetMethodInfo(PRUint16(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;
-
-    PRUint32* ap = args;
-    PRUint32 gpr = 1;    // skip one GPR register
-    PRUint32 fpr = 0;
-    PRUint32 tempu32;
-    PRUint64 tempu64;
-
-    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 (fpr < FPR_COUNT)
-                dp->val.d = fprData[fpr++];
-            else {
-                if ((PRUint32) ap & 4) ap++; // doubles are 8-byte aligned on stack
-                dp->val.d = *(double*) ap;
-                ap += 2;
-		if (gpr < GPR_COUNT)
-		    gpr += 2;
-            }
-            continue;
-        }
-        else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
-            if (fpr < FPR_COUNT)
-                dp->val.f = (float) fprData[fpr++]; // in registers floats are passed as doubles
-            else {
-                dp->val.f = *(float*) ap;
-		ap += 1;
-		if (gpr < GPR_COUNT)
-		    gpr += 1;
-            }
-            continue;
-        }
-        else if (!param.IsOut() && (type == nsXPTType::T_I64
-                                    || type == nsXPTType::T_U64)) {
-            if (gpr & 1) gpr++; // longlongs are aligned in odd/even register pairs, eg. r5/r6
-            if ((gpr + 1) < GPR_COUNT) {
-                tempu64 = *(PRUint64*) &gprData[gpr];
-                gpr += 2;
-            }
-            else {
-                if ((PRUint32) ap & 4) ap++; // longlongs are 8-byte aligned on stack
-                tempu64 = *(PRUint64*) ap;
-                ap += 2;
-            }
-        }
-        else {
-            if (gpr < GPR_COUNT)
-                tempu32 = gprData[gpr++];
-            else
-                tempu32 = *ap++;
-        }
-
-        if(param.IsOut() || !type.IsArithmetic()) {
-            dp->val.p = (void*) tempu32;
-            continue;
-        }
-
-        switch(type) {
-        case nsXPTType::T_I8:      dp->val.i8  = (PRInt8)   tempu32; break;
-        case nsXPTType::T_I16:     dp->val.i16 = (PRInt16)  tempu32; break;
-        case nsXPTType::T_I32:     dp->val.i32 = (PRInt32)  tempu32; break;
-        case nsXPTType::T_I64:     dp->val.i64 = (PRInt64)  tempu64; break;
-        case nsXPTType::T_U8:      dp->val.u8  = (PRUint8)  tempu32; break;
-        case nsXPTType::T_U16:     dp->val.u16 = (PRUint16) tempu32; break;
-        case nsXPTType::T_U32:     dp->val.u32 = (PRUint32) tempu32; break;
-        case nsXPTType::T_U64:     dp->val.u64 = (PRUint64) tempu64; break;
-        case nsXPTType::T_BOOL:    dp->val.b   = (PRBool)   tempu32; break;
-        case nsXPTType::T_CHAR:    dp->val.c   = (char)     tempu32; break;
-        case nsXPTType::T_WCHAR:   dp->val.wc  = (wchar_t)  tempu32; break;
-
-        default:
-            NS_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if (dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-// Load r11 with the constant 'n' and branch to SharedStub().
-//
-// XXX Yes, it's ugly that we're relying on gcc's name-mangling here;
-// however, it's quick, dirty, and'll break when the ABI changes on
-// us, which is what we want ;-).
-
-#define STUB_ENTRY(n)                                       \
-__asm__ (                                                   \
-        ".section \".text\" \n\t"                           \
-        ".align 2 \n\t"                                     \
-	".globl  Stub"#n"__14nsXPTCStubBase \n\t"           \
-	".type   Stub"#n"__14nsXPTCStubBase,@function \n\n" \
-                                                            \
-"Stub"#n"__14nsXPTCStubBase: \n\t"                          \
-	"li     11,"#n" \n\t"                               \
-	"b      SharedStub@local \n"                        \
-);
-
-#define SENTINEL_ENTRY(n)                            \
-nsresult nsXPTCStubBase::Sentinel##n()               \
-{                                                    \
-  NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-  return NS_ERROR_NOT_IMPLEMENTED;                   \
-}
-
-#include "xptcstubsdef.inc"
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_rhapsody.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_rhapsody.cpp	(revision 101813)
+++ 	(revision )
@@ -1,254 +1,0 @@
-/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-/*
-	For 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
-PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args, PRUint32 *gprData, double *fprData)
-{
-#define PARAM_BUFFER_COUNT     16
-#define PARAM_GPR_COUNT			7
-
-  // fprintf(stderr, "PrepareAndDispatch %p, %d, %p, %p, %p\n", self, methodIndex, args, gprData, fprData);
-
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    PRUint32* ap = args;
-    PRUint32 iCount = 0;
-    PRUint32 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  = (PRInt8) gprData[iCount++];
-        							else
-        								dp->val.i8  = (PRInt8)  *ap++;
-        							break;
-        case nsXPTType::T_I16     :  if (iCount < PARAM_GPR_COUNT)
-        								dp->val.i16  = (PRInt16) gprData[iCount++];
-        							else
-        								dp->val.i16  = (PRInt16)  *ap++;
-        							break;
-        case nsXPTType::T_I32     :  if (iCount < PARAM_GPR_COUNT)
-        								dp->val.i32  = (PRInt32) gprData[iCount++];
-        							else
-        								dp->val.i32  = (PRInt32)  *ap++;
-        							break;
-
-        case nsXPTType::T_I64     :
-          {
-            PRUint64 tempu64;
-            if (iCount & 1) iCount++; // longlongs are aligned in odd/even register pairs, eg. r5/r6
-            if ((iCount + 1) < PARAM_GPR_COUNT) {
-              tempu64 = *(PRUint64*) &gprData[iCount];
-              iCount += 2;
-            }
-            else {
-              if ((PRUint32) ap & 4) ap++; // longlongs are 8-byte aligned on stack
-              tempu64 = *(PRUint64*) ap;
-              ap += 2;
-            }
-            dp->val.i64 = (PRUint64)tempu64;
-          }
-          break;
-
-#if 0
-        case nsXPTType::T_I64     :  if (iCount < PARAM_GPR_COUNT)
-        								dp->val.i64.hi  = (PRInt32) gprData[iCount++];
-        							else
-        								dp->val.i64.hi  = (PRInt32)  *ap++;
-        							if (iCount < PARAM_GPR_COUNT)
-        								dp->val.i64.lo  = (PRUint32) gprData[iCount++];
-        							else
-        								dp->val.i64.lo  = (PRUint32)  *ap++;
-        							break;
-#endif
-        case nsXPTType::T_U8     :  if (iCount < PARAM_GPR_COUNT)
-        								dp->val.i8  = (PRUint8) gprData[iCount++];
-        							else
-        								dp->val.i8  = (PRUint8)  *ap++;
-        							break;
-        case nsXPTType::T_U16     :  if (iCount < PARAM_GPR_COUNT)
-        								dp->val.i16  = (PRUint16) gprData[iCount++];
-        							else
-        								dp->val.i16  = (PRUint16)  *ap++;
-        							break;
-        case nsXPTType::T_U32     :  if (iCount < PARAM_GPR_COUNT)
-        								dp->val.i32  = (PRUint32) gprData[iCount++];
-        							else
-        								dp->val.i32  = (PRUint32)  *ap++;
-        							break;
-
-        case nsXPTType::T_U64     :
-#if 0
-          if (iCount < PARAM_GPR_COUNT)
-            dp->val.i64.hi  = (PRUint32) gprData[iCount++];
-          else
-            dp->val.i64.hi  = (PRUint32)  *ap++;
-          if (iCount < PARAM_GPR_COUNT)
-            dp->val.i64.lo  = (PRUint32) gprData[iCount++];
-          else
-            dp->val.i64.lo  = (PRUint32)  *ap++;
-#endif
-          {
-            PRUint64 tempu64;
-            if (iCount & 1) iCount++; // longlongs are aligned in odd/even register pairs, eg. r5/r6
-            if ((iCount + 1) < PARAM_GPR_COUNT) {
-              tempu64 = *(PRUint64*) &gprData[iCount];
-              iCount += 2;
-            }
-            else {
-              if ((PRUint32) ap & 4) ap++; // longlongs are 8-byte aligned on stack
-              tempu64 = *(PRUint64*) ap;
-              ap += 2;
-            }
-            dp->val.i64 = (PRUint64)tempu64;
-          }
-          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  = (PRBool) gprData[iCount++];
-        							else
-        								dp->val.b  = (PRBool)  *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_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-
-#define STUB_ENTRY(n)
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-
-#include "xptcstubsdef.inc"
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_netbsd.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_netbsd.cpp	(revision 101813)
+++ 	(revision )
@@ -1,146 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-#if defined(sparc) || defined(__sparc__)
-
-extern "C" nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args)
-{
-
-    typedef struct {
-        uint32 hi;
-        uint32 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 = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    PRUint32* 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  = *((PRInt32*)  ap);       break;
-        case nsXPTType::T_I16    : dp->val.i16 = *((PRInt32*) ap);       break;
-        case nsXPTType::T_I32    : dp->val.i32 = *((PRInt32*) 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  = *((PRUint32*) ap);       break;
-        case nsXPTType::T_U16    : dp->val.u16 = *((PRUint32*)ap);       break;
-        case nsXPTType::T_U32    : dp->val.u32 = *((PRUint32*)ap);       break;
-        case nsXPTType::T_FLOAT  : dp->val.f   = *((float*)   ap);       break;
-        case nsXPTType::T_BOOL   : dp->val.b   = *((PRBool*)  ap);       break;
-        case nsXPTType::T_CHAR   : dp->val.c   = *((PRUint32*) ap);       break;
-        case nsXPTType::T_WCHAR  : dp->val.wc  = *((PRInt32*) ap);       break;
-        default:
-            NS_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-extern "C" int 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_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
-#endif /* sparc || __sparc__ */
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_solaris.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_solaris.cpp	(revision 101813)
+++ 	(revision )
@@ -1,146 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-#if defined(sparc) || defined(__sparc__)
-
-extern "C" nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args)
-{
-
-    typedef struct {
-        uint32 hi;
-        uint32 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 = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    PRUint32* 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  = *((PRInt32*)  ap);       break;
-        case nsXPTType::T_I16    : dp->val.i16 = *((PRInt32*) ap);       break;
-        case nsXPTType::T_I32    : dp->val.i32 = *((PRInt32*) 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  = *((PRUint32*) ap);       break;
-        case nsXPTType::T_U16    : dp->val.u16 = *((PRUint32*)ap);       break;
-        case nsXPTType::T_U32    : dp->val.u32 = *((PRUint32*)ap);       break;
-        case nsXPTType::T_FLOAT  : dp->val.f   = *((float*)   ap);       break;
-        case nsXPTType::T_BOOL   : dp->val.b   = *((PRBool*)  ap);       break;
-        case nsXPTType::T_CHAR   : dp->val.c   = *((PRUint32*) ap);       break;
-        case nsXPTType::T_WCHAR  : dp->val.wc  = *((PRInt32*) ap);       break;
-        default:
-            NS_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-extern "C" int 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_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
-#endif /* sparc || __sparc__ */
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparcv9_solaris.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparcv9_solaris.cpp	(revision 101813)
+++ 	(revision )
@@ -1,139 +1,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2001
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Stuart Parmenter <pavlov@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-#if defined(sparc) || defined(__sparc__)
-
-extern "C" nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args)
-{
-
-#define PARAM_BUFFER_COUNT     16
-
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(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");
-
-    PRUint64* 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  = *((PRInt32*)  ap);      break;
-        case nsXPTType::T_I16    : dp->val.i16 = *((PRInt32*) ap);       break;
-        case nsXPTType::T_I32    : dp->val.i32 = *((PRInt32*) ap);       break;
-        case nsXPTType::T_DOUBLE : dp->val.d   = *((double*) ap);        break;
-        case nsXPTType::T_U64    : dp->val.u64 = *((PRUint64*) ap);      break;
-        case nsXPTType::T_I64    : dp->val.i64 = *((PRInt64*) ap);       break;
-        case nsXPTType::T_U8     : dp->val.u8  = *((PRUint32*) ap);      break;
-        case nsXPTType::T_U16    : dp->val.u16 = *((PRUint32*)ap);       break;
-        case nsXPTType::T_U32    : dp->val.u32 = *((PRUint32*)ap);       break;
-        case nsXPTType::T_FLOAT  : dp->val.f   = *((float*)   ap);       break;
-        case nsXPTType::T_BOOL   : dp->val.b   = *((PRBool*)  ap);       break;
-        case nsXPTType::T_CHAR   : dp->val.c   = *((PRUint32*) ap);      break;
-        case nsXPTType::T_WCHAR  : dp->val.wc  = *((PRInt32*) ap);       break;
-        default:
-            NS_ASSERTION(0, "bad type");
-            break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-extern "C" int 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_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
-
-#endif /* sparc || __sparc__ */
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp	(revision 101813)
+++ 	(revision )
@@ -1,188 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-#include "xptc_platforms_unixish_x86.h"
-/*#include "xptiprivate.h"*/
-
-static nsresult
-PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
-{
-#define PARAM_BUFFER_COUNT     16
-
-    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
-    const nsXPTMethodInfo* info = NULL;
-    PRUint8 paramCount;
-    PRUint8 i;
-    nsresult result = NS_ERROR_FAILURE;
-
-    NS_ASSERTION(self,"no self");
-
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-    if (!iface_info)
-        return NS_ERROR_UNEXPECTED;
-
-    iface_info->GetMethodInfo(PRUint16(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;
-
-    PRUint32* 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 = *((PRInt64*) ap); ap++; break;
-        case nsXPTType::T_U64    : dp->val.u64 = *((PRUint64*)ap); ap++; break;
-        case nsXPTType::T_DOUBLE : dp->val.d   = *((double*)  ap); ap++; break;
-        }
-    }
-
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
-
-    if(dispatchParams != paramBuffer)
-        delete [] dispatchParams;
-
-    return result;
-}
-
-#ifdef __GNUC__         /* Gnu Compiler. */
-
-#ifdef KEEP_STACK_16_BYTE_ALIGNED
-/* Make sure the stack is 16-byte aligned.  Do that by aligning to 16 bytes and
- * then subtracting 4 so the three subsequent pushes result in a 16-byte aligned
- * stack. */
-#define ALIGN_STACK_DECL \
-  unsigned int saved_esp = 0; /* VBOX: Initialize it to shut up half a million gcc warnings on darwin. 
-                               *       ALIGN_STACK_REGS_OUT/IN are a bit bogus, so the warning is probably correct. */
-
-#define ALIGN_STACK_SAVE \
-  "movl %%esp, %3\n\t"
-
-#define ALIGN_STACK_ALIGN \
-  "addl $0x4, %%esp\n\t" \
-  "andl $0xfffffff0, %%esp\n\t" \
-  "subl $0x4, %%esp\n\t"
-
-#define STACK_RESTORE \
-  "movl %3, %%esp\n"
-
-#define ALIGN_STACK_REGS_IN \
-  , "=r"(saved_esp) /* 3 */
-
-#define ALIGN_STACK_REGS_OUT \
-  , "3"(saved_esp)
-
-#else
-#define ALIGN_STACK_DECL
-#define ALIGN_STACK_SAVE
-#define ALIGN_STACK_ALIGN
-#define STACK_RESTORE \
-  "addl $12, %%esp\n"
-#define ALIGN_STACK_REGS_IN
-#define ALIGN_STACK_REGS_OUT
-#endif
-
-#define STUB_ENTRY(n) \
-nsresult nsXPTCStubBase::Stub##n() \
-{ \
-  register nsresult (*method) (nsXPTCStubBase *, uint32, PRUint32 *) = PrepareAndDispatch; \
-  int temp0, temp1; \
-  register nsresult result; \
-  ALIGN_STACK_DECL \
-  __asm__ __volatile__( \
-    ALIGN_STACK_SAVE \
-    ALIGN_STACK_ALIGN \
-    "leal   0x0c(%%ebp), %%ecx\n\t"    /* args */ \
-    "pushl  %%ecx\n\t" \
-    "pushl  $"#n"\n\t"                 /* method index */ \
-    "movl   0x08(%%ebp), %%ecx\n\t"    /* this */ \
-    "pushl  %%ecx\n\t" \
-    "call   *%%edx\n\t"                /* PrepareAndDispatch */ \
-    STACK_RESTORE                      /* "addl $12, %%esp" or restore saved */ \
-    : "=a" (result),    /* %0 */ \
-      "=&c" (temp0),    /* %1 */ \
-      "=d" (temp1)      /* %2 */ \
-      ALIGN_STACK_REGS_IN \
-    : "2" (method)      /* %2 */ \
-      ALIGN_STACK_REGS_OUT \
-    : "memory" \
-	); \
-    return result; \
-}
-
-#else
-#error "can't find a compiler to use"
-#endif /* __GNUC__ */
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
Index: trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unsupported.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unsupported.cpp	(revision 101813)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Implement shared vtbl methods. */
-
-#include "xptcprivate.h"
-
-#define STUB_ENTRY(n) \
-nsresult nsXPTCStubBase::Stub##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Stub called on unsupported platform"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#define SENTINEL_ENTRY(n) \
-nsresult nsXPTCStubBase::Sentinel##n() \
-{ \
-    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
-    return NS_ERROR_NOT_IMPLEMENTED; \
-}
-
-#include "xptcstubsdef.inc"
