Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Oct 2009 19:06:52 GMT
From:      svn-freebsd-gecko@chruetertee.ch
To:        freebsd-gecko@freebsd.org
Subject:   [SVN-Commit] r127 - branches/experimental/www/libxul/files
Message-ID:  <200910031906.n93J6qul031255@trillian.chruetertee.ch>

next in thread | raw e-mail | index | archive | help
Author: andreast
Date: Sat Oct  3 19:06:51 2009
New Revision: 127

Log:
Fix amd64 support for libxul.

Modified:
   branches/experimental/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
   branches/experimental/www/libxul/files/patch-xptcall-amd64

Modified: branches/experimental/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
==============================================================================
--- branches/experimental/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in	Fri Oct  2 20:35:57 2009	(r126)
+++ branches/experimental/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in	Sat Oct  3 19:06:51 2009	(r127)
@@ -1,5 +1,5 @@
 --- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig	2009-08-24 17:53:28.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in	2009-09-27 21:15:47.000000000 +0200
++++ xpcom/reflect/xptcall/src/md/unix/Makefile.in	2009-10-02 22:34:36.000000000 +0200
 @@ -70,6 +70,9 @@
  ifeq (Darwin,$(OS_ARCH))
  DEFINES		+= -DKEEP_STACK_16_BYTE_ALIGNED
@@ -10,7 +10,7 @@
  endif
  endif
  #
-@@ -87,7 +90,7 @@
+@@ -87,12 +90,20 @@
  endif
  endif
  # IA64 Linux
@@ -19,7 +19,20 @@
  ifneq (,$(findstring ia64,$(OS_TEST)))
  CPPSRCS		:= xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp
  ASFILES		:= xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s
-@@ -150,9 +153,15 @@
+ endif
+ endif
++
++#
++# FreeBSD/amd64
++#
++ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDamd64)
++CPPSRCS		:= xptcinvoke_amd64_freebsd.cpp xptcstubs_amd64_freebsd.cpp
++endif
++
+ #
+ # OpenBSD/amd64
+ #
+@@ -150,9 +161,15 @@
  ASFILES		:= xptcinvoke_asm_osf1_alpha.s xptcstubs_asm_osf1_alpha.s
  endif
  #
@@ -36,7 +49,7 @@
  CPPSRCS		:= xptcinvoke_linux_alpha.cpp xptcstubs_linux_alpha.cpp
  endif
  #
-@@ -304,6 +313,14 @@
+@@ -304,6 +321,14 @@
  CXXFLAGS 	:=  $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(CXXFLAGS))
  endif
  
@@ -51,7 +64,7 @@
  #
  # Linux/PPC
  #
-@@ -385,6 +402,15 @@
+@@ -385,6 +410,15 @@
  ASFILES		:= xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s
  endif
  #

Modified: branches/experimental/www/libxul/files/patch-xptcall-amd64
==============================================================================
--- branches/experimental/www/libxul/files/patch-xptcall-amd64	Fri Oct  2 20:35:57 2009	(r126)
+++ branches/experimental/www/libxul/files/patch-xptcall-amd64	Sat Oct  3 19:06:51 2009	(r127)
@@ -1,5 +1,5 @@
---- /dev/null	Wed Dec 31 16:00:00 1969
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_freebsd.cpp	Thu Oct 16 22:59:43 2003
+--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_freebsd.cpp.orig	2009-10-02 22:13:13.000000000 +0200
++++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_freebsd.cpp	2009-10-02 22:41:36.000000000 +0200
 @@ -0,0 +1,174 @@
 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 +// Platform specific code to invoke XPCOM methods on native objects
@@ -98,8 +98,8 @@
 +}
 +
 +extern "C"
-+XPTC_PUBLIC_API(nsresult)
-+XPTC_InvokeByIndex(nsISupports * that, PRUint32 methodIndex,
++EXPORT_XPCOM_API(nsresult)
++NS_InvokeByIndex_P(nsISupports * that, PRUint32 methodIndex,
 +                   PRUint32 paramCount, nsXPTCVariant * params)
 +{
 +    PRUint32 nr_gpr, nr_fpr, nr_stack;
@@ -175,14 +175,15 @@
 +    PRUint32 result = ((Method)methodAddress)(a0, a1, a2, a3, a4, a5);
 +    return result;
 +}
---- /dev/null	Wed Dec 31 16:00:00 1969
-+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_freebsd.cpp	Thu Oct 16 23:01:08 2003
-@@ -0,0 +1,206 @@
+--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_freebsd.cpp.orig	2009-10-02 22:13:13.000000000 +0200
++++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_freebsd.cpp	2009-10-02 22:39:37.000000000 +0200
+@@ -0,0 +1,200 @@
 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 +
 +// Implement shared vtbl methods.
 +
 +#include "xptcprivate.h"
++#include "xptiprivate.h"
 +
 +// The Linux/x86-64 ABI passes the first 6 integral parameters and the
 +// first 8 floating point parameters in registers (rdi, rsi, rdx, rcx,
@@ -209,7 +210,6 @@
 +{
 +    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
 +    nsXPTCMiniVariant* dispatchParams = NULL;
-+    nsIInterfaceInfo* iface_info = NULL;
 +    const nsXPTMethodInfo* info;
 +    PRUint32 paramCount;
 +    PRUint32 i;
@@ -217,12 +217,7 @@
 +
 +    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);
++    self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
 +    NS_ASSERTION(info,"no method info");
 +    if (! info)
 +        return NS_ERROR_UNEXPECTED;
@@ -297,9 +292,8 @@
 +        }
 +    }
 +
-+    result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
-+
-+    NS_RELEASE(iface_info);
++    result = self->mOuter->CallMethod((PRUint16)methodIndex, info,
++                                      dispatchParams);
 +
 +    if (dispatchParams != paramBuffer)
 +        delete [] dispatchParams;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910031906.n93J6qul031255>